1# Makefile for libpcap 2# $Id: Makefile,v 1.21 1998/09/15 19:34:01 fenner Exp $ 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 \ 8 scanner.l version.c 9MAN3= pcap.3 10CLEANFILES=tokdefs.h version.c 11 12DEFS= -DHAVE_SYS_IOCCOM_H=1 -DHAVE_SYS_SOCKIO_H=1 \ 13 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 \ 14 -DHAVE_SOCKADDR_SA_LEN=1 -DLBL_ALIGN=1 15 16CFLAGS+=-I. -Dyylval=pcap_lval ${DEFS} 17 18SHLIB_MAJOR=2 19SHLIB_MINOR=3 20 21# 22# Magic to grab sources out of src/contrib 23# 24PCAP_DISTDIR?=${.CURDIR}/../../contrib/libpcap 25CFLAGS+=-I${PCAP_DISTDIR} -I${PCAP_DISTDIR}/lbl 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 33beforeinstall: 34.for i in pcap.h pcap-int.h pcap-namedb.h 35 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${PCAP_DISTDIR}/$i \ 36 ${DESTDIR}/usr/include 37.endfor 38 39tokdefs.h: grammar.h 40 ln -sf grammar.h tokdefs.h 41 42.include <bsd.lib.mk> 43