1999-10-08 07:47:09 +08:00
|
|
|
# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
|
2023-02-15 18:53:09 +08:00
|
|
|
# The Regents of the University of California. All rights reserved.
|
1999-10-08 07:47:09 +08:00
|
|
|
#
|
|
|
|
# Redistribution and use in source and binary forms, with or without
|
|
|
|
# modification, are permitted provided that: (1) source code distributions
|
|
|
|
# retain the above copyright notice and this paragraph in its entirety, (2)
|
|
|
|
# distributions including binary code include the above copyright notice and
|
|
|
|
# this paragraph in its entirety in the documentation or other materials
|
|
|
|
# provided with the distribution, and (3) all advertising materials mentioning
|
|
|
|
# features or use of this software display the following acknowledgement:
|
|
|
|
# ``This product includes software developed by the University of California,
|
|
|
|
# Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
|
|
|
|
# the University nor the names of its contributors may be used to endorse
|
|
|
|
# or promote products derived from this software without specific prior
|
|
|
|
# written permission.
|
|
|
|
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
|
|
|
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
|
|
|
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
#
|
|
|
|
# Various configurable paths (remember to edit Makefile.in, not Makefile)
|
|
|
|
#
|
|
|
|
|
|
|
|
# Top level hierarchy
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
2011-02-02 07:38:09 +08:00
|
|
|
datarootdir = @datarootdir@
|
1999-10-08 07:47:09 +08:00
|
|
|
# Pathname of directory to install the binary
|
2020-09-10 19:54:41 +08:00
|
|
|
bindir = @bindir@
|
1999-10-08 07:47:09 +08:00
|
|
|
# Pathname of directory to install the man page
|
2000-07-30 13:57:09 +08:00
|
|
|
mandir = @mandir@
|
1999-10-08 07:47:09 +08:00
|
|
|
|
|
|
|
# VPATH
|
|
|
|
srcdir = @srcdir@
|
2020-03-03 08:15:07 +08:00
|
|
|
top_srcdir = @top_srcdir@
|
2000-01-15 10:31:34 +08:00
|
|
|
VPATH = @srcdir@
|
1999-10-08 07:47:09 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# You shouldn't need to edit anything below here.
|
|
|
|
#
|
|
|
|
|
|
|
|
CC = @CC@
|
2014-01-17 06:40:46 +08:00
|
|
|
AR = @AR@
|
2013-05-08 15:08:12 +08:00
|
|
|
MKDEP = @MKDEP@
|
1999-10-08 07:47:09 +08:00
|
|
|
PROG = tcpdump
|
|
|
|
CCOPT = @V_CCOPT@
|
|
|
|
INCLS = -I. @V_INCLS@
|
2003-12-15 10:12:40 +08:00
|
|
|
DEFS = @DEFS@ @CPPFLAGS@ @V_DEFS@
|
1999-10-08 07:47:09 +08:00
|
|
|
|
|
|
|
# Standard CFLAGS
|
2010-04-16 18:24:45 +08:00
|
|
|
CFLAGS = @CFLAGS@
|
|
|
|
FULL_CFLAGS = $(CCOPT) $(DEFS) $(INCLS) $(CFLAGS)
|
1999-10-08 07:47:09 +08:00
|
|
|
|
|
|
|
# Standard LDFLAGS
|
|
|
|
LDFLAGS = @LDFLAGS@
|
|
|
|
|
|
|
|
# Standard LIBS
|
|
|
|
LIBS = @LIBS@
|
|
|
|
|
|
|
|
INSTALL = @INSTALL@
|
2000-07-30 13:57:09 +08:00
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
2008-02-05 04:33:21 +08:00
|
|
|
RANLIB = @RANLIB@
|
1999-10-08 07:47:09 +08:00
|
|
|
|
2013-05-08 15:08:12 +08:00
|
|
|
DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
|
|
|
|
|
1999-10-08 07:47:09 +08:00
|
|
|
.c.o:
|
2024-04-03 12:59:09 +08:00
|
|
|
$(CC) $(FULL_CFLAGS) -c -o $@ $<
|
1999-10-08 07:47:09 +08:00
|
|
|
|
2020-02-05 11:53:11 +08:00
|
|
|
CSRC = fptype.c tcpdump.c
|
2014-01-02 05:50:20 +08:00
|
|
|
|
2014-01-17 15:51:30 +08:00
|
|
|
LIBNETDISSECT_SRC=\
|
|
|
|
addrtoname.c \
|
2015-09-18 05:56:44 +08:00
|
|
|
addrtostr.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
af.c \
|
2015-06-12 06:47:44 +08:00
|
|
|
ascii_strcasecmp.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
checksum.c \
|
|
|
|
cpack.c \
|
|
|
|
gmpls.c \
|
|
|
|
in_cksum.c \
|
|
|
|
ipproto.c \
|
|
|
|
l2vpn.c \
|
2018-03-14 20:41:33 +08:00
|
|
|
netdissect.c \
|
|
|
|
netdissect-alloc.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
nlpid.c \
|
2018-10-04 02:19:37 +08:00
|
|
|
ntp.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
oui.c \
|
|
|
|
parsenfsfh.c \
|
2015-04-16 00:39:05 +08:00
|
|
|
print.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-802_11.c \
|
|
|
|
print-802_15_4.c \
|
|
|
|
print-ah.c \
|
|
|
|
print-ahcp.c \
|
|
|
|
print-aodv.c \
|
2014-05-05 00:48:03 +08:00
|
|
|
print-aoe.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-ap1394.c \
|
|
|
|
print-arcnet.c \
|
2019-05-18 21:18:30 +08:00
|
|
|
print-arista.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-arp.c \
|
|
|
|
print-ascii.c \
|
|
|
|
print-atalk.c \
|
|
|
|
print-atm.c \
|
2015-09-18 05:56:44 +08:00
|
|
|
print-babel.c \
|
2020-04-01 20:40:50 +08:00
|
|
|
print-bcm-li.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-beep.c \
|
|
|
|
print-bfd.c \
|
|
|
|
print-bgp.c \
|
|
|
|
print-bootp.c \
|
2019-01-19 07:24:33 +08:00
|
|
|
print-brcmtag.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-bt.c \
|
|
|
|
print-calm-fast.c \
|
|
|
|
print-carp.c \
|
|
|
|
print-cdp.c \
|
|
|
|
print-cfm.c \
|
|
|
|
print-chdlc.c \
|
|
|
|
print-cip.c \
|
|
|
|
print-cnfp.c \
|
|
|
|
print-dccp.c \
|
|
|
|
print-decnet.c \
|
2015-09-18 05:56:44 +08:00
|
|
|
print-dhcp6.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-domain.c \
|
2019-04-06 23:16:54 +08:00
|
|
|
print-dsa.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-dtp.c \
|
|
|
|
print-dvmrp.c \
|
|
|
|
print-eap.c \
|
|
|
|
print-egp.c \
|
|
|
|
print-eigrp.c \
|
|
|
|
print-enc.c \
|
2023-06-08 06:20:16 +08:00
|
|
|
print-erspan.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-esp.c \
|
|
|
|
print-ether.c \
|
|
|
|
print-fddi.c \
|
|
|
|
print-forces.c \
|
|
|
|
print-fr.c \
|
2015-09-18 05:56:44 +08:00
|
|
|
print-frag6.c \
|
2014-10-20 02:21:44 +08:00
|
|
|
print-ftp.c \
|
2014-11-05 10:47:24 +08:00
|
|
|
print-geneve.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-geonet.c \
|
|
|
|
print-gre.c \
|
2016-07-29 03:09:41 +08:00
|
|
|
print-hncp.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-hsrp.c \
|
2014-10-20 02:21:44 +08:00
|
|
|
print-http.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-icmp.c \
|
2015-09-18 05:56:44 +08:00
|
|
|
print-icmp6.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-igmp.c \
|
|
|
|
print-igrp.c \
|
2019-03-28 10:58:26 +08:00
|
|
|
print-ip-demux.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-ip.c \
|
2014-10-02 06:32:11 +08:00
|
|
|
print-ip6.c \
|
2015-09-18 05:56:44 +08:00
|
|
|
print-ip6opts.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-ipcomp.c \
|
|
|
|
print-ipfc.c \
|
|
|
|
print-ipnet.c \
|
2019-04-17 15:44:24 +08:00
|
|
|
print-ipoib.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-ipx.c \
|
|
|
|
print-isakmp.c \
|
|
|
|
print-isoclns.c \
|
|
|
|
print-juniper.c \
|
|
|
|
print-krb.c \
|
|
|
|
print-l2tp.c \
|
|
|
|
print-lane.c \
|
|
|
|
print-ldp.c \
|
2015-08-15 00:06:52 +08:00
|
|
|
print-lisp.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-llc.c \
|
|
|
|
print-lldp.c \
|
|
|
|
print-lmp.c \
|
|
|
|
print-loopback.c \
|
|
|
|
print-lspping.c \
|
|
|
|
print-lwapp.c \
|
|
|
|
print-lwres.c \
|
2013-11-22 17:28:37 +08:00
|
|
|
print-m3ua.c \
|
2017-05-18 21:47:57 +08:00
|
|
|
print-macsec.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-mobile.c \
|
2015-09-18 05:56:44 +08:00
|
|
|
print-mobility.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-mpcp.c \
|
|
|
|
print-mpls.c \
|
|
|
|
print-mptcp.c \
|
|
|
|
print-msdp.c \
|
|
|
|
print-msnlb.c \
|
|
|
|
print-nflog.c \
|
|
|
|
print-nfs.c \
|
2023-04-11 18:05:46 +08:00
|
|
|
print-nhrp.c \
|
2016-03-23 00:23:40 +08:00
|
|
|
print-nsh.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-ntp.c \
|
|
|
|
print-null.c \
|
|
|
|
print-olsr.c \
|
|
|
|
print-openflow-1.0.c \
|
2020-09-28 06:17:56 +08:00
|
|
|
print-openflow-1.3.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-openflow.c \
|
|
|
|
print-ospf.c \
|
2015-09-18 05:56:44 +08:00
|
|
|
print-ospf6.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-otv.c \
|
Handle DLT_PFLOG on all OSes.
Don't pad the pflog header with BPF_WORDALIGN(); round up to a multiple
of 4, instead, as that's what all but FreeBSD do, and FreeBSD used to do
that and should go back to doing so (kern/261566).
Don't rely on the OS's pflog include files to define direction types,
reason types, action types, or the layout of the header; instead, define
them ourselves in a header of our own, with #ifs to select the ones that
are only on some platforms. That way, it'll handle some fields and
field values (the ones common to all OSes with pflog) on all OSes, even
ones without pflog.
That also expands the set of direction, reason, and action codes to what
various *BSDs and Darwin support.
Also, handle all the different AF_INET6 values in various *BSDs and
Darwin.
2022-01-30 14:30:33 +08:00
|
|
|
print-pflog.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-pgm.c \
|
|
|
|
print-pim.c \
|
2014-03-31 04:29:51 +08:00
|
|
|
print-pktap.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-ppi.c \
|
|
|
|
print-ppp.c \
|
|
|
|
print-pppoe.c \
|
|
|
|
print-pptp.c \
|
2018-12-14 14:28:36 +08:00
|
|
|
print-ptp.c \
|
2021-10-01 09:34:46 +08:00
|
|
|
print-quic.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-radius.c \
|
|
|
|
print-raw.c \
|
2022-01-23 17:46:20 +08:00
|
|
|
print-realtek.c \
|
2016-01-13 01:32:55 +08:00
|
|
|
print-resp.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-rip.c \
|
2015-09-18 05:56:44 +08:00
|
|
|
print-ripng.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-rpki-rtr.c \
|
|
|
|
print-rsvp.c \
|
2015-09-18 05:56:44 +08:00
|
|
|
print-rt6.c \
|
2014-10-20 02:21:44 +08:00
|
|
|
print-rtsp.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-rx.c \
|
|
|
|
print-sctp.c \
|
|
|
|
print-sflow.c \
|
|
|
|
print-sip.c \
|
|
|
|
print-sl.c \
|
|
|
|
print-sll.c \
|
|
|
|
print-slow.c \
|
2014-10-20 02:21:44 +08:00
|
|
|
print-smtp.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-snmp.c \
|
2020-04-03 01:53:44 +08:00
|
|
|
print-someip.c \
|
2018-12-23 18:38:17 +08:00
|
|
|
print-ssh.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-stp.c \
|
|
|
|
print-sunatm.c \
|
|
|
|
print-sunrpc.c \
|
|
|
|
print-symantec.c \
|
|
|
|
print-syslog.c \
|
|
|
|
print-tcp.c \
|
|
|
|
print-telnet.c \
|
|
|
|
print-tftp.c \
|
|
|
|
print-timed.c \
|
|
|
|
print-tipc.c \
|
|
|
|
print-token.c \
|
|
|
|
print-udld.c \
|
|
|
|
print-udp.c \
|
2020-05-10 01:32:05 +08:00
|
|
|
print-unsupported.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-usb.c \
|
|
|
|
print-vjc.c \
|
|
|
|
print-vqp.c \
|
|
|
|
print-vrrp.c \
|
2016-06-14 22:45:44 +08:00
|
|
|
print-vsock.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-vtp.c \
|
2015-11-16 00:24:19 +08:00
|
|
|
print-vxlan-gpe.c \
|
2020-04-03 01:53:44 +08:00
|
|
|
print-vxlan.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-wb.c \
|
2022-01-14 20:23:28 +08:00
|
|
|
print-whois.c \
|
2017-03-26 09:48:28 +08:00
|
|
|
print-zep.c \
|
2014-01-17 15:51:30 +08:00
|
|
|
print-zephyr.c \
|
|
|
|
print-zeromq.c \
|
|
|
|
signature.c \
|
2015-09-18 05:56:44 +08:00
|
|
|
strtoaddr.c \
|
2015-04-16 00:33:13 +08:00
|
|
|
util-print.c
|
2007-08-29 20:31:27 +08:00
|
|
|
|
1999-10-30 13:11:06 +08:00
|
|
|
LOCALSRC = @LOCALSRC@
|
|
|
|
LIBOBJS = @LIBOBJS@
|
1999-10-08 07:47:09 +08:00
|
|
|
|
2014-01-02 05:50:20 +08:00
|
|
|
LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) ${LOCALSRC:.c=.o} ${LIBOBJS}
|
|
|
|
LIBNETDISSECT=libnetdissect.a
|
|
|
|
|
|
|
|
|
2021-02-06 09:45:41 +08:00
|
|
|
SRC = $(CSRC) $(LOCALSRC)
|
1999-10-08 07:47:09 +08:00
|
|
|
|
2021-02-06 09:45:41 +08:00
|
|
|
OBJ = $(CSRC:.c=.o)
|
2008-05-27 15:13:21 +08:00
|
|
|
HDR = \
|
|
|
|
addrtoname.h \
|
2015-09-18 05:56:44 +08:00
|
|
|
addrtostr.h \
|
2008-05-27 15:13:21 +08:00
|
|
|
af.h \
|
|
|
|
ah.h \
|
|
|
|
appletalk.h \
|
2015-06-12 06:47:44 +08:00
|
|
|
ascii_strcasecmp.h \
|
2008-05-27 15:13:21 +08:00
|
|
|
atm.h \
|
|
|
|
chdlc.h \
|
2018-01-22 09:57:20 +08:00
|
|
|
compiler-tests.h \
|
2008-05-27 15:13:21 +08:00
|
|
|
cpack.h \
|
2021-07-24 16:51:02 +08:00
|
|
|
diag-control.h \
|
2008-05-27 15:13:21 +08:00
|
|
|
ethertype.h \
|
|
|
|
extract.h \
|
2020-02-25 18:40:23 +08:00
|
|
|
fptype.h \
|
2021-01-02 14:47:27 +08:00
|
|
|
ftmacros.h \
|
2017-08-19 11:11:43 +08:00
|
|
|
funcattrs.h \
|
2017-10-24 13:17:28 +08:00
|
|
|
getservent.h \
|
2008-05-27 15:13:21 +08:00
|
|
|
gmpls.h \
|
2023-10-20 14:04:26 +08:00
|
|
|
gre.h \
|
2008-05-27 15:13:21 +08:00
|
|
|
interface.h \
|
|
|
|
ip.h \
|
|
|
|
ip6.h \
|
|
|
|
ipproto.h \
|
|
|
|
l2vpn.h \
|
|
|
|
llc.h \
|
|
|
|
mib.h \
|
|
|
|
mpls.h \
|
|
|
|
nameser.h \
|
|
|
|
netdissect.h \
|
2018-03-14 20:41:33 +08:00
|
|
|
netdissect-alloc.h \
|
2019-09-02 07:11:32 +08:00
|
|
|
netdissect-ctype.h \
|
2018-01-22 09:57:20 +08:00
|
|
|
netdissect-stdinc.h \
|
2008-05-27 15:13:21 +08:00
|
|
|
nfs.h \
|
|
|
|
nfsfh.h \
|
|
|
|
nlpid.h \
|
2018-10-04 02:19:37 +08:00
|
|
|
ntp.h \
|
2013-06-24 05:03:38 +08:00
|
|
|
openflow.h \
|
2008-05-27 15:13:21 +08:00
|
|
|
ospf.h \
|
|
|
|
oui.h \
|
|
|
|
pcap-missing.h \
|
|
|
|
ppp.h \
|
2015-04-27 09:04:26 +08:00
|
|
|
print.h \
|
2008-05-27 15:13:21 +08:00
|
|
|
rpc_auth.h \
|
|
|
|
rpc_msg.h \
|
2009-04-05 03:33:20 +08:00
|
|
|
signature.h \
|
2008-05-27 15:13:21 +08:00
|
|
|
slcompress.h \
|
|
|
|
smb.h \
|
2018-02-25 18:04:39 +08:00
|
|
|
status-exit-codes.h \
|
2015-09-18 05:56:44 +08:00
|
|
|
strtoaddr.h \
|
2008-05-27 15:13:21 +08:00
|
|
|
tcp.h \
|
2015-07-03 01:14:49 +08:00
|
|
|
timeval-operations.h \
|
2018-01-22 09:57:20 +08:00
|
|
|
udp.h \
|
|
|
|
varattrs.h
|
1999-10-08 07:47:09 +08:00
|
|
|
|
|
|
|
TAGHDR = \
|
|
|
|
/usr/include/netinet/if_ether.h \
|
2020-10-01 22:56:35 +08:00
|
|
|
/usr/include/netinet/in.h
|
1999-10-08 07:47:09 +08:00
|
|
|
|
2020-03-29 17:10:53 +08:00
|
|
|
TAGFILES = $(SRC) $(HDR) $(TAGHDR) $(LIBNETDISSECT_SRC) \
|
2023-02-06 20:26:15 +08:00
|
|
|
print-smb.c smbutil.c
|
1999-10-08 07:47:09 +08:00
|
|
|
|
2023-03-01 21:54:20 +08:00
|
|
|
CLEANFILES = $(PROG) $(OBJ) $(LIBNETDISSECT_OBJ) \
|
|
|
|
print-smb.o smbutil.o instrument-functions.o
|
1999-10-08 07:47:09 +08:00
|
|
|
|
2008-05-27 15:13:21 +08:00
|
|
|
EXTRA_DIST = \
|
|
|
|
CHANGES \
|
2022-01-17 23:14:46 +08:00
|
|
|
CMakeLists.txt \
|
2022-06-15 07:08:18 +08:00
|
|
|
CONTRIBUTING.md \
|
2008-05-27 15:13:21 +08:00
|
|
|
CREDITS \
|
2021-12-22 22:02:13 +08:00
|
|
|
INSTALL.md \
|
2008-05-27 15:13:21 +08:00
|
|
|
LICENSE \
|
2009-07-03 10:48:54 +08:00
|
|
|
Makefile-devel-adds \
|
2022-01-17 23:14:46 +08:00
|
|
|
Makefile.in \
|
2013-10-17 03:13:32 +08:00
|
|
|
README.md \
|
2008-05-27 15:13:21 +08:00
|
|
|
VERSION \
|
|
|
|
aclocal.m4 \
|
2023-01-31 18:11:12 +08:00
|
|
|
autogen.sh \
|
2008-05-27 15:13:21 +08:00
|
|
|
atime.awk \
|
|
|
|
bpf_dump.c \
|
2018-01-23 09:20:02 +08:00
|
|
|
cmake/Modules/FindCRYPTO.cmake \
|
2018-01-22 05:22:15 +08:00
|
|
|
cmake/Modules/FindPCAP.cmake \
|
2018-01-22 06:57:37 +08:00
|
|
|
cmake/Modules/FindSMI.cmake \
|
2022-01-17 23:14:46 +08:00
|
|
|
cmake_uninstall.cmake.in \
|
|
|
|
cmakeconfig.h.in \
|
2008-05-27 15:13:21 +08:00
|
|
|
config.guess \
|
|
|
|
config.sub \
|
2017-12-01 02:20:37 +08:00
|
|
|
configure.ac \
|
2022-06-15 18:04:58 +08:00
|
|
|
doc/README.aix.md \
|
2023-02-12 22:46:22 +08:00
|
|
|
doc/README.haiku.md \
|
2022-09-24 19:43:56 +08:00
|
|
|
doc/README.NetBSD.md \
|
2022-06-15 18:04:58 +08:00
|
|
|
doc/README.solaris.md \
|
2024-03-29 08:20:55 +08:00
|
|
|
doc/README.windows.md \
|
2008-05-27 15:13:21 +08:00
|
|
|
install-sh \
|
2022-01-10 23:37:07 +08:00
|
|
|
instrument-functions.c \
|
2008-05-27 15:13:21 +08:00
|
|
|
makemib \
|
2014-05-01 06:28:06 +08:00
|
|
|
missing/getopt_long.c \
|
2022-01-17 23:14:46 +08:00
|
|
|
missing/getopt_long.h \
|
2017-10-24 13:17:28 +08:00
|
|
|
missing/getservent.c \
|
2008-05-27 15:13:21 +08:00
|
|
|
missing/strlcat.c \
|
|
|
|
missing/strlcpy.c \
|
|
|
|
missing/strsep.c \
|
|
|
|
mkdep \
|
|
|
|
packetdat.awk \
|
|
|
|
print-smb.c \
|
|
|
|
send-ack.awk \
|
|
|
|
smbutil.c \
|
|
|
|
stime.awk \
|
2020-07-27 15:25:05 +08:00
|
|
|
tcpdump.1.in
|
2008-05-27 15:13:21 +08:00
|
|
|
|
2023-01-31 18:11:12 +08:00
|
|
|
TEST_DIST= `git -C "$$DIR" ls-files tests | grep -v 'tests/\..*'`
|
2013-02-23 00:29:16 +08:00
|
|
|
|
2022-10-29 00:34:55 +08:00
|
|
|
RELEASE_FILES = $(CSRC) $(HDR) $(LIBNETDISSECT_SRC) $(EXTRA_DIST) $(TEST_DIST)
|
|
|
|
|
2016-10-14 15:39:38 +08:00
|
|
|
all: $(PROG)
|
1999-10-08 07:47:09 +08:00
|
|
|
|
2016-10-14 15:39:38 +08:00
|
|
|
$(PROG): $(OBJ) @V_PCAPDEP@ $(LIBNETDISSECT)
|
1999-10-08 07:47:09 +08:00
|
|
|
@rm -f $@
|
2016-10-14 15:39:38 +08:00
|
|
|
$(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBNETDISSECT) $(LIBS)
|
2022-01-21 02:26:22 +08:00
|
|
|
|
2007-08-29 20:31:27 +08:00
|
|
|
$(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
|
2008-02-05 04:33:21 +08:00
|
|
|
@rm -f $@
|
2013-11-22 17:28:37 +08:00
|
|
|
$(AR) cr $@ $(LIBNETDISSECT_OBJ)
|
2008-02-05 04:33:21 +08:00
|
|
|
$(RANLIB) $@
|
2007-08-29 20:31:27 +08:00
|
|
|
|
2017-10-24 13:11:33 +08:00
|
|
|
getservent.o: $(srcdir)/missing/getservent.c
|
|
|
|
$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getservent.c
|
2014-05-01 06:28:06 +08:00
|
|
|
getopt_long.o: $(srcdir)/missing/getopt_long.c
|
|
|
|
$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getopt_long.c
|
2000-01-19 13:34:17 +08:00
|
|
|
strlcat.o: $(srcdir)/missing/strlcat.c
|
2010-04-16 18:24:45 +08:00
|
|
|
$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
|
2000-01-19 13:34:17 +08:00
|
|
|
strlcpy.o: $(srcdir)/missing/strlcpy.c
|
2010-04-16 18:24:45 +08:00
|
|
|
$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
|
2003-03-25 16:32:59 +08:00
|
|
|
strsep.o: $(srcdir)/missing/strsep.c
|
2010-04-16 18:24:45 +08:00
|
|
|
$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c
|
2006-08-28 02:44:09 +08:00
|
|
|
|
2008-02-27 03:24:14 +08:00
|
|
|
install: all
|
2020-09-10 19:54:41 +08:00
|
|
|
[ -d $(DESTDIR)$(bindir) ] || \
|
|
|
|
(mkdir -p $(DESTDIR)$(bindir); chmod 755 $(DESTDIR)$(bindir))
|
|
|
|
$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(bindir)/$(PROG)
|
|
|
|
$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(bindir)/$(PROG).`cat ${srcdir}/VERSION`
|
2000-09-19 22:57:27 +08:00
|
|
|
[ -d $(DESTDIR)$(mandir)/man1 ] || \
|
|
|
|
(mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
|
2008-11-22 07:17:26 +08:00
|
|
|
$(INSTALL_DATA) $(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1
|
1999-10-08 07:47:09 +08:00
|
|
|
|
2000-07-29 14:51:24 +08:00
|
|
|
uninstall:
|
2020-09-10 19:54:41 +08:00
|
|
|
rm -f $(DESTDIR)$(bindir)/$(PROG)
|
2021-03-14 00:23:43 +08:00
|
|
|
rm -f $(DESTDIR)$(bindir)/$(PROG).`cat ${srcdir}/VERSION`
|
2000-07-30 13:57:09 +08:00
|
|
|
rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1
|
2000-07-29 14:51:24 +08:00
|
|
|
|
2021-02-06 09:45:41 +08:00
|
|
|
lint:
|
2016-10-14 15:39:38 +08:00
|
|
|
lint -hbxn $(SRC) $(LIBNETDISSECT_SRC) | \
|
1999-10-08 07:47:09 +08:00
|
|
|
grep -v 'struct/union .* never defined' | \
|
|
|
|
grep -v 'possible pointer alignment problem'
|
|
|
|
|
|
|
|
clean:
|
2023-02-11 19:04:21 +08:00
|
|
|
rm -f $(CLEANFILES) $(PROG)-`cat ${srcdir}/VERSION`.tar.gz \
|
|
|
|
config.h.in~ configure~ configure.ac~
|
1999-10-08 07:47:09 +08:00
|
|
|
|
2023-02-06 05:23:57 +08:00
|
|
|
distclean: clean
|
|
|
|
rm -f Makefile config.cache config.log config.status \
|
2023-02-11 19:04:21 +08:00
|
|
|
config.h os-proto.h stamp-h stamp-h.in $(PROG).1 \
|
2014-03-17 23:23:00 +08:00
|
|
|
libnetdissect.a tests/.failed tests/.passed \
|
|
|
|
tests/failure-outputs.txt
|
|
|
|
rm -rf autom4te.cache tests/DIFF tests/NEW
|
1999-10-08 07:47:09 +08:00
|
|
|
|
2009-11-15 09:50:39 +08:00
|
|
|
check: tcpdump
|
2020-01-25 06:28:34 +08:00
|
|
|
$(srcdir)/tests/TESTrun
|
2007-11-25 02:13:33 +08:00
|
|
|
|
2016-10-21 16:23:02 +08:00
|
|
|
extags: $(TAGFILES)
|
|
|
|
ctags $(TAGFILES)
|
|
|
|
|
1999-10-08 07:47:09 +08:00
|
|
|
tags: $(TAGFILES)
|
|
|
|
ctags -wtd $(TAGFILES)
|
|
|
|
|
2006-06-16 05:44:36 +08:00
|
|
|
TAGS: $(TAGFILES)
|
|
|
|
etags $(TAGFILES)
|
|
|
|
|
2023-01-31 18:11:12 +08:00
|
|
|
#
|
|
|
|
# Use git archive piped to tar to construct a subdirectory whose name
|
|
|
|
# is tcpdump-{release}, containing all the checked-in source files,
|
|
|
|
# and then run autoreconf in that directory to generate the configure
|
|
|
|
# script and other files from that source. Then remove autom4te.cache,
|
|
|
|
# construct the release tarball from that subdirectory, and remove
|
|
|
|
# the subdirectory.
|
|
|
|
#
|
|
|
|
# The --format=tar is to force git archive to write a non-compressed
|
|
|
|
# archive, in case the platform's tar command doesn't have built-in
|
|
|
|
# decompression.
|
|
|
|
#
|
|
|
|
# The ^{tree} is there to force git archive not to write out the
|
|
|
|
# "helpful" global extended pax header with a commit ID, as not all
|
|
|
|
# versions of tar can handle that (Solaris tar can't, for example).
|
|
|
|
# (It turns HEAD, or a tag, both of which are apparently "tree-ish"es,
|
|
|
|
# into a tree; apparently, unlike HEAD, or a tag, which have a commit
|
|
|
|
# ID associated with them, the tree associated with them doesn't have
|
|
|
|
# a commit ID, so no commit ID is available to write, and thus
|
|
|
|
# git archive doesn't write one.)
|
|
|
|
#
|
2007-07-24 10:21:25 +08:00
|
|
|
releasetar:
|
2022-10-29 00:34:55 +08:00
|
|
|
@TAG=$(PROG)-`cat VERSION` && \
|
2023-01-31 18:11:12 +08:00
|
|
|
if [ ! -d .git ]; then echo 'Not in a git clone, stop.'; exit 1; fi && \
|
|
|
|
TMPTESTFILE=`mktemp -t tmptestfile_XXXXXXXX` && \
|
|
|
|
rm -f "$$TMPTESTFILE" && \
|
|
|
|
AUTORECONF_DIR=`dirname "$$TMPTESTFILE"`/"$(PROG)"_build_autoreconf_$$$$ && \
|
|
|
|
DIR=`pwd` && \
|
|
|
|
rm -rf "$$AUTORECONF_DIR" && \
|
|
|
|
mkdir "$$AUTORECONF_DIR" && \
|
|
|
|
cd "$$AUTORECONF_DIR" && \
|
|
|
|
if git -C "$$DIR" show-ref --tags --quiet --verify -- "refs/tags/$$TAG"; then \
|
|
|
|
(git -C "$$DIR" archive --format=tar --prefix="$$TAG"/ "$$TAG^{tree}" $(RELEASE_FILES) | \
|
|
|
|
tar xf -) && \
|
2022-10-29 00:34:55 +08:00
|
|
|
echo "Archive build from tag $$TAG."; \
|
|
|
|
else \
|
2023-01-31 18:11:12 +08:00
|
|
|
(git -C "$$DIR" archive --format=tar --prefix="$$TAG"/ "HEAD^{tree}" $(RELEASE_FILES) | \
|
|
|
|
tar xf -) && \
|
2022-10-29 00:34:55 +08:00
|
|
|
echo "No $$TAG tag. Archive build from HEAD."; \
|
2023-01-31 18:11:12 +08:00
|
|
|
fi && \
|
|
|
|
(cd "$$TAG" && "$${AUTORECONF:-autoreconf}" && rm -rf autom4te.cache) && \
|
|
|
|
tar cf "$$DIR/$$TAG".tar "$$TAG" && \
|
|
|
|
rm -f "$$DIR/$$TAG".tar.gz && \
|
|
|
|
gzip --best "$$DIR/$$TAG".tar && \
|
|
|
|
cd "$$DIR" && \
|
|
|
|
rm -rf "$$AUTORECONF_DIR"
|
1999-10-08 07:47:09 +08:00
|
|
|
|
2022-11-19 22:41:46 +08:00
|
|
|
releasecheck: releasetar
|
|
|
|
@TAG=$(PROG)-`cat VERSION` && \
|
2022-12-12 01:58:31 +08:00
|
|
|
INSTALL_DIR=/tmp/install_"$$TAG"_$$$$ && \
|
2022-11-19 22:41:46 +08:00
|
|
|
DIR=`pwd` && \
|
|
|
|
cd /tmp && \
|
|
|
|
rm -rf "$$TAG" && \
|
2022-12-12 01:58:31 +08:00
|
|
|
rm -rf "$$INSTALL_DIR" && \
|
2022-11-19 22:41:46 +08:00
|
|
|
tar xf "$$DIR"/"$$TAG".tar.gz && \
|
|
|
|
cd "$$TAG" && \
|
2023-10-15 19:54:49 +08:00
|
|
|
echo "[$@] $$ touch .devel" && \
|
|
|
|
touch .devel && \
|
2023-10-22 02:07:25 +08:00
|
|
|
echo "[$@] $$ ./configure --enable-instrument-functions --enable-smb --quiet --prefix=$$INSTALL_DIR" && \
|
|
|
|
./configure --enable-instrument-functions --enable-smb --quiet --prefix="$$INSTALL_DIR" && \
|
2023-05-08 16:41:28 +08:00
|
|
|
echo '[$@] $$ $(MAKE) -s all check' && \
|
|
|
|
$(MAKE) -s all check >/dev/null && \
|
|
|
|
echo '[$@] $$ $(MAKE) -s install' && \
|
|
|
|
$(MAKE) -s install && \
|
2022-11-19 22:41:46 +08:00
|
|
|
cd .. && \
|
|
|
|
rm -rf "$$TAG" && \
|
2022-12-12 01:58:31 +08:00
|
|
|
rm -rf "$$INSTALL_DIR" && \
|
2022-11-19 22:41:46 +08:00
|
|
|
tar xf "$$DIR"/"$$TAG".tar.gz && \
|
|
|
|
cd "$$TAG" && \
|
2023-10-15 19:54:49 +08:00
|
|
|
echo "[$@] $$ touch .devel" && \
|
|
|
|
touch .devel && \
|
2022-11-19 22:41:46 +08:00
|
|
|
mkdir build && \
|
|
|
|
cd build && \
|
|
|
|
echo '[$@] $$ cmake -DENABLE_SMB=yes [...] ..' && \
|
|
|
|
cmake -DENABLE_SMB=yes \
|
2022-12-12 01:58:31 +08:00
|
|
|
-DCMAKE_INSTALL_PREFIX="$$INSTALL_DIR" \
|
2022-11-19 22:41:46 +08:00
|
|
|
-DCMAKE_MESSAGE_LOG_LEVEL=NOTICE \
|
2022-12-12 01:58:31 +08:00
|
|
|
-DCMAKE_RULE_MESSAGES=OFF \
|
|
|
|
-DCMAKE_INSTALL_MESSAGE=NEVER \
|
|
|
|
.. && \
|
2023-05-08 16:41:28 +08:00
|
|
|
echo '[$@] $$ $(MAKE) -s all check' && \
|
|
|
|
$(MAKE) -s all check >/dev/null && \
|
|
|
|
echo '[$@] $$ $(MAKE) -s install' && \
|
|
|
|
$(MAKE) -s install && \
|
2022-11-19 22:41:46 +08:00
|
|
|
cd ../.. && \
|
|
|
|
rm -rf "$$TAG" && \
|
2022-12-12 01:58:31 +08:00
|
|
|
rm -rf "$$INSTALL_DIR" && \
|
2022-11-19 22:41:46 +08:00
|
|
|
echo '[$@] Done.'
|
|
|
|
|
2022-12-20 03:52:33 +08:00
|
|
|
whitespacecheck:
|
|
|
|
@# trailing space(s)?
|
|
|
|
@if git grep -I -n ' $$' $$(git ls-files|grep -v '^tests/'); then \
|
|
|
|
echo 'Error: Trailing space(s).'; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
|
|
|
@# trailing tab(s)?
|
2023-06-01 20:59:02 +08:00
|
|
|
@if git grep -I -n ' $$' $$(git ls-files|grep -v '^tests/'); then \
|
2022-12-20 03:52:33 +08:00
|
|
|
echo 'Error: Trailing tabs(s).'; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
2023-02-15 19:56:20 +08:00
|
|
|
@# space(s) before tab(s)?
|
|
|
|
@if git grep -I -n '[ ][ ]' $$(git ls-files|grep -v '^tests/'); then \
|
|
|
|
echo 'Error: space(s) before tab(s).'; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
2022-12-20 03:52:33 +08:00
|
|
|
|
2013-02-23 00:29:16 +08:00
|
|
|
testlist:
|
|
|
|
echo $(TEST_DIST)
|
|
|
|
|
2021-02-06 09:45:41 +08:00
|
|
|
depend:
|
2024-04-09 14:09:21 +08:00
|
|
|
@echo $(MKDEP) -c $(CC) -m "$(DEPENDENCY_CFLAG)" -s "$(srcdir)" $(DEFS) $(INCLS) $(SRC) '<libnetdissect src list>'
|
|
|
|
@$(MKDEP) -c $(CC) -m "$(DEPENDENCY_CFLAG)" -s "$(srcdir)" $(DEFS) $(INCLS) $(SRC) $(LIBNETDISSECT_SRC)
|
2021-06-01 15:44:41 +08:00
|
|
|
|
|
|
|
shellcheck:
|
2024-02-08 06:56:04 +08:00
|
|
|
shellcheck -f gcc -e SC2006 autogen.sh build.sh build_matrix.sh build_common.sh mkdep .ci-coverity-scan-build.sh
|