]> The Tcpdump Group git mirrors - tcpdump/blob - Makefile.in
Merge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdump
[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 # @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.325 2008-11-21 23:17:26 guy Exp $ (LBL)
21
22 #
23 # Various configurable paths (remember to edit Makefile.in, not Makefile)
24 #
25
26 # Top level hierarchy
27 prefix = @prefix@
28 exec_prefix = @exec_prefix@
29 datarootdir = @datarootdir@
30 # Pathname of directory to install the binary
31 sbindir = @sbindir@
32 # Pathname of directory to install the man page
33 mandir = @mandir@
34
35 # VPATH
36 srcdir = @srcdir@
37 VPATH = @srcdir@
38
39 #
40 # You shouldn't need to edit anything below here.
41 #
42
43 CC = @CC@
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 # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
65 # Also, gcc does not remove the .o before forking 'as', which can be a
66 # problem if you don't own the file but can write to the directory.
67 .c.o:
68 @rm -f $@
69 $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
70
71 CSRC = addrtoname.c af.c checksum.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \
72 nlpid.c l2vpn.c machdep.c parsenfsfh.c \
73 print-802_11.c print-802_15_4.c print-ap1394.c print-ah.c \
74 print-arcnet.c print-aodv.c print-arp.c print-ascii.c print-atalk.c \
75 print-atm.c print-babel.c print-beep.c print-bfd.c print-bgp.c \
76 print-bootp.c print-bt.c print-cdp.c print-cfm.c print-chdlc.c \
77 print-cip.c print-cnfp.c print-dccp.c print-decnet.c \
78 print-domain.c print-dtp.c print-dvmrp.c print-enc.c print-egp.c \
79 print-eap.c print-eigrp.c\
80 print-esp.c print-ether.c print-fddi.c print-fr.c \
81 print-gre.c print-hsrp.c print-icmp.c print-igmp.c \
82 print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c print-ipnet.c \
83 print-ipx.c print-isoclns.c print-juniper.c print-krb.c \
84 print-l2tp.c print-lane.c print-ldp.c print-lldp.c print-llc.c \
85 print-lmp.c print-lspping.c print-lwapp.c \
86 print-lwres.c print-mobile.c print-mpcp.c print-mpls.c print-msdp.c \
87 print-nfs.c print-ntp.c print-null.c print-olsr.c print-ospf.c \
88 print-pgm.c print-pim.c print-ppp.c print-pppoe.c print-pptp.c \
89 print-radius.c print-raw.c print-rip.c print-rrcp.c print-rsvp.c \
90 print-rx.c print-sctp.c print-sflow.c print-sip.c print-sl.c print-sll.c \
91 print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \
92 print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \
93 print-timed.c print-token.c print-udld.c print-udp.c print-usb.c \
94 print-vjc.c print-vqp.c print-vrrp.c print-vtp.c print-forces.c \
95 print-wb.c print-zephyr.c signature.c setsignal.c tcpdump.c util.c
96
97 LIBNETDISSECT_SRC=print-isakmp.c
98 LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o)
99 LIBNETDISSECT=libnetdissect.a
100
101 LOCALSRC = @LOCALSRC@
102 GENSRC = version.c
103 LIBOBJS = @LIBOBJS@
104
105 SRC = $(CSRC) $(GENSRC) $(LOCALSRC) $(LIBNETDISSECT_SRC)
106
107 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
108 # hack the extra indirection
109 OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) $(LIBOBJS) $(LIBNETDISSECT_OBJ)
110 HDR = \
111 acconfig.h \
112 addrtoname.h \
113 af.h \
114 ah.h \
115 aodv.h \
116 appletalk.h \
117 arcnet.h \
118 atm.h \
119 atmuni31.h \
120 bootp.h \
121 bgp.h \
122 chdlc.h \
123 cpack.h \
124 dccp.h \
125 decnet.h \
126 decode_prefix.h \
127 enc.h \
128 esp.h \
129 ether.h \
130 ethertype.h \
131 extract.h \
132 fddi.h \
133 forces.h \
134 gmpls.h \
135 gmt2local.h \
136 icmp6.h \
137 ieee802_11.h \
138 ieee802_11_radio.h \
139 igrp.h \
140 interface.h \
141 interface.h \
142 ip.h \
143 ip6.h \
144 ipfc.h \
145 ipnet.h \
146 ipproto.h \
147 ipsec_doi.h \
148 ipx.h \
149 isakmp.h \
150 l2tp.h \
151 l2vpn.h \
152 lane.h \
153 llc.h \
154 machdep.h \
155 mib.h \
156 mpls.h \
157 nameser.h \
158 netbios.h \
159 netdissect.h \
160 nfs.h \
161 nfsfh.h \
162 nlpid.h \
163 ntp.h \
164 oakley.h \
165 ospf.h \
166 ospf6.h \
167 oui.h \
168 pcap-missing.h \
169 pmap_prot.h \
170 ppp.h \
171 route6d.h \
172 rpc_auth.h \
173 rpc_msg.h \
174 rx.h \
175 sctpConstants.h \
176 sctpHeader.h \
177 setsignal.h \
178 signature.h \
179 slcompress.h \
180 slip.h \
181 sll.h \
182 smb.h \
183 tcp.h \
184 tcpdump-stdinc.h \
185 telnet.h \
186 tftp.h \
187 timed.h \
188 token.h \
189 udp.h
190
191 TAGHDR = \
192 /usr/include/arpa/tftp.h \
193 /usr/include/net/if_arp.h \
194 /usr/include/net/slip.h \
195 /usr/include/netinet/if_ether.h \
196 /usr/include/netinet/in.h \
197 /usr/include/netinet/ip_icmp.h \
198 /usr/include/netinet/tcp.h \
199 /usr/include/netinet/udp.h \
200 /usr/include/protocols/routed.h
201
202 TAGFILES = $(SRC) $(HDR) $(TAGHDR)
203
204 CLEANFILES = $(PROG) $(OBJ) $(GENSRC)
205
206 EXTRA_DIST = \
207 CHANGES \
208 CREDITS \
209 INSTALL.txt \
210 LICENSE \
211 Makefile.in \
212 Makefile-devel-adds \
213 README \
214 Readme.Win32 \
215 VERSION \
216 aclocal.m4 \
217 atime.awk \
218 bpf_dump.c \
219 config.guess \
220 config.h.in \
221 config.sub \
222 configure \
223 configure.in \
224 install-sh \
225 lbl/os-osf4.h \
226 lbl/os-solaris2.h \
227 lbl/os-sunos4.h \
228 lbl/os-ultrix4.h \
229 makemib \
230 missing/addrinfo.h \
231 missing/dlnames.c \
232 missing/datalinks.c \
233 missing/getnameinfo.c \
234 missing/inet_aton.c \
235 missing/inet_ntop.c \
236 missing/inet_pton.c \
237 missing/snprintf.c \
238 missing/sockstorage.h \
239 missing/strdup.c \
240 missing/strlcat.c \
241 missing/strlcpy.c \
242 missing/strsep.c \
243 mkdep \
244 packetdat.awk \
245 pcap_dump_ftell.c \
246 print-dhcp6.c \
247 print-frag6.c \
248 print-icmp6.c \
249 print-ip6.c \
250 print-ip6opts.c \
251 print-mobility.c \
252 print-netbios.c \
253 print-ospf6.c \
254 print-pflog.c \
255 print-ripng.c \
256 print-rt6.c \
257 print-smb.c \
258 send-ack.awk \
259 smbutil.c \
260 stime.awk \
261 strcasecmp.c \
262 tcpdump.1.in \
263 tests/02-sunrise-sunset-esp.puu \
264 tests/08-sunrise-sunset-aes.puu \
265 tests/08-sunrise-sunset-esp2.puu \
266 tests/TESTLIST \
267 tests/TESTonce \
268 tests/TESTrun.sh \
269 tests/bgp-infinite-loop.pcap \
270 tests/bgp_vpn_attrset.out \
271 tests/bgp_vpn_attrset.pcap \
272 tests/chdlc-slarp-short.pcap \
273 tests/chdlc-slarp.pcap \
274 tests/dio.out \
275 tests/dio.pcap \
276 tests/e1000g.out \
277 tests/e1000g.pcap \
278 tests/eapon1.gdbinit \
279 tests/eapon1.out \
280 tests/eapon1.puu \
281 tests/eapon2.puu \
282 tests/empty.uu \
283 tests/esp-secrets.txt \
284 tests/esp0.out \
285 tests/esp1.gdbinit \
286 tests/esp1.out \
287 tests/esp2.gdbinit \
288 tests/esp2.out \
289 tests/esp3.gdbinit \
290 tests/esp4.gdbinit \
291 tests/esp5.gdbinit \
292 tests/esp5.out \
293 tests/espudp1.out \
294 tests/espudp1.puu \
295 tests/forces1.out \
296 tests/forces1.pcap \
297 tests/forces1vvv.out \
298 tests/forces1vvvv.out \
299 tests/forces2.out \
300 tests/forces2.pcap \
301 tests/forces2v.out \
302 tests/forces2vv.out \
303 tests/ikev2.puu \
304 tests/ikev2four.out \
305 tests/ikev2four.puu \
306 tests/ikev2fourv.out \
307 tests/ikev2fourv4.out \
308 tests/ikev2pI2-secrets.txt \
309 tests/ikev2pI2.out \
310 tests/ikev2pI2.puu \
311 tests/isakmp-delete-segfault.puu \
312 tests/isakmp-identification-segfault.puu \
313 tests/isakmp-pointer-loop.puu \
314 tests/isakmp1.out \
315 tests/isakmp2.out \
316 tests/isakmp3.out \
317 tests/isakmp4.out \
318 tests/isakmp4500.puu \
319 tests/isis-infinite-loop.pcap \
320 tests/ldp-infinite-loop.pcap \
321 tests/lmp.out \
322 tests/lmp.puu \
323 tests/lmp.sh \
324 tests/lspping-fec-ldp.pcap \
325 tests/lspping-fec-rsvp.pcap \
326 tests/mpls-ldp-hello.out \
327 tests/mpls-ldp-hello.puu \
328 tests/mpls-traceroute.pcap \
329 tests/ospf-gmpls.out \
330 tests/ospf-gmpls.puu \
331 tests/print-A.out \
332 tests/print-AA.out \
333 tests/print-capX.out \
334 tests/print-capXX.out \
335 tests/print-flags.puu \
336 tests/print-flags.sh \
337 tests/print-x.out \
338 tests/print-xx.out \
339 tests/rsvp-infinite-loop.pcap \
340 vfprintf.c \
341 win32/Include/bittypes.h \
342 win32/Include/errno.h \
343 win32/Include/getopt.h \
344 win32/Include/w32_fzs.h \
345 win32/Src/getopt.c \
346 win32/prj/GNUmakefile \
347 win32/prj/WinDump.dsp \
348 win32/prj/WinDump.dsw
349
350 all: $(PROG)
351
352 $(PROG): $(OBJ) @V_PCAPDEP@
353 @rm -f $@
354 $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
355
356 $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
357 @rm -f $@
358 $(AR) cr $@ $(LIBNETDISSECT_OBJ)
359 $(RANLIB) $@
360
361 datalinks.o: $(srcdir)/missing/datalinks.c
362 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
363 dlnames.o: $(srcdir)/missing/dlnames.c
364 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c
365 getnameinfo.o: $(srcdir)/missing/getnameinfo.c
366 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c
367 getaddrinfo.o: $(srcdir)/missing/getaddrinfo.c
368 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c
369 inet_pton.o: $(srcdir)/missing/inet_pton.c
370 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c
371 inet_ntop.o: $(srcdir)/missing/inet_ntop.c
372 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c
373 inet_aton.o: $(srcdir)/missing/inet_aton.c
374 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c
375 snprintf.o: $(srcdir)/missing/snprintf.c
376 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
377 strlcat.o: $(srcdir)/missing/strlcat.c
378 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
379 strlcpy.o: $(srcdir)/missing/strlcpy.c
380 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
381 strsep.o: $(srcdir)/missing/strsep.c
382 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c
383
384 version.o: version.c
385 $(CC) $(FULL_CFLAGS) -c version.c
386
387 version.c: $(srcdir)/VERSION
388 @rm -f $@
389 if grep GIT ${srcdir}/VERSION >/dev/null; then \
390 read ver <${srcdir}/VERSION; \
391 echo $$ver | tr -d '\012'; \
392 date +_%Y_%m_%d; \
393 else \
394 cat ${srcdir}/VERSION; \
395 fi | sed -e 's/.*/const char version[] = "&";/' > $@
396
397 install: all
398 [ -d $(DESTDIR)$(sbindir) ] || \
399 (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir))
400 $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
401 $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG).`cat ${srcdir}/VERSION`
402 [ -d $(DESTDIR)$(mandir)/man1 ] || \
403 (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
404 $(INSTALL_DATA) $(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1
405
406 uninstall:
407 rm -f $(DESTDIR)$(sbindir)/$(PROG)
408 rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1
409
410 lint: $(GENSRC)
411 lint -hbxn $(SRC) | \
412 grep -v 'struct/union .* never defined' | \
413 grep -v 'possible pointer alignment problem'
414
415 clean:
416 rm -f $(CLEANFILES) $(PROG)-`cat VERSION`.tar.gz
417
418 distclean:
419 rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
420 config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1
421 rm -rf autom4te.cache
422
423 check: tcpdump
424 uudecode <tests/empty.uu || (echo "No uudecode program found, not running tests"; echo "apt-get/rpm install sharutils?"; exit 1)
425 (cd tests && ./TESTrun.sh)
426
427 tags: $(TAGFILES)
428 ctags -wtd $(TAGFILES)
429
430 TAGS: $(TAGFILES)
431 etags $(TAGFILES)
432
433 releasetar:
434 @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
435 mkdir $$name; \
436 tar cf - $(CSRC) $(HDR) $(LIBNETDISSECT_SRC) $(EXTRA_DIST) | (cd $$name; tar xf -); \
437 tar -c -z -f $$name.tar.gz $$name; \
438 rm -rf $$name
439
440 depend: $(GENSRC)
441 ${srcdir}/mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)