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