11.25Skre#	$NetBSD: Makefile,v 1.25 2025/11/23 08:07:55 kre Exp $
21.1Spooka#
31.1Spooka
41.22SchristosS=${.CURDIR}/../../../..
51.22SchristosSODIUM_IMPORTDIR=${S}/external/isc/libsodium
61.22SchristosSODIUM_DIR=${SODIUM_IMPORTDIR}/dist/src/libsodium
71.22Schristos
81.22Schristos.PATH:	${S}/crypto/adiantum						\
91.22Schristos	${S}/crypto/aes							\
101.22Schristos	${S}/crypto/blowfish						\
111.22Schristos	${S}/crypto/camellia						\
121.22Schristos	${S}/crypto/cast128						\
131.22Schristos	${S}/crypto/des							\
141.22Schristos	${S}/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.22Schristos	${SODIUM_DIR}/crypto_core/ed25519/ref10				\
271.22Schristos	${SODIUM_IMPORTDIR}/src
281.1Spooka
291.1SpookaLIB=	rumpkern_crypto
301.4SpookaCOMMENT=Cryptographic routines
311.1Spooka
321.8Sriastrad# Adiantum
331.8SriastradSRCS+=	adiantum.c
341.8SriastradSRCS+=	adiantum_selftest.c
351.8Sriastrad
361.12Sriastrad# AES
371.12SriastradSRCS+=	aes_bear.c
381.12SriastradSRCS+=	aes_ccm.c
391.12SriastradSRCS+=	aes_ccm_mbuf.c
401.12SriastradSRCS+=	aes_ct.c
411.12SriastradSRCS+=	aes_ct_dec.c
421.12SriastradSRCS+=	aes_ct_enc.c
431.12SriastradSRCS+=	aes_impl.c
441.25SkreSRCS+=	aes_keysched.c
451.12SriastradSRCS+=	aes_selftest.c
461.12Sriastrad
471.1Spooka# blowfish
481.2SpgoyetteSRCS+=	bf_ecb.c bf_enc.c bf_cbc.c bf_skey.c bf_module.c
491.2Spgoyette
501.2Spgoyette# camellia
511.2SpgoyetteSRCS+=  camellia.c camellia-api.c
521.1Spooka
531.12Sriastrad# cast128
541.12SriastradSRCS+=	cast128.c
551.12Sriastrad
561.1Spooka# DES
571.2SpgoyetteSRCS+=	des_ecb.c des_setkey.c des_enc.c des_cbc.c des_module.c
581.1Spooka
591.1Spooka# skipjack
601.1SpookaSRCS+=	skipjack.c
611.1Spooka
621.20Sriastrad# libsodium
631.14SriastradSODIUM_CPPFLAGS+=	-I${SODIUM_IMPORTDIR}/include
641.14SriastradSODIUM_CPPFLAGS+=	-I${SODIUM_IMPORTDIR}/dist/src/libsodium/include/sodium
651.18Sriastrad
661.19Sriastrad#SODIUM_CPPFLAGS+=	-DHAVE_TI_MODE
671.18Sriastrad
681.20SriastradSODIUM_CWARNFLAGS+=	-Wno-shadow
691.20SriastradSODIUM_CWARNFLAGS+=	-Wno-unused-function
701.20SriastradSODIUM_CWARNFLAGS+=	-Wno-unused-variable
711.20Sriastrad
721.20SriastradSODIUM_SRCS+=	x25519_ref10.c
731.20SriastradSODIUM_SRCS+=	scalarmult_curve25519.c
741.20SriastradSODIUM_SRCS+=	crypto_scalarmult.c
751.20SriastradSODIUM_SRCS+=	poly1305_donna.c
761.20SriastradSODIUM_SRCS+=	onetimeauth_poly1305.c
771.20SriastradSODIUM_SRCS+=	crypto_onetimeauth.c
781.20SriastradSODIUM_SRCS+=	chacha20_ref.c
791.20SriastradSODIUM_SRCS+=	stream_chacha20.c
801.20SriastradSODIUM_SRCS+=	aead_xchacha20poly1305.c
811.20SriastradSODIUM_SRCS+=	aead_chacha20poly1305.c
821.20SriastradSODIUM_SRCS+=	core_hchacha20.c
831.20SriastradSODIUM_SRCS+=	ed25519_ref10.c
841.23SchristosSODIUM_SRCS+=	sodium_module.c
851.24SriastradSODIUM_SRCS+=	sodium_selftest.c
861.20Sriastrad
871.20SriastradSRCS+=	${SODIUM_SRCS}
881.20Sriastrad
891.20Sriastrad.for _s_ in ${SODIUM_SRCS}
901.20SriastradCPPFLAGS.${_s_}+=	${SODIUM_CPPFLAGS}
911.20SriastradCOPTS.${_s_}+=		${SODIUM_CWARNFLAGS}
921.20Sriastrad.endfor
931.14Sriastrad
941.1Spooka.include <bsd.lib.mk>
951.1Spooka.include <bsd.klinks.mk>
96