]> The Tcpdump Group git mirrors - tcpdump/blob - Makefile.in
Add vsock test case
[tcpdump] / Makefile.in
1 # Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
2 # The Regents of the University of California. All rights reserved.
3 #
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that: (1) source code distributions
6 # retain the above copyright notice and this paragraph in its entirety, (2)
7 # distributions including binary code include the above copyright notice and
8 # this paragraph in its entirety in the documentation or other materials
9 # provided with the distribution, and (3) all advertising materials mentioning
10 # features or use of this software display the following acknowledgement:
11 # ``This product includes software developed by the University of California,
12 # Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
13 # the University nor the names of its contributors may be used to endorse
14 # or promote products derived from this software without specific prior
15 # written permission.
16 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
17 # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
18 # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19
20 #
21 # Various configurable paths (remember to edit Makefile.in, not Makefile)
22 #
23
24 # Top level hierarchy
25 prefix = @prefix@
26 exec_prefix = @exec_prefix@
27 datarootdir = @datarootdir@
28 # Pathname of directory to install the binary
29 sbindir = @sbindir@
30 # Pathname of directory to install the man page
31 mandir = @mandir@
32
33 # VPATH
34 srcdir = @srcdir@
35 VPATH = @srcdir@
36
37 #
38 # You shouldn't need to edit anything below here.
39 #
40
41 CC = @CC@
42 AR = @AR@
43 MKDEP = @MKDEP@
44 PROG = tcpdump
45 CCOPT = @V_CCOPT@
46 INCLS = -I. @V_INCLS@
47 DEFS = @DEFS@ @CPPFLAGS@ @V_DEFS@
48
49 # Standard CFLAGS
50 CFLAGS = @CFLAGS@
51 FULL_CFLAGS = $(CCOPT) $(DEFS) $(INCLS) $(CFLAGS)
52
53 # Standard LDFLAGS
54 LDFLAGS = @LDFLAGS@
55
56 # Standard LIBS
57 LIBS = @LIBS@
58
59 INSTALL = @INSTALL@
60 INSTALL_PROGRAM = @INSTALL_PROGRAM@
61 INSTALL_DATA = @INSTALL_DATA@
62 RANLIB = @RANLIB@
63
64 DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
65
66 # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
67 # Also, gcc does not remove the .o before forking 'as', which can be a
68 # problem if you don't own the file but can write to the directory.
69 .c.o:
70 @rm -f $@
71 $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
72
73 CSRC = tcpdump.c
74
75 LIBNETDISSECT_SRC=\
76 addrtoname.c \
77 addrtostr.c \
78 af.c \
79 ascii_strcasecmp.c \
80 checksum.c \
81 cpack.c \
82 gmpls.c \
83 in_cksum.c \
84 ipproto.c \
85 l2vpn.c \
86 machdep.c \
87 netdissect.c \
88 netdissect-alloc.c \
89 nlpid.c \
90 oui.c \
91 parsenfsfh.c \
92 print.c \
93 print-802_11.c \
94 print-802_15_4.c \
95 print-ah.c \
96 print-ahcp.c \
97 print-aodv.c \
98 print-aoe.c \
99 print-ap1394.c \
100 print-arcnet.c \
101 print-arp.c \
102 print-ascii.c \
103 print-atalk.c \
104 print-atm.c \
105 print-babel.c \
106 print-beep.c \
107 print-bfd.c \
108 print-bgp.c \
109 print-bootp.c \
110 print-brcmtag.c \
111 print-bt.c \
112 print-calm-fast.c \
113 print-carp.c \
114 print-cdp.c \
115 print-cfm.c \
116 print-chdlc.c \
117 print-cip.c \
118 print-cnfp.c \
119 print-dccp.c \
120 print-decnet.c \
121 print-dhcp6.c \
122 print-domain.c \
123 print-dtp.c \
124 print-dvmrp.c \
125 print-eap.c \
126 print-egp.c \
127 print-eigrp.c \
128 print-enc.c \
129 print-esp.c \
130 print-ether.c \
131 print-fddi.c \
132 print-forces.c \
133 print-fr.c \
134 print-frag6.c \
135 print-ftp.c \
136 print-geneve.c \
137 print-geonet.c \
138 print-gre.c \
139 print-hncp.c \
140 print-hsrp.c \
141 print-http.c \
142 print-icmp.c \
143 print-icmp6.c \
144 print-igmp.c \
145 print-igrp.c \
146 print-ip.c \
147 print-ip-demux.c \
148 print-ip6.c \
149 print-ip6opts.c \
150 print-ipcomp.c \
151 print-ipfc.c \
152 print-ipnet.c \
153 print-ipx.c \
154 print-isakmp.c \
155 print-isoclns.c \
156 print-juniper.c \
157 print-krb.c \
158 print-l2tp.c \
159 print-lane.c \
160 print-ldp.c \
161 print-lisp.c \
162 print-llc.c \
163 print-lldp.c \
164 print-lmp.c \
165 print-loopback.c \
166 print-lspping.c \
167 print-lwapp.c \
168 print-lwres.c \
169 print-m3ua.c \
170 print-medsa.c \
171 print-mobile.c \
172 print-mobility.c \
173 print-mpcp.c \
174 print-mpls.c \
175 print-mptcp.c \
176 print-msdp.c \
177 print-msnlb.c \
178 print-nflog.c \
179 print-nfs.c \
180 print-nsh.c \
181 print-ntp.c \
182 print-null.c \
183 print-olsr.c \
184 print-openflow-1.0.c \
185 print-openflow.c \
186 print-ospf.c \
187 print-ospf6.c \
188 print-otv.c \
189 print-pgm.c \
190 print-pim.c \
191 print-pktap.c \
192 print-ppi.c \
193 print-ppp.c \
194 print-pppoe.c \
195 print-pptp.c \
196 print-radius.c \
197 print-raw.c \
198 print-resp.c \
199 print-rip.c \
200 print-ripng.c \
201 print-rpki-rtr.c \
202 print-rrcp.c \
203 print-rsvp.c \
204 print-rt6.c \
205 print-rtsp.c \
206 print-rx.c \
207 print-sctp.c \
208 print-sflow.c \
209 print-sip.c \
210 print-sl.c \
211 print-sll.c \
212 print-slow.c \
213 print-smtp.c \
214 print-snmp.c \
215 print-stp.c \
216 print-sunatm.c \
217 print-sunrpc.c \
218 print-symantec.c \
219 print-syslog.c \
220 print-tcp.c \
221 print-telnet.c \
222 print-tftp.c \
223 print-timed.c \
224 print-tipc.c \
225 print-token.c \
226 print-udld.c \
227 print-udp.c \
228 print-usb.c \
229 print-vjc.c \
230 print-vqp.c \
231 print-vrrp.c \
232 print-vsock.c \
233 print-vtp.c \
234 print-vxlan.c \
235 print-vxlan-gpe.c \
236 print-wb.c \
237 print-zep.c \
238 print-zephyr.c \
239 print-zeromq.c \
240 signature.c \
241 strtoaddr.c \
242 util-print.c
243
244 LOCALSRC = @LOCALSRC@
245 LIBOBJS = @LIBOBJS@
246
247 LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) ${LOCALSRC:.c=.o} ${LIBOBJS}
248 LIBNETDISSECT=libnetdissect.a
249
250
251 SRC = $(CSRC) $(GENSRC) $(LOCALSRC)
252
253 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
254 # hack the extra indirection
255 OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o)
256 HDR = \
257 addrtoname.h \
258 addrtostr.h \
259 af.h \
260 ah.h \
261 appletalk.h \
262 ascii_strcasecmp.h \
263 atm.h \
264 chdlc.h \
265 compiler-tests.h \
266 cpack.h \
267 ethertype.h \
268 extract.h \
269 funcattrs.h \
270 getservent.h \
271 gmpls.h \
272 interface.h \
273 ip.h \
274 ip6.h \
275 ipproto.h \
276 l2vpn.h \
277 llc.h \
278 machdep.h \
279 mib.h \
280 mpls.h \
281 nameser.h \
282 netdissect.h \
283 netdissect-alloc.h \
284 netdissect-stdinc.h \
285 nfs.h \
286 nfsfh.h \
287 nlpid.h \
288 openflow.h \
289 ospf.h \
290 oui.h \
291 pcap-missing.h \
292 ppp.h \
293 print.h \
294 rpc_auth.h \
295 rpc_msg.h \
296 signature.h \
297 slcompress.h \
298 smb.h \
299 status-exit-codes.h \
300 strtoaddr.h \
301 tcp.h \
302 timeval-operations.h \
303 udp.h \
304 varattrs.h
305
306 TAGHDR = \
307 /usr/include/arpa/tftp.h \
308 /usr/include/net/if_arp.h \
309 /usr/include/netinet/if_ether.h \
310 /usr/include/netinet/in.h \
311 /usr/include/netinet/ip_icmp.h \
312 /usr/include/netinet/tcp.h \
313 /usr/include/netinet/udp.h \
314 /usr/include/protocols/routed.h
315
316 TAGFILES = $(SRC) $(HDR) $(TAGHDR) $(LIBNETDISSECT_SRC)
317
318 CLEANFILES = $(PROG) $(OBJ) $(GENSRC) $(LIBNETDISSECT_OBJ)
319
320 EXTRA_DIST = \
321 CHANGES \
322 CONTRIBUTING \
323 CREDITS \
324 CMakeLists.txt \
325 INSTALL.txt \
326 LICENSE \
327 Makefile.in \
328 Makefile-devel-adds \
329 PLATFORMS \
330 README \
331 README.md \
332 Readme.Win32 \
333 VERSION \
334 aclocal.m4 \
335 atime.awk \
336 bpf_dump.c \
337 cmake_uninstall.cmake.in \
338 cmakeconfig.h.in \
339 cmake/Modules/FindCRYPTO.cmake \
340 cmake/Modules/FindPCAP.cmake \
341 cmake/Modules/FindSMI.cmake \
342 config.guess \
343 config.h.in \
344 config.sub \
345 configure \
346 configure.ac \
347 install-sh \
348 lbl/os-osf4.h \
349 lbl/os-solaris2.h \
350 lbl/os-sunos4.h \
351 lbl/os-ultrix4.h \
352 makemib \
353 missing/dlnames.c \
354 missing/datalinks.c \
355 missing/getopt_long.h \
356 missing/getopt_long.c \
357 missing/getservent.c \
358 missing/pcap_dump_ftell.c \
359 missing/snprintf.c \
360 missing/strdup.c \
361 missing/strlcat.c \
362 missing/strlcpy.c \
363 missing/strsep.c \
364 missing/win_ether_ntohost.c \
365 missing/win_ether_ntohost.h \
366 mkdep \
367 packetdat.awk \
368 print-pflog.c \
369 print-smb.c \
370 send-ack.awk \
371 smbutil.c \
372 stime.awk \
373 tcpdump.1.in \
374 win32/prj/GNUmakefile \
375 win32/prj/WinDump.dsp \
376 win32/prj/WinDump.dsw \
377 win32/prj/WinDump.sln \
378 win32/prj/WinDump.vcproj
379
380 TEST_DIST= `find tests \( -name 'DIFF' -prune \) -o \( -name NEW -prune \) -o -type f \! -name '.*' \! -name '*~' -print`
381
382 all: $(PROG)
383
384 $(PROG): $(OBJ) @V_PCAPDEP@ $(LIBNETDISSECT)
385 @rm -f $@
386 $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBNETDISSECT) $(LIBS)
387
388 $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
389 @rm -f $@
390 $(AR) cr $@ $(LIBNETDISSECT_OBJ)
391 $(RANLIB) $@
392
393 datalinks.o: $(srcdir)/missing/datalinks.c
394 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
395 dlnames.o: $(srcdir)/missing/dlnames.c
396 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c
397 getservent.o: $(srcdir)/missing/getservent.c
398 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getservent.c
399 getopt_long.o: $(srcdir)/missing/getopt_long.c
400 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getopt_long.c
401 snprintf.o: $(srcdir)/missing/snprintf.c
402 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
403 strdup.o: $(srcdir)/missing/strdup.c
404 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strdup.c
405 strlcat.o: $(srcdir)/missing/strlcat.c
406 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
407 strlcpy.o: $(srcdir)/missing/strlcpy.c
408 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
409 strsep.o: $(srcdir)/missing/strsep.c
410 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c
411 pcap_dump_ftell.o: $(srcdir)/missing/pcap_dump_ftell.c
412 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/pcap_dump_ftell.c
413
414 install: all
415 [ -d $(DESTDIR)$(sbindir) ] || \
416 (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir))
417 $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
418 $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG).`cat ${srcdir}/VERSION`
419 [ -d $(DESTDIR)$(mandir)/man1 ] || \
420 (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
421 $(INSTALL_DATA) $(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1
422
423 uninstall:
424 rm -f $(DESTDIR)$(sbindir)/$(PROG)
425 rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1
426
427 lint: $(GENSRC)
428 lint -hbxn $(SRC) $(LIBNETDISSECT_SRC) | \
429 grep -v 'struct/union .* never defined' | \
430 grep -v 'possible pointer alignment problem'
431
432 clean:
433 rm -f $(CLEANFILES) $(PROG)-`cat VERSION`.tar.gz
434
435 distclean:
436 rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
437 config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1 \
438 libnetdissect.a tests/.failed tests/.passed \
439 tests/failure-outputs.txt
440 rm -rf autom4te.cache tests/DIFF tests/NEW
441
442 check: tcpdump
443 (cd tests && ./TESTrun.sh)
444
445 extags: $(TAGFILES)
446 ctags $(TAGFILES)
447
448 tags: $(TAGFILES)
449 ctags -wtd $(TAGFILES)
450
451 TAGS: $(TAGFILES)
452 etags $(TAGFILES)
453
454 releasetar:
455 @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
456 mkdir $$name; \
457 tar cf - $(CSRC) $(HDR) $(LIBNETDISSECT_SRC) $(EXTRA_DIST) $(TEST_DIST) | (cd $$name; tar xf -); \
458 tar -c -z -f $$name.tar.gz $$name; \
459 rm -rf $$name
460
461 testlist:
462 echo $(TEST_DIST)
463
464 depend: $(GENSRC)
465 $(MKDEP) -c "$(CC)" -m "$(DEPENDENCY_CFLAG)" $(DEFS) $(INCLS) $(SRC) $(LIBNETDISSECT_SRC)