]> The Tcpdump Group git mirrors - tcpdump/blob - Makefile.in
use a mnemonic constant in rpl_daoack_print()
[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 = setsignal.c tcpdump.c util.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 gmt2local.c \
84 in_cksum.c \
85 ipproto.c \
86 l2vpn.c \
87 machdep.c \
88 nlpid.c \
89 oui.c \
90 parsenfsfh.c \
91 print.c \
92 print-802_11.c \
93 print-802_15_4.c \
94 print-ah.c \
95 print-ahcp.c \
96 print-aodv.c \
97 print-aoe.c \
98 print-ap1394.c \
99 print-arcnet.c \
100 print-arp.c \
101 print-ascii.c \
102 print-atalk.c \
103 print-atm.c \
104 print-babel.c \
105 print-beep.c \
106 print-bfd.c \
107 print-bgp.c \
108 print-bootp.c \
109 print-bt.c \
110 print-calm-fast.c \
111 print-carp.c \
112 print-cdp.c \
113 print-cfm.c \
114 print-chdlc.c \
115 print-cip.c \
116 print-cnfp.c \
117 print-dccp.c \
118 print-decnet.c \
119 print-dhcp6.c \
120 print-domain.c \
121 print-dtp.c \
122 print-dvmrp.c \
123 print-eap.c \
124 print-egp.c \
125 print-eigrp.c \
126 print-enc.c \
127 print-esp.c \
128 print-ether.c \
129 print-fddi.c \
130 print-forces.c \
131 print-fr.c \
132 print-frag6.c \
133 print-ftp.c \
134 print-geneve.c \
135 print-geonet.c \
136 print-gre.c \
137 print-hsrp.c \
138 print-http.c \
139 print-icmp.c \
140 print-icmp6.c \
141 print-igmp.c \
142 print-igrp.c \
143 print-ip.c \
144 print-ip6.c \
145 print-ip6opts.c \
146 print-ipcomp.c \
147 print-ipfc.c \
148 print-ipnet.c \
149 print-ipx.c \
150 print-isakmp.c \
151 print-isoclns.c \
152 print-juniper.c \
153 print-krb.c \
154 print-l2tp.c \
155 print-lane.c \
156 print-ldp.c \
157 print-lisp.c \
158 print-llc.c \
159 print-lldp.c \
160 print-lmp.c \
161 print-loopback.c \
162 print-lspping.c \
163 print-lwapp.c \
164 print-lwres.c \
165 print-m3ua.c \
166 print-medsa.c \
167 print-mobile.c \
168 print-mobility.c \
169 print-mpcp.c \
170 print-mpls.c \
171 print-mptcp.c \
172 print-msdp.c \
173 print-msnlb.c \
174 print-nflog.c \
175 print-nfs.c \
176 print-nsh.c \
177 print-ntp.c \
178 print-null.c \
179 print-olsr.c \
180 print-openflow-1.0.c \
181 print-openflow.c \
182 print-ospf.c \
183 print-ospf6.c \
184 print-otv.c \
185 print-pgm.c \
186 print-pim.c \
187 print-pktap.c \
188 print-ppi.c \
189 print-ppp.c \
190 print-pppoe.c \
191 print-pptp.c \
192 print-radius.c \
193 print-raw.c \
194 print-resp.c \
195 print-rip.c \
196 print-ripng.c \
197 print-rpki-rtr.c \
198 print-rrcp.c \
199 print-rsvp.c \
200 print-rt6.c \
201 print-rtsp.c \
202 print-rx.c \
203 print-sctp.c \
204 print-sflow.c \
205 print-sip.c \
206 print-sl.c \
207 print-sll.c \
208 print-slow.c \
209 print-smtp.c \
210 print-snmp.c \
211 print-stp.c \
212 print-sunatm.c \
213 print-sunrpc.c \
214 print-symantec.c \
215 print-syslog.c \
216 print-tcp.c \
217 print-telnet.c \
218 print-tftp.c \
219 print-timed.c \
220 print-tipc.c \
221 print-token.c \
222 print-udld.c \
223 print-udp.c \
224 print-usb.c \
225 print-vjc.c \
226 print-vqp.c \
227 print-vrrp.c \
228 print-vtp.c \
229 print-vxlan.c \
230 print-vxlan-gpe.c \
231 print-wb.c \
232 print-zephyr.c \
233 print-zeromq.c \
234 signature.c \
235 strtoaddr.c \
236 util-print.c
237
238 LOCALSRC = @LOCALSRC@
239 GENSRC = version.c
240 LIBOBJS = @LIBOBJS@
241
242 LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) ${LOCALSRC:.c=.o} ${LIBOBJS}
243 LIBNETDISSECT=libnetdissect.a
244
245
246 SRC = $(CSRC) $(GENSRC) $(LOCALSRC) $(LIBNETDISSECT_SRC)
247
248 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
249 # hack the extra indirection
250 OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LIBNETDISSECT_OBJ)
251 HDR = \
252 addrtoname.h \
253 addrtostr.h \
254 af.h \
255 ah.h \
256 appletalk.h \
257 ascii_strcasecmp.h \
258 atm.h \
259 chdlc.h \
260 cpack.h \
261 ether.h \
262 ethertype.h \
263 extract.h \
264 getopt_long.h \
265 gmpls.h \
266 gmt2local.h \
267 interface.h \
268 ip.h \
269 ip6.h \
270 ipproto.h \
271 l2vpn.h \
272 llc.h \
273 machdep.h \
274 mib.h \
275 mpls.h \
276 nameser.h \
277 netdissect.h \
278 nfs.h \
279 nfsfh.h \
280 nlpid.h \
281 openflow.h \
282 ospf.h \
283 oui.h \
284 pcap-missing.h \
285 ppp.h \
286 print.h \
287 rpc_auth.h \
288 rpc_msg.h \
289 rpl.h \
290 setsignal.h \
291 signature.h \
292 slcompress.h \
293 smb.h \
294 strtoaddr.h \
295 tcp.h \
296 netdissect-stdinc.h \
297 timeval-operations.h \
298 udp.h
299
300 TAGHDR = \
301 /usr/include/arpa/tftp.h \
302 /usr/include/net/if_arp.h \
303 /usr/include/net/slip.h \
304 /usr/include/netinet/if_ether.h \
305 /usr/include/netinet/in.h \
306 /usr/include/netinet/ip_icmp.h \
307 /usr/include/netinet/tcp.h \
308 /usr/include/netinet/udp.h \
309 /usr/include/protocols/routed.h
310
311 TAGFILES = $(SRC) $(HDR) $(TAGHDR)
312
313 CLEANFILES = $(PROG) $(OBJ) $(GENSRC)
314
315 EXTRA_DIST = \
316 CHANGES \
317 CREDITS \
318 INSTALL.txt \
319 LICENSE \
320 Makefile.in \
321 Makefile-devel-adds \
322 README.md \
323 Readme.Win32 \
324 VERSION \
325 aclocal.m4 \
326 atime.awk \
327 bpf_dump.c \
328 config.guess \
329 config.h.in \
330 config.sub \
331 configure \
332 configure.in \
333 install-sh \
334 lbl/os-osf4.h \
335 lbl/os-solaris2.h \
336 lbl/os-sunos4.h \
337 lbl/os-ultrix4.h \
338 makemib \
339 missing/dlnames.c \
340 missing/datalinks.c \
341 missing/getopt_long.c \
342 missing/snprintf.c \
343 missing/strdup.c \
344 missing/strlcat.c \
345 missing/strlcpy.c \
346 missing/strsep.c \
347 mkdep \
348 packetdat.awk \
349 pcap_dump_ftell.c \
350 print-pflog.c \
351 print-smb.c \
352 send-ack.awk \
353 smbutil.c \
354 stime.awk \
355 tcpdump.1.in \
356 vfprintf.c \
357 win32/prj/GNUmakefile \
358 win32/prj/WinDump.dsp \
359 win32/prj/WinDump.dsw
360
361 TEST_DIST= `find tests \( -name 'DIFF' -prune \) -o \( -name NEW -prune \) -o -type f \! -name '.*' \! -name '*~' -print`
362
363 all: $(PROG) $(LIBNETDISSECT)
364
365 $(PROG): $(OBJ) @V_PCAPDEP@
366 @rm -f $@
367 $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
368
369 $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
370 @rm -f $@
371 $(AR) cr $@ $(LIBNETDISSECT_OBJ)
372 $(RANLIB) $@
373
374 datalinks.o: $(srcdir)/missing/datalinks.c
375 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
376 dlnames.o: $(srcdir)/missing/dlnames.c
377 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c
378 getopt_long.o: $(srcdir)/missing/getopt_long.c
379 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getopt_long.c
380 snprintf.o: $(srcdir)/missing/snprintf.c
381 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
382 strdup.o: $(srcdir)/missing/strdup.c
383 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strdup.c
384 strlcat.o: $(srcdir)/missing/strlcat.c
385 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
386 strlcpy.o: $(srcdir)/missing/strlcpy.c
387 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
388 strsep.o: $(srcdir)/missing/strsep.c
389 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c
390
391 version.o: version.c
392 $(CC) $(FULL_CFLAGS) -c version.c
393
394 version.c: $(srcdir)/VERSION
395 @rm -f $@
396 if grep GIT ${srcdir}/VERSION >/dev/null; then \
397 read ver <${srcdir}/VERSION; \
398 echo $$ver | tr -d '\012'; \
399 date +_%Y_%m_%d; \
400 else \
401 cat ${srcdir}/VERSION; \
402 fi | sed -e 's/.*/const char version[] = "&";/' > $@
403
404 install: all
405 [ -d $(DESTDIR)$(sbindir) ] || \
406 (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir))
407 $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
408 $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG).`cat ${srcdir}/VERSION`
409 [ -d $(DESTDIR)$(mandir)/man1 ] || \
410 (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
411 $(INSTALL_DATA) $(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1
412
413 uninstall:
414 rm -f $(DESTDIR)$(sbindir)/$(PROG)
415 rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1
416
417 lint: $(GENSRC)
418 lint -hbxn $(SRC) | \
419 grep -v 'struct/union .* never defined' | \
420 grep -v 'possible pointer alignment problem'
421
422 clean:
423 rm -f $(CLEANFILES) $(PROG)-`cat VERSION`.tar.gz
424
425 distclean:
426 rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
427 config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1 \
428 libnetdissect.a tests/.failed tests/.passed \
429 tests/failure-outputs.txt
430 rm -rf autom4te.cache tests/DIFF tests/NEW
431
432 check: tcpdump
433 (cd tests && ./TESTrun.sh)
434
435 tags: $(TAGFILES)
436 ctags -wtd $(TAGFILES)
437
438 TAGS: $(TAGFILES)
439 etags $(TAGFILES)
440
441 releasetar:
442 @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
443 mkdir $$name; \
444 tar cf - $(CSRC) $(HDR) $(LIBNETDISSECT_SRC) $(EXTRA_DIST) $(TEST_DIST) | (cd $$name; tar xf -); \
445 tar -c -z -f $$name.tar.gz $$name; \
446 rm -rf $$name
447
448 testlist:
449 echo $(TEST_DIST)
450
451 depend: $(GENSRC)
452 $(MKDEP) -c $(CC) -m $(DEPENDENCY_CFLAG) $(DEFS) $(INCLS) $(SRC)