freebsd-dev/sbin/ipf/ipmon/Makefile
Bryan Drewery 864c53ead8 In preparation for ASLR [1] support add WITH_PIE to support building with -fPIE.
This is currently an opt-in build flag. Once ASLR support is ready and stable
it should changed to opt-out and be enabled by default along with ASLR.

Each application Makefile uses opt-out to ensure that ASLR will be enabled by
default in new directories when the system is compiled with PIE/ASLR. [2]

Mark known build failures as NO_PIE for now.

The only known runtime failure was rtld.

[1] http://www.bsdcan.org/2014/schedule/events/452.en.html
Submitted by:		Shawn Webb <lattera@gmail.com>
Discussed between:	des@ and Shawn Webb [2]
2014-06-08 17:29:31 +00:00

37 lines
704 B
Makefile

# $FreeBSD$
PROG= ipmon
SRCS= ${GENHDRS} ipmon.c ipmon_y.c ipmon_l.c
MAN= ipmon.8
CFLAGS+= -DLOGFAC=LOG_LOCAL0 -I.
GENHDRS+= ipmon_l.h ipmon_y.h
DPSRCS+= ${GENHDRS}
CLEANFILES+= ${GENHDRS} ipmon_y.c ipmon_l.c
NO_PIE= yes
ipmon_y.c: ipmon_y.y
${YACC} -d ${.ALLSRC}
sed -e 's/yy/ipmon_yy/g' \
-e 's/"ipmon_y.y"/"..\/tools\/ipmon_y.y"/' \
y.tab.c > ${.TARGET}
sed -e 's/yy/ipmon_yy/g' \
y.tab.h > ${.TARGET:.c=.h}
ipmon_y.h: ipmon_y.c
ipmon_l.c: lexer.c
sed -e 's/yy/ipmon_yy/g' \
-e 's/y.tab.h/ipmon_y.h/' \
-e 's/lexer.h/ipmon_l.h/' \
${.ALLSRC} > ${.TARGET}
ipmon_l.h: lexer.h
sed -e 's/yy/ipmon_yy/g' \
${.ALLSRC} > ${.TARGET}
.include <bsd.prog.mk>