blob: 4ffca817b328357d79d1f992dca700f14c7505a2 [file] [log] [blame]
The Android Open Source Project2949f582009-03-03 19:30:46 -08001# 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.
The Android Open Source Project2949f582009-03-03 19:30:46 -080019
20#
21# Various configurable paths (remember to edit Makefile.in, not Makefile)
22#
23
24# Top level hierarchy
25prefix = @prefix@
26exec_prefix = @exec_prefix@
JP Abgrall53f17a92014-02-12 14:02:41 -080027datarootdir = @datarootdir@
The Android Open Source Project2949f582009-03-03 19:30:46 -080028# Pathname of directory to install the binary
Elliott Hughes820eced2021-08-20 18:00:50 -070029bindir = @bindir@
The Android Open Source Project2949f582009-03-03 19:30:46 -080030# Pathname of directory to install the man page
31mandir = @mandir@
32
33# VPATH
34srcdir = @srcdir@
Elliott Hughes820eced2021-08-20 18:00:50 -070035top_srcdir = @top_srcdir@
The Android Open Source Project2949f582009-03-03 19:30:46 -080036VPATH = @srcdir@
37
38#
39# You shouldn't need to edit anything below here.
40#
41
42CC = @CC@
Elliott Hughes892a68b2015-10-19 14:43:53 -070043AR = @AR@
JP Abgrall53f17a92014-02-12 14:02:41 -080044MKDEP = @MKDEP@
The Android Open Source Project2949f582009-03-03 19:30:46 -080045PROG = tcpdump
46CCOPT = @V_CCOPT@
47INCLS = -I. @V_INCLS@
48DEFS = @DEFS@ @CPPFLAGS@ @V_DEFS@
49
50# Standard CFLAGS
JP Abgrall53f17a92014-02-12 14:02:41 -080051CFLAGS = @CFLAGS@
52FULL_CFLAGS = $(CCOPT) $(DEFS) $(INCLS) $(CFLAGS)
The Android Open Source Project2949f582009-03-03 19:30:46 -080053
54# Standard LDFLAGS
55LDFLAGS = @LDFLAGS@
56
57# Standard LIBS
58LIBS = @LIBS@
59
60INSTALL = @INSTALL@
61INSTALL_PROGRAM = @INSTALL_PROGRAM@
62INSTALL_DATA = @INSTALL_DATA@
JP Abgrall53f17a92014-02-12 14:02:41 -080063RANLIB = @RANLIB@
64
65DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
The Android Open Source Project2949f582009-03-03 19:30:46 -080066
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 $@
JP Abgrall53f17a92014-02-12 14:02:41 -080072 $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
The Android Open Source Project2949f582009-03-03 19:30:46 -080073
Elliott Hughes820eced2021-08-20 18:00:50 -070074CSRC = fptype.c tcpdump.c
JP Abgrall53f17a92014-02-12 14:02:41 -080075
Elliott Hughes892a68b2015-10-19 14:43:53 -070076LIBNETDISSECT_SRC=\
77 addrtoname.c \
Elliott Hughese2e3bd12017-05-15 10:59:29 -070078 addrtostr.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -070079 af.c \
Elliott Hughese2e3bd12017-05-15 10:59:29 -070080 ascii_strcasecmp.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -070081 checksum.c \
82 cpack.c \
83 gmpls.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -070084 in_cksum.c \
85 ipproto.c \
86 l2vpn.c \
87 machdep.c \
Elliott Hughes820eced2021-08-20 18:00:50 -070088 netdissect.c \
89 netdissect-alloc.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -070090 nlpid.c \
Elliott Hughes820eced2021-08-20 18:00:50 -070091 ntp.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -070092 oui.c \
93 parsenfsfh.c \
Elliott Hughese2e3bd12017-05-15 10:59:29 -070094 print.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -070095 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 \
Elliott Hughes820eced2021-08-20 18:00:50 -0700103 print-arista.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700104 print-arp.c \
105 print-ascii.c \
106 print-atalk.c \
107 print-atm.c \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700108 print-babel.c \
Elliott Hughes820eced2021-08-20 18:00:50 -0700109 print-bcm-li.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700110 print-beep.c \
111 print-bfd.c \
112 print-bgp.c \
113 print-bootp.c \
Elliott Hughes820eced2021-08-20 18:00:50 -0700114 print-brcmtag.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700115 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 \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700125 print-dhcp6.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700126 print-domain.c \
Elliott Hughes820eced2021-08-20 18:00:50 -0700127 print-dsa.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700128 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 \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700139 print-frag6.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700140 print-ftp.c \
141 print-geneve.c \
142 print-geonet.c \
143 print-gre.c \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700144 print-hncp.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700145 print-hsrp.c \
146 print-http.c \
147 print-icmp.c \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700148 print-icmp6.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700149 print-igmp.c \
150 print-igrp.c \
Elliott Hughes820eced2021-08-20 18:00:50 -0700151 print-ip-demux.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700152 print-ip.c \
153 print-ip6.c \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700154 print-ip6opts.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700155 print-ipcomp.c \
156 print-ipfc.c \
157 print-ipnet.c \
Elliott Hughes820eced2021-08-20 18:00:50 -0700158 print-ipoib.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700159 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 \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700167 print-lisp.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700168 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 \
Elliott Hughes820eced2021-08-20 18:00:50 -0700176 print-macsec.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700177 print-mobile.c \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700178 print-mobility.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700179 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 \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700186 print-nsh.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700187 print-ntp.c \
188 print-null.c \
189 print-olsr.c \
190 print-openflow-1.0.c \
Elliott Hughes820eced2021-08-20 18:00:50 -0700191 print-openflow-1.3.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700192 print-openflow.c \
193 print-ospf.c \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700194 print-ospf6.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700195 print-otv.c \
196 print-pgm.c \
197 print-pim.c \
198 print-pktap.c \
199 print-ppi.c \
200 print-ppp.c \
201 print-pppoe.c \
202 print-pptp.c \
Elliott Hughes820eced2021-08-20 18:00:50 -0700203 print-ptp.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700204 print-radius.c \
205 print-raw.c \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700206 print-resp.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700207 print-rip.c \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700208 print-ripng.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700209 print-rpki-rtr.c \
210 print-rrcp.c \
211 print-rsvp.c \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700212 print-rt6.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700213 print-rtsp.c \
214 print-rx.c \
215 print-sctp.c \
216 print-sflow.c \
217 print-sip.c \
218 print-sl.c \
219 print-sll.c \
220 print-slow.c \
221 print-smtp.c \
222 print-snmp.c \
Elliott Hughes820eced2021-08-20 18:00:50 -0700223 print-someip.c \
224 print-ssh.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700225 print-stp.c \
226 print-sunatm.c \
227 print-sunrpc.c \
228 print-symantec.c \
229 print-syslog.c \
230 print-tcp.c \
231 print-telnet.c \
232 print-tftp.c \
233 print-timed.c \
234 print-tipc.c \
235 print-token.c \
236 print-udld.c \
237 print-udp.c \
Elliott Hughes820eced2021-08-20 18:00:50 -0700238 print-unsupported.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700239 print-usb.c \
240 print-vjc.c \
241 print-vqp.c \
242 print-vrrp.c \
Elliott Hughes820eced2021-08-20 18:00:50 -0700243 print-vsock.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700244 print-vtp.c \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700245 print-vxlan-gpe.c \
Elliott Hughes820eced2021-08-20 18:00:50 -0700246 print-vxlan.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700247 print-wb.c \
Elliott Hughes820eced2021-08-20 18:00:50 -0700248 print-zep.c \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700249 print-zephyr.c \
250 print-zeromq.c \
251 signature.c \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700252 strtoaddr.c \
253 util-print.c
The Android Open Source Project2949f582009-03-03 19:30:46 -0800254
255LOCALSRC = @LOCALSRC@
The Android Open Source Project2949f582009-03-03 19:30:46 -0800256LIBOBJS = @LIBOBJS@
257
Elliott Hughes892a68b2015-10-19 14:43:53 -0700258LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) ${LOCALSRC:.c=.o} ${LIBOBJS}
259LIBNETDISSECT=libnetdissect.a
260
261
Elliott Hughes820eced2021-08-20 18:00:50 -0700262SRC = $(CSRC) $(LOCALSRC)
The Android Open Source Project2949f582009-03-03 19:30:46 -0800263
264# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
265# hack the extra indirection
Elliott Hughes820eced2021-08-20 18:00:50 -0700266OBJ = $(CSRC:.c=.o)
JP Abgrall53f17a92014-02-12 14:02:41 -0800267HDR = \
268 addrtoname.h \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700269 addrtostr.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800270 af.h \
271 ah.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800272 appletalk.h \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700273 ascii_strcasecmp.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800274 atm.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800275 chdlc.h \
Elliott Hughes820eced2021-08-20 18:00:50 -0700276 compiler-tests.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800277 cpack.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800278 ethertype.h \
279 extract.h \
Elliott Hughes820eced2021-08-20 18:00:50 -0700280 fptype.h \
281 ftmacros.h \
Elliott Hughescec480a2017-12-19 16:54:57 -0800282 funcattrs.h \
Elliott Hughes820eced2021-08-20 18:00:50 -0700283 getservent.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800284 gmpls.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800285 interface.h \
286 ip.h \
287 ip6.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800288 ipproto.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800289 l2vpn.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800290 llc.h \
291 machdep.h \
292 mib.h \
293 mpls.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800294 nameser.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800295 netdissect.h \
Elliott Hughes820eced2021-08-20 18:00:50 -0700296 netdissect-alloc.h \
297 netdissect-ctype.h \
298 netdissect-stdinc.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800299 nfs.h \
300 nfsfh.h \
301 nlpid.h \
Elliott Hughes820eced2021-08-20 18:00:50 -0700302 ntp.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800303 openflow.h \
304 ospf.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800305 oui.h \
306 pcap-missing.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800307 ppp.h \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700308 print.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800309 rpc_auth.h \
310 rpc_msg.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800311 signature.h \
312 slcompress.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800313 smb.h \
Elliott Hughes820eced2021-08-20 18:00:50 -0700314 status-exit-codes.h \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700315 strtoaddr.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800316 tcp.h \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700317 timeval-operations.h \
Elliott Hughes820eced2021-08-20 18:00:50 -0700318 udp.h \
319 varattrs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -0800320
321TAGHDR = \
The Android Open Source Project2949f582009-03-03 19:30:46 -0800322 /usr/include/netinet/if_ether.h \
Elliott Hughes820eced2021-08-20 18:00:50 -0700323 /usr/include/netinet/in.h
The Android Open Source Project2949f582009-03-03 19:30:46 -0800324
Elliott Hughes820eced2021-08-20 18:00:50 -0700325TAGFILES = $(SRC) $(HDR) $(TAGHDR) $(LIBNETDISSECT_SRC) \
326 print-pflog.c print-smb.c smbutil.c
The Android Open Source Project2949f582009-03-03 19:30:46 -0800327
Elliott Hughes820eced2021-08-20 18:00:50 -0700328CLEANFILES = $(PROG) $(OBJ) $(LIBNETDISSECT_OBJ)
The Android Open Source Project2949f582009-03-03 19:30:46 -0800329
JP Abgrall53f17a92014-02-12 14:02:41 -0800330EXTRA_DIST = \
331 CHANGES \
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700332 CONTRIBUTING \
JP Abgrall53f17a92014-02-12 14:02:41 -0800333 CREDITS \
Elliott Hughes820eced2021-08-20 18:00:50 -0700334 CMakeLists.txt \
JP Abgrall53f17a92014-02-12 14:02:41 -0800335 INSTALL.txt \
336 LICENSE \
337 Makefile.in \
338 Makefile-devel-adds \
339 README.md \
JP Abgrall53f17a92014-02-12 14:02:41 -0800340 VERSION \
341 aclocal.m4 \
342 atime.awk \
343 bpf_dump.c \
Elliott Hughes820eced2021-08-20 18:00:50 -0700344 cmake_uninstall.cmake.in \
345 cmakeconfig.h.in \
346 cmake/Modules/FindCRYPTO.cmake \
347 cmake/Modules/FindPCAP.cmake \
348 cmake/Modules/FindSMI.cmake \
JP Abgrall53f17a92014-02-12 14:02:41 -0800349 config.guess \
350 config.h.in \
351 config.sub \
352 configure \
Elliott Hughes820eced2021-08-20 18:00:50 -0700353 configure.ac \
354 doc/README.Win32.md \
JP Abgrall53f17a92014-02-12 14:02:41 -0800355 install-sh \
356 lbl/os-osf4.h \
357 lbl/os-solaris2.h \
358 lbl/os-sunos4.h \
359 lbl/os-ultrix4.h \
360 makemib \
JP Abgrall53f17a92014-02-12 14:02:41 -0800361 missing/dlnames.c \
362 missing/datalinks.c \
Elliott Hughes820eced2021-08-20 18:00:50 -0700363 missing/getopt_long.h \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700364 missing/getopt_long.c \
Elliott Hughes820eced2021-08-20 18:00:50 -0700365 missing/getservent.c \
366 missing/pcap_dump_ftell.c \
JP Abgrall53f17a92014-02-12 14:02:41 -0800367 missing/snprintf.c \
JP Abgrall53f17a92014-02-12 14:02:41 -0800368 missing/strdup.c \
369 missing/strlcat.c \
370 missing/strlcpy.c \
371 missing/strsep.c \
Elliott Hughes820eced2021-08-20 18:00:50 -0700372 missing/win_ether_ntohost.c \
373 missing/win_ether_ntohost.h \
JP Abgrall53f17a92014-02-12 14:02:41 -0800374 mkdep \
375 packetdat.awk \
JP Abgrall53f17a92014-02-12 14:02:41 -0800376 print-pflog.c \
JP Abgrall53f17a92014-02-12 14:02:41 -0800377 print-smb.c \
378 send-ack.awk \
379 smbutil.c \
380 stime.awk \
Elliott Hughes820eced2021-08-20 18:00:50 -0700381 tcpdump.1.in
JP Abgrall53f17a92014-02-12 14:02:41 -0800382
Elliott Hughes820eced2021-08-20 18:00:50 -0700383TEST_DIST= `git ls-files tests | grep -v 'tests/\..*'`
JP Abgrall53f17a92014-02-12 14:02:41 -0800384
Elliott Hughes820eced2021-08-20 18:00:50 -0700385all: $(PROG)
The Android Open Source Project2949f582009-03-03 19:30:46 -0800386
Elliott Hughes820eced2021-08-20 18:00:50 -0700387$(PROG): $(OBJ) @V_PCAPDEP@ $(LIBNETDISSECT)
The Android Open Source Project2949f582009-03-03 19:30:46 -0800388 @rm -f $@
Elliott Hughes820eced2021-08-20 18:00:50 -0700389 $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBNETDISSECT) $(LIBS)
JP Abgrall53f17a92014-02-12 14:02:41 -0800390
391$(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
392 @rm -f $@
Elliott Hughes892a68b2015-10-19 14:43:53 -0700393 $(AR) cr $@ $(LIBNETDISSECT_OBJ)
JP Abgrall53f17a92014-02-12 14:02:41 -0800394 $(RANLIB) $@
The Android Open Source Project2949f582009-03-03 19:30:46 -0800395
396datalinks.o: $(srcdir)/missing/datalinks.c
JP Abgrall53f17a92014-02-12 14:02:41 -0800397 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
The Android Open Source Project2949f582009-03-03 19:30:46 -0800398dlnames.o: $(srcdir)/missing/dlnames.c
JP Abgrall53f17a92014-02-12 14:02:41 -0800399 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c
Elliott Hughes820eced2021-08-20 18:00:50 -0700400getservent.o: $(srcdir)/missing/getservent.c
401 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getservent.c
Elliott Hughes892a68b2015-10-19 14:43:53 -0700402getopt_long.o: $(srcdir)/missing/getopt_long.c
403 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getopt_long.c
The Android Open Source Project2949f582009-03-03 19:30:46 -0800404snprintf.o: $(srcdir)/missing/snprintf.c
JP Abgrall53f17a92014-02-12 14:02:41 -0800405 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
Elliott Hughes892a68b2015-10-19 14:43:53 -0700406strdup.o: $(srcdir)/missing/strdup.c
407 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strdup.c
The Android Open Source Project2949f582009-03-03 19:30:46 -0800408strlcat.o: $(srcdir)/missing/strlcat.c
JP Abgrall53f17a92014-02-12 14:02:41 -0800409 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
The Android Open Source Project2949f582009-03-03 19:30:46 -0800410strlcpy.o: $(srcdir)/missing/strlcpy.c
JP Abgrall53f17a92014-02-12 14:02:41 -0800411 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
The Android Open Source Project2949f582009-03-03 19:30:46 -0800412strsep.o: $(srcdir)/missing/strsep.c
JP Abgrall53f17a92014-02-12 14:02:41 -0800413 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c
Elliott Hughes820eced2021-08-20 18:00:50 -0700414pcap_dump_ftell.o: $(srcdir)/missing/pcap_dump_ftell.c
415 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/pcap_dump_ftell.c
The Android Open Source Project2949f582009-03-03 19:30:46 -0800416
JP Abgrall53f17a92014-02-12 14:02:41 -0800417install: all
Elliott Hughes820eced2021-08-20 18:00:50 -0700418 [ -d $(DESTDIR)$(bindir) ] || \
419 (mkdir -p $(DESTDIR)$(bindir); chmod 755 $(DESTDIR)$(bindir))
420 $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(bindir)/$(PROG)
421 $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(bindir)/$(PROG).`cat ${srcdir}/VERSION`
The Android Open Source Project2949f582009-03-03 19:30:46 -0800422 [ -d $(DESTDIR)$(mandir)/man1 ] || \
423 (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
JP Abgrall53f17a92014-02-12 14:02:41 -0800424 $(INSTALL_DATA) $(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1
The Android Open Source Project2949f582009-03-03 19:30:46 -0800425
426uninstall:
Elliott Hughes820eced2021-08-20 18:00:50 -0700427 rm -f $(DESTDIR)$(bindir)/$(PROG)
428 rm -f $(DESTDIR)$(bindir)/$(PROG).`cat ${srcdir}/VERSION`
The Android Open Source Project2949f582009-03-03 19:30:46 -0800429 rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1
430
Elliott Hughes820eced2021-08-20 18:00:50 -0700431lint:
432 lint -hbxn $(SRC) $(LIBNETDISSECT_SRC) | \
The Android Open Source Project2949f582009-03-03 19:30:46 -0800433 grep -v 'struct/union .* never defined' | \
434 grep -v 'possible pointer alignment problem'
435
436clean:
Elliott Hughes820eced2021-08-20 18:00:50 -0700437 rm -f $(CLEANFILES) $(PROG)-`cat ${srcdir}/VERSION`.tar.gz
The Android Open Source Project2949f582009-03-03 19:30:46 -0800438
439distclean:
440 rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
Elliott Hughes892a68b2015-10-19 14:43:53 -0700441 config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1 \
442 libnetdissect.a tests/.failed tests/.passed \
443 tests/failure-outputs.txt
444 rm -rf autom4te.cache tests/DIFF tests/NEW
JP Abgrall53f17a92014-02-12 14:02:41 -0800445
446check: tcpdump
Elliott Hughes820eced2021-08-20 18:00:50 -0700447 $(srcdir)/tests/TESTrun
The Android Open Source Project2949f582009-03-03 19:30:46 -0800448
Elliott Hughese2e3bd12017-05-15 10:59:29 -0700449extags: $(TAGFILES)
450 ctags $(TAGFILES)
451
The Android Open Source Project2949f582009-03-03 19:30:46 -0800452tags: $(TAGFILES)
453 ctags -wtd $(TAGFILES)
454
JP Abgrall53f17a92014-02-12 14:02:41 -0800455TAGS: $(TAGFILES)
456 etags $(TAGFILES)
457
The Android Open Source Project2949f582009-03-03 19:30:46 -0800458releasetar:
Elliott Hughes820eced2021-08-20 18:00:50 -0700459 @autoreconf -f; \
460 name=$(PROG)-`cat VERSION` ; \
JP Abgrall53f17a92014-02-12 14:02:41 -0800461 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
Elliott Hughes820eced2021-08-20 18:00:50 -0700466rc1 rc2 rc3 rc4 rc5:
467 @VER=`cat $(srcdir)/VERSION`; \
468 sed -i "s/$$VER/$${VER}$@/" VERSION ; \
469 make releasetar; \
470 git checkout VERSION configure
471
JP Abgrall53f17a92014-02-12 14:02:41 -0800472testlist:
473 echo $(TEST_DIST)
The Android Open Source Project2949f582009-03-03 19:30:46 -0800474
Elliott Hughes820eced2021-08-20 18:00:50 -0700475depend:
476 $(MKDEP) -c "$(CC)" -m "$(DEPENDENCY_CFLAG)" -s "$(srcdir)" $(DEFS) $(INCLS) $(SRC) $(LIBNETDISSECT_SRC)
477
478shellcheck:
479 shellcheck -f gcc build.sh build_matrix.sh