aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/crypto/Kbuild.include
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-08-28 23:50:35 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2018-09-03 23:52:11 -0600
commit4a0e319af86c0d38304535293f6fc32fe436ef1d (patch)
tree6fca1e89becf3ff1afdcec7b6bc725e256af5811 /src/crypto/Kbuild.include
parentuapi: reformat (diff)
downloadwireguard-monolithic-historical-4a0e319af86c0d38304535293f6fc32fe436ef1d.tar.xz
wireguard-monolithic-historical-4a0e319af86c0d38304535293f6fc32fe436ef1d.zip
crypto: import zinc
Diffstat (limited to 'src/crypto/Kbuild.include')
-rw-r--r--src/crypto/Kbuild.include64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/crypto/Kbuild.include b/src/crypto/Kbuild.include
new file mode 100644
index 0000000..d12930d
--- /dev/null
+++ b/src/crypto/Kbuild.include
@@ -0,0 +1,64 @@
+ifeq ($(wildcard $(src)/compat/compat.h),)
+cmd_include_path_prefix := $(srctree)/$(src)
+else
+cmd_include_path_prefix := $(src)
+endif
+
+ccflags-y += -I$(src)/crypto/include
+
+wireguard-y += crypto/zinc/chacha20/chacha20.o
+ifeq ($(CONFIG_X86_64)$(CONFIG_UML),y)
+wireguard-y += crypto/zinc/chacha20/chacha20-x86_64.o
+CFLAGS_chacha20.o += -include $(cmd_include_path_prefix)/crypto/zinc/chacha20/chacha20-x86_64-glue.h
+endif
+ifeq ($(CONFIG_ARM),y)
+wireguard-y += crypto/zinc/chacha20/chacha20-arm.o
+CFLAGS_chacha20.o += -include $(cmd_include_path_prefix)/crypto/zinc/chacha20/chacha20-arm-glue.h
+endif
+ifeq ($(CONFIG_ARM64),y)
+wireguard-y += crypto/zinc/chacha20/chacha20-arm64.o
+CFLAGS_chacha20.o += -include $(cmd_include_path_prefix)/crypto/zinc/chacha20/chacha20-arm-glue.h
+endif
+ifeq ($(CONFIG_MIPS)$(CONFIG_CPU_MIPS32_R2),yy)
+wireguard-y += crypto/zinc/chacha20/chacha20-mips.o
+CFLAGS_chacha20.o += -include $(cmd_include_path_prefix)/crypto/zinc/chacha20/chacha20-mips-glue.h
+endif
+
+wireguard-y += crypto/zinc/poly1305/poly1305.o
+ifeq ($(CONFIG_X86_64)$(CONFIG_UML),y)
+wireguard-y += crypto/zinc/poly1305/poly1305-x86_64.o
+CFLAGS_poly1305.o += -include $(cmd_include_path_prefix)/crypto/zinc/poly1305/poly1305-x86_64-glue.h
+endif
+ifeq ($(CONFIG_ARM),y)
+wireguard-y += crypto/zinc/poly1305/poly1305-arm.o
+CFLAGS_poly1305.o += -include $(cmd_include_path_prefix)/crypto/zinc/poly1305/poly1305-arm-glue.h
+endif
+ifeq ($(CONFIG_ARM64),y)
+wireguard-y += crypto/zinc/poly1305/poly1305-arm64.o
+CFLAGS_poly1305.o += -include $(cmd_include_path_prefix)/crypto/zinc/poly1305/poly1305-arm-glue.h
+endif
+ifeq ($(CONFIG_MIPS)$(CONFIG_CPU_MIPS32_R2),yy)
+wireguard-y += crypto/zinc/poly1305/poly1305-mips.o
+CFLAGS_poly1305.o += -include $(cmd_include_path_prefix)/crypto/zinc/poly1305/poly1305-mips-glue.h
+endif
+ifeq ($(CONFIG_MIPS)$(CONFIG_64BIT),yy)
+wireguard-y += crypto/zinc/poly1305/poly1305-mips64.o
+CFLAGS_poly1305.o += -include $(cmd_include_path_prefix)/crypto/zinc/poly1305/poly1305-mips-glue.h
+endif
+
+wireguard-y += crypto/zinc/chacha20poly1305.o
+
+wireguard-y += crypto/zinc/curve25519/curve25519.o
+ifeq ($(CONFIG_ARM)$(CONFIG_KERNEL_MODE_NEON),yy)
+wireguard-y += crypto/zinc/curve25519/curve25519-arm.o
+CFLAGS_curve25519.o += -include $(cmd_include_path_prefix)/crypto/zinc/curve25519/curve25519-arm-glue.h
+endif
+ifeq ($(CONFIG_X86_64)$(CONFIG_UML),y)
+CFLAGS_curve25519.o += -include $(cmd_include_path_prefix)/crypto/zinc/curve25519/curve25519-x86_64-glue.h
+endif
+
+wireguard-y += crypto/zinc/blake2s/blake2s.o
+ifeq ($(CONFIG_X86_64)$(CONFIG_UML),y)
+wireguard-y += crypto/zinc/blake2s/blake2s-x86_64.o
+CFLAGS_blake2s.o += -include $(cmd_include_path_prefix)/crypto/zinc/blake2s/blake2s-x86_64-glue.h
+endif