1 2.PATH: ${SRCTOP}/sys/crypto/openssl 3.PATH: ${SRCTOP}/sys/crypto/openssl/${MACHINE_CPUARCH} 4 5KMOD= ossl 6OBJS+= ${OBJS.${MACHINE_CPUARCH}} 7SRCS= bus_if.h \ 8 cryptodev_if.h \ 9 device_if.h \ 10 ossl.c \ 11 ossl_aes.c \ 12 ossl_chacha20.c \ 13 ossl_poly1305.c \ 14 ossl_sha1.c \ 15 ossl_sha256.c \ 16 ossl_sha512.c \ 17 ${SRCS.${MACHINE_CPUARCH}} 18 19SRCS.aarch64= \ 20 chacha-armv8.S \ 21 poly1305-armv8.S \ 22 sha1-armv8.S \ 23 sha256-armv8.S \ 24 sha512-armv8.S \ 25 vpaes-armv8.S \ 26 ossl_aarch64.c 27 28SRCS.amd64= \ 29 aes-gcm-avx512.S \ 30 aesni-x86_64.S \ 31 aesni-gcm-x86_64.S \ 32 chacha-x86_64.S \ 33 ghash-x86_64.S \ 34 poly1305-x86_64.S \ 35 sha1-x86_64.S \ 36 sha256-x86_64.S \ 37 sha512-x86_64.S \ 38 ossl_aes_gcm.c \ 39 ossl_x86.c 40 41SRCS.i386= \ 42 aesni-x86.S \ 43 chacha-x86.S \ 44 poly1305-x86.S \ 45 sha1-586.S \ 46 sha256-586.S \ 47 sha512-586.S \ 48 ossl_x86.c 49 50# For arm64, we are forced to rewrite the compiler invocation for the assembly 51# files, to remove -mgeneral-regs-only. 52${SRCS.aarch64:M*.S:S/S/o/}: ${.TARGET:R}.S 53 ${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${PROF} ${.IMPSRC} 54 ${CTFCONVERT_CMD} 55 56# Based on modules/armv8crypto/Makefile. 57# Clang doesn't recognize "aes*" instructions without -march set. 58aesv8-armx.o: aesv8-armx.S 59 ${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${PROF} \ 60 -march=armv8-a+crypto ${.IMPSRC} 61 ${CTFCONVERT_CMD} 62 63OBJS.aarch64= aesv8-armx.o 64 65.include <bsd.kmod.mk> 66