1999-10-07 23:46:40 +00:00
|
|
|
# Copyright (c) 1993, 1994, 1995, 1996
|
|
|
|
# The Regents of the University of California. All rights reserved.
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
2008-11-22 17:30:24 +00:00
|
|
|
# @(#) $Header: /tcpdump/master/libpcap/Makefile.in,v 1.142 2008-11-22 17:30:24 guy Exp $ (LBL)
|
1999-10-07 23:46:40 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Various configurable paths (remember to edit Makefile.in, not Makefile)
|
|
|
|
#
|
|
|
|
|
|
|
|
# Top level hierarchy
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
2006-12-20 08:19:37 +00:00
|
|
|
datarootdir = @datarootdir@
|
2008-09-23 18:04:01 +00:00
|
|
|
# Pathname of directory to install the configure program
|
|
|
|
bindir = @bindir@
|
1999-10-07 23:46:40 +00:00
|
|
|
# Pathname of directory to install the include files
|
2000-07-30 05:56:49 +00:00
|
|
|
includedir = @includedir@
|
1999-10-07 23:46:40 +00:00
|
|
|
# Pathname of directory to install the library
|
2000-07-30 05:56:49 +00:00
|
|
|
libdir = @libdir@
|
2008-09-23 18:04:01 +00:00
|
|
|
# Pathname of directory to install the man pages
|
2000-07-30 05:56:49 +00:00
|
|
|
mandir = @mandir@
|
1999-10-07 23:46:40 +00:00
|
|
|
|
|
|
|
# VPATH
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
#
|
|
|
|
# You shouldn't need to edit anything below.
|
|
|
|
#
|
|
|
|
|
|
|
|
CC = @CC@
|
|
|
|
CCOPT = @V_CCOPT@
|
|
|
|
INCLS = -I. @V_INCLS@
|
2003-07-23 05:29:19 +00:00
|
|
|
DEFS = @DEFS@ @V_DEFS@
|
2009-05-22 23:14:08 +00:00
|
|
|
ADDLOBJ = @ADDLOBJ@
|
2009-07-02 19:18:31 +00:00
|
|
|
LIBS = @LIBS@
|
2009-04-21 16:09:37 +00:00
|
|
|
LDFLAGS = @LDFLAGS@
|
2003-11-30 04:45:02 +00:00
|
|
|
DYEXT = @DYEXT@
|
2009-06-09 18:34:05 +00:00
|
|
|
V_RPATH_OPT = @V_RPATH_OPT@
|
2007-07-24 02:36:34 +00:00
|
|
|
PROG=libpcap
|
1999-10-07 23:46:40 +00:00
|
|
|
|
|
|
|
# Standard CFLAGS
|
|
|
|
CFLAGS = $(CCOPT) $(INCLS) $(DEFS)
|
|
|
|
|
|
|
|
INSTALL = @INSTALL@
|
2000-07-30 05:56:49 +00:00
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
2000-06-10 14:20:24 +00:00
|
|
|
RANLIB = @RANLIB@
|
1999-10-07 23:46:40 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Flex and bison allow you to specify the prefixes of the global symbols
|
|
|
|
# used by the generated parser. This allows programs to use lex/yacc
|
|
|
|
# and link against libpcap. If you don't have flex or bison, get them.
|
|
|
|
#
|
|
|
|
LEX = @V_LEX@
|
|
|
|
YACC = @V_YACC@
|
|
|
|
|
|
|
|
# Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
|
|
|
|
# Also, gcc does not remove the .o before forking 'as', which can be a
|
|
|
|
# problem if you don't own the file but can write to the directory.
|
|
|
|
.c.o:
|
|
|
|
@rm -f $@
|
1999-10-19 15:18:28 +00:00
|
|
|
$(CC) $(CFLAGS) -c $(srcdir)/$*.c
|
1999-10-07 23:46:40 +00:00
|
|
|
|
2006-10-13 17:34:53 +00:00
|
|
|
PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@
|
2002-07-27 18:45:34 +00:00
|
|
|
FSRC = fad-@V_FINDALLDEVS@.c
|
2003-07-23 05:29:19 +00:00
|
|
|
SSRC = @SSRC@
|
1999-10-07 23:46:40 +00:00
|
|
|
CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c \
|
2000-06-26 04:16:04 +00:00
|
|
|
etherent.c savefile.c bpf_filter.c bpf_image.c bpf_dump.c
|
1999-10-07 23:46:40 +00:00
|
|
|
GENSRC = scanner.c grammar.c version.c
|
2000-07-29 07:05:20 +00:00
|
|
|
LIBOBJS = @LIBOBJS@
|
1999-10-07 23:46:40 +00:00
|
|
|
|
2003-07-23 05:29:19 +00:00
|
|
|
SRC = $(PSRC) $(FSRC) $(CSRC) $(SSRC) $(GENSRC)
|
1999-10-07 23:46:40 +00:00
|
|
|
|
|
|
|
# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
|
|
|
|
# hack the extra indirection
|
2003-12-15 01:35:03 +00:00
|
|
|
OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS)
|
2008-11-22 17:30:24 +00:00
|
|
|
PUBHDR = \
|
|
|
|
pcap.h \
|
|
|
|
pcap-bpf.h \
|
|
|
|
pcap-namedb.h \
|
|
|
|
pcap/bpf.h \
|
|
|
|
pcap/bluetooth.h \
|
|
|
|
pcap/namedb.h \
|
|
|
|
pcap/pcap.h \
|
|
|
|
pcap/sll.h \
|
|
|
|
pcap/vlan.h \
|
|
|
|
pcap/usb.h
|
|
|
|
|
|
|
|
HDR = $(PUBHDR) \
|
FILES isn't used to make the tarball any more; get rid of it.
Update HDR in Makefile.in to include all headers.
Add pcap_activate.3pcap to the list of man pages in the 3PCAP section.
Add an EXTRA_DIST variable to include all the files that should go into
the tarball and that aren't in CSRC, HDR, MAN3PCAP, or MAN4.
Use CSRC, HDR, MAN3PCAP, MAN4, and EXTRA_DIST to determine what goes
into the tarball, rather than doing a "make distclean" and putting
everything into the tarball; that way, you can do "make releasetar"
without cleaning out the current directory.
Given that we're not just tarring up the entire source directory, we can
make the tarball directory as a subdirectory of the current directory and
put the tarball into the current directory, rather than putting it into
a (not-entirely-obvious) ../n directory. Clean out the tarball
directory when we're done.
2008-05-26 21:05:47 +00:00
|
|
|
arcnet.h \
|
|
|
|
atmuni31.h \
|
|
|
|
ethertype.h \
|
|
|
|
gencode.h \
|
|
|
|
ieee80211.h \
|
|
|
|
llc.h \
|
|
|
|
nlpid.h \
|
|
|
|
pcap-int.h \
|
|
|
|
pcap-stdinc.h \
|
|
|
|
ppp.h \
|
|
|
|
sunatmpos.h
|
|
|
|
|
1999-10-07 23:46:40 +00:00
|
|
|
GENHDR = \
|
2007-12-30 00:28:17 +00:00
|
|
|
scanner.h tokdefs.h version.h
|
1999-10-07 23:46:40 +00:00
|
|
|
|
|
|
|
TAGFILES = \
|
2008-11-22 17:30:24 +00:00
|
|
|
$(SRC) $(HDR)
|
1999-10-07 23:46:40 +00:00
|
|
|
|
2009-06-09 18:37:10 +00:00
|
|
|
CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c pcap-config
|
1999-10-07 23:46:40 +00:00
|
|
|
|
2008-09-23 18:04:01 +00:00
|
|
|
MAN1 = pcap-config.1
|
|
|
|
|
2008-10-21 07:33:01 +00:00
|
|
|
MAN3PCAP_EXPAND = \
|
|
|
|
pcap.3pcap.in \
|
|
|
|
pcap_compile.3pcap.in \
|
|
|
|
pcap_datalink.3pcap.in \
|
2008-10-23 05:56:59 +00:00
|
|
|
pcap_dump_open.3pcap.in \
|
2008-10-21 07:33:01 +00:00
|
|
|
pcap_list_datalinks.3pcap.in \
|
2008-10-23 05:56:59 +00:00
|
|
|
pcap_open_dead.3pcap.in \
|
|
|
|
pcap_open_offline.3pcap.in
|
2008-10-21 07:33:01 +00:00
|
|
|
|
|
|
|
MAN3PCAP_NOEXPAND = \
|
FILES isn't used to make the tarball any more; get rid of it.
Update HDR in Makefile.in to include all headers.
Add pcap_activate.3pcap to the list of man pages in the 3PCAP section.
Add an EXTRA_DIST variable to include all the files that should go into
the tarball and that aren't in CSRC, HDR, MAN3PCAP, or MAN4.
Use CSRC, HDR, MAN3PCAP, MAN4, and EXTRA_DIST to determine what goes
into the tarball, rather than doing a "make distclean" and putting
everything into the tarball; that way, you can do "make releasetar"
without cleaning out the current directory.
Given that we're not just tarring up the entire source directory, we can
make the tarball directory as a subdirectory of the current directory and
put the tarball into the current directory, rather than putting it into
a (not-entirely-obvious) ../n directory. Clean out the tarball
directory when we're done.
2008-05-26 21:05:47 +00:00
|
|
|
pcap_activate.3pcap \
|
2008-04-05 20:19:41 +00:00
|
|
|
pcap_breakloop.3pcap \
|
2008-04-06 17:29:31 +00:00
|
|
|
pcap_can_set_rfmon.3pcap \
|
2008-04-05 20:19:41 +00:00
|
|
|
pcap_close.3pcap \
|
2008-04-06 17:29:31 +00:00
|
|
|
pcap_create.3pcap \
|
2008-04-05 20:19:41 +00:00
|
|
|
pcap_datalink_name_to_val.3pcap \
|
2008-04-06 20:16:30 +00:00
|
|
|
pcap_datalink_val_to_name.3pcap \
|
2008-04-05 20:19:41 +00:00
|
|
|
pcap_dump.3pcap \
|
|
|
|
pcap_dump_close.3pcap \
|
|
|
|
pcap_dump_file.3pcap \
|
|
|
|
pcap_dump_flush.3pcap \
|
|
|
|
pcap_dump_ftell.3pcap \
|
|
|
|
pcap_file.3pcap \
|
|
|
|
pcap_fileno.3pcap \
|
|
|
|
pcap_findalldevs.3pcap \
|
|
|
|
pcap_freealldevs.3pcap \
|
|
|
|
pcap_freecode.3pcap \
|
2008-05-26 19:58:06 +00:00
|
|
|
pcap_free_datalinks.3pcap \
|
2008-04-05 20:19:41 +00:00
|
|
|
pcap_get_selectable_fd.3pcap \
|
|
|
|
pcap_geterr.3pcap \
|
|
|
|
pcap_inject.3pcap \
|
|
|
|
pcap_is_swapped.3pcap \
|
|
|
|
pcap_lib_version.3pcap \
|
|
|
|
pcap_lookupdev.3pcap \
|
|
|
|
pcap_lookupnet.3pcap \
|
|
|
|
pcap_loop.3pcap \
|
|
|
|
pcap_major_version.3pcap \
|
|
|
|
pcap_next_ex.3pcap \
|
2008-05-13 15:19:56 +00:00
|
|
|
pcap_offline_filter.3pcap \
|
2008-04-05 20:19:41 +00:00
|
|
|
pcap_open_live.3pcap \
|
2008-04-06 17:29:31 +00:00
|
|
|
pcap_set_buffer_size.3pcap \
|
2008-04-05 20:19:41 +00:00
|
|
|
pcap_set_datalink.3pcap \
|
2008-04-06 17:29:31 +00:00
|
|
|
pcap_set_promisc.3pcap \
|
|
|
|
pcap_set_rfmon.3pcap \
|
|
|
|
pcap_set_snaplen.3pcap \
|
|
|
|
pcap_set_timeout.3pcap \
|
2008-04-05 20:19:41 +00:00
|
|
|
pcap_setdirection.3pcap \
|
|
|
|
pcap_setfilter.3pcap \
|
|
|
|
pcap_setnonblock.3pcap \
|
|
|
|
pcap_snapshot.3pcap \
|
|
|
|
pcap_stats.3pcap \
|
2008-04-09 21:39:21 +00:00
|
|
|
pcap_statustostr.3pcap \
|
2008-04-05 20:19:41 +00:00
|
|
|
pcap_strerror.3pcap
|
|
|
|
|
2008-10-21 07:33:01 +00:00
|
|
|
MAN3PCAP = $(MAN3PCAP_NOEXPAND) $(MAN3PCAP_EXPAND:.in=)
|
|
|
|
|
2008-10-23 05:56:59 +00:00
|
|
|
MANFILE = \
|
|
|
|
pcap-savefile.manfile.in
|
|
|
|
|
|
|
|
MANMISC = \
|
|
|
|
pcap-filter.manmisc.in \
|
2008-10-21 07:33:01 +00:00
|
|
|
pcap-linktype.manmisc.in
|
2008-04-05 20:19:41 +00:00
|
|
|
|
FILES isn't used to make the tarball any more; get rid of it.
Update HDR in Makefile.in to include all headers.
Add pcap_activate.3pcap to the list of man pages in the 3PCAP section.
Add an EXTRA_DIST variable to include all the files that should go into
the tarball and that aren't in CSRC, HDR, MAN3PCAP, or MAN4.
Use CSRC, HDR, MAN3PCAP, MAN4, and EXTRA_DIST to determine what goes
into the tarball, rather than doing a "make distclean" and putting
everything into the tarball; that way, you can do "make releasetar"
without cleaning out the current directory.
Given that we're not just tarring up the entire source directory, we can
make the tarball directory as a subdirectory of the current directory and
put the tarball into the current directory, rather than putting it into
a (not-entirely-obvious) ../n directory. Clean out the tarball
directory when we're done.
2008-05-26 21:05:47 +00:00
|
|
|
EXTRA_DIST = \
|
|
|
|
CHANGES \
|
|
|
|
ChmodBPF/ChmodBPF \
|
|
|
|
ChmodBPF/StartupParameters.plist \
|
|
|
|
CREDITS \
|
|
|
|
INSTALL.txt \
|
|
|
|
LICENSE \
|
|
|
|
Makefile.in \
|
|
|
|
README \
|
|
|
|
README.aix \
|
|
|
|
README.dag \
|
|
|
|
README.hpux \
|
|
|
|
README.linux \
|
|
|
|
README.macosx \
|
|
|
|
README.septel \
|
|
|
|
README.sita \
|
|
|
|
README.tru64 \
|
|
|
|
README.Win32 \
|
|
|
|
SUNOS4/nit_if.o.sparc \
|
|
|
|
SUNOS4/nit_if.o.sun3 \
|
|
|
|
SUNOS4/nit_if.o.sun4c.4.0.3c \
|
|
|
|
TODO \
|
|
|
|
VERSION \
|
|
|
|
aclocal.m4 \
|
|
|
|
bpf/net/bpf_filter.c \
|
2008-05-28 02:14:10 +00:00
|
|
|
chmod_bpf \
|
FILES isn't used to make the tarball any more; get rid of it.
Update HDR in Makefile.in to include all headers.
Add pcap_activate.3pcap to the list of man pages in the 3PCAP section.
Add an EXTRA_DIST variable to include all the files that should go into
the tarball and that aren't in CSRC, HDR, MAN3PCAP, or MAN4.
Use CSRC, HDR, MAN3PCAP, MAN4, and EXTRA_DIST to determine what goes
into the tarball, rather than doing a "make distclean" and putting
everything into the tarball; that way, you can do "make releasetar"
without cleaning out the current directory.
Given that we're not just tarring up the entire source directory, we can
make the tarball directory as a subdirectory of the current directory and
put the tarball into the current directory, rather than putting it into
a (not-entirely-obvious) ../n directory. Clean out the tarball
directory when we're done.
2008-05-26 21:05:47 +00:00
|
|
|
config.guess \
|
|
|
|
config.h.in \
|
|
|
|
config.sub \
|
|
|
|
configure \
|
|
|
|
configure.in \
|
|
|
|
dlpisubs.c \
|
|
|
|
dlpisubs.h \
|
|
|
|
fad-getad.c \
|
|
|
|
fad-gifc.c \
|
|
|
|
fad-glifc.c \
|
|
|
|
fad-null.c \
|
|
|
|
fad-sita.c \
|
|
|
|
fad-win32.c \
|
|
|
|
filtertest.c \
|
|
|
|
findalldevstest.c \
|
|
|
|
grammar.y \
|
|
|
|
install-sh \
|
|
|
|
lbl/os-aix4.h \
|
|
|
|
lbl/os-hpux11.h \
|
|
|
|
lbl/os-osf4.h \
|
|
|
|
lbl/os-osf5.h \
|
|
|
|
lbl/os-solaris2.h \
|
|
|
|
lbl/os-sunos4.h \
|
|
|
|
lbl/os-ultrix4.h \
|
|
|
|
missing/snprintf.c \
|
|
|
|
mkdep \
|
|
|
|
msdos/bin2c.c \
|
|
|
|
msdos/common.dj \
|
|
|
|
msdos/makefile \
|
|
|
|
msdos/makefile.dj \
|
|
|
|
msdos/makefile.wc \
|
|
|
|
msdos/ndis2.c \
|
|
|
|
msdos/ndis2.h \
|
|
|
|
msdos/ndis_0.asm \
|
|
|
|
msdos/pkt_rx0.asm \
|
|
|
|
msdos/pkt_rx1.s \
|
|
|
|
msdos/pktdrvr.c \
|
|
|
|
msdos/pktdrvr.h \
|
|
|
|
msdos/readme.dos \
|
2008-05-28 02:14:10 +00:00
|
|
|
org.tcpdump.chmod_bpf.plist \
|
FILES isn't used to make the tarball any more; get rid of it.
Update HDR in Makefile.in to include all headers.
Add pcap_activate.3pcap to the list of man pages in the 3PCAP section.
Add an EXTRA_DIST variable to include all the files that should go into
the tarball and that aren't in CSRC, HDR, MAN3PCAP, or MAN4.
Use CSRC, HDR, MAN3PCAP, MAN4, and EXTRA_DIST to determine what goes
into the tarball, rather than doing a "make distclean" and putting
everything into the tarball; that way, you can do "make releasetar"
without cleaning out the current directory.
Given that we're not just tarring up the entire source directory, we can
make the tarball directory as a subdirectory of the current directory and
put the tarball into the current directory, rather than putting it into
a (not-entirely-obvious) ../n directory. Clean out the tarball
directory when we're done.
2008-05-26 21:05:47 +00:00
|
|
|
packaging/pcap.spec.in \
|
|
|
|
pcap-bpf.c \
|
|
|
|
pcap-bt-linux.c \
|
|
|
|
pcap-bt-linux.h \
|
2008-09-23 18:04:01 +00:00
|
|
|
pcap-config.in \
|
FILES isn't used to make the tarball any more; get rid of it.
Update HDR in Makefile.in to include all headers.
Add pcap_activate.3pcap to the list of man pages in the 3PCAP section.
Add an EXTRA_DIST variable to include all the files that should go into
the tarball and that aren't in CSRC, HDR, MAN3PCAP, or MAN4.
Use CSRC, HDR, MAN3PCAP, MAN4, and EXTRA_DIST to determine what goes
into the tarball, rather than doing a "make distclean" and putting
everything into the tarball; that way, you can do "make releasetar"
without cleaning out the current directory.
Given that we're not just tarring up the entire source directory, we can
make the tarball directory as a subdirectory of the current directory and
put the tarball into the current directory, rather than putting it into
a (not-entirely-obvious) ../n directory. Clean out the tarball
directory when we're done.
2008-05-26 21:05:47 +00:00
|
|
|
pcap-dag.c \
|
|
|
|
pcap-dag.h \
|
|
|
|
pcap-dlpi.c \
|
|
|
|
pcap-dos.c \
|
|
|
|
pcap-dos.h \
|
|
|
|
pcap-enet.c \
|
|
|
|
pcap-int.h \
|
|
|
|
pcap-libdlpi.c \
|
|
|
|
pcap-linux.c \
|
|
|
|
pcap-namedb.h \
|
|
|
|
pcap-nit.c \
|
|
|
|
pcap-null.c \
|
|
|
|
pcap-pf.c \
|
|
|
|
pcap-septel.c \
|
|
|
|
pcap-septel.h \
|
|
|
|
pcap-sita.h \
|
|
|
|
pcap-sita.c \
|
|
|
|
pcap-sita.html \
|
|
|
|
pcap-snit.c \
|
|
|
|
pcap-snoop.c \
|
|
|
|
pcap-usb-linux.c \
|
|
|
|
pcap-usb-linux.h \
|
|
|
|
pcap-win32.c \
|
|
|
|
runlex.sh \
|
|
|
|
scanner.l \
|
|
|
|
Win32/Include/Gnuc.h \
|
|
|
|
Win32/Include/addrinfo.h \
|
|
|
|
Win32/Include/bittypes.h \
|
|
|
|
Win32/Include/cdecl_ext.h \
|
|
|
|
Win32/Include/inetprivate.h \
|
|
|
|
Win32/Include/ip6_misc.h \
|
|
|
|
Win32/Include/sockstorage.h \
|
|
|
|
Win32/Include/arpa/nameser.h \
|
|
|
|
Win32/Include/net/if.h \
|
|
|
|
Win32/Include/net/netdb.h \
|
|
|
|
Win32/Include/net/paths.h \
|
|
|
|
Win32/Prj/libpcap.dsp \
|
|
|
|
Win32/Prj/libpcap.dsw \
|
|
|
|
Win32/Src/ffs.c \
|
|
|
|
Win32/Src/gai_strerror.c \
|
|
|
|
Win32/Src/getaddrinfo.c \
|
|
|
|
Win32/Src/getnetbynm.c \
|
|
|
|
Win32/Src/getnetent.c \
|
|
|
|
Win32/Src/getopt.c \
|
|
|
|
Win32/Src/getservent.c \
|
|
|
|
Win32/Src/inet_aton.c \
|
|
|
|
Win32/Src/inet_net.c \
|
|
|
|
Win32/Src/inet_pton.c
|
|
|
|
|
2009-04-21 16:09:37 +00:00
|
|
|
all: libpcap.a shared pcap-config
|
1999-10-07 23:46:40 +00:00
|
|
|
|
|
|
|
libpcap.a: $(OBJ)
|
|
|
|
@rm -f $@
|
2009-06-10 00:07:43 +00:00
|
|
|
ar rc $@ $(OBJ) $(ADDLOBJ)
|
1999-10-07 23:46:40 +00:00
|
|
|
$(RANLIB) $@
|
|
|
|
|
2003-11-30 04:45:02 +00:00
|
|
|
shared: libpcap.$(DYEXT)
|
2003-11-30 22:46:13 +00:00
|
|
|
|
2003-11-30 04:45:02 +00:00
|
|
|
libpcap.so: $(OBJ)
|
|
|
|
@rm -f $@
|
2008-11-21 19:23:19 +00:00
|
|
|
VER=`cat $(srcdir)/VERSION`; \
|
|
|
|
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
|
2009-04-21 16:09:37 +00:00
|
|
|
@V_SHLIB_CMD@ @V_SHLIB_OPT@ @V_SONAME_OPT@$@.$$MAJOR_VER $(LDFLAGS) \
|
2009-05-22 23:14:08 +00:00
|
|
|
-o $@.$$VER $(OBJ) $(ADDLOBJ) $(LIBS)
|
2003-11-30 04:45:02 +00:00
|
|
|
|
2008-09-26 21:48:49 +00:00
|
|
|
#
|
|
|
|
# The following rule succeeds, but the result is untested.
|
|
|
|
#
|
2008-11-18 09:01:23 +00:00
|
|
|
# In Mac OS X, the libpcap dylib has the name "libpcap.A.dylib", with
|
|
|
|
# its full path as the install_name, and with the compatibility and
|
|
|
|
# current version both set to 1. The compatibility version is set to
|
|
|
|
# 1 so that programs built with a newer version of the library will run
|
|
|
|
# against older versions; multi-platform software probably will fail if
|
|
|
|
# it uses APIs added in the newer version, but Mac OS X-specific software
|
|
|
|
# will use weak linking and check at run time whether those APIs are
|
|
|
|
# available.
|
|
|
|
#
|
|
|
|
# We also use "A" as the major version, and 1 as the compatibility version,
|
|
|
|
# but set the current version to the value in VERSION, with any non-numeric
|
|
|
|
# stuff stripped off (the compatibility and current version must be of the
|
|
|
|
# form X[.Y[.Z]], with Y and Z possibly absent, and with all components
|
|
|
|
# numeric).
|
2008-09-26 21:48:49 +00:00
|
|
|
#
|
2003-11-30 04:45:02 +00:00
|
|
|
libpcap.dylib: $(OBJ)
|
|
|
|
rm -f libpcap*.dylib
|
2008-11-21 19:23:19 +00:00
|
|
|
VER=`cat $(srcdir)/VERSION`; \
|
|
|
|
MAJOR_VER=A; \
|
|
|
|
COMPAT_VER=1; \
|
|
|
|
CURRENT_VER=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`; \
|
2009-04-21 16:09:37 +00:00
|
|
|
$(CC) -dynamiclib -undefined error $(LDFLAGS) \
|
2009-05-22 23:14:08 +00:00
|
|
|
-o libpcap.$$VER.dylib $(OBJ) $(ADDLOBJ) $(LIBS) \
|
2009-04-21 16:09:37 +00:00
|
|
|
-install_name $(libdir)/libpcap.$$MAJOR_VER.dylib \
|
|
|
|
-compatibility_version $$COMPAT_VER \
|
|
|
|
-current_version $$CURRENT_VER
|
|
|
|
|
|
|
|
#
|
2009-06-10 00:49:05 +00:00
|
|
|
# The HP-UX linker manual says that the convention for a versioned library
|
|
|
|
# is libXXX.{number}, not libXXX.sl.{number}. That appears to be the case
|
|
|
|
# on at least one HP-UX 11.00 system; libXXX.sl is a symlink to
|
|
|
|
# libXXX.{number}.
|
2009-04-21 16:09:37 +00:00
|
|
|
#
|
2009-06-10 00:49:05 +00:00
|
|
|
# The manual also says "library-level versioning" (think "sonames") was
|
2009-04-21 16:09:37 +00:00
|
|
|
# added in HP-UX 10.0.
|
|
|
|
#
|
Add support for building AIX shared libraries. (It's complicated - we
build "traditional" AIX shared libraries, which are archive libraries
containing shared objects, so, on AIX, we build the archive library, for
the benefit of "build libpcap and tcpdump in subdirectories of the same
directory, with tcpdump linked statically with that libpcap", but don't
install it. Newer versions of AIX, at least, also support "standard"
.so-style UN*X shared libraries, but we stick with
<Tevye>Tradition!</Tevye>.)
Fix an AIX build problem that shows up when building with GCC.
Clean up HP-UX stuff.
2009-06-16 07:18:54 +00:00
|
|
|
# XXX - this assumes we're using the HP linker, rather than the GNU
|
|
|
|
# linker, even with GCC.
|
|
|
|
#
|
2009-04-21 16:09:37 +00:00
|
|
|
libpcap.sl: $(OBJ)
|
2009-06-10 00:49:05 +00:00
|
|
|
@MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
|
|
|
|
rm -f libpcap.$$MAJOR_VER
|
|
|
|
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
|
|
|
|
ld -b $(LDFLAGS) -o libpcap.$$MAJOR_VER +h libpcap.$$MAJOR_VER \
|
|
|
|
$(OBJ) $(ADDLOBJ) $(LIBS)
|
2003-11-30 04:45:02 +00:00
|
|
|
|
Add support for building AIX shared libraries. (It's complicated - we
build "traditional" AIX shared libraries, which are archive libraries
containing shared objects, so, on AIX, we build the archive library, for
the benefit of "build libpcap and tcpdump in subdirectories of the same
directory, with tcpdump linked statically with that libpcap", but don't
install it. Newer versions of AIX, at least, also support "standard"
.so-style UN*X shared libraries, but we stick with
<Tevye>Tradition!</Tevye>.)
Fix an AIX build problem that shows up when building with GCC.
Clean up HP-UX stuff.
2009-06-16 07:18:54 +00:00
|
|
|
#
|
|
|
|
# AIX is different from everybody else. A shared library is an archive
|
|
|
|
# library with one or more shared-object components. We still build a
|
|
|
|
# normal static archive library on AIX, for the benefit of the traditional
|
|
|
|
# scheme of building libpcap and tcpdump in subdirectories of the
|
|
|
|
# same directory, with tcpdump statically linked with the libpcap
|
|
|
|
# in question, but we also build a shared library as "libpcap.shareda"
|
|
|
|
# and install *it*, rather than the static library, as "libpcap.a".
|
|
|
|
#
|
|
|
|
libpcap.shareda: $(OBJ)
|
|
|
|
@rm -f $@ shr.o
|
|
|
|
$(CC) @V_SHLIB_OPT@ -o shr.o $(OBJ) $(ADDLOBJ) $(LIBS)
|
|
|
|
ar rc $@ shr.o
|
|
|
|
|
2009-06-27 19:43:26 +00:00
|
|
|
#
|
|
|
|
# For platforms that don't support shared libraries (or on which we
|
|
|
|
# don't support shared libraries).
|
|
|
|
#
|
|
|
|
libpcap.none:
|
|
|
|
|
1999-10-07 23:46:40 +00:00
|
|
|
scanner.c: $(srcdir)/scanner.l
|
|
|
|
@rm -f $@
|
2008-11-21 22:54:59 +00:00
|
|
|
$(srcdir)/runlex.sh $(LEX) -o$@ $<
|
1999-10-07 23:46:40 +00:00
|
|
|
|
|
|
|
scanner.o: scanner.c tokdefs.h
|
1999-10-30 05:33:45 +00:00
|
|
|
$(CC) $(CFLAGS) -c scanner.c
|
|
|
|
|
2003-02-21 03:19:19 +00:00
|
|
|
pcap.o: version.h
|
|
|
|
|
1999-10-07 23:46:40 +00:00
|
|
|
tokdefs.h: grammar.c
|
|
|
|
grammar.c: $(srcdir)/grammar.y
|
|
|
|
@rm -f grammar.c tokdefs.h
|
|
|
|
$(YACC) -d $<
|
|
|
|
mv y.tab.c grammar.c
|
|
|
|
mv y.tab.h tokdefs.h
|
|
|
|
|
|
|
|
grammar.o: grammar.c
|
|
|
|
@rm -f $@
|
|
|
|
$(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c
|
|
|
|
|
|
|
|
version.o: version.c
|
1999-10-30 05:33:45 +00:00
|
|
|
$(CC) $(CFLAGS) -c version.c
|
|
|
|
|
2003-12-15 01:35:03 +00:00
|
|
|
snprintf.o: $(srcdir)/missing/snprintf.c
|
|
|
|
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
|
2000-07-29 07:05:20 +00:00
|
|
|
|
1999-10-07 23:46:40 +00:00
|
|
|
version.c: $(srcdir)/VERSION
|
|
|
|
@rm -f $@
|
|
|
|
sed -e 's/.*/char pcap_version[] = "&";/' $(srcdir)/VERSION > $@
|
|
|
|
|
2003-02-13 07:56:38 +00:00
|
|
|
#
|
|
|
|
# NOTE: this really is supposed to be static; importing a string
|
|
|
|
# from a shared library does not work very well on many
|
|
|
|
# versions of UNIX (Solaris, Linux, and the BSDs, for example),
|
|
|
|
# so we make the version string static and return it from
|
|
|
|
# a function, which does work.
|
|
|
|
#
|
2003-02-11 07:40:09 +00:00
|
|
|
version.h: $(srcdir)/VERSION
|
|
|
|
@rm -f $@
|
At least on SunOS 5.x, Digital UNIX 4.0, AIX 4.3, FreeBSD 3.4, some
version of Red Hat Linux, HP-UX 11.00, and MacOS X 10.1, if a string in
a shared library is static, and returned by a function in that library,
the return value of that function, when called from a program, will
reflect the contents of the string in the version of the shared library
with which the program is running, not the version with which it's
linked.
Therefore we can just generate a definition of the version string and
put it into "version.h", which means that VERSION can contain any string
(as long as " and \ are escaped with \) rather than having to be N.M or
N.M.MM.
2003-02-13 07:54:59 +00:00
|
|
|
sed -e 's/.*/static const char pcap_version_string[] = "libpcap version &";/' $(srcdir)/VERSION > $@
|
2003-02-11 07:40:09 +00:00
|
|
|
|
2000-03-31 16:59:43 +00:00
|
|
|
bpf_filter.c: $(srcdir)/bpf/net/bpf_filter.c
|
|
|
|
rm -f 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
|
1999-10-30 05:33:45 +00:00
|
|
|
|
2008-09-23 18:04:01 +00:00
|
|
|
#
|
|
|
|
# Generate the pcap-config script.
|
|
|
|
#
|
2009-07-02 19:18:31 +00:00
|
|
|
pcap-config: $(srcdir)/pcap-config.in
|
2008-09-23 18:04:01 +00:00
|
|
|
@rm -f $@ $@.tmp
|
|
|
|
sed -e 's|@includedir[@]|$(includedir)|g' \
|
|
|
|
-e 's|@libdir[@]|$(libdir)|g' \
|
2009-05-22 23:14:08 +00:00
|
|
|
-e 's|@LIBS[@]|$(LIBS)|g' \
|
2009-06-09 17:50:31 +00:00
|
|
|
-e 's|@V_RPATH_OPT[@]|$(V_RPATH_OPT)|g' \
|
2008-11-21 22:54:59 +00:00
|
|
|
$(srcdir)/pcap-config.in >$@.tmp
|
2008-09-23 18:04:01 +00:00
|
|
|
mv $@.tmp $@
|
|
|
|
chmod a+x $@
|
|
|
|
|
2005-08-10 06:19:05 +00:00
|
|
|
#
|
|
|
|
# Test programs - not built by default, and not installed.
|
|
|
|
#
|
2005-08-08 17:44:25 +00:00
|
|
|
filtertest: filtertest.c libpcap.a
|
2009-07-02 19:18:31 +00:00
|
|
|
$(CC) $(CFLAGS) -I. -L. -o filtertest filtertest.c libpcap.a $(LIBS)
|
2005-08-08 17:44:25 +00:00
|
|
|
|
2005-08-10 06:19:05 +00:00
|
|
|
findalldevstest: findalldevstest.c libpcap.a
|
2009-07-02 19:18:31 +00:00
|
|
|
$(CC) $(CFLAGS) -I. -L. -o findalldevstest findalldevstest.c libpcap.a $(LIBS)
|
2005-08-10 06:19:05 +00:00
|
|
|
|
Add support for building AIX shared libraries. (It's complicated - we
build "traditional" AIX shared libraries, which are archive libraries
containing shared objects, so, on AIX, we build the archive library, for
the benefit of "build libpcap and tcpdump in subdirectories of the same
directory, with tcpdump linked statically with that libpcap", but don't
install it. Newer versions of AIX, at least, also support "standard"
.so-style UN*X shared libraries, but we stick with
<Tevye>Tradition!</Tevye>.)
Fix an AIX build problem that shows up when building with GCC.
Clean up HP-UX stuff.
2009-06-16 07:18:54 +00:00
|
|
|
install: install-shared install-archive pcap-config
|
2000-09-19 14:52:41 +00:00
|
|
|
[ -d $(DESTDIR)$(libdir) ] || \
|
|
|
|
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
|
|
|
|
[ -d $(DESTDIR)$(includedir) ] || \
|
|
|
|
(mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))
|
2006-10-04 18:09:21 +00:00
|
|
|
[ -d $(DESTDIR)$(includedir)/pcap ] || \
|
|
|
|
(mkdir -p $(DESTDIR)$(includedir)/pcap; chmod 755 $(DESTDIR)$(includedir)/pcap)
|
2008-09-23 18:04:01 +00:00
|
|
|
[ -d $(DESTDIR)$(mandir)/man1 ] || \
|
|
|
|
(mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
|
2008-01-06 21:14:16 +00:00
|
|
|
[ -d $(DESTDIR)$(mandir)/man3 ] || \
|
2008-09-23 18:04:01 +00:00
|
|
|
(mkdir -p $(DESTDIR)$(mandir)/man3; chmod 755 $(DESTDIR)$(mandir)/man3)
|
2008-10-23 05:56:59 +00:00
|
|
|
[ -d $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@ ] || \
|
|
|
|
(mkdir -p $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@)
|
2008-10-21 07:33:01 +00:00
|
|
|
[ -d $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@ ] || \
|
|
|
|
(mkdir -p $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@)
|
2008-11-22 17:30:24 +00:00
|
|
|
for i in $(PUBHDR); do \
|
|
|
|
$(INSTALL_DATA) $(srcdir)/$$i \
|
|
|
|
$(DESTDIR)$(includedir)/$$i; done
|
2008-11-18 06:50:29 +00:00
|
|
|
[ -d $(DESTDIR)$(bindir) ] || \
|
|
|
|
(mkdir -p $(DESTDIR)$(bindir); chmod 755 $(DESTDIR)$(bindir))
|
2008-09-23 18:04:01 +00:00
|
|
|
$(INSTALL_PROGRAM) pcap-config $(DESTDIR)$(bindir)/pcap-config
|
|
|
|
for i in $(MAN1); do \
|
|
|
|
$(INSTALL_DATA) $(srcdir)/$$i \
|
|
|
|
$(DESTDIR)$(mandir)/man1/$$i; done
|
2008-11-21 22:54:59 +00:00
|
|
|
for i in $(MAN3PCAP_NOEXPAND); do \
|
2008-04-05 20:19:41 +00:00
|
|
|
$(INSTALL_DATA) $(srcdir)/$$i \
|
|
|
|
$(DESTDIR)$(mandir)/man3/$$i; done
|
2008-11-21 22:54:59 +00:00
|
|
|
for i in $(MAN3PCAP_EXPAND:.in=); do \
|
|
|
|
$(INSTALL_DATA) $$i \
|
|
|
|
$(DESTDIR)$(mandir)/man3/$$i; done
|
2008-11-22 17:30:24 +00:00
|
|
|
rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
|
2008-04-06 20:22:13 +00:00
|
|
|
ln $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_name.3pcap \
|
|
|
|
$(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
|
2008-11-22 17:30:24 +00:00
|
|
|
rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
|
2008-04-05 20:19:41 +00:00
|
|
|
ln $(DESTDIR)$(mandir)/man3/pcap_dump_open.3pcap \
|
|
|
|
$(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
|
2008-11-22 17:30:24 +00:00
|
|
|
rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
|
2008-04-05 20:19:41 +00:00
|
|
|
ln $(DESTDIR)$(mandir)/man3/pcap_geterr.3pcap \
|
|
|
|
$(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
|
2008-11-22 17:30:24 +00:00
|
|
|
rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
|
2008-04-05 20:19:41 +00:00
|
|
|
ln $(DESTDIR)$(mandir)/man3/pcap_inject.3pcap \
|
|
|
|
$(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
|
2008-11-22 17:30:24 +00:00
|
|
|
rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
|
2008-04-05 20:19:41 +00:00
|
|
|
ln $(DESTDIR)$(mandir)/man3/pcap_loop.3pcap \
|
|
|
|
$(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
|
2008-11-22 17:30:24 +00:00
|
|
|
rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
|
2008-04-05 20:19:41 +00:00
|
|
|
ln $(DESTDIR)$(mandir)/man3/pcap_major_version.3pcap \
|
|
|
|
$(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
|
2008-11-22 17:30:24 +00:00
|
|
|
rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
|
2008-04-05 20:19:41 +00:00
|
|
|
ln $(DESTDIR)$(mandir)/man3/pcap_next_ex.3pcap \
|
|
|
|
$(DESTDIR)$(mandir)/man3/pcap_next.3pcap
|
2008-11-22 17:30:24 +00:00
|
|
|
rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
|
2008-04-05 20:19:41 +00:00
|
|
|
ln $(DESTDIR)$(mandir)/man3/pcap_open_offline.3pcap \
|
|
|
|
$(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
|
2008-11-22 17:30:24 +00:00
|
|
|
rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
|
2008-04-05 20:19:41 +00:00
|
|
|
ln $(DESTDIR)$(mandir)/man3/pcap_setnonblock.3pcap \
|
|
|
|
$(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
|
2008-10-23 05:56:59 +00:00
|
|
|
for i in $(MANFILE); do \
|
2008-11-21 22:54:59 +00:00
|
|
|
$(INSTALL_DATA) `echo $$i | sed 's/.manfile.in/.manfile/'` \
|
2008-10-23 05:56:59 +00:00
|
|
|
$(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
|
2008-10-21 07:33:01 +00:00
|
|
|
for i in $(MANMISC); do \
|
2008-11-21 22:54:59 +00:00
|
|
|
$(INSTALL_DATA) `echo $$i | sed 's/.manmisc.in/.manmisc/'` \
|
2008-10-21 07:33:01 +00:00
|
|
|
$(DESTDIR)$(mandir)/man@MAN_MISC_INFO@/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
|
1999-10-07 23:46:40 +00:00
|
|
|
|
2003-11-30 04:45:02 +00:00
|
|
|
install-shared: install-shared-$(DYEXT)
|
|
|
|
install-shared-so: libpcap.so
|
2009-06-09 18:54:58 +00:00
|
|
|
[ -d $(DESTDIR)$(libdir) ] || \
|
|
|
|
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
|
2008-11-21 19:23:19 +00:00
|
|
|
VER=`cat $(srcdir)/VERSION`; \
|
|
|
|
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
|
|
|
|
$(INSTALL_PROGRAM) libpcap.so.$$VER $(DESTDIR)$(libdir)/libpcap.so.$$VER; \
|
|
|
|
ln -sf libpcap.so.$$VER $(DESTDIR)$(libdir)/libpcap.so.$$MAJOR_VER; \
|
|
|
|
ln -sf libpcap.so.$$MAJOR_VER $(DESTDIR)$(libdir)/libpcap.so
|
2003-11-30 04:45:02 +00:00
|
|
|
install-shared-dylib: libpcap.dylib
|
2009-06-09 18:54:58 +00:00
|
|
|
[ -d $(DESTDIR)$(libdir) ] || \
|
|
|
|
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
|
2008-11-21 19:23:19 +00:00
|
|
|
VER=`cat $(srcdir)/VERSION`; \
|
|
|
|
MAJOR_VER=A; \
|
|
|
|
$(INSTALL_PROGRAM) libpcap.$$VER.dylib $(DESTDIR)$(libdir)/libpcap.$$VER.dylib; \
|
|
|
|
ln -sf libpcap.$$VER.dylib $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER.dylib; \
|
|
|
|
ln -sf libpcap.$$MAJOR_VER.dylib $(DESTDIR)$(libdir)/libpcap.dylib
|
2009-06-07 21:21:29 +00:00
|
|
|
install-shared-sl: libpcap.sl
|
2009-06-09 18:54:58 +00:00
|
|
|
[ -d $(DESTDIR)$(libdir) ] || \
|
|
|
|
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
|
2009-06-10 00:49:05 +00:00
|
|
|
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
|
|
|
|
$(INSTALL_PROGRAM) libpcap.$$MAJOR_VER $(DESTDIR)$(libdir)
|
|
|
|
ln -sf libpcap.$$MAJOR_VER $(DESTDIR)$(libdir)/libpcap.sl
|
Add support for building AIX shared libraries. (It's complicated - we
build "traditional" AIX shared libraries, which are archive libraries
containing shared objects, so, on AIX, we build the archive library, for
the benefit of "build libpcap and tcpdump in subdirectories of the same
directory, with tcpdump linked statically with that libpcap", but don't
install it. Newer versions of AIX, at least, also support "standard"
.so-style UN*X shared libraries, but we stick with
<Tevye>Tradition!</Tevye>.)
Fix an AIX build problem that shows up when building with GCC.
Clean up HP-UX stuff.
2009-06-16 07:18:54 +00:00
|
|
|
install-shared-shareda: libpcap.shareda
|
|
|
|
#
|
|
|
|
# AIX shared libraries are weird. They're archive libraries
|
|
|
|
# with one or more shared object components.
|
|
|
|
#
|
|
|
|
[ -d $(DESTDIR)$(libdir) ] || \
|
|
|
|
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
|
|
|
|
$(INSTALL_PROGRAM) libpcap.shareda $(DESTDIR)$(libdir)/libpcap.a
|
2009-06-27 19:43:26 +00:00
|
|
|
install-shared-none:
|
Add support for building AIX shared libraries. (It's complicated - we
build "traditional" AIX shared libraries, which are archive libraries
containing shared objects, so, on AIX, we build the archive library, for
the benefit of "build libpcap and tcpdump in subdirectories of the same
directory, with tcpdump linked statically with that libpcap", but don't
install it. Newer versions of AIX, at least, also support "standard"
.so-style UN*X shared libraries, but we stick with
<Tevye>Tradition!</Tevye>.)
Fix an AIX build problem that shows up when building with GCC.
Clean up HP-UX stuff.
2009-06-16 07:18:54 +00:00
|
|
|
|
|
|
|
install-archive: install-archive-$(DYEXT)
|
2009-06-27 19:43:26 +00:00
|
|
|
install-archive-so install-archive-dylib install-archive-sl install-archive-none: libpcap.a
|
Add support for building AIX shared libraries. (It's complicated - we
build "traditional" AIX shared libraries, which are archive libraries
containing shared objects, so, on AIX, we build the archive library, for
the benefit of "build libpcap and tcpdump in subdirectories of the same
directory, with tcpdump linked statically with that libpcap", but don't
install it. Newer versions of AIX, at least, also support "standard"
.so-style UN*X shared libraries, but we stick with
<Tevye>Tradition!</Tevye>.)
Fix an AIX build problem that shows up when building with GCC.
Clean up HP-UX stuff.
2009-06-16 07:18:54 +00:00
|
|
|
#
|
|
|
|
# Most platforms have separate suffixes for shared and
|
|
|
|
# archive libraries, so we install both.
|
|
|
|
#
|
|
|
|
[ -d $(DESTDIR)$(libdir) ] || \
|
|
|
|
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
|
|
|
|
$(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
|
|
|
|
$(RANLIB) $(DESTDIR)$(libdir)/libpcap.a
|
|
|
|
install-archive-shareda:
|
|
|
|
#
|
|
|
|
# AIX, however, doesn't, so we don't install the archive
|
|
|
|
# library on AIX.
|
|
|
|
#
|
2003-11-30 04:45:02 +00:00
|
|
|
|
2009-06-07 21:21:29 +00:00
|
|
|
uninstall: uninstall-shared
|
2000-07-30 05:56:49 +00:00
|
|
|
rm -f $(DESTDIR)$(libdir)/libpcap.a
|
2008-11-22 17:30:24 +00:00
|
|
|
for i in $(PUBHDR); do \
|
|
|
|
rm -f $(DESTDIR)$(includedir)/$$i; done
|
2006-10-04 18:09:21 +00:00
|
|
|
-rmdir $(DESTDIR)$(includedir)/pcap
|
2009-06-08 17:30:49 +00:00
|
|
|
rm -f $(DESTDIR)/$(bindir)/pcap-config
|
2008-09-23 18:04:01 +00:00
|
|
|
for i in $(MAN1); do \
|
|
|
|
rm -f $(DESTDIR)$(mandir)/man1/$$i; done
|
2008-04-05 20:19:41 +00:00
|
|
|
for i in $(MAN3PCAP); do \
|
|
|
|
rm -f $(DESTDIR)$(mandir)/man3/$$i; done
|
2008-11-22 17:30:24 +00:00
|
|
|
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_perror.3pcap
|
|
|
|
rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.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
|
|
|
|
rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
|
|
|
|
rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
|
2008-10-23 05:56:59 +00:00
|
|
|
for i in $(MANFILE); do \
|
|
|
|
rm -f $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
|
2008-10-21 07:33:01 +00:00
|
|
|
for i in $(MANMISC); do \
|
|
|
|
rm -f $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
|
2000-07-29 07:05:20 +00:00
|
|
|
|
2008-11-21 19:23:19 +00:00
|
|
|
uninstall-shared: uninstall-shared-$(DYEXT)
|
|
|
|
uninstall-shared-so:
|
|
|
|
VER=`cat $(srcdir)/VERSION`; \
|
|
|
|
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
|
2008-11-22 17:30:24 +00:00
|
|
|
rm -f $(DESTDIR)$(libdir)/libpcap.so.$$VER; \
|
|
|
|
rm -f $(DESTDIR)$(libdir)/libpcap.so.$$MAJOR_VER; \
|
|
|
|
rm -f $(DESTDIR)$(libdir)/libpcap.so
|
2008-11-21 19:23:19 +00:00
|
|
|
uninstall-shared-dylib:
|
|
|
|
VER=`cat $(srcdir)/VERSION`; \
|
|
|
|
MAJOR_VER=A; \
|
2008-11-22 17:30:24 +00:00
|
|
|
rm -f $(DESTDIR)$(libdir)/libpcap.$$VER.dylib; \
|
|
|
|
rm -f $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER.dylib; \
|
|
|
|
rm -f $(DESTDIR)$(libdir)/libpcap.dylib
|
2009-06-07 21:21:29 +00:00
|
|
|
uninstall-shared-sl:
|
2009-06-10 00:49:05 +00:00
|
|
|
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
|
|
|
|
rm -f $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER; \
|
2009-06-07 21:21:29 +00:00
|
|
|
rm -f $(DESTDIR)$(libdir)/libpcap.sl
|
Add support for building AIX shared libraries. (It's complicated - we
build "traditional" AIX shared libraries, which are archive libraries
containing shared objects, so, on AIX, we build the archive library, for
the benefit of "build libpcap and tcpdump in subdirectories of the same
directory, with tcpdump linked statically with that libpcap", but don't
install it. Newer versions of AIX, at least, also support "standard"
.so-style UN*X shared libraries, but we stick with
<Tevye>Tradition!</Tevye>.)
Fix an AIX build problem that shows up when building with GCC.
Clean up HP-UX stuff.
2009-06-16 07:18:54 +00:00
|
|
|
uninstall-shared-shareda:
|
|
|
|
rm -f $(DESTDIR)$(libdir)/libpcap.a
|
2009-06-27 19:43:26 +00:00
|
|
|
uninstall-shared-none:
|
2008-11-21 19:23:19 +00:00
|
|
|
|
1999-10-07 23:46:40 +00:00
|
|
|
clean:
|
2009-06-07 18:48:58 +00:00
|
|
|
rm -f $(CLEANFILES) libpcap.$(DYEXT) $(PROG)-`cat VERSION`.tar.gz
|
1999-10-07 23:46:40 +00:00
|
|
|
|
2003-11-30 04:45:02 +00:00
|
|
|
distclean: clean
|
|
|
|
rm -f Makefile config.cache config.log config.status \
|
2008-09-23 18:04:01 +00:00
|
|
|
config.h gnuc.h os-proto.h bpf_filter.c pcap-config \
|
|
|
|
stamp-h stamp-h.in
|
2008-10-23 05:56:59 +00:00
|
|
|
rm -f $(MAN3PCAP_EXPAND:.in=) $(MANFILE:.in=) $(MANMISC:.in=)
|
2003-11-30 04:45:02 +00:00
|
|
|
rm -rf autom4te.cache
|
1999-10-07 23:46:40 +00:00
|
|
|
|
|
|
|
tags: $(TAGFILES)
|
|
|
|
ctags -wtd $(TAGFILES)
|
|
|
|
|
2003-11-30 04:45:02 +00:00
|
|
|
packaging/pcap.spec: packaging/pcap.spec.in VERSION
|
|
|
|
RPMVERSION=`cat VERSION | sed s/-.*//g`; \
|
|
|
|
sed -e s/@VERSION@/$$RPMVERSION/ -e s/@NAME@/libpcap-`cat VERSION`/ $< > $@
|
|
|
|
|
2007-07-24 02:25:19 +00:00
|
|
|
releasetar:
|
2008-05-27 07:17:04 +00:00
|
|
|
@cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
|
FILES isn't used to make the tarball any more; get rid of it.
Update HDR in Makefile.in to include all headers.
Add pcap_activate.3pcap to the list of man pages in the 3PCAP section.
Add an EXTRA_DIST variable to include all the files that should go into
the tarball and that aren't in CSRC, HDR, MAN3PCAP, or MAN4.
Use CSRC, HDR, MAN3PCAP, MAN4, and EXTRA_DIST to determine what goes
into the tarball, rather than doing a "make distclean" and putting
everything into the tarball; that way, you can do "make releasetar"
without cleaning out the current directory.
Given that we're not just tarring up the entire source directory, we can
make the tarball directory as a subdirectory of the current directory and
put the tarball into the current directory, rather than putting it into
a (not-entirely-obvious) ../n directory. Clean out the tarball
directory when we're done.
2008-05-26 21:05:47 +00:00
|
|
|
mkdir $$name; \
|
2008-10-21 07:33:01 +00:00
|
|
|
tar cf - $(CSRC) $(HDR) $(MAN1) $(MAN3PCAP_EXPAND) \
|
2008-10-23 05:56:59 +00:00
|
|
|
$(MAN3PCAP_NOEXPAND) $(MANFILE) $(MANMISC) $(EXTRA_DIST) | \
|
|
|
|
(cd $$name; tar xf -); \
|
FILES isn't used to make the tarball any more; get rid of it.
Update HDR in Makefile.in to include all headers.
Add pcap_activate.3pcap to the list of man pages in the 3PCAP section.
Add an EXTRA_DIST variable to include all the files that should go into
the tarball and that aren't in CSRC, HDR, MAN3PCAP, or MAN4.
Use CSRC, HDR, MAN3PCAP, MAN4, and EXTRA_DIST to determine what goes
into the tarball, rather than doing a "make distclean" and putting
everything into the tarball; that way, you can do "make releasetar"
without cleaning out the current directory.
Given that we're not just tarring up the entire source directory, we can
make the tarball directory as a subdirectory of the current directory and
put the tarball into the current directory, rather than putting it into
a (not-entirely-obvious) ../n directory. Clean out the tarball
directory when we're done.
2008-05-26 21:05:47 +00:00
|
|
|
tar -c -z -f $$name.tar.gz $$name; \
|
|
|
|
rm -rf $$name
|
1999-10-07 23:46:40 +00:00
|
|
|
|
2003-02-11 08:01:40 +00:00
|
|
|
depend: $(GENSRC) $(GENHDR) bpf_filter.c
|
1999-10-07 23:46:40 +00:00
|
|
|
./mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
|
2003-11-30 04:45:02 +00:00
|
|
|
|
|
|
|
Makefile: Makefile.in config.status
|
|
|
|
./config.status
|
|
|
|
@echo your Makefile was out of date, now run $(MAKE) again
|
|
|
|
exit 1
|