2 # $FreeBSD: src/lib/libpcap/Makefile,v 1.24.2.4 2002/07/22 14:21:50 ru Exp $
3 # $DragonFly: src/lib/libpcap/Makefile,v 1.12 2007/10/11 01:07:29 pavalos Exp $
5 SRCDIR
= ${.CURDIR
}/..
/..
/contrib
/libpcap
8 SRCS
= grammar.y tokdefs.h pcap-bpf.c version.h \
9 pcap.c inet.c fad-getad.c gencode.c optimize.c nametoaddr.c \
10 etherent.c savefile.c bpf_filter.c bpf_image.c bpf_dump.c \
13 # Old compatibility headers
14 INCS
= pcap.h pcap-namedb.h pcap-int.h
16 PCAPINCS
= pcap
/pcap.h pcap
/namedb.h
17 PCAPINCSDIR
= ${INCLUDEDIR}/pcap
18 INCSGROUPS
= INCS PCAPINCS
23 pcap_can_set_rfmon
.3 \
28 pcap_datalink_name_to_val
.3 \
29 pcap_datalink_val_to_name
.3 \
39 pcap_free_datalinks
.3 \
42 pcap_get_selectable_fd
.3 \
47 pcap_list_datalinks
.3 \
51 pcap_major_version
.3 \
53 pcap_offline_filter
.3 \
57 pcap_set_buffer_size
.3 \
73 MLINKS
= pcap_datalink_val_to_name
.3 pcap_datalink_val_to_description
.3 \
74 pcap_dump_open
.3 pcap_dump_fopen
.3 \
75 pcap_geterr
.3 pcap_perror
.3 \
76 pcap_inject
.3 pcap_sendpacket
.3 \
77 pcap_loop
.3 pcap_dispatch
.3 \
78 pcap_major_version
.3 pcap_minor_version
.3 \
79 pcap_next_ex
.3 pcap_next
.3 \
80 pcap_open_offline
.3 pcap_fopen_offline
.3 \
81 pcap_setnonblock
.3 pcap_getnonblock
.3
83 CLEANFILES
=tokdefs.h version.c version.h
87 CFLAGS
+=-DHAVE_CONFIG_H
-Dyylval
=pcap_lval
-I
${.CURDIR
} -I.
88 CFLAGS
+=-D_U_
="__attribute__((unused))"
89 CFLAGS
+=-DHAVE_STRUCT_ETHER_ADDR
-DHAVE_NET_PFVAR_H
97 # Magic to grab sources out of src/contrib
99 PCAP_DISTDIR?
=${SRCDIR}
100 CFLAGS
+=-I
${PCAP_DISTDIR}
101 .PATH
: ${PCAP_DISTDIR}
102 .PATH
: ${PCAP_DISTDIR}/bpf
/net
104 version.c
: ${PCAP_DISTDIR}/VERSION
106 sed
's/.*/char pcap_version[] = "&";/' ${PCAP_DISTDIR}/VERSION
> $@
108 version.h
: ${PCAP_DISTDIR}/VERSION
110 sed
's/.*/static const char pcap_version_string[] = "libpcap version &";/' \
111 ${PCAP_DISTDIR}/VERSION
> $@
114 ${LN} -sf grammar.h tokdefs.h
117 # Magic to convert the man pages to something non Solarish
121 if
[ -f
${PCAP_DISTDIR}/${_page
:S
/3$/3pcap
/} ]; then \
122 F
=${_page
:S
/3$/3pcap
/}; \
123 elif
[ -f
${PCAP_DISTDIR}/${_page
:S
/3$/3pcap.in
/} ]; then \
124 F
=${_page
:S
/3$/3pcap.in
/}; \
125 elif
[ -f
${PCAP_DISTDIR}/${_page
:S
/5$/manfile
/} ]; then \
126 F
=${_page
:S
/5$/manfile
/}; \
127 elif
[ -f
${PCAP_DISTDIR}/${_page
:S
/5$/manfile.in
/} ]; then \
128 F
=${_page
:S
/5$/manfile.in
/}; \
129 elif
[ -f
${PCAP_DISTDIR}/${_page
:S
/7$/manmisc
/} ]; then \
130 F
=${_page
:S
/7$/manmisc
/}; \
131 elif
[ -f
${PCAP_DISTDIR}/${_page
:S
/7$/manmisc.in
/} ]; then \
132 F
=${_page
:S
/7$/manmisc.in
/}; \
134 sed
-e
's/3PCAP/3/g' -e
's/@MAN_FILE_FORMATS@/5/g' \
135 -e
's/@MAN_MISC_INFO@/7/g' ${PCAP_DISTDIR}/$$F > ${_page}
138 .
include <bsd.lib.mk
>