14644f044SBill Fenner# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 24edb46e9SPaul Traina# The Regents of the University of California. All rights reserved. 34edb46e9SPaul Traina# 44edb46e9SPaul Traina# Redistribution and use in source and binary forms, with or without 54edb46e9SPaul Traina# modification, are permitted provided that: (1) source code distributions 64edb46e9SPaul Traina# retain the above copyright notice and this paragraph in its entirety, (2) 74edb46e9SPaul Traina# distributions including binary code include the above copyright notice and 84edb46e9SPaul Traina# this paragraph in its entirety in the documentation or other materials 94edb46e9SPaul Traina# provided with the distribution, and (3) all advertising materials mentioning 104edb46e9SPaul Traina# features or use of this software display the following acknowledgement: 114edb46e9SPaul Traina# ``This product includes software developed by the University of California, 124edb46e9SPaul Traina# Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 134edb46e9SPaul Traina# the University nor the names of its contributors may be used to endorse 144edb46e9SPaul Traina# or promote products derived from this software without specific prior 154edb46e9SPaul Traina# written permission. 164edb46e9SPaul Traina# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 174edb46e9SPaul Traina# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 184edb46e9SPaul Traina# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 194edb46e9SPaul Traina 204edb46e9SPaul Traina# 214edb46e9SPaul Traina# Various configurable paths (remember to edit Makefile.in, not Makefile) 224edb46e9SPaul Traina# 234edb46e9SPaul Traina 244edb46e9SPaul Traina# Top level hierarchy 254edb46e9SPaul Trainaprefix = @prefix@ 264edb46e9SPaul Trainaexec_prefix = @exec_prefix@ 27cac3dcd5SXin LIdatarootdir = @datarootdir@ 284edb46e9SPaul Traina# Pathname of directory to install the binary 29ee67461eSJoseph Mingronebindir = @bindir@ 304edb46e9SPaul Traina# Pathname of directory to install the man page 31685295f4SBill Fennermandir = @mandir@ 324edb46e9SPaul Traina 334de76e31SBill Fenner# VPATH 344de76e31SBill Fennersrcdir = @srcdir@ 35ee67461eSJoseph Mingronetop_srcdir = @top_srcdir@ 364de76e31SBill FennerVPATH = @srcdir@ 374de76e31SBill Fenner 384edb46e9SPaul Traina# 394edb46e9SPaul Traina# You shouldn't need to edit anything below here. 404edb46e9SPaul Traina# 414edb46e9SPaul Traina 424edb46e9SPaul TrainaCC = @CC@ 433c602fabSXin LIAR = @AR@ 443c602fabSXin LIMKDEP = @MKDEP@ 454644f044SBill FennerPROG = tcpdump 464edb46e9SPaul TrainaCCOPT = @V_CCOPT@ 474edb46e9SPaul TrainaINCLS = -I. @V_INCLS@ 481de50e9fSSam LefflerDEFS = @DEFS@ @CPPFLAGS@ @V_DEFS@ 494edb46e9SPaul Traina 504edb46e9SPaul Traina# Standard CFLAGS 51cac3dcd5SXin LICFLAGS = @CFLAGS@ 52cac3dcd5SXin LIFULL_CFLAGS = $(CCOPT) $(DEFS) $(INCLS) $(CFLAGS) 534edb46e9SPaul Traina 544644f044SBill Fenner# Standard LDFLAGS 554644f044SBill FennerLDFLAGS = @LDFLAGS@ 564644f044SBill Fenner 574edb46e9SPaul Traina# Standard LIBS 584edb46e9SPaul TrainaLIBS = @LIBS@ 594edb46e9SPaul Traina 604edb46e9SPaul TrainaINSTALL = @INSTALL@ 61685295f4SBill FennerINSTALL_PROGRAM = @INSTALL_PROGRAM@ 62685295f4SBill FennerINSTALL_DATA = @INSTALL_DATA@ 63a5779b6eSRui PauloRANLIB = @RANLIB@ 644edb46e9SPaul Traina 653c602fabSXin LIDEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@ 663c602fabSXin LI 674edb46e9SPaul Traina# Explicitly define compilation rule since SunOS 4's make doesn't like gcc. 684edb46e9SPaul Traina# Also, gcc does not remove the .o before forking 'as', which can be a 694edb46e9SPaul Traina# problem if you don't own the file but can write to the directory. 704edb46e9SPaul Traina.c.o: 714edb46e9SPaul Traina @rm -f $@ 72cac3dcd5SXin LI $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c 734edb46e9SPaul Traina 74ee67461eSJoseph MingroneCSRC = fptype.c tcpdump.c 75685295f4SBill Fenner 763c602fabSXin LILIBNETDISSECT_SRC=\ 773c602fabSXin LI addrtoname.c \ 783340d773SGleb Smirnoff addrtostr.c \ 793c602fabSXin LI af.c \ 803340d773SGleb Smirnoff ascii_strcasecmp.c \ 813c602fabSXin LI checksum.c \ 823c602fabSXin LI cpack.c \ 833c602fabSXin LI gmpls.c \ 843c602fabSXin LI in_cksum.c \ 853c602fabSXin LI ipproto.c \ 863c602fabSXin LI l2vpn.c \ 873c602fabSXin LI machdep.c \ 88ee67461eSJoseph Mingrone netdissect.c \ 89ee67461eSJoseph Mingrone netdissect-alloc.c \ 903c602fabSXin LI nlpid.c \ 91ee67461eSJoseph Mingrone ntp.c \ 923c602fabSXin LI oui.c \ 933c602fabSXin LI parsenfsfh.c \ 943340d773SGleb Smirnoff print.c \ 953c602fabSXin LI print-802_11.c \ 963c602fabSXin LI print-802_15_4.c \ 973c602fabSXin LI print-ah.c \ 983c602fabSXin LI print-ahcp.c \ 993c602fabSXin LI print-aodv.c \ 1003c602fabSXin LI print-aoe.c \ 1013c602fabSXin LI print-ap1394.c \ 1023c602fabSXin LI print-arcnet.c \ 103ee67461eSJoseph Mingrone print-arista.c \ 1043c602fabSXin LI print-arp.c \ 1053c602fabSXin LI print-ascii.c \ 1063c602fabSXin LI print-atalk.c \ 1073c602fabSXin LI print-atm.c \ 1083340d773SGleb Smirnoff print-babel.c \ 109ee67461eSJoseph Mingrone print-bcm-li.c \ 1103c602fabSXin LI print-beep.c \ 1113c602fabSXin LI print-bfd.c \ 1123c602fabSXin LI print-bgp.c \ 1133c602fabSXin LI print-bootp.c \ 114ee67461eSJoseph Mingrone print-brcmtag.c \ 1153c602fabSXin LI print-bt.c \ 1163c602fabSXin LI print-calm-fast.c \ 1173c602fabSXin LI print-carp.c \ 1183c602fabSXin LI print-cdp.c \ 1193c602fabSXin LI print-cfm.c \ 1203c602fabSXin LI print-chdlc.c \ 1213c602fabSXin LI print-cip.c \ 1223c602fabSXin LI print-cnfp.c \ 1233c602fabSXin LI print-dccp.c \ 1243c602fabSXin LI print-decnet.c \ 1253340d773SGleb Smirnoff print-dhcp6.c \ 1263c602fabSXin LI print-domain.c \ 127ee67461eSJoseph Mingrone print-dsa.c \ 1283c602fabSXin LI print-dtp.c \ 1293c602fabSXin LI print-dvmrp.c \ 1303c602fabSXin LI print-eap.c \ 1313c602fabSXin LI print-egp.c \ 1323c602fabSXin LI print-eigrp.c \ 1333c602fabSXin LI print-enc.c \ 1343c602fabSXin LI print-esp.c \ 1353c602fabSXin LI print-ether.c \ 1363c602fabSXin LI print-fddi.c \ 1373c602fabSXin LI print-forces.c \ 1383c602fabSXin LI print-fr.c \ 1393340d773SGleb Smirnoff print-frag6.c \ 1408bdc5a62SPatrick Kelsey print-ftp.c \ 1418bdc5a62SPatrick Kelsey print-geneve.c \ 1423c602fabSXin LI print-geonet.c \ 1433c602fabSXin LI print-gre.c \ 1443340d773SGleb Smirnoff print-hncp.c \ 1453c602fabSXin LI print-hsrp.c \ 1468bdc5a62SPatrick Kelsey print-http.c \ 1473c602fabSXin LI print-icmp.c \ 1483340d773SGleb Smirnoff print-icmp6.c \ 1493c602fabSXin LI print-igmp.c \ 1503c602fabSXin LI print-igrp.c \ 151ee67461eSJoseph Mingrone print-ip-demux.c \ 1523c602fabSXin LI print-ip.c \ 1538bdc5a62SPatrick Kelsey print-ip6.c \ 1543340d773SGleb Smirnoff print-ip6opts.c \ 1553c602fabSXin LI print-ipcomp.c \ 1563c602fabSXin LI print-ipfc.c \ 1573c602fabSXin LI print-ipnet.c \ 158ee67461eSJoseph Mingrone print-ipoib.c \ 1593c602fabSXin LI print-ipx.c \ 1603c602fabSXin LI print-isakmp.c \ 1613c602fabSXin LI print-isoclns.c \ 1623c602fabSXin LI print-juniper.c \ 1633c602fabSXin LI print-krb.c \ 1643c602fabSXin LI print-l2tp.c \ 1653c602fabSXin LI print-lane.c \ 1663c602fabSXin LI print-ldp.c \ 1673340d773SGleb Smirnoff print-lisp.c \ 1683c602fabSXin LI print-llc.c \ 1693c602fabSXin LI print-lldp.c \ 1703c602fabSXin LI print-lmp.c \ 1713c602fabSXin LI print-loopback.c \ 1723c602fabSXin LI print-lspping.c \ 1733c602fabSXin LI print-lwapp.c \ 1743c602fabSXin LI print-lwres.c \ 1753c602fabSXin LI print-m3ua.c \ 176ee67461eSJoseph Mingrone print-macsec.c \ 1773c602fabSXin LI print-mobile.c \ 1783340d773SGleb Smirnoff print-mobility.c \ 1793c602fabSXin LI print-mpcp.c \ 1803c602fabSXin LI print-mpls.c \ 1813c602fabSXin LI print-mptcp.c \ 1823c602fabSXin LI print-msdp.c \ 1833c602fabSXin LI print-msnlb.c \ 1843c602fabSXin LI print-nflog.c \ 1853c602fabSXin LI print-nfs.c \ 1863340d773SGleb Smirnoff print-nsh.c \ 1873c602fabSXin LI print-ntp.c \ 1883c602fabSXin LI print-null.c \ 1893c602fabSXin LI print-olsr.c \ 1903c602fabSXin LI print-openflow-1.0.c \ 191ee67461eSJoseph Mingrone print-openflow-1.3.c \ 1923c602fabSXin LI print-openflow.c \ 1933c602fabSXin LI print-ospf.c \ 1943340d773SGleb Smirnoff print-ospf6.c \ 1953c602fabSXin LI print-otv.c \ 196ee67461eSJoseph Mingrone print-pflog.c \ 1973c602fabSXin LI print-pgm.c \ 1983c602fabSXin LI print-pim.c \ 1993c602fabSXin LI print-pktap.c \ 2003c602fabSXin LI print-ppi.c \ 2013c602fabSXin LI print-ppp.c \ 2023c602fabSXin LI print-pppoe.c \ 2033c602fabSXin LI print-pptp.c \ 204ee67461eSJoseph Mingrone print-ptp.c \ 2053c602fabSXin LI print-radius.c \ 2063c602fabSXin LI print-raw.c \ 207ee67461eSJoseph Mingrone print-realtek.c \ 2083340d773SGleb Smirnoff print-resp.c \ 2093c602fabSXin LI print-rip.c \ 2103340d773SGleb Smirnoff print-ripng.c \ 2113c602fabSXin LI print-rpki-rtr.c \ 2123c602fabSXin LI print-rsvp.c \ 2133340d773SGleb Smirnoff print-rt6.c \ 2148bdc5a62SPatrick Kelsey print-rtsp.c \ 2153c602fabSXin LI print-rx.c \ 2163c602fabSXin LI print-sctp.c \ 2173c602fabSXin LI print-sflow.c \ 2183c602fabSXin LI print-sip.c \ 2193c602fabSXin LI print-sl.c \ 2203c602fabSXin LI print-sll.c \ 2213c602fabSXin LI print-slow.c \ 2228bdc5a62SPatrick Kelsey print-smtp.c \ 2233c602fabSXin LI print-snmp.c \ 224ee67461eSJoseph Mingrone print-someip.c \ 225ee67461eSJoseph Mingrone print-ssh.c \ 2263c602fabSXin LI print-stp.c \ 2273c602fabSXin LI print-sunatm.c \ 2283c602fabSXin LI print-sunrpc.c \ 2293c602fabSXin LI print-symantec.c \ 2303c602fabSXin LI print-syslog.c \ 2313c602fabSXin LI print-tcp.c \ 2323c602fabSXin LI print-telnet.c \ 2333c602fabSXin LI print-tftp.c \ 2343c602fabSXin LI print-timed.c \ 2353c602fabSXin LI print-tipc.c \ 2363c602fabSXin LI print-token.c \ 2373c602fabSXin LI print-udld.c \ 2383c602fabSXin LI print-udp.c \ 239ee67461eSJoseph Mingrone print-unsupported.c \ 2403c602fabSXin LI print-usb.c \ 2413c602fabSXin LI print-vjc.c \ 2423c602fabSXin LI print-vqp.c \ 2433c602fabSXin LI print-vrrp.c \ 244ee67461eSJoseph Mingrone print-vsock.c \ 2453c602fabSXin LI print-vtp.c \ 2463340d773SGleb Smirnoff print-vxlan-gpe.c \ 247ee67461eSJoseph Mingrone print-vxlan.c \ 2483c602fabSXin LI print-wb.c \ 249ee67461eSJoseph Mingrone print-whois.c \ 250ee67461eSJoseph Mingrone print-zep.c \ 2513c602fabSXin LI print-zephyr.c \ 2523c602fabSXin LI print-zeromq.c \ 2533c602fabSXin LI signature.c \ 2543340d773SGleb Smirnoff strtoaddr.c \ 2553340d773SGleb Smirnoff util-print.c 256a5779b6eSRui Paulo 257b0453382SBill FennerLOCALSRC = @LOCALSRC@ 258b0453382SBill FennerLIBOBJS = @LIBOBJS@ 2594edb46e9SPaul Traina 2603c602fabSXin LILIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) ${LOCALSRC:.c=.o} ${LIBOBJS} 2613c602fabSXin LILIBNETDISSECT=libnetdissect.a 2623c602fabSXin LI 2633c602fabSXin LI 264ee67461eSJoseph MingroneSRC = $(CSRC) $(LOCALSRC) 2654edb46e9SPaul Traina 2664edb46e9SPaul Traina# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot 2674edb46e9SPaul Traina# hack the extra indirection 268ee67461eSJoseph MingroneOBJ = $(CSRC:.c=.o) 269a5779b6eSRui PauloHDR = \ 270a5779b6eSRui Paulo addrtoname.h \ 2713340d773SGleb Smirnoff addrtostr.h \ 272a5779b6eSRui Paulo af.h \ 273a5779b6eSRui Paulo ah.h \ 274a5779b6eSRui Paulo appletalk.h \ 2753340d773SGleb Smirnoff ascii_strcasecmp.h \ 276a5779b6eSRui Paulo atm.h \ 277a5779b6eSRui Paulo chdlc.h \ 278ee67461eSJoseph Mingrone compiler-tests.h \ 279a5779b6eSRui Paulo cpack.h \ 280ee67461eSJoseph Mingrone diag-control.h \ 281a5779b6eSRui Paulo ethertype.h \ 282a5779b6eSRui Paulo extract.h \ 283ee67461eSJoseph Mingrone fptype.h \ 284ee67461eSJoseph Mingrone ftmacros.h \ 2850bff6a5aSEd Maste funcattrs.h \ 286ee67461eSJoseph Mingrone getservent.h \ 287a5779b6eSRui Paulo gmpls.h \ 288a5779b6eSRui Paulo interface.h \ 289a5779b6eSRui Paulo ip.h \ 290a5779b6eSRui Paulo ip6.h \ 291a5779b6eSRui Paulo ipproto.h \ 292a5779b6eSRui Paulo l2vpn.h \ 293a5779b6eSRui Paulo llc.h \ 294a5779b6eSRui Paulo machdep.h \ 295a5779b6eSRui Paulo mib.h \ 296a5779b6eSRui Paulo mpls.h \ 297a5779b6eSRui Paulo nameser.h \ 298a5779b6eSRui Paulo netdissect.h \ 299ee67461eSJoseph Mingrone netdissect-alloc.h \ 300ee67461eSJoseph Mingrone netdissect-ctype.h \ 301ee67461eSJoseph Mingrone netdissect-stdinc.h \ 302a5779b6eSRui Paulo nfs.h \ 303a5779b6eSRui Paulo nfsfh.h \ 304a5779b6eSRui Paulo nlpid.h \ 305ee67461eSJoseph Mingrone ntp.h \ 3063c602fabSXin LI openflow.h \ 307a5779b6eSRui Paulo ospf.h \ 308a5779b6eSRui Paulo oui.h \ 309a5779b6eSRui Paulo pcap-missing.h \ 310ee67461eSJoseph Mingrone pflog.h \ 311a5779b6eSRui Paulo ppp.h \ 3123340d773SGleb Smirnoff print.h \ 313a5779b6eSRui Paulo rpc_auth.h \ 314a5779b6eSRui Paulo rpc_msg.h \ 31527df3f5dSRui Paulo signature.h \ 316a5779b6eSRui Paulo slcompress.h \ 317a5779b6eSRui Paulo smb.h \ 318ee67461eSJoseph Mingrone status-exit-codes.h \ 3193340d773SGleb Smirnoff strtoaddr.h \ 320a5779b6eSRui Paulo tcp.h \ 3213340d773SGleb Smirnoff timeval-operations.h \ 322ee67461eSJoseph Mingrone udp.h \ 323ee67461eSJoseph Mingrone varattrs.h 3244edb46e9SPaul Traina 3254edb46e9SPaul TrainaTAGHDR = \ 3264edb46e9SPaul Traina /usr/include/netinet/if_ether.h \ 327ee67461eSJoseph Mingrone /usr/include/netinet/in.h 3284edb46e9SPaul Traina 329ee67461eSJoseph MingroneTAGFILES = $(SRC) $(HDR) $(TAGHDR) $(LIBNETDISSECT_SRC) \ 330ee67461eSJoseph Mingrone print-smb.c smbutil.c 3314edb46e9SPaul Traina 332*0a7e5f1fSJoseph MingroneCLEANFILES = $(PROG) $(OBJ) $(LIBNETDISSECT_OBJ) \ 333*0a7e5f1fSJoseph Mingrone print-smb.o smbutil.o instrument-functions.o 3344edb46e9SPaul Traina 335a5779b6eSRui PauloEXTRA_DIST = \ 336a5779b6eSRui Paulo CHANGES \ 337ee67461eSJoseph Mingrone CMakeLists.txt \ 338ee67461eSJoseph Mingrone CONTRIBUTING.md \ 339a5779b6eSRui Paulo CREDITS \ 340ee67461eSJoseph Mingrone INSTALL.md \ 341a5779b6eSRui Paulo LICENSE \ 34227df3f5dSRui Paulo Makefile-devel-adds \ 343ee67461eSJoseph Mingrone Makefile.in \ 3443c602fabSXin LI README.md \ 345a5779b6eSRui Paulo VERSION \ 346a5779b6eSRui Paulo aclocal.m4 \ 347*0a7e5f1fSJoseph Mingrone autogen.sh \ 348a5779b6eSRui Paulo atime.awk \ 349a5779b6eSRui Paulo bpf_dump.c \ 350ee67461eSJoseph Mingrone cmake/Modules/FindCRYPTO.cmake \ 351ee67461eSJoseph Mingrone cmake/Modules/FindPCAP.cmake \ 352ee67461eSJoseph Mingrone cmake/Modules/FindSMI.cmake \ 353ee67461eSJoseph Mingrone cmake_uninstall.cmake.in \ 354ee67461eSJoseph Mingrone cmakeconfig.h.in \ 355a5779b6eSRui Paulo config.guess \ 356a5779b6eSRui Paulo config.sub \ 35739e421e8SCy Schubert configure.ac \ 358ee67461eSJoseph Mingrone doc/README.aix.md \ 359*0a7e5f1fSJoseph Mingrone doc/README.haiku.md \ 360ee67461eSJoseph Mingrone doc/README.NetBSD.md \ 361ee67461eSJoseph Mingrone doc/README.solaris.md \ 362*0a7e5f1fSJoseph Mingrone doc/README.windows.md \ 363a5779b6eSRui Paulo install-sh \ 364*0a7e5f1fSJoseph Mingrone instrument-functions.c \ 365a5779b6eSRui Paulo lbl/os-osf4.h \ 366a5779b6eSRui Paulo lbl/os-solaris2.h \ 367a5779b6eSRui Paulo lbl/os-sunos4.h \ 368a5779b6eSRui Paulo lbl/os-ultrix4.h \ 369a5779b6eSRui Paulo makemib \ 370a5779b6eSRui Paulo missing/datalinks.c \ 371ee67461eSJoseph Mingrone missing/dlnames.c \ 3723c602fabSXin LI missing/getopt_long.c \ 373ee67461eSJoseph Mingrone missing/getopt_long.h \ 374ee67461eSJoseph Mingrone missing/getservent.c \ 375ee67461eSJoseph Mingrone missing/pcap_dump_ftell.c \ 376a5779b6eSRui Paulo missing/snprintf.c \ 377a5779b6eSRui Paulo missing/strdup.c \ 378a5779b6eSRui Paulo missing/strlcat.c \ 379a5779b6eSRui Paulo missing/strlcpy.c \ 380a5779b6eSRui Paulo missing/strsep.c \ 381a5779b6eSRui Paulo mkdep \ 382a5779b6eSRui Paulo packetdat.awk \ 383a5779b6eSRui Paulo print-smb.c \ 384a5779b6eSRui Paulo send-ack.awk \ 385a5779b6eSRui Paulo smbutil.c \ 386a5779b6eSRui Paulo stime.awk \ 387ee67461eSJoseph Mingrone tcpdump.1.in 388a5779b6eSRui Paulo 389*0a7e5f1fSJoseph MingroneTEST_DIST= `git -C "$$DIR" ls-files tests | grep -v 'tests/\..*'` 390d03c0883SXin LI 391ee67461eSJoseph MingroneRELEASE_FILES = $(CSRC) $(HDR) $(LIBNETDISSECT_SRC) $(EXTRA_DIST) $(TEST_DIST) 3924644f044SBill Fenner 393ee67461eSJoseph Mingroneall: $(PROG) 394ee67461eSJoseph Mingrone 395ee67461eSJoseph Mingrone$(PROG): $(OBJ) @V_PCAPDEP@ $(LIBNETDISSECT) 3964edb46e9SPaul Traina @rm -f $@ 397ee67461eSJoseph Mingrone $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBNETDISSECT) $(LIBS) 3984edb46e9SPaul Traina 399a5779b6eSRui Paulo$(LIBNETDISSECT): $(LIBNETDISSECT_OBJ) 400a5779b6eSRui Paulo @rm -f $@ 4013340d773SGleb Smirnoff $(AR) cr $@ $(LIBNETDISSECT_OBJ) 402a5779b6eSRui Paulo $(RANLIB) $@ 403a5779b6eSRui Paulo 4045b0fe478SBruce M Simpsondatalinks.o: $(srcdir)/missing/datalinks.c 405cac3dcd5SXin LI $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c 4065b0fe478SBruce M Simpsondlnames.o: $(srcdir)/missing/dlnames.c 407cac3dcd5SXin LI $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c 408ee67461eSJoseph Mingronegetservent.o: $(srcdir)/missing/getservent.c 409ee67461eSJoseph Mingrone $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getservent.c 4103c602fabSXin LIgetopt_long.o: $(srcdir)/missing/getopt_long.c 4113c602fabSXin LI $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getopt_long.c 412685295f4SBill Fennersnprintf.o: $(srcdir)/missing/snprintf.c 413cac3dcd5SXin LI $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c 4143c602fabSXin LIstrdup.o: $(srcdir)/missing/strdup.c 4153c602fabSXin LI $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strdup.c 416685295f4SBill Fennerstrlcat.o: $(srcdir)/missing/strlcat.c 417cac3dcd5SXin LI $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c 418685295f4SBill Fennerstrlcpy.o: $(srcdir)/missing/strlcpy.c 419cac3dcd5SXin LI $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c 4205b0fe478SBruce M Simpsonstrsep.o: $(srcdir)/missing/strsep.c 421cac3dcd5SXin LI $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c 422ee67461eSJoseph Mingronepcap_dump_ftell.o: $(srcdir)/missing/pcap_dump_ftell.c 423ee67461eSJoseph Mingrone $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/pcap_dump_ftell.c 424a5779b6eSRui Paulo 425a5779b6eSRui Pauloinstall: all 426ee67461eSJoseph Mingrone [ -d $(DESTDIR)$(bindir) ] || \ 427ee67461eSJoseph Mingrone (mkdir -p $(DESTDIR)$(bindir); chmod 755 $(DESTDIR)$(bindir)) 428ee67461eSJoseph Mingrone $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(bindir)/$(PROG) 429ee67461eSJoseph Mingrone $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(bindir)/$(PROG).`cat ${srcdir}/VERSION` 430685295f4SBill Fenner [ -d $(DESTDIR)$(mandir)/man1 ] || \ 431685295f4SBill Fenner (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1) 43227df3f5dSRui Paulo $(INSTALL_DATA) $(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1 4334edb46e9SPaul Traina 434685295f4SBill Fenneruninstall: 435ee67461eSJoseph Mingrone rm -f $(DESTDIR)$(bindir)/$(PROG) 436ee67461eSJoseph Mingrone rm -f $(DESTDIR)$(bindir)/$(PROG).`cat ${srcdir}/VERSION` 437685295f4SBill Fenner rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1 4384edb46e9SPaul Traina 439ee67461eSJoseph Mingronelint: 440ee67461eSJoseph Mingrone lint -hbxn $(SRC) $(LIBNETDISSECT_SRC) | \ 4414edb46e9SPaul Traina grep -v 'struct/union .* never defined' | \ 4424edb46e9SPaul Traina grep -v 'possible pointer alignment problem' 4434edb46e9SPaul Traina 4444edb46e9SPaul Trainaclean: 445*0a7e5f1fSJoseph Mingrone rm -f $(CLEANFILES) $(PROG)-`cat ${srcdir}/VERSION`.tar.gz \ 446*0a7e5f1fSJoseph Mingrone config.h.in~ configure~ configure.ac~ 4474edb46e9SPaul Traina 448*0a7e5f1fSJoseph Mingronedistclean: clean 449*0a7e5f1fSJoseph Mingrone rm -f Makefile config.cache config.log config.status \ 450ee67461eSJoseph Mingrone config.h os-proto.h stamp-h stamp-h.in $(PROG).1 \ 4513c602fabSXin LI libnetdissect.a tests/.failed tests/.passed \ 4523c602fabSXin LI tests/failure-outputs.txt 4533c602fabSXin LI rm -rf autom4te.cache tests/DIFF tests/NEW 45427df3f5dSRui Paulo 45527df3f5dSRui Paulocheck: tcpdump 456ee67461eSJoseph Mingrone $(srcdir)/tests/TESTrun 4574edb46e9SPaul Traina 4583340d773SGleb Smirnoffextags: $(TAGFILES) 4593340d773SGleb Smirnoff ctags $(TAGFILES) 4603340d773SGleb Smirnoff 4614edb46e9SPaul Trainatags: $(TAGFILES) 4624edb46e9SPaul Traina ctags -wtd $(TAGFILES) 4634edb46e9SPaul Traina 464a5779b6eSRui PauloTAGS: $(TAGFILES) 465a5779b6eSRui Paulo etags $(TAGFILES) 466a5779b6eSRui Paulo 467*0a7e5f1fSJoseph Mingrone# 468*0a7e5f1fSJoseph Mingrone# Use git archive piped to tar to construct a subdirectory whose name 469*0a7e5f1fSJoseph Mingrone# is tcpdump-{release}, containing all the checked-in source files, 470*0a7e5f1fSJoseph Mingrone# and then run autoreconf in that directory to generate the configure 471*0a7e5f1fSJoseph Mingrone# script and other files from that source. Then remove autom4te.cache, 472*0a7e5f1fSJoseph Mingrone# construct the release tarball from that subdirectory, and remove 473*0a7e5f1fSJoseph Mingrone# the subdirectory. 474*0a7e5f1fSJoseph Mingrone# 475*0a7e5f1fSJoseph Mingrone# The --format=tar is to force git archive to write a non-compressed 476*0a7e5f1fSJoseph Mingrone# archive, in case the platform's tar command doesn't have built-in 477*0a7e5f1fSJoseph Mingrone# decompression. 478*0a7e5f1fSJoseph Mingrone# 479*0a7e5f1fSJoseph Mingrone# The ^{tree} is there to force git archive not to write out the 480*0a7e5f1fSJoseph Mingrone# "helpful" global extended pax header with a commit ID, as not all 481*0a7e5f1fSJoseph Mingrone# versions of tar can handle that (Solaris tar can't, for example). 482*0a7e5f1fSJoseph Mingrone# (It turns HEAD, or a tag, both of which are apparently "tree-ish"es, 483*0a7e5f1fSJoseph Mingrone# into a tree; apparently, unlike HEAD, or a tag, which have a commit 484*0a7e5f1fSJoseph Mingrone# ID associated with them, the tree associated with them doesn't have 485*0a7e5f1fSJoseph Mingrone# a commit ID, so no commit ID is available to write, and thus 486*0a7e5f1fSJoseph Mingrone# git archive doesn't write one.) 487*0a7e5f1fSJoseph Mingrone# 488b5bfcb5dSMax Laierreleasetar: 489ee67461eSJoseph Mingrone @TAG=$(PROG)-`cat VERSION` && \ 490*0a7e5f1fSJoseph Mingrone if [ ! -d .git ]; then echo 'Not in a git clone, stop.'; exit 1; fi && \ 491*0a7e5f1fSJoseph Mingrone TMPTESTFILE=`mktemp -t tmptestfile_XXXXXXXX` && \ 492*0a7e5f1fSJoseph Mingrone rm -f "$$TMPTESTFILE" && \ 493*0a7e5f1fSJoseph Mingrone AUTORECONF_DIR=`dirname "$$TMPTESTFILE"`/"$(PROG)"_build_autoreconf_$$$$ && \ 494*0a7e5f1fSJoseph Mingrone DIR=`pwd` && \ 495*0a7e5f1fSJoseph Mingrone rm -rf "$$AUTORECONF_DIR" && \ 496*0a7e5f1fSJoseph Mingrone mkdir "$$AUTORECONF_DIR" && \ 497*0a7e5f1fSJoseph Mingrone cd "$$AUTORECONF_DIR" && \ 498*0a7e5f1fSJoseph Mingrone if git -C "$$DIR" show-ref --tags --quiet --verify -- "refs/tags/$$TAG"; then \ 499*0a7e5f1fSJoseph Mingrone (git -C "$$DIR" archive --format=tar --prefix="$$TAG"/ "$$TAG^{tree}" $(RELEASE_FILES) | \ 500*0a7e5f1fSJoseph Mingrone tar xf -) && \ 501ee67461eSJoseph Mingrone echo "Archive build from tag $$TAG."; \ 502ee67461eSJoseph Mingrone else \ 503*0a7e5f1fSJoseph Mingrone (git -C "$$DIR" archive --format=tar --prefix="$$TAG"/ "HEAD^{tree}" $(RELEASE_FILES) | \ 504*0a7e5f1fSJoseph Mingrone tar xf -) && \ 505ee67461eSJoseph Mingrone echo "No $$TAG tag. Archive build from HEAD."; \ 506*0a7e5f1fSJoseph Mingrone fi && \ 507*0a7e5f1fSJoseph Mingrone (cd "$$TAG" && "$${AUTORECONF:-autoreconf}" && rm -rf autom4te.cache) && \ 508*0a7e5f1fSJoseph Mingrone tar cf "$$DIR/$$TAG".tar "$$TAG" && \ 509*0a7e5f1fSJoseph Mingrone rm -f "$$DIR/$$TAG".tar.gz && \ 510*0a7e5f1fSJoseph Mingrone gzip --best "$$DIR/$$TAG".tar && \ 511*0a7e5f1fSJoseph Mingrone cd "$$DIR" && \ 512*0a7e5f1fSJoseph Mingrone rm -rf "$$AUTORECONF_DIR" 513ee67461eSJoseph Mingrone 514ee67461eSJoseph Mingronereleasecheck: releasetar 515ee67461eSJoseph Mingrone @TAG=$(PROG)-`cat VERSION` && \ 516ee67461eSJoseph Mingrone INSTALL_DIR=/tmp/install_"$$TAG"_$$$$ && \ 517ee67461eSJoseph Mingrone DIR=`pwd` && \ 518ee67461eSJoseph Mingrone cd /tmp && \ 519ee67461eSJoseph Mingrone rm -rf "$$TAG" && \ 520ee67461eSJoseph Mingrone rm -rf "$$INSTALL_DIR" && \ 521ee67461eSJoseph Mingrone tar xf "$$DIR"/"$$TAG".tar.gz && \ 522ee67461eSJoseph Mingrone cd "$$TAG" && \ 523*0a7e5f1fSJoseph Mingrone echo "[$@] $$ touch .devel" && \ 524*0a7e5f1fSJoseph Mingrone touch .devel && \ 525*0a7e5f1fSJoseph Mingrone echo "[$@] $$ ./configure --enable-instrument-functions --enable-smb --quiet --prefix=$$INSTALL_DIR" && \ 526*0a7e5f1fSJoseph Mingrone ./configure --enable-instrument-functions --enable-smb --quiet --prefix="$$INSTALL_DIR" && \ 527*0a7e5f1fSJoseph Mingrone echo '[$@] $$ $(MAKE) -s all check' && \ 528*0a7e5f1fSJoseph Mingrone $(MAKE) -s all check >/dev/null && \ 529*0a7e5f1fSJoseph Mingrone echo '[$@] $$ $(MAKE) -s install' && \ 530*0a7e5f1fSJoseph Mingrone $(MAKE) -s install && \ 531ee67461eSJoseph Mingrone cd .. && \ 532ee67461eSJoseph Mingrone rm -rf "$$TAG" && \ 533ee67461eSJoseph Mingrone rm -rf "$$INSTALL_DIR" && \ 534ee67461eSJoseph Mingrone tar xf "$$DIR"/"$$TAG".tar.gz && \ 535ee67461eSJoseph Mingrone cd "$$TAG" && \ 536*0a7e5f1fSJoseph Mingrone echo "[$@] $$ touch .devel" && \ 537*0a7e5f1fSJoseph Mingrone touch .devel && \ 538ee67461eSJoseph Mingrone mkdir build && \ 539ee67461eSJoseph Mingrone cd build && \ 540ee67461eSJoseph Mingrone echo '[$@] $$ cmake -DENABLE_SMB=yes [...] ..' && \ 541ee67461eSJoseph Mingrone cmake -DENABLE_SMB=yes \ 542ee67461eSJoseph Mingrone -DCMAKE_INSTALL_PREFIX="$$INSTALL_DIR" \ 543ee67461eSJoseph Mingrone -DCMAKE_MESSAGE_LOG_LEVEL=NOTICE \ 544ee67461eSJoseph Mingrone -DCMAKE_RULE_MESSAGES=OFF \ 545ee67461eSJoseph Mingrone -DCMAKE_INSTALL_MESSAGE=NEVER \ 546ee67461eSJoseph Mingrone .. && \ 547*0a7e5f1fSJoseph Mingrone echo '[$@] $$ $(MAKE) -s all check' && \ 548*0a7e5f1fSJoseph Mingrone $(MAKE) -s all check >/dev/null && \ 549*0a7e5f1fSJoseph Mingrone echo '[$@] $$ $(MAKE) -s install' && \ 550*0a7e5f1fSJoseph Mingrone $(MAKE) -s install && \ 551ee67461eSJoseph Mingrone cd ../.. && \ 552ee67461eSJoseph Mingrone rm -rf "$$TAG" && \ 553ee67461eSJoseph Mingrone rm -rf "$$INSTALL_DIR" && \ 554ee67461eSJoseph Mingrone echo '[$@] Done.' 555ee67461eSJoseph Mingrone 556ee67461eSJoseph Mingronewhitespacecheck: 557ee67461eSJoseph Mingrone @# trailing space(s)? 558ee67461eSJoseph Mingrone @if git grep -I -n ' $$' $$(git ls-files|grep -v '^tests/'); then \ 559ee67461eSJoseph Mingrone echo 'Error: Trailing space(s).'; \ 560ee67461eSJoseph Mingrone exit 1; \ 561ee67461eSJoseph Mingrone fi 562ee67461eSJoseph Mingrone @# trailing tab(s)? 563*0a7e5f1fSJoseph Mingrone @if git grep -I -n ' $$' $$(git ls-files|grep -v '^tests/'); then \ 564ee67461eSJoseph Mingrone echo 'Error: Trailing tabs(s).'; \ 565ee67461eSJoseph Mingrone exit 1; \ 566ee67461eSJoseph Mingrone fi 567ee67461eSJoseph Mingrone @# space(s) before tab(s)? 568ee67461eSJoseph Mingrone @if git grep -I -n '[ ][ ]' $$(git ls-files|grep -v '^tests/'); then \ 569ee67461eSJoseph Mingrone echo 'Error: space(s) before tab(s).'; \ 570ee67461eSJoseph Mingrone exit 1; \ 571ee67461eSJoseph Mingrone fi 5724edb46e9SPaul Traina 573d03c0883SXin LItestlist: 574d03c0883SXin LI echo $(TEST_DIST) 575d03c0883SXin LI 576ee67461eSJoseph Mingronedepend: 577*0a7e5f1fSJoseph Mingrone @echo $(MKDEP) -c $(CC) -m "$(DEPENDENCY_CFLAG)" -s "$(srcdir)" $(DEFS) $(INCLS) $(SRC) '<libnetdissect src list>' 578*0a7e5f1fSJoseph Mingrone @$(MKDEP) -c $(CC) -m "$(DEPENDENCY_CFLAG)" -s "$(srcdir)" $(DEFS) $(INCLS) $(SRC) $(LIBNETDISSECT_SRC) 579ee67461eSJoseph Mingrone 580ee67461eSJoseph Mingroneshellcheck: 581*0a7e5f1fSJoseph Mingrone shellcheck -f gcc -e SC2006 autogen.sh build.sh build_matrix.sh build_common.sh mkdep .ci-coverity-scan-build.sh 582