Makefile revision 1.18
11.18Sriastrad#	$NetBSD: Makefile,v 1.18 2020/08/21 06:30:46 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.16Sriastrad	${.CURDIR}/../../../../crypto/blake2				\
101.7Sriastrad	${.CURDIR}/../../../../crypto/blowfish				\
111.2Spgoyette	${.CURDIR}/../../../../crypto/camellia				\
121.1Spooka	${.CURDIR}/../../../../crypto/cast128				\
131.1Spooka	${.CURDIR}/../../../../crypto/des				\
141.14Sriastrad	${.CURDIR}/../../../../crypto/skipjack				\
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.15SriastradSRCS+=	blake2s.c
621.14Sriastrad
631.14Sriastrad# Various cryptography functions
641.14SriastradSODIUM_CPPFLAGS=
651.14SriastradSODIUM_CPPFLAGS+=	-I${SODIUM_IMPORTDIR}/include
661.14SriastradSODIUM_CPPFLAGS+=	-I${SODIUM_IMPORTDIR}/dist/src/libsodium/include/sodium
671.18Sriastrad
681.18SriastradSODIUM_CPPFLAGS+=	-DHAVE_TI_MODE
691.18Sriastrad
701.18SriastradSODIUM_CPPFLAGS+=	-Wno-shadow
711.18SriastradSODIUM_CPPFLAGS+=	-Wno-unused-function
721.18SriastradSODIUM_CPPFLAGS+=	-Wno-unused-variable
731.14Sriastrad
741.14SriastradCPPFLAGS.x25519_ref10.c+=		${SODIUM_CPPFLAGS}
751.14SriastradCPPFLAGS.scalarmult_curve25519.c+=	${SODIUM_CPPFLAGS}
761.14SriastradCPPFLAGS.crypto_scalarmult.c+=		${SODIUM_CPPFLAGS}
771.14SriastradCPPFLAGS.poly1305_donna.c+=		${SODIUM_CPPFLAGS}
781.14SriastradCPPFLAGS.onetimeauth_poly1305.c+=	${SODIUM_CPPFLAGS}
791.14SriastradCPPFLAGS.crypto_onetimeauth.c+=		${SODIUM_CPPFLAGS}
801.14SriastradCPPFLAGS.chacha20_ref.c+=		${SODIUM_CPPFLAGS}
811.14SriastradCPPFLAGS.stream_chacha20.c+=		${SODIUM_CPPFLAGS}
821.14SriastradCPPFLAGS.aead_xchacha20poly1305.c+=	${SODIUM_CPPFLAGS}
831.14SriastradCPPFLAGS.aead_chacha20poly1305.c+=	${SODIUM_CPPFLAGS}
841.14SriastradCPPFLAGS.core_hchacha20.c+=		${SODIUM_CPPFLAGS}
851.14SriastradCPPFLAGS.ed25519_ref10.c+=		${SODIUM_CPPFLAGS}
861.14Sriastrad
871.14SriastradSRCS+=	x25519_ref10.c scalarmult_curve25519.c crypto_scalarmult.c
881.14SriastradSRCS+=	poly1305_donna.c onetimeauth_poly1305.c
891.14SriastradSRCS+=	crypto_onetimeauth.c chacha20_ref.c stream_chacha20.c
901.14SriastradSRCS+=	aead_xchacha20poly1305.c aead_chacha20poly1305.c
911.14SriastradSRCS+=	core_hchacha20.c ed25519_ref10.c
921.14Sriastrad
931.1Spooka.include <bsd.lib.mk>
941.1Spooka.include <bsd.klinks.mk>
95