]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/modules/if_wg/Makefile
if_wg: appease gcc
[FreeBSD/FreeBSD.git] / sys / modules / if_wg / Makefile
1 # $FreeBSD$
2
3
4 KMOD=   if_wg
5
6 INCDIR= ${SRCTOP}/sys/dev/if_wg/include
7 ZINCDIR= ${SRCTOP}/sys/dev/if_wg/module/crypto/zinc
8
9 .PATH: ${SRCTOP}/sys/dev/if_wg/module
10 .PATH: ${ZINCDIR}
11 .PATH: ${ZINCDIR}/chacha20
12 .PATH: ${ZINCDIR}/poly1305
13
14 CFLAGS+= -I${INCDIR}
15
16 CFLAGS+= -D__KERNEL__
17
18 DEBUG_FLAGS=-g
19
20 SRCS= opt_inet.h opt_inet6.h device_if.h bus_if.h ifdi_if.h
21
22 SRCS+= if_wg_session.c module.c
23 SRCS+= wg_noise.c wg_cookie.c
24 SRCS+= curve25519.c blake2s.c
25 SRCS+= chacha20poly1305.c chacha20.c poly1305.c
26
27 .if ${MACHINE_ARCH} == "amd64"
28 SRCS += poly1305-x86_64.S chacha20-x86_64.S
29 SIMD_FLAGS = -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_AVX=1 \
30         -DCONFIG_AS_AVX512=1 -DCONFIG_AS_AVX2=1
31 .endif
32 .include <bsd.kmod.mk>
33
34 .if ${MACHINE_ARCH} == "amd64"
35 CFLAGS.poly1305-x86_64.S = -D__LOCORE -gdwarf-4 ${SIMD_FLAGS}  -include ${INCDIR}/sys/support.h
36 CFLAGS.chacha20-x86_64.S = -D__LOCORE -gdwarf-4 ${SIMD_FLAGS} -include ${INCDIR}/sys/support.h
37 CFLAGS.chacha20poly1305.c = -DCONFIG_ZINC_ARCH_X86_64
38 CFLAGS.chacha20.c = -DCONFIG_ZINC_ARCH_X86_64
39 CFLAGS.poly1305.c = -DCONFIG_ZINC_ARCH_X86_64
40 .endif