xref: /netbsd-src/external/bsd/ipf/bin/ipsend/Makefile (revision 5b28f239895d55856221c590945769250e289f5f)
1#	$NetBSD: Makefile,v 1.7 2024/09/08 09:36:46 rillig Exp $
2
3.include <bsd.own.mk>
4.include "../Makefile.inc"
5
6PROG=		ipsend
7SRCS=		ipsend.c ip.c ipsopt.c iplang_y.c iplang_l.l sbpf.c \
8		sock.c 44arp.c
9MAN=		ipsend.1 ipsend.5
10DPADD+=		${LIBL}
11LDADD+=		-ll
12
13CPPFLAGS+=	-I${UDIST}/ipsend
14CPPFLAGS+=	-I${UDIST}/iplang
15CPPFLAGS+=	-I${.CURDIR} -I.
16
17# There is some very dubious code to locate the values of
18# tcb.rcv_adv, tcb.snd_nxt and tcb.rcv_nxt for a socket.
19CPPFLAGS+=	-D_KMEMUSER
20
21CLEANFILES+=	iplang_y.c iplang_y.h
22
23DPSRCS+=	iplang_y.h
24
25.PATH:		${UDIST}/ipsend \
26		${UDIST}/iplang
27
28iplang_y.c: iplang_y.y
29	${_MKTARGET_CREATE}
30	${YACC} -d ${.ALLSRC}
31	mv y.tab.c ${.TARGET}
32	mv y.tab.h ${.TARGET:.c=.h}
33
34iplang_y.h: iplang_y.c
35
36# XXX
37# We have a problem with make and linking ipsend
38# cc   -o /home/source/src/usr.sbin/ipf/ipsend/../../../dist/ipf/ipsend .....
39# isn't correct.
40# Use .NOPATH as a workaround for that problem
41.NOPATH: ipsend
42
43.include <bsd.prog.mk>
44