etc/protocols - sync with NetBSD-8
[minix.git] / external / bsd / tcpdump / bin / Makefile
blob5caf234a1aa237287edbae9e14d5cba4e24f3ee2
1 # $NetBSD: Makefile,v 1.13 2015/03/31 21:59:35 christos Exp $
3 WARNS?= 1 # XXX: need to cleanup later
5 CWARNFLAGS.clang+= -Wno-constant-logical-operand -Wno-error=unused-function
7 .include <bsd.own.mk>
9 .if defined(__MINIX)
10 #LSC: -Wno-unused-but-set-variable while compiling with -DNDEBUG -O2
11 #LSC: -Wno-maybe-uninitialized while compiling with -DNDEBUG -O3
12 CWARNFLAGS.gcc+= -Wno-unused-but-set-variable -Wno-maybe-uninitialized
13 .endif # defined(__MINIX)
15 USE_FORT?= yes # network client
17 BINDIR=/usr/sbin
18 SRCDIR= ${.CURDIR}/../dist
19 .PATH: ${SRCDIR}
21 PROG= tcpdump
22 MAN= tcpdump.8
24 SRCS= addrtoname.c cpack.c gmpls.c gmt2local.c machdep.c oui.c parsenfsfh.c \
25 setsignal.c smbutil.c tcpdump.c util.c checksum.c signature.c \
26 l2vpn.c nlpid.c ipproto.c af.c in_cksum.c pf_print_state.c
28 SRCS+= bpf_dump.c
29 SRCS+= version.c
31 SRCS+= \
32 print-802_11.c \
33 print-802_15_4.c \
34 print-ah.c \
35 print-ahcp.c \
36 print-aodv.c \
37 print-aoe.c \
38 print-ap1394.c \
39 print-arcnet.c \
40 print-arp.c \
41 print-ascii.c \
42 print-atalk.c \
43 print-atm.c \
44 print-beep.c \
45 print-bfd.c \
46 print-bgp.c \
47 print-bootp.c \
48 print-bt.c \
49 print-calm-fast.c \
50 print-carp.c \
51 print-cdp.c \
52 print-cfm.c \
53 print-chdlc.c \
54 print-cip.c \
55 print-cnfp.c \
56 print-dccp.c \
57 print-decnet.c \
58 print-domain.c \
59 print-dtp.c \
60 print-dvmrp.c \
61 print-eap.c \
62 print-egp.c \
63 print-eigrp.c \
64 print-enc.c \
65 print-esp.c \
66 print-ether.c \
67 print-fddi.c \
68 print-forces.c \
69 print-fr.c \
70 print-frag6.c \
71 print-ftp.c \
72 print-geneve.c \
73 print-geonet.c \
74 print-gre.c \
75 print-hsrp.c \
76 print-http.c \
77 print-icmp.c \
78 print-igmp.c \
79 print-igrp.c \
80 print-ip.c \
81 print-ipcomp.c \
82 print-ipfc.c \
83 print-ipnet.c \
84 print-ipx.c \
85 print-isakmp.c \
86 print-isoclns.c \
87 print-juniper.c \
88 print-krb.c \
89 print-l2tp.c \
90 print-lane.c \
91 print-ldp.c \
92 print-llc.c \
93 print-lldp.c \
94 print-lmp.c \
95 print-loopback.c \
96 print-lspping.c \
97 print-lwapp.c \
98 print-lwres.c \
99 print-m3ua.c \
100 print-mobile.c \
101 print-mobility.c \
102 print-mpcp.c \
103 print-mpls.c \
104 print-mptcp.c \
105 print-msdp.c \
106 print-msnlb.c \
107 print-nflog.c \
108 print-nfs.c \
109 print-ntp.c \
110 print-null.c \
111 print-olsr.c \
112 print-openflow.c \
113 print-openflow-1.0.c \
114 print-ospf.c \
115 print-otv.c \
116 print-pflog.c \
117 print-pfsync.c \
118 print-pgm.c \
119 print-pim.c \
120 print-pktap.c \
121 print-ppi.c \
122 print-ppp.c \
123 print-pppoe.c \
124 print-pptp.c \
125 print-radius.c \
126 print-raw.c \
127 print-rip.c \
128 print-ripng.c \
129 print-rpki-rtr.c \
130 print-rrcp.c \
131 print-rsvp.c \
132 print-rtsp.c \
133 print-rx.c \
134 print-sctp.c \
135 print-sflow.c \
136 print-sip.c \
137 print-sl.c \
138 print-sll.c \
139 print-slow.c \
140 print-smb.c \
141 print-smtp.c \
142 print-snmp.c \
143 print-stp.c \
144 print-sunatm.c \
145 print-symantec.c \
146 print-syslog.c \
147 print-tcp.c \
148 print-telnet.c \
149 print-tftp.c \
150 print-timed.c \
151 print-tipc.c \
152 print-token.c \
153 print-udld.c \
154 print-udp.c \
155 print-usb.c \
156 print-vjc.c \
157 print-vqp.c \
158 print-vrrp.c \
159 print-vtp.c \
160 print-vxlan.c \
161 print-wb.c \
162 print-zephyr.c \
163 print-zeromq.c
164 # MINIX 3: readd this file once rpc has been imported!
165 #print-sunrpc.c
167 version.c: VERSION
168 ${_MKTARGET_CREATE}
169 ${TOOL_SED} -e 's/.*/char version[] = "&";/' ${.ALLSRC} > ${.TARGET}
171 LDADD+= -lpcap -ll
172 DPADD+= ${LIBPCAP} ${LIBL}
174 CPPFLAGS+= -I${.CURDIR}/../include -I${.CURDIR} -I${SRCDIR} -DHAVE_CONFIG_H
175 CPPFLAGS+= -I${NETBSDSRCDIR}/dist/pf/sbin/pfctl \
176 -I${NETBSDSRCDIR}/sys/dist/pf
178 AWKS= atime.awk packetdat.awk stime.awk send-ack.awk
180 CPPFLAGS+=-DHAVE_CONFIG_H -D_U_="__attribute__((__unused__))"
182 CPPFLAGS+=-DWITH_USER=\"_tcpdump\"
183 CPPFLAGS+=-DWITH_CHROOT=\"/var/chroot/tcpdump\"
185 .if (${USE_INET6} != "no")
186 SRCS+= print-babel.c print-ip6.c print-ip6opts.c print-icmp6.c \
187 print-rt6.c print-dhcp6.c print-ospf6.c
189 CPPFLAGS+=-DINET6=1 -DHAVE_RES_USE_INET6=1
190 .elif defined(__MINIX)
191 # MINIX 3 compilation fix for USE_INET6=no (already fixed upstream!)
192 SRCS+= print-ip6.c
193 .endif
195 .if (${MKCRYPTO} != "no")
196 CPPFLAGS+=-DHAVE_LIBCRYPTO=1
197 LDADD+= -lcrypto -lcrypt
198 DPADD+= ${LIBCRYPTO} ${LIBCRYPT}
199 .endif
201 CLEANFILES+= version.c tcpdump.8
203 tcpdump.8: tcpdump.1.in
204 @rm -f ${.TARGET}
205 cp ${.ALLSRC} ${.TARGET}
207 .include <bsd.prog.mk>