summaryrefslogtreecommitdiffhomepage
path: root/src/crypto
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-12-16 00:50:39 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-12-18 14:41:48 +0100
commit26befc0011fd1cbdbae3d416c37cdfd24c25ea39 (patch)
tree06e1eedb7d94c07c159d8e8b65e24177a9f87d64 /src/crypto
parentc96acaaa41f70d2693660cfe626c17f8dda01e76 (diff)
makefile: use immediate expansion and use correct template patterns
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/Kbuild.include12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/crypto/Kbuild.include b/src/crypto/Kbuild.include
index e93f3af..460684d 100644
--- a/src/crypto/Kbuild.include
+++ b/src/crypto/Kbuild.include
@@ -39,13 +39,13 @@ zinc-$(CONFIG_ZINC_ARCH_ARM) += curve25519/curve25519-arm.o
quiet_cmd_perlasm = PERLASM $@
cmd_perlasm = $(PERL) $< > $@
-%.S: %.pl
- $(call cmd,perlasm)
-kbuild-dir ?= $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
-targets += $(patsubst $(kbuild-dir)/%.pl,%.S,$(wildcard $(patsubst %.o,$(kbuild-dir)/crypto/zinc/%.pl,$(zinc-y) $(zinc-m) $(zinc-))))
+$(obj)/%.S: $(src)/%.pl FORCE
+ $(call if_changed,perlasm)
+kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
+targets := $(patsubst $(kbuild-dir)/%.pl,%.S,$(wildcard $(patsubst %.o,$(kbuild-dir)/crypto/zinc/%.pl,$(zinc-y) $(zinc-m) $(zinc-))))
-# Old kernels don't have targets, so use SECONDARY manually, which requires the full path
-.SECONDARY: $(addprefix $(kbuild-dir)/,$(targets))
+# Old kernels don't set this, which causes trouble.
+.SECONDARY:
wireguard-y += $(addprefix crypto/zinc/,$(zinc-y))
ccflags-y += -I$(src)/crypto/include