]> The Tcpdump Group git mirrors - tcpdump/blob - Makefile.in
Autosar SOME/IP protocol support
[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 print-someip.c \
245 signature.c \
246 strtoaddr.c \
247 util-print.c
248
249 LOCALSRC = @LOCALSRC@
250 LIBOBJS = @LIBOBJS@
251
252 LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) ${LOCALSRC:.c=.o} ${LIBOBJS}
253 LIBNETDISSECT=libnetdissect.a
254
255
256 SRC = $(CSRC) $(GENSRC) $(LOCALSRC)
257
258 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
259 # hack the extra indirection
260 OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o)
261 HDR = \
262 addrtoname.h \
263 addrtostr.h \
264 af.h \
265 ah.h \
266 appletalk.h \
267 ascii_strcasecmp.h \
268 atm.h \
269 chdlc.h \
270 compiler-tests.h \
271 cpack.h \
272 ethertype.h \
273 extract.h \
274 funcattrs.h \
275 getservent.h \
276 gmpls.h \
277 interface.h \
278 ip.h \
279 ip6.h \
280 ipproto.h \
281 l2vpn.h \
282 llc.h \
283 machdep.h \
284 mib.h \
285 mpls.h \
286 nameser.h \
287 netdissect.h \
288 netdissect-alloc.h \
289 netdissect-ctype.h \
290 netdissect-stdinc.h \
291 nfs.h \
292 nfsfh.h \
293 nlpid.h \
294 openflow.h \
295 ospf.h \
296 oui.h \
297 pcap-missing.h \
298 ppp.h \
299 print.h \
300 rpc_auth.h \
301 rpc_msg.h \
302 signature.h \
303 slcompress.h \
304 smb.h \
305 status-exit-codes.h \
306 strtoaddr.h \
307 tcp.h \
308 timeval-operations.h \
309 udp.h \
310 varattrs.h
311
312 TAGHDR = \
313 /usr/include/arpa/tftp.h \
314 /usr/include/net/if_arp.h \
315 /usr/include/netinet/if_ether.h \
316 /usr/include/netinet/in.h \
317 /usr/include/netinet/ip_icmp.h \
318 /usr/include/netinet/tcp.h \
319 /usr/include/netinet/udp.h \
320 /usr/include/protocols/routed.h
321
322 TAGFILES = $(SRC) $(HDR) $(TAGHDR) $(LIBNETDISSECT_SRC)
323
324 CLEANFILES = $(PROG) $(OBJ) $(GENSRC) $(LIBNETDISSECT_OBJ)
325
326 EXTRA_DIST = \
327 CHANGES \
328 CONTRIBUTING \
329 CREDITS \
330 CMakeLists.txt \
331 INSTALL.txt \
332 LICENSE \
333 Makefile.in \
334 Makefile-devel-adds \
335 PLATFORMS \
336 README \
337 README.md \
338 Readme.Win32 \
339 VERSION \
340 aclocal.m4 \
341 atime.awk \
342 bpf_dump.c \
343 cmake_uninstall.cmake.in \
344 cmakeconfig.h.in \
345 cmake/Modules/FindCRYPTO.cmake \
346 cmake/Modules/FindPCAP.cmake \
347 cmake/Modules/FindSMI.cmake \
348 config.guess \
349 config.h.in \
350 config.sub \
351 configure \
352 configure.ac \
353 install-sh \
354 lbl/os-osf4.h \
355 lbl/os-solaris2.h \
356 lbl/os-sunos4.h \
357 lbl/os-ultrix4.h \
358 makemib \
359 missing/dlnames.c \
360 missing/datalinks.c \
361 missing/getopt_long.h \
362 missing/getopt_long.c \
363 missing/getservent.c \
364 missing/pcap_dump_ftell.c \
365 missing/snprintf.c \
366 missing/strdup.c \
367 missing/strlcat.c \
368 missing/strlcpy.c \
369 missing/strsep.c \
370 missing/win_ether_ntohost.c \
371 missing/win_ether_ntohost.h \
372 mkdep \
373 packetdat.awk \
374 print-pflog.c \
375 print-smb.c \
376 send-ack.awk \
377 smbutil.c \
378 stime.awk \
379 tcpdump.1.in \
380 win32/prj/GNUmakefile \
381 win32/prj/WinDump.dsp \
382 win32/prj/WinDump.dsw \
383 win32/prj/WinDump.sln \
384 win32/prj/WinDump.vcproj
385
386 TEST_DIST= `git ls-files tests | grep -v 'tests/\..*'`
387
388 all: $(PROG)
389
390 $(PROG): $(OBJ) @V_PCAPDEP@ $(LIBNETDISSECT)
391 @rm -f $@
392 $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBNETDISSECT) $(LIBS)
393
394 $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
395 @rm -f $@
396 $(AR) cr $@ $(LIBNETDISSECT_OBJ)
397 $(RANLIB) $@
398
399 datalinks.o: $(srcdir)/missing/datalinks.c
400 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
401 dlnames.o: $(srcdir)/missing/dlnames.c
402 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c
403 getservent.o: $(srcdir)/missing/getservent.c
404 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getservent.c
405 getopt_long.o: $(srcdir)/missing/getopt_long.c
406 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getopt_long.c
407 snprintf.o: $(srcdir)/missing/snprintf.c
408 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
409 strdup.o: $(srcdir)/missing/strdup.c
410 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strdup.c
411 strlcat.o: $(srcdir)/missing/strlcat.c
412 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
413 strlcpy.o: $(srcdir)/missing/strlcpy.c
414 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
415 strsep.o: $(srcdir)/missing/strsep.c
416 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c
417 pcap_dump_ftell.o: $(srcdir)/missing/pcap_dump_ftell.c
418 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/pcap_dump_ftell.c
419
420 install: all
421 [ -d $(DESTDIR)$(sbindir) ] || \
422 (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir))
423 $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
424 $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG).`cat ${srcdir}/VERSION`
425 [ -d $(DESTDIR)$(mandir)/man1 ] || \
426 (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
427 $(INSTALL_DATA) $(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1
428
429 uninstall:
430 rm -f $(DESTDIR)$(sbindir)/$(PROG)
431 rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1
432
433 lint: $(GENSRC)
434 lint -hbxn $(SRC) $(LIBNETDISSECT_SRC) | \
435 grep -v 'struct/union .* never defined' | \
436 grep -v 'possible pointer alignment problem'
437
438 clean:
439 rm -f $(CLEANFILES) $(PROG)-`cat VERSION`.tar.gz
440
441 distclean:
442 rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
443 config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1 \
444 libnetdissect.a tests/.failed tests/.passed \
445 tests/failure-outputs.txt
446 rm -rf autom4te.cache tests/DIFF tests/NEW
447
448 check: tcpdump
449 $(srcdir)/tests/TESTrun
450
451 extags: $(TAGFILES)
452 ctags $(TAGFILES)
453
454 tags: $(TAGFILES)
455 ctags -wtd $(TAGFILES)
456
457 TAGS: $(TAGFILES)
458 etags $(TAGFILES)
459
460 releasetar:
461 @name=$(PROG)-`cat VERSION` ; \
462 mkdir $$name; \
463 tar cf - $(CSRC) $(HDR) $(LIBNETDISSECT_SRC) $(EXTRA_DIST) $(TEST_DIST) | (cd $$name; tar xf -); \
464 tar -c -z -f $$name.tar.gz $$name; \
465 rm -rf $$name
466
467 testlist:
468 echo $(TEST_DIST)
469
470 depend: $(GENSRC)
471 $(MKDEP) -c "$(CC)" -m "$(DEPENDENCY_CFLAG)" $(DEFS) $(INCLS) $(SRC) $(LIBNETDISSECT_SRC)