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