Makefile.in 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  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. # Various configurable paths (remember to edit Makefile.in, not Makefile)
  21. #
  22. # Top level hierarchy
  23. prefix = @prefix@
  24. exec_prefix = @exec_prefix@
  25. datarootdir = @datarootdir@
  26. # Pathname of directory to install the binary
  27. sbindir = @sbindir@
  28. # Pathname of directory to install the man page
  29. mandir = @mandir@
  30. # VPATH
  31. srcdir = @srcdir@
  32. VPATH = @srcdir@
  33. #
  34. # You shouldn't need to edit anything below here.
  35. #
  36. CC = @CC@
  37. AR = @AR@
  38. MKDEP = @MKDEP@
  39. PROG = tcpdump
  40. CCOPT = @V_CCOPT@
  41. INCLS = -I. @V_INCLS@
  42. DEFS = @DEFS@ @CPPFLAGS@ @V_DEFS@
  43. # Standard CFLAGS
  44. CFLAGS = @CFLAGS@
  45. FULL_CFLAGS = $(CCOPT) $(DEFS) $(INCLS) $(CFLAGS)
  46. # Standard LDFLAGS
  47. LDFLAGS = @LDFLAGS@
  48. # Standard LIBS
  49. LIBS = @LIBS@
  50. INSTALL = @INSTALL@
  51. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  52. INSTALL_DATA = @INSTALL_DATA@
  53. RANLIB = @RANLIB@
  54. DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
  55. # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
  56. # Also, gcc does not remove the .o before forking 'as', which can be a
  57. # problem if you don't own the file but can write to the directory.
  58. .c.o:
  59. @rm -f $@
  60. $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
  61. CSRC = setsignal.c tcpdump.c
  62. LIBNETDISSECT_SRC=\
  63. addrtoname.c \
  64. addrtostr.c \
  65. af.c \
  66. ascii_strcasecmp.c \
  67. checksum.c \
  68. cpack.c \
  69. gmpls.c \
  70. gmt2local.c \
  71. in_cksum.c \
  72. ipproto.c \
  73. l2vpn.c \
  74. machdep.c \
  75. nlpid.c \
  76. oui.c \
  77. parsenfsfh.c \
  78. print.c \
  79. print-802_11.c \
  80. print-802_15_4.c \
  81. print-ah.c \
  82. print-ahcp.c \
  83. print-aodv.c \
  84. print-aoe.c \
  85. print-ap1394.c \
  86. print-arcnet.c \
  87. print-arp.c \
  88. print-ascii.c \
  89. print-atalk.c \
  90. print-atm.c \
  91. print-babel.c \
  92. print-beep.c \
  93. print-bfd.c \
  94. print-bgp.c \
  95. print-bootp.c \
  96. print-bt.c \
  97. print-calm-fast.c \
  98. print-carp.c \
  99. print-cdp.c \
  100. print-cfm.c \
  101. print-chdlc.c \
  102. print-cip.c \
  103. print-cnfp.c \
  104. print-dccp.c \
  105. print-decnet.c \
  106. print-dhcp6.c \
  107. print-domain.c \
  108. print-dtp.c \
  109. print-dvmrp.c \
  110. print-eap.c \
  111. print-egp.c \
  112. print-eigrp.c \
  113. print-enc.c \
  114. print-esp.c \
  115. print-ether.c \
  116. print-fddi.c \
  117. print-forces.c \
  118. print-fr.c \
  119. print-frag6.c \
  120. print-ftp.c \
  121. print-geneve.c \
  122. print-geonet.c \
  123. print-gre.c \
  124. print-hncp.c \
  125. print-hsrp.c \
  126. print-http.c \
  127. print-icmp.c \
  128. print-icmp6.c \
  129. print-igmp.c \
  130. print-igrp.c \
  131. print-ip.c \
  132. print-ip6.c \
  133. print-ip6opts.c \
  134. print-ipcomp.c \
  135. print-ipfc.c \
  136. print-ipnet.c \
  137. print-ipx.c \
  138. print-isakmp.c \
  139. print-isoclns.c \
  140. print-juniper.c \
  141. print-krb.c \
  142. print-l2tp.c \
  143. print-lane.c \
  144. print-ldp.c \
  145. print-lisp.c \
  146. print-llc.c \
  147. print-lldp.c \
  148. print-lmp.c \
  149. print-loopback.c \
  150. print-lspping.c \
  151. print-lwapp.c \
  152. print-lwres.c \
  153. print-m3ua.c \
  154. print-medsa.c \
  155. print-mobile.c \
  156. print-mobility.c \
  157. print-mpcp.c \
  158. print-mpls.c \
  159. print-mptcp.c \
  160. print-msdp.c \
  161. print-msnlb.c \
  162. print-nflog.c \
  163. print-nfs.c \
  164. print-nsh.c \
  165. print-ntp.c \
  166. print-null.c \
  167. print-olsr.c \
  168. print-openflow-1.0.c \
  169. print-openflow.c \
  170. print-ospf.c \
  171. print-ospf6.c \
  172. print-otv.c \
  173. print-pgm.c \
  174. print-pim.c \
  175. print-pktap.c \
  176. print-ppi.c \
  177. print-ppp.c \
  178. print-pppoe.c \
  179. print-pptp.c \
  180. print-radius.c \
  181. print-raw.c \
  182. print-resp.c \
  183. print-rip.c \
  184. print-ripng.c \
  185. print-rpki-rtr.c \
  186. print-rrcp.c \
  187. print-rsvp.c \
  188. print-rt6.c \
  189. print-rtsp.c \
  190. print-rx.c \
  191. print-sctp.c \
  192. print-sflow.c \
  193. print-sip.c \
  194. print-sl.c \
  195. print-sll.c \
  196. print-slow.c \
  197. print-smtp.c \
  198. print-snmp.c \
  199. print-stp.c \
  200. print-sunatm.c \
  201. print-sunrpc.c \
  202. print-symantec.c \
  203. print-syslog.c \
  204. print-tcp.c \
  205. print-telnet.c \
  206. print-tftp.c \
  207. print-timed.c \
  208. print-tipc.c \
  209. print-token.c \
  210. print-udld.c \
  211. print-udp.c \
  212. print-usb.c \
  213. print-vjc.c \
  214. print-vqp.c \
  215. print-vrrp.c \
  216. print-vtp.c \
  217. print-vxlan.c \
  218. print-vxlan-gpe.c \
  219. print-wb.c \
  220. print-zephyr.c \
  221. print-zeromq.c \
  222. netdissect.c \
  223. signature.c \
  224. strtoaddr.c \
  225. util-print.c
  226. LOCALSRC = @LOCALSRC@
  227. GENSRC = version.c
  228. LIBOBJS = @LIBOBJS@
  229. LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) ${LOCALSRC:.c=.o} ${LIBOBJS}
  230. LIBNETDISSECT=libnetdissect.a
  231. SRC = $(CSRC) $(GENSRC) $(LOCALSRC) $(LIBNETDISSECT_SRC)
  232. # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
  233. # hack the extra indirection
  234. OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LIBNETDISSECT_OBJ)
  235. HDR = \
  236. addrtoname.h \
  237. addrtostr.h \
  238. af.h \
  239. ah.h \
  240. appletalk.h \
  241. ascii_strcasecmp.h \
  242. atm.h \
  243. chdlc.h \
  244. cpack.h \
  245. ether.h \
  246. ethertype.h \
  247. extract.h \
  248. funcattrs.h \
  249. getopt_long.h \
  250. gmpls.h \
  251. gmt2local.h \
  252. interface.h \
  253. ip.h \
  254. ip6.h \
  255. ipproto.h \
  256. l2vpn.h \
  257. llc.h \
  258. machdep.h \
  259. mib.h \
  260. mpls.h \
  261. nameser.h \
  262. netdissect.h \
  263. nfs.h \
  264. nfsfh.h \
  265. nlpid.h \
  266. openflow.h \
  267. ospf.h \
  268. oui.h \
  269. pcap-missing.h \
  270. ppp.h \
  271. print.h \
  272. rpc_auth.h \
  273. rpc_msg.h \
  274. rpl.h \
  275. setsignal.h \
  276. signature.h \
  277. slcompress.h \
  278. smb.h \
  279. strtoaddr.h \
  280. tcp.h \
  281. netdissect-stdinc.h \
  282. timeval-operations.h \
  283. udp.h
  284. TAGHDR = \
  285. /usr/include/arpa/tftp.h \
  286. /usr/include/net/if_arp.h \
  287. /usr/include/netinet/if_ether.h \
  288. /usr/include/netinet/in.h \
  289. /usr/include/netinet/ip_icmp.h \
  290. /usr/include/netinet/tcp.h \
  291. /usr/include/netinet/udp.h \
  292. /usr/include/protocols/routed.h
  293. TAGFILES = $(SRC) $(HDR) $(TAGHDR)
  294. CLEANFILES = $(PROG) $(OBJ) $(GENSRC)
  295. EXTRA_DIST = \
  296. CHANGES \
  297. CONTRIBUTING \
  298. CREDITS \
  299. INSTALL.txt \
  300. LICENSE \
  301. Makefile.in \
  302. Makefile-devel-adds \
  303. PLATFORMS \
  304. README \
  305. README.md \
  306. Readme.Win32 \
  307. VERSION \
  308. aclocal.m4 \
  309. atime.awk \
  310. bpf_dump.c \
  311. config.guess \
  312. config.h.in \
  313. config.sub \
  314. configure \
  315. configure.in \
  316. install-sh \
  317. lbl/os-osf4.h \
  318. lbl/os-solaris2.h \
  319. lbl/os-sunos4.h \
  320. lbl/os-ultrix4.h \
  321. makemib \
  322. missing/dlnames.c \
  323. missing/datalinks.c \
  324. missing/getopt_long.c \
  325. missing/snprintf.c \
  326. missing/strdup.c \
  327. missing/strlcat.c \
  328. missing/strlcpy.c \
  329. missing/strsep.c \
  330. mkdep \
  331. packetdat.awk \
  332. pcap_dump_ftell.c \
  333. print-pflog.c \
  334. print-smb.c \
  335. send-ack.awk \
  336. smbutil.c \
  337. stime.awk \
  338. tcpdump.1.in \
  339. vfprintf.c \
  340. win32/prj/GNUmakefile \
  341. win32/prj/WinDump.dsp \
  342. win32/prj/WinDump.dsw \
  343. win32/prj/WinDump.sln \
  344. win32/prj/WinDump.vcproj \
  345. win32/src/ether_ntohost.c
  346. TEST_DIST= `find tests \( -name 'DIFF' -prune \) -o \( -name NEW -prune \) -o -type f \! -name '.*' \! -name '*~' -print`
  347. all: $(PROG) $(LIBNETDISSECT)
  348. $(PROG): $(OBJ) @V_PCAPDEP@
  349. @rm -f $@
  350. $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
  351. $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
  352. @rm -f $@
  353. $(AR) cr $@ $(LIBNETDISSECT_OBJ)
  354. $(RANLIB) $@
  355. datalinks.o: $(srcdir)/missing/datalinks.c
  356. $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
  357. dlnames.o: $(srcdir)/missing/dlnames.c
  358. $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c
  359. getopt_long.o: $(srcdir)/missing/getopt_long.c
  360. $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getopt_long.c
  361. snprintf.o: $(srcdir)/missing/snprintf.c
  362. $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
  363. strdup.o: $(srcdir)/missing/strdup.c
  364. $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strdup.c
  365. strlcat.o: $(srcdir)/missing/strlcat.c
  366. $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
  367. strlcpy.o: $(srcdir)/missing/strlcpy.c
  368. $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
  369. strsep.o: $(srcdir)/missing/strsep.c
  370. $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c
  371. version.o: version.c
  372. $(CC) $(FULL_CFLAGS) -c version.c
  373. version.c: $(srcdir)/VERSION
  374. @rm -f $@
  375. if grep GIT ${srcdir}/VERSION >/dev/null; then \
  376. read ver <${srcdir}/VERSION; \
  377. echo $$ver | tr -d '\012'; \
  378. date +_%Y_%m_%d; \
  379. else \
  380. cat ${srcdir}/VERSION; \
  381. fi | sed -e 's/.*/const char version[] = "&";/' > $@
  382. install: all
  383. [ -d $(DESTDIR)$(sbindir) ] || \
  384. (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir))
  385. $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
  386. $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG).`cat ${srcdir}/VERSION`
  387. [ -d $(DESTDIR)$(mandir)/man1 ] || \
  388. (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
  389. $(INSTALL_DATA) $(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1
  390. uninstall:
  391. rm -f $(DESTDIR)$(sbindir)/$(PROG)
  392. rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1
  393. lint: $(GENSRC)
  394. lint -hbxn $(SRC) | \
  395. grep -v 'struct/union .* never defined' | \
  396. grep -v 'possible pointer alignment problem'
  397. clean:
  398. rm -f $(CLEANFILES) $(PROG)-`cat VERSION`.tar.gz
  399. distclean:
  400. rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
  401. config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1 \
  402. libnetdissect.a tests/.failed tests/.passed \
  403. tests/failure-outputs.txt
  404. rm -rf autom4te.cache tests/DIFF tests/NEW
  405. check: tcpdump
  406. (cd tests && ./TESTrun.sh)
  407. extags: $(TAGFILES)
  408. ctags $(TAGFILES)
  409. tags: $(TAGFILES)
  410. ctags -wtd $(TAGFILES)
  411. TAGS: $(TAGFILES)
  412. etags $(TAGFILES)
  413. releasetar:
  414. @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
  415. mkdir $$name; \
  416. tar cf - $(CSRC) $(HDR) $(LIBNETDISSECT_SRC) $(EXTRA_DIST) $(TEST_DIST) | (cd $$name; tar xf -); \
  417. tar -c -z -f $$name.tar.gz $$name; \
  418. rm -rf $$name
  419. testlist:
  420. echo $(TEST_DIST)
  421. depend: $(GENSRC)
  422. $(MKDEP) -c $(CC) -m $(DEPENDENCY_CFLAG) $(DEFS) $(INCLS) $(SRC)