]> The Tcpdump Group git mirrors - tcpdump/blob - Makefile.in
Merge pull request #733 from marka63/dns-get-extended-rcode
[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-ip6.c \
148 print-ip6opts.c \
149 print-ipcomp.c \
150 print-ipfc.c \
151 print-ipnet.c \
152 print-ipx.c \
153 print-isakmp.c \
154 print-isoclns.c \
155 print-juniper.c \
156 print-krb.c \
157 print-l2tp.c \
158 print-lane.c \
159 print-ldp.c \
160 print-lisp.c \
161 print-llc.c \
162 print-lldp.c \
163 print-lmp.c \
164 print-loopback.c \
165 print-lspping.c \
166 print-lwapp.c \
167 print-lwres.c \
168 print-m3ua.c \
169 print-medsa.c \
170 print-mobile.c \
171 print-mobility.c \
172 print-mpcp.c \
173 print-mpls.c \
174 print-mptcp.c \
175 print-msdp.c \
176 print-msnlb.c \
177 print-nflog.c \
178 print-nfs.c \
179 print-nsh.c \
180 print-ntp.c \
181 print-null.c \
182 print-olsr.c \
183 print-openflow-1.0.c \
184 print-openflow.c \
185 print-ospf.c \
186 print-ospf6.c \
187 print-otv.c \
188 print-pgm.c \
189 print-pim.c \
190 print-pktap.c \
191 print-ppi.c \
192 print-ppp.c \
193 print-pppoe.c \
194 print-pptp.c \
195 print-radius.c \
196 print-raw.c \
197 print-resp.c \
198 print-rip.c \
199 print-ripng.c \
200 print-rpki-rtr.c \
201 print-rrcp.c \
202 print-rsvp.c \
203 print-rt6.c \
204 print-rtsp.c \
205 print-rx.c \
206 print-sctp.c \
207 print-sflow.c \
208 print-sip.c \
209 print-sl.c \
210 print-sll.c \
211 print-slow.c \
212 print-smtp.c \
213 print-snmp.c \
214 print-stp.c \
215 print-sunatm.c \
216 print-sunrpc.c \
217 print-symantec.c \
218 print-syslog.c \
219 print-tcp.c \
220 print-telnet.c \
221 print-tftp.c \
222 print-timed.c \
223 print-tipc.c \
224 print-token.c \
225 print-udld.c \
226 print-udp.c \
227 print-usb.c \
228 print-vjc.c \
229 print-vqp.c \
230 print-vrrp.c \
231 print-vtp.c \
232 print-vxlan.c \
233 print-vxlan-gpe.c \
234 print-wb.c \
235 print-zephyr.c \
236 print-zeromq.c \
237 signature.c \
238 strtoaddr.c \
239 util-print.c
240
241 LOCALSRC = @LOCALSRC@
242 LIBOBJS = @LIBOBJS@
243
244 LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) ${LOCALSRC:.c=.o} ${LIBOBJS}
245 LIBNETDISSECT=libnetdissect.a
246
247
248 SRC = $(CSRC) $(GENSRC) $(LOCALSRC)
249
250 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
251 # hack the extra indirection
252 OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o)
253 HDR = \
254 addrtoname.h \
255 addrtostr.h \
256 af.h \
257 ah.h \
258 appletalk.h \
259 ascii_strcasecmp.h \
260 atm.h \
261 chdlc.h \
262 compiler-tests.h \
263 cpack.h \
264 ethertype.h \
265 extract.h \
266 funcattrs.h \
267 getservent.h \
268 gmpls.h \
269 interface.h \
270 ip.h \
271 ip6.h \
272 ipproto.h \
273 l2vpn.h \
274 llc.h \
275 machdep.h \
276 mib.h \
277 mpls.h \
278 nameser.h \
279 netdissect.h \
280 netdissect-alloc.h \
281 netdissect-stdinc.h \
282 nfs.h \
283 nfsfh.h \
284 nlpid.h \
285 openflow.h \
286 ospf.h \
287 oui.h \
288 pcap-missing.h \
289 ppp.h \
290 print.h \
291 rpc_auth.h \
292 rpc_msg.h \
293 signature.h \
294 slcompress.h \
295 smb.h \
296 status-exit-codes.h \
297 strtoaddr.h \
298 tcp.h \
299 timeval-operations.h \
300 udp.h \
301 varattrs.h
302
303 TAGHDR = \
304 /usr/include/arpa/tftp.h \
305 /usr/include/net/if_arp.h \
306 /usr/include/netinet/if_ether.h \
307 /usr/include/netinet/in.h \
308 /usr/include/netinet/ip_icmp.h \
309 /usr/include/netinet/tcp.h \
310 /usr/include/netinet/udp.h \
311 /usr/include/protocols/routed.h
312
313 TAGFILES = $(SRC) $(HDR) $(TAGHDR) $(LIBNETDISSECT_SRC)
314
315 CLEANFILES = $(PROG) $(OBJ) $(GENSRC) $(LIBNETDISSECT_OBJ)
316
317 EXTRA_DIST = \
318 CHANGES \
319 CONTRIBUTING \
320 CREDITS \
321 CMakeLists.txt \
322 INSTALL.txt \
323 LICENSE \
324 Makefile.in \
325 Makefile-devel-adds \
326 PLATFORMS \
327 README \
328 README.md \
329 Readme.Win32 \
330 VERSION \
331 aclocal.m4 \
332 atime.awk \
333 bpf_dump.c \
334 cmake_uninstall.cmake.in \
335 cmakeconfig.h.in \
336 cmake/Modules/FindCRYPTO.cmake \
337 cmake/Modules/FindPCAP.cmake \
338 cmake/Modules/FindSMI.cmake \
339 config.guess \
340 config.h.in \
341 config.sub \
342 configure \
343 configure.ac \
344 install-sh \
345 lbl/os-osf4.h \
346 lbl/os-solaris2.h \
347 lbl/os-sunos4.h \
348 lbl/os-ultrix4.h \
349 makemib \
350 missing/dlnames.c \
351 missing/datalinks.c \
352 missing/getopt_long.h \
353 missing/getopt_long.c \
354 missing/getservent.c \
355 missing/pcap_dump_ftell.c \
356 missing/snprintf.c \
357 missing/strdup.c \
358 missing/strlcat.c \
359 missing/strlcpy.c \
360 missing/strsep.c \
361 missing/win_ether_ntohost.c \
362 missing/win_ether_ntohost.h \
363 mkdep \
364 packetdat.awk \
365 print-pflog.c \
366 print-smb.c \
367 send-ack.awk \
368 smbutil.c \
369 stime.awk \
370 tcpdump.1.in \
371 win32/prj/GNUmakefile \
372 win32/prj/WinDump.dsp \
373 win32/prj/WinDump.dsw \
374 win32/prj/WinDump.sln \
375 win32/prj/WinDump.vcproj
376
377 TEST_DIST= `find tests \( -name 'DIFF' -prune \) -o \( -name NEW -prune \) -o -type f \! -name '.*' \! -name '*~' -print`
378
379 all: $(PROG)
380
381 $(PROG): $(OBJ) @V_PCAPDEP@ $(LIBNETDISSECT)
382 @rm -f $@
383 $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBNETDISSECT) $(LIBS)
384
385 $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
386 @rm -f $@
387 $(AR) cr $@ $(LIBNETDISSECT_OBJ)
388 $(RANLIB) $@
389
390 datalinks.o: $(srcdir)/missing/datalinks.c
391 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
392 dlnames.o: $(srcdir)/missing/dlnames.c
393 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c
394 getservent.o: $(srcdir)/missing/getservent.c
395 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getservent.c
396 getopt_long.o: $(srcdir)/missing/getopt_long.c
397 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getopt_long.c
398 snprintf.o: $(srcdir)/missing/snprintf.c
399 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
400 strdup.o: $(srcdir)/missing/strdup.c
401 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strdup.c
402 strlcat.o: $(srcdir)/missing/strlcat.c
403 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
404 strlcpy.o: $(srcdir)/missing/strlcpy.c
405 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
406 strsep.o: $(srcdir)/missing/strsep.c
407 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c
408 pcap_dump_ftell.o: $(srcdir)/missing/pcap_dump_ftell.c
409 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/pcap_dump_ftell.c
410
411 install: all
412 [ -d $(DESTDIR)$(sbindir) ] || \
413 (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir))
414 $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
415 $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG).`cat ${srcdir}/VERSION`
416 [ -d $(DESTDIR)$(mandir)/man1 ] || \
417 (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
418 $(INSTALL_DATA) $(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1
419
420 uninstall:
421 rm -f $(DESTDIR)$(sbindir)/$(PROG)
422 rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1
423
424 lint: $(GENSRC)
425 lint -hbxn $(SRC) $(LIBNETDISSECT_SRC) | \
426 grep -v 'struct/union .* never defined' | \
427 grep -v 'possible pointer alignment problem'
428
429 clean:
430 rm -f $(CLEANFILES) $(PROG)-`cat VERSION`.tar.gz
431
432 distclean:
433 rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
434 config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1 \
435 libnetdissect.a tests/.failed tests/.passed \
436 tests/failure-outputs.txt
437 rm -rf autom4te.cache tests/DIFF tests/NEW
438
439 check: tcpdump
440 (cd tests && ./TESTrun.sh)
441
442 extags: $(TAGFILES)
443 ctags $(TAGFILES)
444
445 tags: $(TAGFILES)
446 ctags -wtd $(TAGFILES)
447
448 TAGS: $(TAGFILES)
449 etags $(TAGFILES)
450
451 releasetar:
452 @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
453 mkdir $$name; \
454 tar cf - $(CSRC) $(HDR) $(LIBNETDISSECT_SRC) $(EXTRA_DIST) $(TEST_DIST) | (cd $$name; tar xf -); \
455 tar -c -z -f $$name.tar.gz $$name; \
456 rm -rf $$name
457
458 testlist:
459 echo $(TEST_DIST)
460
461 depend: $(GENSRC)
462 $(MKDEP) -c "$(CC)" -m "$(DEPENDENCY_CFLAG)" $(DEFS) $(INCLS) $(SRC) $(LIBNETDISSECT_SRC)