1# Makefile for libpcap 2# $Id: Makefile,v 1.19 1998/05/08 06:43:07 bde 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 9MAN3= pcap.3 10CLEANFILES+= tokdefs.h 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=2 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 29beforeinstall: 30.for i in pcap.h pcap-int.h pcap-namedb.h 31 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${PCAP_DISTDIR}/$i \ 32 ${DESTDIR}/usr/include 33.endfor 34 35tokdefs.h: grammar.h 36 ln -sf grammar.h tokdefs.h 37 38.include <bsd.lib.mk> 39