]> The Tcpdump Group git mirrors - tcpdump/blob - Makefile.in
Print packets for unsupported link-layer protocols in hexadecimal/ASCII
[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-unsupported.c \
237 print-usb.c \
238 print-vjc.c \
239 print-vqp.c \
240 print-vrrp.c \
241 print-vsock.c \
242 print-vtp.c \
243 print-vxlan-gpe.c \
244 print-vxlan.c \
245 print-wb.c \
246 print-zep.c \
247 print-zephyr.c \
248 print-zeromq.c \
249 signature.c \
250 strtoaddr.c \
251 util-print.c
252
253 LOCALSRC = @LOCALSRC@
254 LIBOBJS = @LIBOBJS@
255
256 LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) ${LOCALSRC:.c=.o} ${LIBOBJS}
257 LIBNETDISSECT=libnetdissect.a
258
259
260 SRC = $(CSRC) $(GENSRC) $(LOCALSRC)
261
262 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
263 # hack the extra indirection
264 OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o)
265 HDR = \
266 addrtoname.h \
267 addrtostr.h \
268 af.h \
269 ah.h \
270 appletalk.h \
271 ascii_strcasecmp.h \
272 atm.h \
273 chdlc.h \
274 compiler-tests.h \
275 cpack.h \
276 ethertype.h \
277 extract.h \
278 fptype.h \
279 funcattrs.h \
280 getservent.h \
281 gmpls.h \
282 interface.h \
283 ip.h \
284 ip6.h \
285 ipproto.h \
286 l2vpn.h \
287 llc.h \
288 machdep.h \
289 mib.h \
290 mpls.h \
291 nameser.h \
292 netdissect.h \
293 netdissect-alloc.h \
294 netdissect-ctype.h \
295 netdissect-stdinc.h \
296 nfs.h \
297 nfsfh.h \
298 nlpid.h \
299 ntp.h \
300 openflow.h \
301 ospf.h \
302 oui.h \
303 pcap-missing.h \
304 ppp.h \
305 print.h \
306 rpc_auth.h \
307 rpc_msg.h \
308 signature.h \
309 slcompress.h \
310 smb.h \
311 status-exit-codes.h \
312 strtoaddr.h \
313 tcp.h \
314 timeval-operations.h \
315 udp.h \
316 varattrs.h
317
318 TAGHDR = \
319 /usr/include/arpa/tftp.h \
320 /usr/include/net/if_arp.h \
321 /usr/include/netinet/if_ether.h \
322 /usr/include/netinet/in.h \
323 /usr/include/netinet/ip_icmp.h \
324 /usr/include/netinet/tcp.h \
325 /usr/include/netinet/udp.h \
326 /usr/include/protocols/routed.h
327
328 TAGFILES = $(SRC) $(HDR) $(TAGHDR) $(LIBNETDISSECT_SRC) \
329 print-pflog.c print-smb.c smbutil.c
330
331 CLEANFILES = $(PROG) $(OBJ) $(GENSRC) $(LIBNETDISSECT_OBJ)
332
333 EXTRA_DIST = \
334 CHANGES \
335 CONTRIBUTING \
336 CREDITS \
337 CMakeLists.txt \
338 INSTALL.txt \
339 LICENSE \
340 Makefile.in \
341 Makefile-devel-adds \
342 PLATFORMS \
343 README \
344 README.md \
345 Readme.Win32 \
346 VERSION \
347 aclocal.m4 \
348 atime.awk \
349 bpf_dump.c \
350 cmake_uninstall.cmake.in \
351 cmakeconfig.h.in \
352 cmake/Modules/FindCRYPTO.cmake \
353 cmake/Modules/FindPCAP.cmake \
354 cmake/Modules/FindSMI.cmake \
355 config.guess \
356 config.h.in \
357 config.sub \
358 configure \
359 configure.ac \
360 doc/README.Win32.md \
361 install-sh \
362 lbl/os-osf4.h \
363 lbl/os-solaris2.h \
364 lbl/os-sunos4.h \
365 lbl/os-ultrix4.h \
366 makemib \
367 missing/dlnames.c \
368 missing/datalinks.c \
369 missing/getopt_long.h \
370 missing/getopt_long.c \
371 missing/getservent.c \
372 missing/pcap_dump_ftell.c \
373 missing/snprintf.c \
374 missing/strdup.c \
375 missing/strlcat.c \
376 missing/strlcpy.c \
377 missing/strsep.c \
378 missing/win_ether_ntohost.c \
379 missing/win_ether_ntohost.h \
380 mkdep \
381 packetdat.awk \
382 print-pflog.c \
383 print-smb.c \
384 send-ack.awk \
385 smbutil.c \
386 stime.awk \
387 tcpdump.1.in \
388 win32/prj/GNUmakefile \
389 win32/prj/WinDump.dsp \
390 win32/prj/WinDump.dsw \
391 win32/prj/WinDump.sln \
392 win32/prj/WinDump.vcproj
393
394 TEST_DIST= `git ls-files tests | grep -v 'tests/\..*'`
395
396 all: $(PROG)
397
398 $(PROG): $(OBJ) @V_PCAPDEP@ $(LIBNETDISSECT)
399 @rm -f $@
400 $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBNETDISSECT) $(LIBS)
401
402 $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
403 @rm -f $@
404 $(AR) cr $@ $(LIBNETDISSECT_OBJ)
405 $(RANLIB) $@
406
407 datalinks.o: $(srcdir)/missing/datalinks.c
408 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
409 dlnames.o: $(srcdir)/missing/dlnames.c
410 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c
411 getservent.o: $(srcdir)/missing/getservent.c
412 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getservent.c
413 getopt_long.o: $(srcdir)/missing/getopt_long.c
414 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getopt_long.c
415 snprintf.o: $(srcdir)/missing/snprintf.c
416 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
417 strdup.o: $(srcdir)/missing/strdup.c
418 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strdup.c
419 strlcat.o: $(srcdir)/missing/strlcat.c
420 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
421 strlcpy.o: $(srcdir)/missing/strlcpy.c
422 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
423 strsep.o: $(srcdir)/missing/strsep.c
424 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c
425 pcap_dump_ftell.o: $(srcdir)/missing/pcap_dump_ftell.c
426 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/pcap_dump_ftell.c
427
428 install: all
429 [ -d $(DESTDIR)$(sbindir) ] || \
430 (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir))
431 $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
432 $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG).`cat ${srcdir}/VERSION`
433 [ -d $(DESTDIR)$(mandir)/man1 ] || \
434 (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
435 $(INSTALL_DATA) $(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1
436
437 uninstall:
438 rm -f $(DESTDIR)$(sbindir)/$(PROG)
439 rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1
440
441 lint: $(GENSRC)
442 lint -hbxn $(SRC) $(LIBNETDISSECT_SRC) | \
443 grep -v 'struct/union .* never defined' | \
444 grep -v 'possible pointer alignment problem'
445
446 clean:
447 rm -f $(CLEANFILES) $(PROG)-`cat VERSION`.tar.gz
448
449 distclean:
450 rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
451 config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1 \
452 libnetdissect.a tests/.failed tests/.passed \
453 tests/failure-outputs.txt
454 rm -rf autom4te.cache tests/DIFF tests/NEW
455
456 check: tcpdump
457 $(srcdir)/tests/TESTrun
458
459 extags: $(TAGFILES)
460 ctags $(TAGFILES)
461
462 tags: $(TAGFILES)
463 ctags -wtd $(TAGFILES)
464
465 TAGS: $(TAGFILES)
466 etags $(TAGFILES)
467
468 releasetar:
469 @name=$(PROG)-`cat VERSION` ; \
470 mkdir $$name; \
471 tar cf - $(CSRC) $(HDR) $(LIBNETDISSECT_SRC) $(EXTRA_DIST) $(TEST_DIST) | (cd $$name; tar xf -); \
472 tar -c -z -f $$name.tar.gz $$name; \
473 rm -rf $$name
474
475 testlist:
476 echo $(TEST_DIST)
477
478 depend: $(GENSRC)
479 $(MKDEP) -c "$(CC)" -m "$(DEPENDENCY_CFLAG)" -s "$(srcdir)" $(DEFS) $(INCLS) $(SRC) $(LIBNETDISSECT_SRC)