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 19 20# 21# Magic to grab sources out of src/contrib 22# 23PCAP_DISTDIR?=${.CURDIR}/../../contrib/libpcap 24CFLAGS+=-I${PCAP_DISTDIR} 25.PATH: ${PCAP_DISTDIR} 26.PATH: ${PCAP_DISTDIR}/bpf/net 27 28version.c: ${PCAP_DISTDIR}/VERSION 29 @rm -f $@ 30 sed 's/.*/char pcap_version[] = "&";/' ${PCAP_DISTDIR}/VERSION > $@ 31 32tokdefs.h: grammar.h 33 ln -sf grammar.h tokdefs.h 34 35.include <bsd.lib.mk> 36