1995-01-20 04:13:07 +00:00
|
|
|
# Makefile for libpcap
|
1999-08-28 00:22:10 +00:00
|
|
|
# $FreeBSD$
|
1995-01-20 04:13:07 +00:00
|
|
|
|
2006-04-13 07:25:02 +00:00
|
|
|
SHLIBDIR?= /lib
|
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2004-03-31 09:15:09 +00:00
|
|
|
LIB= pcap
|
|
|
|
SRCS= grammar.y tokdefs.h version.h pcap-bpf.c \
|
|
|
|
pcap.c inet.c fad-getad.c gencode.c optimize.c nametoaddr.c \
|
2001-04-03 04:34:50 +00:00
|
|
|
etherent.c savefile.c bpf_filter.c bpf_image.c bpf_dump.c \
|
|
|
|
scanner.l version.c
|
2002-05-12 16:01:00 +00:00
|
|
|
INCS= pcap.h pcap-int.h pcap-namedb.h
|
2001-03-27 17:27:19 +00:00
|
|
|
MAN= pcap.3
|
2004-03-31 09:15:09 +00:00
|
|
|
CLEANFILES=tokdefs.h version.h version.c
|
1996-08-19 21:01:37 +00:00
|
|
|
|
2003-11-04 06:12:21 +00:00
|
|
|
YFLAGS+=-p pcapyy
|
|
|
|
LFLAGS+=-Ppcapyy
|
|
|
|
CFLAGS+=-DHAVE_CONFIG_H -Dyylval=pcapyylval -I${.CURDIR} -I.
|
2004-03-31 09:15:09 +00:00
|
|
|
CFLAGS+=-D_U_="__attribute__((unused))"
|
|
|
|
CFLAGS+=-DHAVE_SNPRINTF -DHAVE_VSNPRINTF
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_INET6_SUPPORT} != "no"
|
2001-04-03 10:08:51 +00:00
|
|
|
CFLAGS+=-DINET6
|
2000-04-15 20:45:52 +00:00
|
|
|
.endif
|
1996-08-19 21:01:37 +00:00
|
|
|
|
2007-05-21 02:49:08 +00:00
|
|
|
SHLIB_MAJOR=5
|
1996-08-20 05:43:51 +00:00
|
|
|
|
1996-08-19 21:01:37 +00:00
|
|
|
#
|
|
|
|
# Magic to grab sources out of src/contrib
|
|
|
|
#
|
1996-08-21 16:50:15 +00:00
|
|
|
PCAP_DISTDIR?=${.CURDIR}/../../contrib/libpcap
|
2001-07-31 23:27:06 +00:00
|
|
|
CFLAGS+=-I${PCAP_DISTDIR}
|
1996-08-21 16:50:15 +00:00
|
|
|
.PATH: ${PCAP_DISTDIR}
|
|
|
|
.PATH: ${PCAP_DISTDIR}/bpf/net
|
1995-01-20 04:13:07 +00:00
|
|
|
|
1998-09-15 19:34:01 +00:00
|
|
|
version.c: ${PCAP_DISTDIR}/VERSION
|
|
|
|
@rm -f $@
|
|
|
|
sed 's/.*/char pcap_version[] = "&";/' ${PCAP_DISTDIR}/VERSION > $@
|
|
|
|
|
2004-03-31 09:15:09 +00:00
|
|
|
version.h: ${PCAP_DISTDIR}/VERSION
|
|
|
|
@rm -f $@
|
|
|
|
sed 's/.*/char pcap_version_string[] = "libpcap version &";/' ${PCAP_DISTDIR}/VERSION > $@
|
|
|
|
|
1998-05-08 06:43:07 +00:00
|
|
|
tokdefs.h: grammar.h
|
|
|
|
ln -sf grammar.h tokdefs.h
|
1995-01-20 04:13:07 +00:00
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|