Makefile revision 1.15
11.15Sriastrad#	$NetBSD: Makefile,v 1.15 2020/08/20 21:30: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	${SODIUM_DIR}/crypto_scalarmult/curve25519/ref10		\
151.14Sriastrad	${SODIUM_DIR}/crypto_scalarmult/curve25519			\
161.14Sriastrad	${SODIUM_DIR}/crypto_scalarmult					\
171.14Sriastrad	${SODIUM_DIR}/crypto_onetimeauth/poly1305/donna			\
181.14Sriastrad	${SODIUM_DIR}/crypto_onetimeauth/poly1305			\
191.14Sriastrad	${SODIUM_DIR}/crypto_onetimeauth				\
201.14Sriastrad	${SODIUM_DIR}/crypto_stream/chacha20/ref			\
211.14Sriastrad	${SODIUM_DIR}/crypto_stream/chacha20				\
221.14Sriastrad	${SODIUM_DIR}/crypto_aead/xchacha20poly1305/sodium		\
231.14Sriastrad	${SODIUM_DIR}/crypto_aead/chacha20poly1305/sodium		\
241.14Sriastrad	${SODIUM_DIR}/crypto_core/hchacha20				\
251.14Sriastrad	${SODIUM_DIR}/crypto_core/ed25519/ref10
261.1Spooka
271.1SpookaLIB=	rumpkern_crypto
281.4SpookaCOMMENT=Cryptographic routines
291.1Spooka
301.8Sriastrad# Adiantum
311.8SriastradSRCS+=	adiantum.c
321.8SriastradSRCS+=	adiantum_selftest.c
331.8Sriastrad
341.12Sriastrad# AES
351.12SriastradSRCS+=	aes_bear.c
361.12SriastradSRCS+=	aes_ccm.c
371.12SriastradSRCS+=	aes_ccm_mbuf.c
381.12SriastradSRCS+=	aes_ct.c
391.12SriastradSRCS+=	aes_ct_dec.c
401.12SriastradSRCS+=	aes_ct_enc.c
411.12SriastradSRCS+=	aes_impl.c
421.12SriastradSRCS+=	aes_selftest.c
431.12Sriastrad
441.1Spooka# blowfish
451.2SpgoyetteSRCS+=	bf_ecb.c bf_enc.c bf_cbc.c bf_skey.c bf_module.c
461.2Spgoyette
471.2Spgoyette# camellia
481.2SpgoyetteSRCS+=  camellia.c camellia-api.c
491.1Spooka
501.12Sriastrad# cast128
511.12SriastradSRCS+=	cast128.c
521.12Sriastrad
531.1Spooka# DES
541.2SpgoyetteSRCS+=	des_ecb.c des_setkey.c des_enc.c des_cbc.c des_module.c
551.1Spooka
561.1Spooka# skipjack
571.1SpookaSRCS+=	skipjack.c
581.1Spooka
591.14Sriastrad# BLAKE2
601.15SriastradSRCS+=	blake2s.c
611.14Sriastrad
621.14Sriastrad# Various cryptography functions
631.14SriastradSODIUM_CPPFLAGS=
641.14SriastradSODIUM_CPPFLAGS+=	-I${SODIUM_IMPORTDIR}/include
651.14SriastradSODIUM_CPPFLAGS+=	-I${SODIUM_IMPORTDIR}/dist/src/libsodium/include/sodium
661.14SriastradSODIUM_CPPFLAGS+=	-Wno-unused-function -Wno-unused-variable -DHAVE_TI_MODE
671.14Sriastrad
681.14SriastradCPPFLAGS.x25519_ref10.c+=		${SODIUM_CPPFLAGS}
691.14SriastradCPPFLAGS.scalarmult_curve25519.c+=	${SODIUM_CPPFLAGS}
701.14SriastradCPPFLAGS.crypto_scalarmult.c+=		${SODIUM_CPPFLAGS}
711.14SriastradCPPFLAGS.poly1305_donna.c+=		${SODIUM_CPPFLAGS}
721.14SriastradCPPFLAGS.onetimeauth_poly1305.c+=	${SODIUM_CPPFLAGS}
731.14SriastradCPPFLAGS.crypto_onetimeauth.c+=		${SODIUM_CPPFLAGS}
741.14SriastradCPPFLAGS.chacha20_ref.c+=		${SODIUM_CPPFLAGS}
751.14SriastradCPPFLAGS.stream_chacha20.c+=		${SODIUM_CPPFLAGS}
761.14SriastradCPPFLAGS.aead_xchacha20poly1305.c+=	${SODIUM_CPPFLAGS}
771.14SriastradCPPFLAGS.aead_chacha20poly1305.c+=	${SODIUM_CPPFLAGS}
781.14SriastradCPPFLAGS.core_hchacha20.c+=		${SODIUM_CPPFLAGS}
791.14SriastradCPPFLAGS.ed25519_ref10.c+=		${SODIUM_CPPFLAGS}
801.14Sriastrad
811.14SriastradSRCS+=	x25519_ref10.c scalarmult_curve25519.c crypto_scalarmult.c
821.14SriastradSRCS+=	poly1305_donna.c onetimeauth_poly1305.c
831.14SriastradSRCS+=	crypto_onetimeauth.c chacha20_ref.c stream_chacha20.c
841.14SriastradSRCS+=	aead_xchacha20poly1305.c aead_chacha20poly1305.c
851.14SriastradSRCS+=	core_hchacha20.c ed25519_ref10.c
861.14Sriastrad
871.1Spooka.include <bsd.lib.mk>
881.1Spooka.include <bsd.klinks.mk>
89