Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/apache2/argon2/lib/libargon2 Move guts of the Makef...



details:   https://anonhg.NetBSD.org/src/rev/fa317bf5fd9d
branches:  trunk
changeset: 366197:fa317bf5fd9d
user:      christos <christos%NetBSD.org@localhost>
date:      Tue May 17 18:55:41 2022 +0000

description:
Move guts of the Makefile into Makefile.inc so it can be re-used.

diffstat:

 external/apache2/argon2/lib/libargon2/Makefile     |  18 +++---------------
 external/apache2/argon2/lib/libargon2/Makefile.inc |  22 ++++++++++++++++++++++
 2 files changed, 25 insertions(+), 15 deletions(-)

diffs (56 lines):

diff -r 57673d99a053 -r fa317bf5fd9d external/apache2/argon2/lib/libargon2/Makefile
--- a/external/apache2/argon2/lib/libargon2/Makefile    Tue May 17 15:00:05 2022 +0000
+++ b/external/apache2/argon2/lib/libargon2/Makefile    Tue May 17 18:55:41 2022 +0000
@@ -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 <bsd.own.mk>
 
-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
 
-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 <bsd.lib.mk>
diff -r 57673d99a053 -r fa317bf5fd9d external/apache2/argon2/lib/libargon2/Makefile.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/apache2/argon2/lib/libargon2/Makefile.inc        Tue May 17 18:55:41 2022 +0000
@@ -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



Home | Main Index | Thread Index | Old Index