]> The Tcpdump Group git mirrors - tcpdump/blob - Makefile.in
CI: Introduce and use TCPDUMP_CMAKE_TAINTED
[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 bindir = @bindir@
30 # Pathname of directory to install the man page
31 mandir = @mandir@
32
33 # VPATH
34 srcdir = @srcdir@
35 top_srcdir = @top_srcdir@
36 VPATH = @srcdir@
37
38 #
39 # You shouldn't need to edit anything below here.
40 #
41
42 CC = @CC@
43 AR = @AR@
44 MKDEP = @MKDEP@
45 PROG = tcpdump
46 CCOPT = @V_CCOPT@
47 INCLS = -I. @V_INCLS@
48 DEFS = @DEFS@ @CPPFLAGS@ @V_DEFS@
49
50 # Standard CFLAGS
51 CFLAGS = @CFLAGS@
52 FULL_CFLAGS = $(CCOPT) $(DEFS) $(INCLS) $(CFLAGS)
53
54 # Standard LDFLAGS
55 LDFLAGS = @LDFLAGS@
56
57 # Standard LIBS
58 LIBS = @LIBS@
59
60 INSTALL = @INSTALL@
61 INSTALL_PROGRAM = @INSTALL_PROGRAM@
62 INSTALL_DATA = @INSTALL_DATA@
63 RANLIB = @RANLIB@
64
65 DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
66
67 # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
68 # Also, gcc does not remove the .o before forking 'as', which can be a
69 # problem if you don't own the file but can write to the directory.
70 .c.o:
71 @rm -f $@
72 $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
73
74 CSRC = fptype.c tcpdump.c
75
76 LIBNETDISSECT_SRC=\
77 addrtoname.c \
78 addrtostr.c \
79 af.c \
80 ascii_strcasecmp.c \
81 checksum.c \
82 cpack.c \
83 gmpls.c \
84 in_cksum.c \
85 ipproto.c \
86 l2vpn.c \
87 machdep.c \
88 netdissect.c \
89 netdissect-alloc.c \
90 nlpid.c \
91 ntp.c \
92 oui.c \
93 parsenfsfh.c \
94 print.c \
95 print-802_11.c \
96 print-802_15_4.c \
97 print-ah.c \
98 print-ahcp.c \
99 print-aodv.c \
100 print-aoe.c \
101 print-ap1394.c \
102 print-arcnet.c \
103 print-arista.c \
104 print-arp.c \
105 print-ascii.c \
106 print-atalk.c \
107 print-atm.c \
108 print-babel.c \
109 print-bcm-li.c \
110 print-beep.c \
111 print-bfd.c \
112 print-bgp.c \
113 print-bootp.c \
114 print-brcmtag.c \
115 print-bt.c \
116 print-calm-fast.c \
117 print-carp.c \
118 print-cdp.c \
119 print-cfm.c \
120 print-chdlc.c \
121 print-cip.c \
122 print-cnfp.c \
123 print-dccp.c \
124 print-decnet.c \
125 print-dhcp6.c \
126 print-domain.c \
127 print-dsa.c \
128 print-dtp.c \
129 print-dvmrp.c \
130 print-eap.c \
131 print-egp.c \
132 print-eigrp.c \
133 print-enc.c \
134 print-esp.c \
135 print-ether.c \
136 print-fddi.c \
137 print-forces.c \
138 print-fr.c \
139 print-frag6.c \
140 print-ftp.c \
141 print-geneve.c \
142 print-geonet.c \
143 print-gre.c \
144 print-hncp.c \
145 print-hsrp.c \
146 print-http.c \
147 print-icmp.c \
148 print-icmp6.c \
149 print-igmp.c \
150 print-igrp.c \
151 print-ip-demux.c \
152 print-ip.c \
153 print-ip6.c \
154 print-ip6opts.c \
155 print-ipcomp.c \
156 print-ipfc.c \
157 print-ipnet.c \
158 print-ipoib.c \
159 print-ipx.c \
160 print-isakmp.c \
161 print-isoclns.c \
162 print-juniper.c \
163 print-krb.c \
164 print-l2tp.c \
165 print-lane.c \
166 print-ldp.c \
167 print-lisp.c \
168 print-llc.c \
169 print-lldp.c \
170 print-lmp.c \
171 print-loopback.c \
172 print-lspping.c \
173 print-lwapp.c \
174 print-lwres.c \
175 print-m3ua.c \
176 print-macsec.c \
177 print-mobile.c \
178 print-mobility.c \
179 print-mpcp.c \
180 print-mpls.c \
181 print-mptcp.c \
182 print-msdp.c \
183 print-msnlb.c \
184 print-nflog.c \
185 print-nfs.c \
186 print-nsh.c \
187 print-ntp.c \
188 print-null.c \
189 print-olsr.c \
190 print-openflow-1.0.c \
191 print-openflow-1.3.c \
192 print-openflow.c \
193 print-ospf.c \
194 print-ospf6.c \
195 print-otv.c \
196 print-pflog.c \
197 print-pgm.c \
198 print-pim.c \
199 print-pktap.c \
200 print-ppi.c \
201 print-ppp.c \
202 print-pppoe.c \
203 print-pptp.c \
204 print-ptp.c \
205 print-radius.c \
206 print-raw.c \
207 print-realtek.c \
208 print-resp.c \
209 print-rip.c \
210 print-ripng.c \
211 print-rpki-rtr.c \
212 print-rsvp.c \
213 print-rt6.c \
214 print-rtsp.c \
215 print-rx.c \
216 print-sctp.c \
217 print-sflow.c \
218 print-sip.c \
219 print-sl.c \
220 print-sll.c \
221 print-slow.c \
222 print-smtp.c \
223 print-snmp.c \
224 print-someip.c \
225 print-ssh.c \
226 print-stp.c \
227 print-sunatm.c \
228 print-sunrpc.c \
229 print-symantec.c \
230 print-syslog.c \
231 print-tcp.c \
232 print-telnet.c \
233 print-tftp.c \
234 print-timed.c \
235 print-tipc.c \
236 print-token.c \
237 print-udld.c \
238 print-udp.c \
239 print-unsupported.c \
240 print-usb.c \
241 print-vjc.c \
242 print-vqp.c \
243 print-vrrp.c \
244 print-vsock.c \
245 print-vtp.c \
246 print-vxlan-gpe.c \
247 print-vxlan.c \
248 print-wb.c \
249 print-whois.c \
250 print-zep.c \
251 print-zephyr.c \
252 print-zeromq.c \
253 signature.c \
254 strtoaddr.c \
255 util-print.c
256
257 LOCALSRC = @LOCALSRC@
258 LIBOBJS = @LIBOBJS@
259
260 LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) ${LOCALSRC:.c=.o} ${LIBOBJS}
261 LIBNETDISSECT=libnetdissect.a
262
263
264 SRC = $(CSRC) $(LOCALSRC)
265
266 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
267 # hack the extra indirection
268 OBJ = $(CSRC:.c=.o)
269 HDR = \
270 addrtoname.h \
271 addrtostr.h \
272 af.h \
273 ah.h \
274 appletalk.h \
275 ascii_strcasecmp.h \
276 atm.h \
277 chdlc.h \
278 compiler-tests.h \
279 cpack.h \
280 diag-control.h \
281 ethertype.h \
282 extract.h \
283 fptype.h \
284 ftmacros.h \
285 funcattrs.h \
286 getservent.h \
287 gmpls.h \
288 interface.h \
289 ip.h \
290 ip6.h \
291 ipproto.h \
292 l2vpn.h \
293 llc.h \
294 machdep.h \
295 mib.h \
296 mpls.h \
297 nameser.h \
298 netdissect.h \
299 netdissect-alloc.h \
300 netdissect-ctype.h \
301 netdissect-stdinc.h \
302 nfs.h \
303 nfsfh.h \
304 nlpid.h \
305 ntp.h \
306 openflow.h \
307 ospf.h \
308 oui.h \
309 pcap-missing.h \
310 pflog.h \
311 ppp.h \
312 print.h \
313 rpc_auth.h \
314 rpc_msg.h \
315 signature.h \
316 slcompress.h \
317 smb.h \
318 status-exit-codes.h \
319 strtoaddr.h \
320 tcp.h \
321 timeval-operations.h \
322 udp.h \
323 varattrs.h
324
325 TAGHDR = \
326 /usr/include/netinet/if_ether.h \
327 /usr/include/netinet/in.h
328
329 TAGFILES = $(SRC) $(HDR) $(TAGHDR) $(LIBNETDISSECT_SRC) \
330 print-pflog.c print-smb.c smbutil.c
331
332 CLEANFILES = $(PROG) $(OBJ) $(LIBNETDISSECT_OBJ)
333
334 EXTRA_DIST = \
335 CHANGES \
336 CMakeLists.txt \
337 CONTRIBUTING \
338 CREDITS \
339 INSTALL.txt \
340 LICENSE \
341 Makefile-devel-adds \
342 Makefile.in \
343 README.md \
344 VERSION \
345 aclocal.m4 \
346 atime.awk \
347 bpf_dump.c \
348 cmake/Modules/FindCRYPTO.cmake \
349 cmake/Modules/FindPCAP.cmake \
350 cmake/Modules/FindSMI.cmake \
351 cmake_uninstall.cmake.in \
352 cmakeconfig.h.in \
353 config.guess \
354 config.h.in \
355 config.sub \
356 configure \
357 configure.ac \
358 doc/README.aix.md \
359 doc/README.solaris.md \
360 doc/README.Win32.md \
361 install-sh \
362 lbl/os-osf4.h \
363 lbl/os-solaris2.h \
364 lbl/os-sunos4.h \
365 lbl/os-ultrix4.h \
366 makemib \
367 missing/datalinks.c \
368 missing/dlnames.c \
369 missing/getopt_long.c \
370 missing/getopt_long.h \
371 missing/getservent.c \
372 missing/pcap_dump_ftell.c \
373 missing/snprintf.c \
374 missing/strdup.c \
375 missing/strlcat.c \
376 missing/strlcpy.c \
377 missing/strsep.c \
378 mkdep \
379 packetdat.awk \
380 print-pflog.c \
381 print-smb.c \
382 send-ack.awk \
383 smbutil.c \
384 stime.awk \
385 tcpdump.1.in
386
387 TEST_DIST= `git ls-files tests | grep -v 'tests/\..*'`
388
389 RELEASE_FILES = $(CSRC) $(HDR) $(LIBNETDISSECT_SRC) $(EXTRA_DIST) $(TEST_DIST)
390
391 all: $(PROG)
392
393 $(PROG): $(OBJ) @V_PCAPDEP@ $(LIBNETDISSECT)
394 @rm -f $@
395 $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBNETDISSECT) $(LIBS)
396
397 $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
398 @rm -f $@
399 $(AR) cr $@ $(LIBNETDISSECT_OBJ)
400 $(RANLIB) $@
401
402 datalinks.o: $(srcdir)/missing/datalinks.c
403 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
404 dlnames.o: $(srcdir)/missing/dlnames.c
405 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c
406 getservent.o: $(srcdir)/missing/getservent.c
407 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getservent.c
408 getopt_long.o: $(srcdir)/missing/getopt_long.c
409 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getopt_long.c
410 snprintf.o: $(srcdir)/missing/snprintf.c
411 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
412 strdup.o: $(srcdir)/missing/strdup.c
413 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strdup.c
414 strlcat.o: $(srcdir)/missing/strlcat.c
415 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
416 strlcpy.o: $(srcdir)/missing/strlcpy.c
417 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
418 strsep.o: $(srcdir)/missing/strsep.c
419 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c
420 pcap_dump_ftell.o: $(srcdir)/missing/pcap_dump_ftell.c
421 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/pcap_dump_ftell.c
422
423 install: all
424 [ -d $(DESTDIR)$(bindir) ] || \
425 (mkdir -p $(DESTDIR)$(bindir); chmod 755 $(DESTDIR)$(bindir))
426 $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(bindir)/$(PROG)
427 $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(bindir)/$(PROG).`cat ${srcdir}/VERSION`
428 [ -d $(DESTDIR)$(mandir)/man1 ] || \
429 (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
430 $(INSTALL_DATA) $(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1
431
432 uninstall:
433 rm -f $(DESTDIR)$(bindir)/$(PROG)
434 rm -f $(DESTDIR)$(bindir)/$(PROG).`cat ${srcdir}/VERSION`
435 rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1
436
437 lint:
438 lint -hbxn $(SRC) $(LIBNETDISSECT_SRC) | \
439 grep -v 'struct/union .* never defined' | \
440 grep -v 'possible pointer alignment problem'
441
442 clean:
443 rm -f $(CLEANFILES) $(PROG)-`cat ${srcdir}/VERSION`.tar.gz
444
445 distclean:
446 rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
447 config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1 \
448 libnetdissect.a tests/.failed tests/.passed \
449 tests/failure-outputs.txt
450 rm -rf autom4te.cache tests/DIFF tests/NEW
451
452 check: tcpdump
453 $(srcdir)/tests/TESTrun
454
455 extags: $(TAGFILES)
456 ctags $(TAGFILES)
457
458 tags: $(TAGFILES)
459 ctags -wtd $(TAGFILES)
460
461 TAGS: $(TAGFILES)
462 etags $(TAGFILES)
463
464 releasetar:
465 @TAG=$(PROG)-`cat VERSION` && \
466 if git show-ref --tags --quiet --verify -- "refs/tags/$$TAG"; then \
467 git archive --prefix="$$TAG"/ -o "$$TAG".tar.gz "$$TAG" \
468 $(RELEASE_FILES) && \
469 echo "Archive build from tag $$TAG."; \
470 else \
471 git archive --prefix="$$TAG"/ -o "$$TAG".tar.gz HEAD \
472 $(RELEASE_FILES) && \
473 echo "No $$TAG tag. Archive build from HEAD."; \
474 fi
475
476 testlist:
477 echo $(TEST_DIST)
478
479 depend:
480 $(MKDEP) -c "$(CC)" -m "$(DEPENDENCY_CFLAG)" -s "$(srcdir)" $(DEFS) $(INCLS) $(SRC) $(LIBNETDISSECT_SRC)
481
482 shellcheck:
483 shellcheck -f gcc -e SC2006 build.sh build_matrix.sh build_common.sh