1 # $NetBSD: Makefile,v 1.12 2014/11/19 19:33:31 christos Exp $
5 USE_FORT?
= yes
# network protocol library
7 CWARNFLAGS.clang
+= -Wno-format-extra-args \
8 -Wno-unneeded-internal-declaration
10 CPPFLAGS
+= -DPCAP_DONT_INCLUDE_PCAP_BPF_H
-DHAVE_CONFIG_H
16 ${TOOL_SED} -e
's,@MAN_FILE_FORMATS@,5,g' \
17 -e
's,@MAN_MISC_INFO@,7,g' \
18 -e
's,3PCAP,3,g' < ${.ALLSRC
} > ${.TARGET
}
22 ${TOOL_SED} -e
's,@MAN_FILE_FORMATS@,5,g' \
23 -e
's,@MAN_MISC_INFO@,7,g' \
24 -e
's,3PCAP,3,g' < ${.ALLSRC
} > ${.TARGET
}
27 SRCDIR
= ${.CURDIR
}/..
/dist
34 pcap_breakloop
.3pcap \
35 pcap_can_set_rfmon
.3pcap \
40 pcap_datalink_name_to_val
.3pcap \
41 pcap_datalink_val_to_name
.3pcap \
43 pcap_dump_close
.3pcap \
44 pcap_dump_file
.3pcap \
45 pcap_dump_flush
.3pcap \
46 pcap_dump_ftell
.3pcap \
47 pcap_dump_open
.3pcap \
50 pcap_findalldevs
.3pcap \
52 pcap_get_selectable_fd
.3pcap \
55 pcap_is_swapped
.3pcap \
56 pcap_lib_version
.3pcap \
57 pcap_list_datalinks
.3pcap \
58 pcap_list_tstamp_types
.3pcap \
59 pcap_lookupdev
.3pcap \
60 pcap_lookupnet
.3pcap \
62 pcap_major_version
.3pcap \
64 pcap_offline_filter
.3pcap \
65 pcap_open_dead
.3pcap \
66 pcap_open_live
.3pcap \
67 pcap_open_offline
.3pcap \
68 pcap_set_buffer_size
.3pcap \
69 pcap_set_datalink
.3pcap \
70 pcap_set_immediate_mode
.3pcap \
71 pcap_set_promisc
.3pcap \
72 pcap_set_rfmon
.3pcap \
73 pcap_set_snaplen
.3pcap \
74 pcap_set_timeout
.3pcap \
75 pcap_set_tstamp_type
.3pcap \
76 pcap_setdirection
.3pcap \
77 pcap_setfilter
.3pcap \
78 pcap_setnonblock
.3pcap \
81 pcap_statustostr
.3pcap \
83 pcap_tstamp_type_name_to_val
.3pcap \
84 pcap_tstamp_type_val_to_name
.3pcap
89 pcap_compile
.3pcap.in \
90 pcap_datalink
.3pcap.in \
91 pcap_dump_open
.3pcap.in \
92 pcap_get_tstamp_precision
.3pcap.in \
93 pcap_list_datalinks
.3pcap.in \
94 pcap_list_tstamp_types
.3pcap.in \
95 pcap_open_dead
.3pcap.in \
96 pcap_open_offline
.3pcap.in \
97 pcap_set_tstamp_precision
.3pcap.in \
98 pcap_set_tstamp_type
.3pcap.in
101 pcap-filter.manmisc.in \
102 pcap-linktype.manmisc.in \
103 pcap-tstamp.manmisc.in
104 MANFILEIN
= pcap-savefile.manfile.in
107 MAN
= ${MAN3
:S
/3pcap
/3/g
} ${MAN3IN
:S
/3pcap.in
/3/g
} \
108 ${MANMISCIN
:S
/manmisc.in
/7/g
} ${MANFILEIN
:S
/manfile.in
/5/g
}
112 ${i
:S
/pcap.in
//}: ${i} __sed
115 .for i in
${MANMISCIN}
116 ${i
:S
/manmisc.in
/7/}: ${i} __sed
119 .for i in
${MANFILEIN}
120 ${i
:S
/manfile.in
/5/}: ${i} __sed
123 CPPFLAGS
+= -I
${.CURDIR
}/..
/include -I
${.CURDIR
} -I
${SRCDIR}
129 CPPFLAGS
+= -DHAVE_CONFIG_H
130 CPPFLAGS
+= -D_U_
="__attribute__((__unused__))"
132 .if
(${USE_INET6} != "no")
136 SRCS
= scanner.l savefile.c pcap.c pcap-bpf.c optimize.c nametoaddr.c \
137 inet.c grammar.y gencode.c fad-getad.c etherent.c bpf_image.c \
138 bpf_dump.c version.c sf-pcap-ng.c sf-pcap.c pcap-common.c
140 .PATH
: ${NETBSDSRCDIR}/sys
/net
143 INCS
= pcap
/pcap.h pcap
/namedb.h
144 INCSDIR
= /usr
/include
145 INCSYMLINKS
+= ..
/net
/bpf.h
${INCSDIR}/pcap
/bpf.h
146 INCSYMLINKS
+= pcap
/pcap.h
${INCSDIR}/pcap.h
147 INCSYMLINKS
+= pcap
/namedb.h
${INCSDIR}/pcap-namedb.h
149 scanner.d scanner.o
: tokdefs.h
154 CLEANFILES
+= tokdefs.h
155 COPTS.bpf_image.c
= -Wno-format-nonliteral
157 .
include <bsd.lib.mk
>