diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-05-30 15:36:14 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-05-30 15:36:14 +0000 |
commit | 7575e10b027b0228d282d68d3ee7d19493160d8c (patch) | |
tree | c8f380d61bcb0fb3ea8e2e4761dd18c4286e9743 /regress/sbin/iked | |
parent | 39beb566d98aa08af1923b549b28847e1195ee1b (diff) |
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@
Diffstat (limited to 'regress/sbin/iked')
-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> |