Move guts of the Makefile into Makefile.inc so it can be re-used.
This commit is contained in:
parent
3987c5ad40
commit
5fc96d7ad8
|
@ -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
|
LIBISPRIVATE= pic
|
||||||
|
|
||||||
.include <bsd.own.mk>
|
.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
|
.include "${.CURDIR}/Makefile.inc"
|
||||||
CPPFLAGS+= -I${ARGON2DIR}/dist/phc-winner-argon2/include
|
|
||||||
|
|
||||||
.if ${MACHINE} == "vax"
|
|
||||||
COPTS.blake2b.c+= -O0
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.include <bsd.lib.mk>
|
.include <bsd.lib.mk>
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue