Makefile revision 1.2
11.2Sriastrad#	$NetBSD: Makefile,v 1.2 2020/07/01 09:58:29 riastradh Exp $
21.1Sriastrad
31.1Sriastrad.include <bsd.own.mk>
41.1Sriastrad
51.1SriastradTESTSDIR=	${TESTSBASE}/sys/crypto/aes
61.1Sriastrad
71.1SriastradTESTS_C=	t_aes
81.1Sriastrad
91.1Sriastrad.PATH:	${NETBSDSRCDIR}/sys/crypto/aes
101.1SriastradCPPFLAGS+=	-I${NETBSDSRCDIR}/sys
111.1Sriastrad
121.1SriastradSRCS.t_aes+=	t_aes.c
131.1Sriastrad
141.1SriastradSRCS.t_aes+=	aes_bear.c
151.1SriastradSRCS.t_aes+=	aes_ct.c
161.1SriastradSRCS.t_aes+=	aes_ct_dec.c
171.1SriastradSRCS.t_aes+=	aes_ct_enc.c
181.1SriastradSRCS.t_aes+=	aes_selftest.c
191.1Sriastrad
201.1Sriastrad.if !empty(MACHINE_ARCH:Mearmv7*) || !empty(MACHINE_ARCH:Maarch64*)
211.1Sriastrad
221.1Sriastrad.PATH:	${NETBSDSRCDIR}/sys/crypto/aes/arch/arm
231.1SriastradCPPFLAGS+=	-I${NETBSDSRCDIR}/sys/crypto/aes/arch/arm
241.1Sriastrad
251.1Sriastrad.if !empty(MACHINE_ARCH:Maarch64*)	# XXX no AESE/AESD in 32-bit mode yet
261.1SriastradSRCS.t_aes+=	aes_armv8.c
271.1SriastradSRCS.t_aes+=	aes_armv8_64.S
281.1Sriastrad.endif
291.1Sriastrad
301.1SriastradSRCS.t_aes+=	aes_neon.c
311.1SriastradSRCS.t_aes+=	aes_neon_impl.c
321.1SriastradSRCS.t_aes+=	aes_neon_subr.c
331.1Sriastrad.if !empty(MACHINE_ARCH:Mearmv7*)
341.1SriastradSRCS.t_aes+=	aes_neon_32.S
351.1Sriastrad.endif
361.1Sriastrad
371.1Sriastrad.endif				# earmv7/aarch64
381.1Sriastrad
391.1Sriastrad.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
401.1Sriastrad
411.1Sriastrad.PATH:	${NETBSDSRCDIR}/sys/crypto/aes/arch/x86
421.1SriastradCPPFLAGS+=	-I${NETBSDSRCDIR}/sys/crypto/aes/arch/x86
431.1Sriastrad
441.1Sriastrad.if ${MACHINE_ARCH} == "x86_64"		# XXX no AES-NI in 32-bit mode yet
451.1SriastradSRCS.t_aes+=	aes_ni.c
461.1SriastradSRCS.t_aes+=	aes_ni_64.S
471.1Sriastrad.endif
481.1Sriastrad
491.1SriastradSRCS.t_aes+=	aes_sse2.c
501.1SriastradSRCS.t_aes+=	aes_sse2_dec.c
511.1SriastradSRCS.t_aes+=	aes_sse2_enc.c
521.1SriastradSRCS.t_aes+=	aes_sse2_impl.c
531.1SriastradSRCS.t_aes+=	aes_sse2_subr.c
541.2SriastradCOPTS.aes_sse2.c+=	-msse -msse2
551.2SriastradCOPTS.aes_sse2_dec.c+=	-msse -msse2
561.2SriastradCOPTS.aes_sse2_enc.c+=	-msse -msse2
571.2SriastradCOPTS.aes_sse2_subr.c+=	-msse -msse2
581.1Sriastrad
591.1SriastradSRCS.t_aes+=	aes_ssse3.c
601.1SriastradSRCS.t_aes+=	aes_ssse3_impl.c
611.1SriastradSRCS.t_aes+=	aes_ssse3_subr.c
621.2SriastradCOPTS.aes_ssse3.c+=		-msse -msse2 -msse3 -mssse3
631.2SriastradCOPTS.aes_ssse3_subr.c+=	-msse -msse2 -msse3 -mssse3
641.1Sriastrad
651.1SriastradSRCS.t_aes+=	aes_via.c
661.1Sriastrad
671.1Sriastrad.endif				# x86
681.1Sriastrad
691.1SriastradWARNS=		5
701.1Sriastrad
711.1Sriastrad.include <bsd.test.mk>
72