Makefile revision 1.14
11.14Sriastrad#	$NetBSD: Makefile,v 1.14 2020/08/20 21:21:32 riastradh Exp $
21.1Spooka#
31.1Spooka
41.14SriastradSODIUM_IMPORTDIR=${.CURDIR}/../../../../external/isc/libsodium
51.14SriastradSODIUM_DIR=${.CURDIR}/../../../../external/isc/libsodium/dist/src/libsodium
61.14Sriastrad
71.8Sriastrad.PATH:	${.CURDIR}/../../../../crypto/adiantum				\
81.8Sriastrad	${.CURDIR}/../../../../crypto/aes				\
91.7Sriastrad	${.CURDIR}/../../../../crypto/blowfish				\
101.2Spgoyette	${.CURDIR}/../../../../crypto/camellia				\
111.1Spooka	${.CURDIR}/../../../../crypto/cast128				\
121.1Spooka	${.CURDIR}/../../../../crypto/des				\
131.14Sriastrad	${.CURDIR}/../../../../crypto/skipjack				\
141.14Sriastrad	${.CURDIR}/../../../../external/cc0/libb2/dist/src		\
151.14Sriastrad	${SODIUM_DIR}/crypto_scalarmult/curve25519/ref10		\
161.14Sriastrad	${SODIUM_DIR}/crypto_scalarmult/curve25519			\
171.14Sriastrad	${SODIUM_DIR}/crypto_scalarmult					\
181.14Sriastrad	${SODIUM_DIR}/crypto_onetimeauth/poly1305/donna			\
191.14Sriastrad	${SODIUM_DIR}/crypto_onetimeauth/poly1305			\
201.14Sriastrad	${SODIUM_DIR}/crypto_onetimeauth				\
211.14Sriastrad	${SODIUM_DIR}/crypto_stream/chacha20/ref			\
221.14Sriastrad	${SODIUM_DIR}/crypto_stream/chacha20				\
231.14Sriastrad	${SODIUM_DIR}/crypto_aead/xchacha20poly1305/sodium		\
241.14Sriastrad	${SODIUM_DIR}/crypto_aead/chacha20poly1305/sodium		\
251.14Sriastrad	${SODIUM_DIR}/crypto_core/hchacha20				\
261.14Sriastrad	${SODIUM_DIR}/crypto_core/ed25519/ref10
271.1Spooka
281.1SpookaLIB=	rumpkern_crypto
291.4SpookaCOMMENT=Cryptographic routines
301.1Spooka
311.8Sriastrad# Adiantum
321.8SriastradSRCS+=	adiantum.c
331.8SriastradSRCS+=	adiantum_selftest.c
341.8Sriastrad
351.12Sriastrad# AES
361.12SriastradSRCS+=	aes_bear.c
371.12SriastradSRCS+=	aes_ccm.c
381.12SriastradSRCS+=	aes_ccm_mbuf.c
391.12SriastradSRCS+=	aes_ct.c
401.12SriastradSRCS+=	aes_ct_dec.c
411.12SriastradSRCS+=	aes_ct_enc.c
421.12SriastradSRCS+=	aes_impl.c
431.12SriastradSRCS+=	aes_selftest.c
441.12Sriastrad
451.1Spooka# blowfish
461.2SpgoyetteSRCS+=	bf_ecb.c bf_enc.c bf_cbc.c bf_skey.c bf_module.c
471.2Spgoyette
481.2Spgoyette# camellia
491.2SpgoyetteSRCS+=  camellia.c camellia-api.c
501.1Spooka
511.12Sriastrad# cast128
521.12SriastradSRCS+=	cast128.c
531.12Sriastrad
541.1Spooka# DES
551.2SpgoyetteSRCS+=	des_ecb.c des_setkey.c des_enc.c des_cbc.c des_module.c
561.1Spooka
571.1Spooka# skipjack
581.1SpookaSRCS+=	skipjack.c
591.1Spooka
601.14Sriastrad# BLAKE2
611.14SriastradSRCS+=	blake2s-ref.c
621.14SriastradCPPFLAGS.blake2s-ref.c+= -I${.CURDIR}/../../../../external/cc0/libb2/include \
631.14Sriastrad    -Wno-cast-qual -DSUFFIX=
641.14Sriastrad
651.14Sriastrad# Various cryptography functions
661.14SriastradSODIUM_CPPFLAGS=
671.14SriastradSODIUM_CPPFLAGS+=	-I${SODIUM_IMPORTDIR}/include
681.14SriastradSODIUM_CPPFLAGS+=	-I${SODIUM_IMPORTDIR}/dist/src/libsodium/include/sodium
691.14SriastradSODIUM_CPPFLAGS+=	-Wno-unused-function -Wno-unused-variable -DHAVE_TI_MODE
701.14Sriastrad
711.14SriastradCPPFLAGS.x25519_ref10.c+=		${SODIUM_CPPFLAGS}
721.14SriastradCPPFLAGS.scalarmult_curve25519.c+=	${SODIUM_CPPFLAGS}
731.14SriastradCPPFLAGS.crypto_scalarmult.c+=		${SODIUM_CPPFLAGS}
741.14SriastradCPPFLAGS.poly1305_donna.c+=		${SODIUM_CPPFLAGS}
751.14SriastradCPPFLAGS.onetimeauth_poly1305.c+=	${SODIUM_CPPFLAGS}
761.14SriastradCPPFLAGS.crypto_onetimeauth.c+=		${SODIUM_CPPFLAGS}
771.14SriastradCPPFLAGS.chacha20_ref.c+=		${SODIUM_CPPFLAGS}
781.14SriastradCPPFLAGS.stream_chacha20.c+=		${SODIUM_CPPFLAGS}
791.14SriastradCPPFLAGS.aead_xchacha20poly1305.c+=	${SODIUM_CPPFLAGS}
801.14SriastradCPPFLAGS.aead_chacha20poly1305.c+=	${SODIUM_CPPFLAGS}
811.14SriastradCPPFLAGS.core_hchacha20.c+=		${SODIUM_CPPFLAGS}
821.14SriastradCPPFLAGS.ed25519_ref10.c+=		${SODIUM_CPPFLAGS}
831.14Sriastrad
841.14SriastradSRCS+=	x25519_ref10.c scalarmult_curve25519.c crypto_scalarmult.c
851.14SriastradSRCS+=	poly1305_donna.c onetimeauth_poly1305.c
861.14SriastradSRCS+=	crypto_onetimeauth.c chacha20_ref.c stream_chacha20.c
871.14SriastradSRCS+=	aead_xchacha20poly1305.c aead_chacha20poly1305.c
881.14SriastradSRCS+=	core_hchacha20.c ed25519_ref10.c
891.14Sriastrad
901.1Spooka.include <bsd.lib.mk>
911.1Spooka.include <bsd.klinks.mk>
92