From 5fc96d7ad8f02edf91cd6431e74db6255cab4516 Mon Sep 17 00:00:00 2001 From: christos Date: Tue, 17 May 2022 18:55:41 +0000 Subject: [PATCH] Move guts of the Makefile into Makefile.inc so it can be re-used. --- .../apache2/argon2/lib/libargon2/Makefile | 16 ++------------ .../apache2/argon2/lib/libargon2/Makefile.inc | 22 +++++++++++++++++++ 2 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 external/apache2/argon2/lib/libargon2/Makefile.inc diff --git a/external/apache2/argon2/lib/libargon2/Makefile b/external/apache2/argon2/lib/libargon2/Makefile index 24d9cd70e9a2..75275ddca379 100644 --- a/external/apache2/argon2/lib/libargon2/Makefile +++ b/external/apache2/argon2/lib/libargon2/Makefile @@ -1,23 +1,11 @@ -# $NetBSD: Makefile,v 1.4 2021/11/22 14:34:35 nia Exp $ +# $NetBSD: Makefile,v 1.5 2022/05/17 18:55:41 christos Exp $ LIBISPRIVATE= pic .include -ARGON2DIR= ${NETBSDSRCDIR}/external/apache2/argon2 - -.PATH: ${ARGON2DIR}/dist/phc-winner-argon2/src \ - ${ARGON2DIR}/dist/phc-winner-argon2/src/blake2 \ - ${ARGON2DIR}/dist/phc-winner-argon2/include - LIB= argon2 -SRCS= argon2.c core.c blake2b.c thread.c encoding.c ref.c -CFLAGS+= -pthread -CPPFLAGS+= -I${ARGON2DIR}/dist/phc-winner-argon2/include - -.if ${MACHINE} == "vax" -COPTS.blake2b.c+= -O0 -.endif +.include "${.CURDIR}/Makefile.inc" .include diff --git a/external/apache2/argon2/lib/libargon2/Makefile.inc b/external/apache2/argon2/lib/libargon2/Makefile.inc new file mode 100644 index 000000000000..d3f4470c6c79 --- /dev/null +++ b/external/apache2/argon2/lib/libargon2/Makefile.inc @@ -0,0 +1,22 @@ +# $NetBSD: Makefile.inc,v 1.1 2022/05/17 18:55:41 christos Exp $ + +ARGON2DIR= ${NETBSDSRCDIR}/external/apache2/argon2/dist/phc-winner-argon2 + +.PATH.c: ${ARGON2DIR}/src ${ARGON2DIR}/src/blake2 + +SRCS+= argon2.c core.c blake2b.c encoding.c ref.c + +CPPFLAGS+=-I${ARGON2DIR}/include + +.if defined(ARGON2_NO_THREADS) +CPPFLAGS+= -DARGON2_NO_THREADS +.else +SRCS+= thread.c +CFLAGS+= -pthread +LDADD+=-lpthread +DPADD+=${LIBPTHREAD} +.endif + +.if ${MACHINE} == "vax" +COPTS.blake2b.c+= -O0 +.endif