Home | History | Annotate | Line # | Download | only in chacha
      1  1.8       mrg #	$NetBSD: Makefile,v 1.8 2023/09/05 22:14:08 mrg Exp $
      2  1.1  riastrad 
      3  1.1  riastrad .include <bsd.own.mk>
      4  1.1  riastrad 
      5  1.1  riastrad TESTSDIR=	${TESTSBASE}/sys/crypto/chacha
      6  1.1  riastrad 
      7  1.1  riastrad TESTS_C=	t_chacha
      8  1.1  riastrad 
      9  1.1  riastrad AFLAGS+=	-D_LOCORE
     10  1.1  riastrad 
     11  1.1  riastrad .PATH:	${NETBSDSRCDIR}/sys/crypto/chacha
     12  1.1  riastrad CPPFLAGS+=	-I${NETBSDSRCDIR}/sys
     13  1.1  riastrad 
     14  1.1  riastrad SRCS.t_chacha+=	t_chacha.c
     15  1.1  riastrad 
     16  1.1  riastrad SRCS.t_chacha+=	chacha_ref.c
     17  1.1  riastrad SRCS.t_chacha+=	chacha_selftest.c
     18  1.1  riastrad 
     19  1.5  riastrad .if !empty(MACHINE_ARCH:Mearmv7*) || !empty(MACHINE_ARCH:Maarch64*)
     20  1.1  riastrad 
     21  1.1  riastrad .PATH:	${NETBSDSRCDIR}/sys/crypto/chacha/arch/arm
     22  1.1  riastrad CPPFLAGS+=	-I${NETBSDSRCDIR}/sys/crypto/chacha/arch/arm
     23  1.1  riastrad 
     24  1.6  jakllsch CLANG_NO_NONPORTABLE_VECTOR_INITIALIZATION= ${${ACTIVE_CC} == "clang":? -Wno-nonportable-vector-initialization :}
     25  1.6  jakllsch 
     26  1.1  riastrad SRCS.t_chacha+=	chacha_neon.c
     27  1.6  jakllsch COPTS.chacha_neon.c+=	${CLANG_NO_NONPORTABLE_VECTOR_INITIALIZATION}
     28  1.5  riastrad .if !empty(MACHINE_ARCH:Mearmv7*)
     29  1.3  riastrad SRCS.t_chacha+=	chacha_neon_32.S
     30  1.3  riastrad .elif !empty(MACHINE_ARCH:Maarch64*)
     31  1.1  riastrad SRCS.t_chacha+=	chacha_neon_64.S
     32  1.2  riastrad .endif
     33  1.1  riastrad SRCS.t_chacha+=	chacha_neon_impl.c
     34  1.1  riastrad 
     35  1.5  riastrad .if !empty(MACHINE_ARCH:Mearmv7*) && empty(MACHINE_ARCH:Mearmv7hf*)
     36  1.5  riastrad COPTS.chacha_neon.c+=		-mfloat-abi=softfp -mfpu=neon
     37  1.5  riastrad AOPTS.chacha_neon_32.S+=	-D__SOFTFP__
     38  1.5  riastrad .endif
     39  1.5  riastrad 
     40  1.2  riastrad .endif				# earmv7 or aarch64
     41  1.1  riastrad 
     42  1.1  riastrad .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
     43  1.1  riastrad 
     44  1.1  riastrad .PATH:	${NETBSDSRCDIR}/sys/crypto/chacha/arch/x86
     45  1.1  riastrad CPPFLAGS+=	-I${NETBSDSRCDIR}/sys/crypto/chacha/arch/x86
     46  1.1  riastrad 
     47  1.1  riastrad SRCS.t_chacha+=	chacha_sse2.c
     48  1.1  riastrad SRCS.t_chacha+=	chacha_sse2_impl.c
     49  1.1  riastrad COPTS.chacha_sse2.c+=	-msse -msse2
     50  1.7       mrg # XXXGCC12 - believes subkey[] is maybe uninitialised, but it is not.
     51  1.8       mrg COPTS.chacha_sse2.c+=	${${ACTIVE_CC} == "gcc":? -Wno-maybe-uninitialized :}
     52  1.1  riastrad 
     53  1.1  riastrad .endif				# x86
     54  1.1  riastrad 
     55  1.1  riastrad WARNS=		5
     56  1.1  riastrad 
     57  1.1  riastrad .include <bsd.test.mk>
     58