summaryrefslogtreecommitdiffhomepage
path: root/src/compat/Kbuild.include
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-02-28 01:45:14 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-03-02 16:42:29 +0100
commitc227209268ad270a5a83fb98879d0142c2298c67 (patch)
tree329d0a73291a14704776fb584f96632f770c08bd /src/compat/Kbuild.include
parent3b1eb11b525ab7538133f7f098e75c58059576aa (diff)
compat: use correct -include path
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat/Kbuild.include')
-rw-r--r--src/compat/Kbuild.include11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/compat/Kbuild.include b/src/compat/Kbuild.include
index 863cd28..94159fc 100644
--- a/src/compat/Kbuild.include
+++ b/src/compat/Kbuild.include
@@ -3,13 +3,14 @@
# Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
ifeq ($(wildcard $(src)/compat/compat.h),)
-ccflags-y += -include $(srctree)/$(src)/compat/compat.h
-asflags-y += -include $(srctree)/$(src)/compat/compat-asm.h
+cmd_include_path_prefix := $(srctree)/$(src)
else
-ccflags-y += -include $(src)/compat/compat.h
-asflags-y += -include $(src)/compat/compat-asm.h
+cmd_include_path_prefix := $(src)
endif
+ccflags-y += -include $(cmd_include_path_prefix)/compat/compat.h
+asflags-y += -include $(cmd_include_path_prefix)/compat/compat-asm.h
+
ifeq ($(wildcard $(srctree)/include/linux/ptr_ring.h),)
ccflags-y += -I$(src)/compat/ptr_ring/include
endif
@@ -42,7 +43,7 @@ wireguard-y += compat/udp_tunnel/udp_tunnel.o
endif
ifeq ($(shell grep -F "int crypto_memneq" "$(srctree)/include/crypto/algapi.h"),)
-ccflags-y += -include $(src)/compat/memneq/include.h
+ccflags-y += -include $(cmd_include_path_prefix)/compat/memneq/include.h
wireguard-y += compat/memneq/memneq.o
endif