Makefile revision 1.35
11.35Smrg# $NetBSD: Makefile,v 1.35 2023/09/04 23:00:48 mrg Exp $ 21.32Snia 31.32SniaUSE_FORT?= yes # cryptographic software 41.26Sjhigh 51.26Sjhigh.include <bsd.own.mk> 61.13Slukem 71.13SlukemUSE_SHLIBDIR= yes 81.7Sthorpej 91.26Sjhigh.if (defined(MKARGON2) && ${MKARGON2} != "no") 101.26SjhighHAVE_ARGON2=1 111.26Sjhigh.endif 121.26Sjhigh 131.1ScgdLIB= crypt 141.4Scgd 151.16SchristosSRCS= crypt.c md5crypt.c bcrypt.c crypt-sha1.c util.c pw_gensalt.c 161.18SdrochnerSRCS+= hmac_sha1.c 171.12Sitojun 181.34SchristosCPPFLAGS+= -include ${.CURDIR}/namespace.h 191.34Schristos 201.26Sjhigh.if defined(HAVE_ARGON2) 211.28SniaARGON2DIR= ${NETBSDSRCDIR}/external/apache2/argon2 221.28Snia.PATH: ${ARGON2DIR}/dist/phc-winner-argon2/src \ 231.28Snia ${ARGON2DIR}/dist/phc-winner-argon2/src/blake2 \ 241.28Snia ${ARGON2DIR}/dist/phc-winner-argon2/include 251.28SniaCPPFLAGS+= -DHAVE_ARGON2 -DARGON2_NO_THREADS 261.28SniaCPPFLAGS+= -I${ARGON2DIR}/dist/phc-winner-argon2/include 271.26SjhighSRCS+= crypt-argon2.c 281.28Snia# libargon2 sources 291.28Snia. for src in argon2.c core.c blake2b.c encoding.c ref.c 301.28SniaSRCS+= ${src} 311.29SniaCOPTS.${src}+= -fvisibility=hidden 321.28Snia. endfor 331.29Snia. if ${MACHINE} == "vax" 341.29SniaCOPTS.blake2b.c+= -O0 351.29Snia. endif 361.26Sjhigh.endif 371.26Sjhigh 381.23SmattWARNS?= 5 391.4Scgd 401.27SchristosMAN= crypt.3 pw_gensalt.3 411.4ScgdMLINKS= crypt.3 encrypt.3 crypt.3 setkey.3 421.4Scgd 431.35Smrg# XXXGCC12 - init_perm() takes a larger array than IE3264[] is, but 441.35Smrg# it doesn't need more. 451.35SmrgCOPTS.crypt.c+= ${CC_WNO_STRINGOP_OVERFLOW} 461.15Ssjg 471.15Ssjg.if make(*.test) 481.15Ssjg.SUFFIXES: .test 491.15Ssjg.c.test: 501.15Ssjg ${CC} -o $@ -DUNIT_TEST -DMAIN ${LDSTATIC} ${.IMPSRC} ${LDADD} 511.15SsjgLDADD+= -L${.OBJDIR} -l${LIB} -L${.OBJDIR}/../../libc 521.15SsjgDPADD+= lib${LIB}.a 531.15SsjgLDSTATIC?= -static 541.15Ssjg.include <bsd.prog.mk> 551.15Ssjg.else 561.4Scgd.include <bsd.lib.mk> 571.15Ssjg.endif 58