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