From 7575e10b027b0228d282d68d3ee7d19493160d8c Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Tue, 30 May 2017 15:36:14 +0000 Subject: 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@ --- regress/sbin/iked/parser/Makefile | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) (limited to 'regress/sbin/iked') 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 -.include - -.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 -- cgit v1.2.3