summaryrefslogtreecommitdiffstats
path: root/sbin/ipf/ipmon/Makefile
blob: 2ecfed1aa1b8cfcee07404c91fb7b256ab0cf4c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#	$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>
OpenPOWER on IntegriCloud