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