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