1 SRCDIR
= ${.CURDIR
}/..
/..
/contrib
/libpcap
6 pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \
7 savefile.c sf-pcap.c sf-pcap-ng.c pcap-common.c \
8 bpf_image.c bpf_dump.c \
9 scanner.l grammar.y bpf_filter.c version.c \
26 PCAPINCSDIR
= ${INCLUDEDIR}/pcap
27 INCSGROUPS
= INCS PCAPINCS
33 pcap_list_datalinks
.3 \
34 pcap_list_tstamp_types
.3 \
37 pcap_set_tstamp_type
.3
38 MAN
+= pcap_activate
.3 \
40 pcap_can_set_rfmon
.3 \
43 pcap_datalink_name_to_val
.3 \
44 pcap_datalink_val_to_name
.3 \
54 pcap_get_selectable_fd
.3 \
62 pcap_major_version
.3 \
64 pcap_offline_filter
.3 \
66 pcap_set_buffer_size
.3 \
79 pcap_tstamp_type_name_to_val
.3 \
80 pcap_tstamp_type_val_to_name
.3
85 MLINKS
= pcap_datalink_val_to_name
.3 pcap_datalink_val_to_description
.3 \
86 pcap_dump_open
.3 pcap_dump_fopen
.3 \
87 pcap_findalldevs
.3 pcap_freealldevs
.3 \
88 pcap_geterr
.3 pcap_perror
.3 \
89 pcap_inject
.3 pcap_sendpacket
.3 \
90 pcap_list_datalinks
.3 pcap_free_datalinks
.3 \
91 pcap_list_tstamp_types
.3 pcap_free_tstamp_types
.3 \
92 pcap_loop
.3 pcap_dispatch
.3 \
93 pcap_major_version
.3 pcap_minor_version
.3 \
94 pcap_next_ex
.3 pcap_next
.3 \
95 pcap_open_offline
.3 pcap_fopen_offline
.3 \
96 pcap_setnonblock
.3 pcap_getnonblock
.3
98 CLEANFILES
=tokdefs.h version.c version.h
104 CFLAGS
+=-DHAVE_CONFIG_H
-I
${.CURDIR
} -I
${.OBJDIR
}
105 CFLAGS
+=-D_U_
="__attribute__((unused))" -DYYBISON
106 CFLAGS
+=-DHAVE_STRUCT_ETHER_ADDR
-DHAVE_NET_PFVAR_H
107 .if
!defined
(NOINET6
)
114 # Magic to grab sources out of src/contrib
116 PCAP_DISTDIR?
=${SRCDIR}
117 CFLAGS
+=-I
${PCAP_DISTDIR}
118 .PATH
: ${PCAP_DISTDIR}
119 .PATH
: ${PCAP_DISTDIR}/bpf
/net
122 sed
-e
's/.*/char pcap_version[] = "&";/' ${.ALLSRC
} > ${.TARGET
}
125 sed
-e
's/.*/static const char pcap_version_string[] = "libpcap version &";/' \
126 ${.ALLSRC
} > ${.TARGET
}
129 ${LN} -sf grammar.h tokdefs.h
132 # Magic to convert the man pages to something non Solarish
136 if
[ -f
${PCAP_DISTDIR}/${_page
:S
/3$/3pcap
/} ]; then \
137 F
=${_page
:S
/3$/3pcap
/}; \
138 elif
[ -f
${PCAP_DISTDIR}/${_page
:S
/3$/3pcap.in
/} ]; then \
139 F
=${_page
:S
/3$/3pcap.in
/}; \
140 elif
[ -f
${PCAP_DISTDIR}/${_page
:S
/5$/manfile
/} ]; then \
141 F
=${_page
:S
/5$/manfile
/}; \
142 elif
[ -f
${PCAP_DISTDIR}/${_page
:S
/5$/manfile.in
/} ]; then \
143 F
=${_page
:S
/5$/manfile.in
/}; \
144 elif
[ -f
${PCAP_DISTDIR}/${_page
:S
/7$/manmisc
/} ]; then \
145 F
=${_page
:S
/7$/manmisc
/}; \
146 elif
[ -f
${PCAP_DISTDIR}/${_page
:S
/7$/manmisc.in
/} ]; then \
147 F
=${_page
:S
/7$/manmisc.in
/}; \
149 sed
-e
's/3PCAP/3/g' -e
's/@MAN_FILE_FORMATS@/5/g' \
150 -e
's/@MAN_MISC_INFO@/7/g' ${PCAP_DISTDIR}/$$F > ${_page}
153 .
include <bsd.lib.mk
>