1# Makefile for libpcap 2# $FreeBSD$ 3 4LIB= pcap 5SRCS= grammar.y tokdefs.h pcap-bpf.c \ 6 pcap.c inet.c gencode.c optimize.c nametoaddr.c \ 7 etherent.c savefile.c bpf_filter.c bpf_image.c bpf_dump.c \ 8 scanner.l version.c 9INCS= pcap.h pcap-int.h pcap-namedb.h 10MAN= pcap.3 11CLEANFILES=tokdefs.h version.c 12 13CFLAGS+=-DHAVE_CONFIG_H -Dyylval=pcap_lval -I${.CURDIR} -I. 14.if !defined(NOINET6) 15CFLAGS+=-DINET6 16.endif 17 18SHLIB_MAJOR=2 19SHLIB_MINOR=5 20 21# 22# Magic to grab sources out of src/contrib 23# 24PCAP_DISTDIR?=${.CURDIR}/../../contrib/libpcap 25CFLAGS+=-I${PCAP_DISTDIR} 26.PATH: ${PCAP_DISTDIR} 27.PATH: ${PCAP_DISTDIR}/bpf/net 28 29version.c: ${PCAP_DISTDIR}/VERSION 30 @rm -f $@ 31 sed 's/.*/char pcap_version[] = "&";/' ${PCAP_DISTDIR}/VERSION > $@ 32 33tokdefs.h: grammar.h 34 ln -sf grammar.h tokdefs.h 35 36.include <bsd.lib.mk> 37