diff options
-rw-r--r-- | src/compat/Kbuild.include | 11 |
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 |