summaryrefslogtreecommitdiffstats
path: root/contrib/libpcap/Makefile.in
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2012-05-14 05:12:56 +0000
committerdelphij <delphij@FreeBSD.org>2012-05-14 05:12:56 +0000
commita3451bb93bbf335a8f6b5feb9b80b256b0e304fe (patch)
tree158e6045ed438c41ac8de6cb27ac3c73cdc6643a /contrib/libpcap/Makefile.in
parenta17ebbd192e814c313397aefc289ab32a0ece772 (diff)
parente11c3f548e0bd184480800016b8567824dc35516 (diff)
downloadFreeBSD-src-a3451bb93bbf335a8f6b5feb9b80b256b0e304fe.zip
FreeBSD-src-a3451bb93bbf335a8f6b5feb9b80b256b0e304fe.tar.gz
Merge from vendor branch: update libpcap to 1.2.1.
MFC after: 2 weeks
Diffstat (limited to 'contrib/libpcap/Makefile.in')
-rw-r--r--contrib/libpcap/Makefile.in115
1 files changed, 79 insertions, 36 deletions
diff --git a/contrib/libpcap/Makefile.in b/contrib/libpcap/Makefile.in
index f576462..912b7e3 100644
--- a/contrib/libpcap/Makefile.in
+++ b/contrib/libpcap/Makefile.in
@@ -46,19 +46,21 @@ VPATH = @srcdir@
LD = /usr/bin/ld
CC = @CC@
+AR = @AR@
CCOPT = @V_CCOPT@
INCLS = -I. @V_INCLS@
DEFS = @DEFS@ @V_DEFS@
ADDLOBJS = @ADDLOBJS@
ADDLARCHIVEOBJS = @ADDLARCHIVEOBJS@
LIBS = @LIBS@
+CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
DYEXT = @DYEXT@
V_RPATH_OPT = @V_RPATH_OPT@
PROG=libpcap
# Standard CFLAGS
-CFLAGS = $(CCOPT) $(INCLS) $(DEFS)
+FULL_CFLAGS = $(CCOPT) $(INCLS) $(DEFS) $(CFLAGS)
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -78,9 +80,9 @@ YACC = @V_YACC@
# problem if you don't own the file but can write to the directory.
.c.o:
@rm -f $@
- $(CC) $(CFLAGS) -c $(srcdir)/$*.c
+ $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
-PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@
+PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@
FSRC = fad-@V_FINDALLDEVS@.c
SSRC = @SSRC@
CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \
@@ -123,14 +125,29 @@ HDR = $(PUBHDR) \
sf-pcap-ng.h \
sunatmpos.h
+TESTS = \
+ filtertest \
+ findalldevstest \
+ nonblocktest \
+ opentest \
+ selpolltest
+
+TESTS_SRC = \
+ tests/filtertest.c \
+ tests/findalldevstest.c \
+ tests/nonblocktest.c \
+ tests/opentest.c \
+ tests/reactivatetest.c \
+ tests/selpolltest.c
+
GENHDR = \
scanner.h tokdefs.h version.h
TAGFILES = \
$(SRC) $(HDR)
-CLEANFILES = $(OBJ) libpcap.* filtertest findalldevstest selpolltest \
- opentest $(PROG)-`cat $(srcdir)/VERSION`.tar.gz $(GENSRC) $(GENHDR) \
+CLEANFILES = $(OBJ) libpcap.* $(TESTS) \
+ $(PROG)-`cat $(srcdir)/VERSION`.tar.gz $(GENSRC) $(GENHDR) \
lex.yy.c pcap-config
MAN1 = pcap-config.1
@@ -141,8 +158,10 @@ MAN3PCAP_EXPAND = \
pcap_datalink.3pcap.in \
pcap_dump_open.3pcap.in \
pcap_list_datalinks.3pcap.in \
+ pcap_list_tstamp_types.3pcap.in \
pcap_open_dead.3pcap.in \
- pcap_open_offline.3pcap.in
+ pcap_open_offline.3pcap.in \
+ pcap_set_tstamp_type.3pcap.in
MAN3PCAP_NOEXPAND = \
pcap_activate.3pcap \
@@ -160,9 +179,7 @@ MAN3PCAP_NOEXPAND = \
pcap_file.3pcap \
pcap_fileno.3pcap \
pcap_findalldevs.3pcap \
- pcap_freealldevs.3pcap \
pcap_freecode.3pcap \
- pcap_free_datalinks.3pcap \
pcap_get_selectable_fd.3pcap \
pcap_geterr.3pcap \
pcap_inject.3pcap \
@@ -187,7 +204,9 @@ MAN3PCAP_NOEXPAND = \
pcap_snapshot.3pcap \
pcap_stats.3pcap \
pcap_statustostr.3pcap \
- pcap_strerror.3pcap
+ pcap_strerror.3pcap \
+ pcap_tstamp_type_name_to_val.3pcap \
+ pcap_tstamp_type_val_to_name.3pcap
MAN3PCAP = $(MAN3PCAP_NOEXPAND) $(MAN3PCAP_EXPAND:.in=)
@@ -196,9 +215,11 @@ MANFILE = \
MANMISC = \
pcap-filter.manmisc.in \
- pcap-linktype.manmisc.in
+ pcap-linktype.manmisc.in \
+ pcap-tstamp.manmisc.in
EXTRA_DIST = \
+ $(TESTS_SRC) \
CHANGES \
ChmodBPF/ChmodBPF \
ChmodBPF/StartupParameters.plist \
@@ -237,8 +258,6 @@ EXTRA_DIST = \
fad-null.c \
fad-sita.c \
fad-win32.c \
- filtertest.c \
- findalldevstest.c \
grammar.y \
install-sh \
lbl/os-aix4.h \
@@ -263,7 +282,6 @@ EXTRA_DIST = \
msdos/pktdrvr.c \
msdos/pktdrvr.h \
msdos/readme.dos \
- opentest.c \
org.tcpdump.chmod_bpf.plist \
packaging/pcap.spec.in \
pcap-bpf.c \
@@ -282,6 +300,8 @@ EXTRA_DIST = \
pcap-libdlpi.c \
pcap-linux.c \
pcap-namedb.h \
+ pcap-netfilter-linux.c \
+ pcap-netfilter-linux.h \
pcap-nit.c \
pcap-null.c \
pcap-pf.c \
@@ -299,7 +319,6 @@ EXTRA_DIST = \
pcap-win32.c \
runlex.sh \
scanner.l \
- selpolltest.c \
Win32/Include/Gnuc.h \
Win32/Include/addrinfo.h \
Win32/Include/bittypes.h \
@@ -328,7 +347,7 @@ all: libpcap.a shared pcap-config
libpcap.a: $(OBJ)
@rm -f $@
- ar rc $@ $(OBJ) $(ADDLARCHIVEOBJS)
+ $(AR) rc $@ $(OBJ) $(ADDLARCHIVEOBJS)
$(RANLIB) $@
shared: libpcap.$(DYEXT)
@@ -401,7 +420,7 @@ libpcap.sl: $(OBJ)
libpcap.shareda: $(OBJ)
@rm -f $@ shr.o
$(CC) @V_SHLIB_OPT@ -o shr.o $(OBJ) $(ADDLOBJS) $(LDFLAGS) $(LIBS)
- ar rc $@ shr.o
+ $(AR) rc $@ shr.o
#
# For platforms that don't support shared libraries (or on which we
@@ -414,7 +433,7 @@ scanner.c: $(srcdir)/scanner.l
$(srcdir)/runlex.sh $(LEX) -o$@ $<
scanner.o: scanner.c tokdefs.h
- $(CC) $(CFLAGS) -c scanner.c
+ $(CC) $(FULL_CFLAGS) -c scanner.c
pcap.o: version.h
@@ -427,13 +446,13 @@ grammar.c: $(srcdir)/grammar.y
grammar.o: grammar.c
@rm -f $@
- $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c
+ $(CC) $(FULL_CFLAGS) -Dyylval=pcap_lval -c grammar.c
version.o: version.c
- $(CC) $(CFLAGS) -c version.c
+ $(CC) $(FULL_CFLAGS) -c version.c
snprintf.o: $(srcdir)/missing/snprintf.c
- $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
+ $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
version.c: $(srcdir)/VERSION
@rm -f $@
@@ -467,35 +486,47 @@ bpf_filter.c: $(srcdir)/bpf/net/bpf_filter.c
ln -s $(srcdir)/bpf/net/bpf_filter.c bpf_filter.c
bpf_filter.o: bpf_filter.c
- $(CC) $(CFLAGS) -c bpf_filter.c
+ $(CC) $(FULL_CFLAGS) -c bpf_filter.c
#
# Generate the pcap-config script.
#
-pcap-config: $(srcdir)/pcap-config.in
+# Some Makes, e.g. AIX Make and Solaris Make, can't handle "--file=$@.tmp:$<";
+# for example, the Solaris 9 make man page says
+#
+# Because make assigns $< and $* as it would for implicit rules
+# (according to the suffixes list and the directory contents),
+# they may be unreliable when used within explicit target entries.
+#
+# and this is an explicit target entry.
+#
+# Therefore, instead of using $<, we explicitly put in $(srcdir)/pcap-config.in.
+#
+pcap-config: $(srcdir)/pcap-config.in ./config.status
@rm -f $@ $@.tmp
- sed -e 's|@includedir[@]|$(includedir)|g' \
- -e 's|@libdir[@]|$(libdir)|g' \
- -e 's|@LIBS[@]|$(LIBS)|g' \
- -e 's|@V_RPATH_OPT[@]|$(V_RPATH_OPT)|g' \
- $(srcdir)/pcap-config.in >$@.tmp
+ ./config.status --file=$@.tmp:$(srcdir)/pcap-config.in
mv $@.tmp $@
chmod a+x $@
#
# Test programs - not built by default, and not installed.
#
-filtertest: filtertest.c libpcap.a
- $(CC) $(CFLAGS) -I. -L. -o filtertest $(srcdir)/filtertest.c libpcap.a $(LIBS)
+tests: $(TESTS)
+
+filtertest: tests/filtertest.c libpcap.a
+ $(CC) $(FULL_CFLAGS) -I. -L. -o filtertest $(srcdir)/tests/filtertest.c libpcap.a $(LIBS)
+
+findalldevstest: tests/findalldevstest.c libpcap.a
+ $(CC) $(FULL_CFLAGS) -I. -L. -o findalldevstest $(srcdir)/tests/findalldevstest.c libpcap.a $(LIBS)
-findalldevstest: findalldevstest.c libpcap.a
- $(CC) $(CFLAGS) -I. -L. -o findalldevstest $(srcdir)/findalldevstest.c libpcap.a $(LIBS)
+nonblocktest: tests/nonblocktest.c libpcap.a
+ $(CC) $(FULL_CFLAGS) -I. -L. -o nonblocktest $(srcdir)/tests/nonblocktest.c libpcap.a $(LIBS)
-selpolltest: selpolltest.c libpcap.a
- $(CC) $(CFLAGS) -I. -L. -o selpolltest $(srcdir)/selpolltest.c libpcap.a $(LIBS)
+opentest: tests/opentest.c libpcap.a
+ $(CC) $(FULL_CFLAGS) -I. -L. -o opentest $(srcdir)/tests/opentest.c libpcap.a $(LIBS)
-opentest: opentest.c libpcap.a
- $(CC) $(CFLAGS) -I. -L. -o opentest $(srcdir)/opentest.c libpcap.a $(LIBS)
+selpolltest: tests/selpolltest.c libpcap.a
+ $(CC) $(FULL_CFLAGS) -I. -L. -o selpolltest $(srcdir)/tests/selpolltest.c libpcap.a $(LIBS)
install: install-shared install-archive pcap-config
[ -d $(DESTDIR)$(libdir) ] || \
@@ -533,12 +564,21 @@ install: install-shared install-archive pcap-config
rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
ln $(DESTDIR)$(mandir)/man3/pcap_dump_open.3pcap \
$(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
+ rm -f $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap
+ ln $(DESTDIR)$(mandir)/man3/pcap_findalldevs.3pcap \
+ $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap
rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
ln $(DESTDIR)$(mandir)/man3/pcap_geterr.3pcap \
$(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
ln $(DESTDIR)$(mandir)/man3/pcap_inject.3pcap \
$(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
+ rm -f $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap
+ ln $(DESTDIR)$(mandir)/man3/pcap_list_datalinks.3pcap \
+ $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap
+ rm -f $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap
+ ln $(DESTDIR)$(mandir)/man3/pcap_list_tstamp_types.3pcap \
+ $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap
rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
ln $(DESTDIR)$(mandir)/man3/pcap_loop.3pcap \
$(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
@@ -622,8 +662,11 @@ uninstall: uninstall-shared
rm -f $(DESTDIR)$(mandir)/man3/$$i; done
rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
+ rm -f $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap
rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
+ rm -f $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap
+ rm -f $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap
rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
@@ -660,7 +703,7 @@ clean:
distclean: clean
rm -f Makefile config.cache config.log config.status \
- config.h gnuc.h os-proto.h bpf_filter.c pcap-config \
+ config.h gnuc.h net os-proto.h bpf_filter.c pcap-config \
stamp-h stamp-h.in
rm -f $(MAN3PCAP_EXPAND:.in=) $(MANFILE:.in=) $(MANMISC:.in=)
rm -rf autom4te.cache
OpenPOWER on IntegriCloud