1995-01-20 04:13:07 +00:00
|
|
|
# Makefile for libpcap
|
1997-05-27 00:08:01 +00:00
|
|
|
# $Id: Makefile,v 1.15 1997/02/22 15:07:50 peter Exp $
|
1995-01-20 04:13:07 +00:00
|
|
|
|
|
|
|
LIB= pcap
|
1997-01-05 18:25:53 +00:00
|
|
|
SRCS= grammar.c tokdefs.h pcap-bpf.c \
|
1996-08-19 21:01:37 +00:00
|
|
|
pcap.c inet.c gencode.c optimize.c nametoaddr.c \
|
|
|
|
etherent.c savefile.c bpf_filter.c bpf_image.c \
|
1997-01-05 18:25:53 +00:00
|
|
|
scanner.c
|
1996-08-19 21:01:37 +00:00
|
|
|
MAN3= pcap.3
|
1997-01-05 18:25:53 +00:00
|
|
|
CLEANFILES+= tokdefs.h grammar.c scanner.c y.tab.c y.tab.h
|
1996-08-19 21:01:37 +00:00
|
|
|
|
|
|
|
DEFS= -DHAVE_SYS_IOCCOM_H=1 -DHAVE_SYS_SOCKIO_H=1 \
|
|
|
|
-DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 \
|
|
|
|
-DHAVE_SOCKADDR_SA_LEN=1 -DLBL_ALIGN=1
|
|
|
|
|
1997-05-27 00:08:01 +00:00
|
|
|
CFLAGS+=-I. -Dyylval=pcap_lval ${DEFS}
|
1996-08-19 21:01:37 +00:00
|
|
|
|
1996-08-20 05:43:51 +00:00
|
|
|
SHLIB_MAJOR=2
|
1997-05-27 00:08:01 +00:00
|
|
|
SHLIB_MINOR=2
|
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
|
1997-05-27 00:08:01 +00:00
|
|
|
CFLAGS+=-I${PCAP_DISTDIR} -I${PCAP_DISTDIR}/lbl -I${PCAP_DISTDIR}/bpf
|
1996-08-21 16:50:15 +00:00
|
|
|
.PATH: ${PCAP_DISTDIR}
|
|
|
|
.PATH: ${PCAP_DISTDIR}/bpf/net
|
1995-01-20 04:13:07 +00:00
|
|
|
|
|
|
|
beforeinstall:
|
1996-08-30 01:59:46 +00:00
|
|
|
.for i in pcap.h pcap-namedb.h
|
|
|
|
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${PCAP_DISTDIR}/$i \
|
|
|
|
${DESTDIR}/usr/include
|
|
|
|
.endfor
|
1995-01-20 04:13:07 +00:00
|
|
|
|
1997-01-05 18:25:53 +00:00
|
|
|
tokdefs.h grammar.c: grammar.y
|
|
|
|
${YACC} ${YACCFLAGS} -d ${PCAP_DISTDIR}/grammar.y
|
|
|
|
mv y.tab.c grammar.c
|
|
|
|
mv y.tab.h tokdefs.h
|
1995-01-20 04:13:07 +00:00
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|