xref: /freebsd/lib/libpcap/Makefile (revision bf18e76ab6b3abd05867b45dd562b9430a9782e2)
1609c8587SJordan K. Hubbard# Makefile for libpcap
26141261fSPeter Wemm# $Id: Makefile,v 1.7 1996/06/02 17:09:03 phk Exp $
3609c8587SJordan K. Hubbard
4609c8587SJordan K. HubbardLIB=    pcap
5bf18e76aSPaul TrainaSRCS=	pcap-bpf.c \
6bf18e76aSPaul Traina        pcap.c inet.c gencode.c optimize.c nametoaddr.c \
7bf18e76aSPaul Traina	etherent.c savefile.c bpf_filter.c bpf_image.c \
88a695f76SAndras Olah        grammar.y scanner.l
9609c8587SJordan K. HubbardMAN3=	pcap.3
10609c8587SJordan K. Hubbard
11bf18e76aSPaul TrainaCLEANFILES+= lex.yy.c tokdefs.h grammar.c scanner.c
12bf18e76aSPaul Traina
13bf18e76aSPaul TrainaDEFS=	-DHAVE_SYS_IOCCOM_H=1 -DHAVE_SYS_SOCKIO_H=1 \
14bf18e76aSPaul Traina	-DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 \
15bf18e76aSPaul Traina	-DHAVE_SOCKADDR_SA_LEN=1 -DLBL_ALIGN=1
16bf18e76aSPaul Traina
17bf18e76aSPaul TrainaCFLAGS+=-Wall -I. -I${.CURDIR} -Dyylval=pcap_lval -Dlint ${DEFS}
18bf18e76aSPaul Traina
19bf18e76aSPaul Traina#
20bf18e76aSPaul Traina# Magic to grab sources out of src/contrib
21bf18e76aSPaul Traina#
22bf18e76aSPaul TrainaDISTDIR?=${.CURDIR}/../../contrib/libpcap
23bf18e76aSPaul Traina.PATH:	${DISTDIR}
24bf18e76aSPaul Traina.PATH:	${DISTDIR}/bpf/net
25bf18e76aSPaul TrainaCFLAGS+=-I${DISTDIR} -I${DISTDIR}/lbl
26bf18e76aSPaul Traina
27609c8587SJordan K. Hubbardbeforeinstall:
28bf18e76aSPaul Traina	-cmp -s ${DISTDIR}/pcap.h ${DESTDIR}/usr/include/pcap.h || \
2997cefc58SBruce Evans	  ( $(INSTALL) -c -o ${BINOWN} -g ${BINGRP} -m 444 \
30bf18e76aSPaul Traina	    ${DISTDIR}/pcap.h ${DESTDIR}/usr/include; )
31bf18e76aSPaul Traina	-cmp -s ${DISTDIR}/pcap-namedb.h ${DESTDIR}/usr/include/pcap-namedb.h || \
3297cefc58SBruce Evans	  ( $(INSTALL) -c -o ${BINOWN} -g ${BINGRP} -m 444 \
33bf18e76aSPaul Traina	    ${DISTDIR}/pcap-namedb.h ${DESTDIR}/usr/include; )
34bf18e76aSPaul Traina
35609c8587SJordan K. Hubbard
368a695f76SAndras Olahscanner.o: tokdefs.h
37609c8587SJordan K. Hubbard
38609c8587SJordan K. Hubbardtokdefs.h: grammar.c
396b513974SPoul-Henning Kamp	mv -f y.tab.h tokdefs.h
40609c8587SJordan K. Hubbard
41609c8587SJordan K. Hubbard.include <bsd.lib.mk>
42