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