1# $FreeBSD$ 2 3.PATH: ${SRCTOP}/sys/crypto/aesni 4.PATH: ${SRCTOP}/contrib/llvm/tools/clang/lib/Headers 5 6KMOD= aesni 7SRCS= aesni.c 8SRCS+= aeskeys_${MACHINE_CPUARCH}.S 9SRCS+= device_if.h bus_if.h opt_bus.h cryptodev_if.h 10 11OBJS+= aesni_ghash.o aesni_wrap.o 12OBJS+= intel_sha1.o intel_sha256.o 13 14# Remove -nostdinc so we can get the intrinsics. 15aesni_ghash.o: aesni_ghash.c 16 # XXX - gcc won't understand -mpclmul 17 ${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} \ 18 -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC} 19 ${CTFCONVERT_CMD} 20 21aesni_wrap.o: aesni_wrap.c 22 ${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} \ 23 -mmmx -msse -msse4 -maes ${.IMPSRC} 24 ${CTFCONVERT_CMD} 25 26intel_sha1.o: intel_sha1.c 27 ${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} \ 28 -mmmx -msse -msse4 -msha ${.IMPSRC} 29 ${CTFCONVERT_CMD} 30 31intel_sha256.o: intel_sha256.c 32 ${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} \ 33 -mmmx -msse -msse4 -msha ${.IMPSRC} 34 ${CTFCONVERT_CMD} 35 36aesni_ghash.o: aesni.h 37aesni_wrap.o: aesni.h 38intel_sha1.o: sha_sse.h immintrin.h shaintrin.h tmmintrin.h xmmintrin.h 39intel_sha256.o: sha_sse.h immintrin.h shaintrin.h tmmintrin.h xmmintrin.h 40 41.include <bsd.kmod.mk> 42 43CWARNFLAGS.aesni_ghash.c= ${NO_WCAST_QUAL} 44CWARNFLAGS.aesni_wrap.c= ${NO_WCAST_QUAL} 45