1 # $FreeBSD: releng/12.0/sys/modules/crypto/Makefile 337939 2018-08-17 00:30:04Z cem $
2
3 LIBSODIUM=${SRCTOP}/sys/contrib/libsodium/src/libsodium
4
5 .PATH: ${SRCTOP}/sys/opencrypto
6 .PATH: ${SRCTOP}/sys/crypto
7 .PATH: ${SRCTOP}/sys/crypto/blowfish
8 .PATH: ${SRCTOP}/sys/crypto/camellia
9 .PATH: ${SRCTOP}/sys/crypto/des
10 .PATH: ${SRCTOP}/sys/crypto/rijndael
11 .PATH: ${SRCTOP}/sys/crypto/sha2
12 .PATH: ${SRCTOP}/sys/crypto/siphash
13 .PATH: ${SRCTOP}/sys/crypto/skein
14 .PATH: ${SRCTOP}/sys/crypto/blake2
15 .PATH: ${SRCTOP}/sys/crypto/chacha20
16 .PATH: ${SRCTOP}/sys/contrib/libb2
17 .PATH: ${LIBSODIUM}/crypto_onetimeauth/poly1305
18 .PATH: ${LIBSODIUM}/crypto_onetimeauth/poly1305/donna
19 .PATH: ${LIBSODIUM}/crypto_verify/sodium
20 .PATH: ${SRCTOP}/sys/crypto/libsodium
21
22 KMOD = crypto
23 SRCS = crypto.c cryptodev_if.c
24 SRCS += criov.c cryptosoft.c xform.c
25 SRCS += cast.c cryptodeflate.c rmd160.c rijndael-alg-fst.c rijndael-api.c rijndael-api-fst.c
26 SRCS += skipjack.c bf_enc.c bf_ecb.c bf_skey.c
27 SRCS += camellia.c camellia-api.c
28 SRCS += des_ecb.c des_enc.c des_setkey.c
29 SRCS += sha1.c sha256c.c sha512c.c
30 SRCS += skein.c skein_block.c
31 # unroll the 256 and 512 loops, half unroll the 1024
32 CFLAGS+= -DSKEIN_LOOP=995
33 .if exists(${MACHINE_ARCH}/skein_block_asm.s)
34 .PATH: ${SRCTOP}/sys/crypto/skein/${MACHINE_ARCH}
35 SRCS += skein_block_asm.s
36 CFLAGS += -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace with assembly: 256+512+1024 = 1792
37 ACFLAGS += -DELF -Wa,--noexecstack
38 # Fully unroll all loops in the assembly optimized version
39 AFLAGS+= --defsym SKEIN_LOOP=0
40 .endif
41 SRCS += siphash.c
42 SRCS += gmac.c gfmult.c
43 SRCS += blake2b-ref.c
44 SRCS += blake2s-ref.c
45 SRCS += blake2-sw.c
46 CFLAGS.blake2b-ref.c += -I${SRCTOP}/sys/crypto/blake2 -DSUFFIX=_ref
47 CFLAGS.blake2s-ref.c += -I${SRCTOP}/sys/crypto/blake2 -DSUFFIX=_ref
48 CFLAGS.blake2-sw.c += -I${SRCTOP}/sys/crypto/blake2
49 CWARNFLAGS.blake2b-ref.c += -Wno-cast-qual -Wno-unused-function
50 CWARNFLAGS.blake2s-ref.c += -Wno-cast-qual -Wno-unused-function
51 SRCS += chacha.c
52 SRCS += chacha-sw.c
53
54 LIBSODIUM_INC=${LIBSODIUM}/include
55 LIBSODIUM_COMPAT=${SRCTOP}/sys/crypto/libsodium
56 SRCS += xform_poly1305.c
57 CFLAGS.xform_poly1305.c += -I${LIBSODIUM_INC} -I${LIBSODIUM_COMPAT}
58 SRCS += onetimeauth_poly1305.c
59 CFLAGS.onetimeauth_poly1305.c += -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
60 SRCS += poly1305_donna.c
61 CFLAGS.poly1305_donna.c += -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
62 SRCS += verify.c
63 CFLAGS.verify.c += -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
64 SRCS += randombytes.c
65 CFLAGS.randombytes.c += -I${LIBSODIUM_INC} -I${LIBSODIUM_COMPAT}
66 SRCS += utils.c
67 CFLAGS.utils.c += -I${LIBSODIUM_INC} -I${LIBSODIUM_COMPAT}
68
69 SRCS += opt_param.h cryptodev_if.h bus_if.h device_if.h
70 SRCS += opt_ddb.h
71
72 .include <bsd.kmod.mk>
Cache object: 7997d3316a6aca6e2045fd5d7617f58a
|