diff options
author | 2017-05-30 15:36:13 +0000 | |
---|---|---|
committer | 2017-05-30 15:36:13 +0000 | |
commit | 353735a95e1e4bcab4466b07c76b5f0f8792eff9 (patch) | |
tree | e4b5b651755a8145a346ffeec33c7cea54e112d0 | |
parent | usage and order tweaks from jmc (diff) | |
download | wireguard-openbsd-353735a95e1e4bcab4466b07c76b5f0f8792eff9.tar.xz wireguard-openbsd-353735a95e1e4bcab4466b07c76b5f0f8792eff9.zip |
Organize iked parser regress Makefile similar to mandoc dbm_dump.
When object files from other parts of the tree are needed, build
them there and symlink them into the regress obj directory.
OK markus@
-rw-r--r-- | regress/sbin/iked/parser/Makefile | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/regress/sbin/iked/parser/Makefile b/regress/sbin/iked/parser/Makefile index 7bd3b966b63..3424c7b77f6 100644 --- a/regress/sbin/iked/parser/Makefile +++ b/regress/sbin/iked/parser/Makefile @@ -1,37 +1,30 @@ -# $OpenBSD: Makefile,v 1.1 2017/05/29 20:59:28 markus Exp $ +# $OpenBSD: Makefile,v 1.2 2017/05/30 15:36:13 bluhm Exp $ WARNINGS=Yes -.include <bsd.own.mk> -.include <bsd.obj.mk> - -.PATH: ${.CURDIR}/../../../../sbin/iked \ - ${.CURDIR}/../../../../sbin/iked/${__objdir} - PROG= test_parser -SRCS= tests.c common.c test_parser_fuzz.c ikev2_pld.c \ - imsg_util.c log.c util.c -SRCS+= ikev2_map.c eap_map.c +SRCS= tests.c common.c test_parser_fuzz.c +IKEOBJS= ikev2_pld.o imsg_util.o log.o util.o \ + ikev2_map.o eap_map.o +CLEANFILES= ${IKEOBJS} -LDADD= -lutil -lcrypto +LDADD+= -lutil -lcrypto ${IKEOBJS} DPADD+= ${LIBUTIL} ${LIBCRYPTO} CFLAGS+= -I${.CURDIR}/../../../../sbin/iked -CFLAGS+= -I${.CURDIR}/../../../../sbin/iked/${__objdir} CFLAGS+= -Wno-missing-field-initializers -CFLAGS+= -I${.CURDIR}/../test_helper +test_parser: ${IKEOBJS} -.if exists(${.CURDIR}/../test_helper/${__objdir}) -LDADD+=-L${.CURDIR}/../test_helper/${__objdir} -ltest_helper -DPADD+=${.CURDIR}/../test_helper/${__objdir}/libtest_helper.a -.else -LDADD+=-L${.CURDIR}/../test_helper -ltest_helper -DPADD+=${.CURDIR}/../test_helper/libtest_helper.a -.endif +${IKEOBJS}: + cd ${.CURDIR}/../../../../sbin/iked && make $@ + ln -sf ${.OBJDIR}/../../../../sbin/iked/$@ . -REGRESS_TARGETS=stamp-regress-${PROG} +LDADD+= -L${.OBJDIR} -ltest_helper +DPADD+= libtest_helper.a +CFLAGS+= -I${.CURDIR}/../test_helper -stamp-regress-${PROG}: ${PROG} - ./${PROG} && touch stamp-regress-${PROG} +libtest_helper.a: + cd ${.CURDIR}/../test_helper && make $@ + ln -sf ${.OBJDIR}/../test_helper/$@ . .include <bsd.regress.mk> |