1# Makefile for libpcap 2# $Id: Makefile,v 1.11 1996/08/21 16:50:08 pst Exp $ 3 4LIB= pcap 5SRCS= 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 grammar.y scanner.l 9MAN3= pcap.3 10CLEANFILES+= lex.yy.c tokdefs.h grammar.c scanner.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+=-Wall -I. -I${.CURDIR} -Dyylval=pcap_lval -Dlint ${DEFS} 17 18SHLIB_MAJOR=2 19SHLIB_MINOR=1 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-namedb.h 31 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${PCAP_DISTDIR}/$i \ 32 ${DESTDIR}/usr/include 33.endfor 34 35scanner.o: tokdefs.h 36 37tokdefs.h: grammar.c 38 mv -f y.tab.h tokdefs.h 39 40.include <bsd.lib.mk> 41