etc/protocols - sync with NetBSD-8
[minix.git] / external / bsd / libpcap / lib / Makefile
blobba8c1f8638587b701510e983c7b9ea1efba48af8
1 # $NetBSD: Makefile,v 1.12 2014/11/19 19:33:31 christos Exp $
3 USE_SHLIBDIR=yes
4 .include <bsd.own.mk>
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
12 .SUFFIXES: .3 .3pcap
14 __sed: .USE
15 @rm -f ${.TARGET}
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}
20 .3pcap.3:
21 @rm -f ${.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
28 .PATH: ${SRCDIR}
30 LIB= pcap
31 MAN3= \
32 pcap.3pcap \
33 pcap_activate.3pcap \
34 pcap_breakloop.3pcap \
35 pcap_can_set_rfmon.3pcap \
36 pcap_close.3pcap \
37 pcap_compile.3pcap \
38 pcap_create.3pcap \
39 pcap_datalink.3pcap \
40 pcap_datalink_name_to_val.3pcap \
41 pcap_datalink_val_to_name.3pcap \
42 pcap_dump.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 \
48 pcap_file.3pcap \
49 pcap_fileno.3pcap \
50 pcap_findalldevs.3pcap \
51 pcap_freecode.3pcap \
52 pcap_get_selectable_fd.3pcap \
53 pcap_geterr.3pcap \
54 pcap_inject.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 \
61 pcap_loop.3pcap \
62 pcap_major_version.3pcap \
63 pcap_next_ex.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 \
79 pcap_snapshot.3pcap \
80 pcap_stats.3pcap \
81 pcap_statustostr.3pcap \
82 pcap_strerror.3pcap \
83 pcap_tstamp_type_name_to_val.3pcap \
84 pcap_tstamp_type_val_to_name.3pcap
87 MAN3IN= \
88 pcap.3pcap.in \
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
100 MANMISCIN= \
101 pcap-filter.manmisc.in \
102 pcap-linktype.manmisc.in \
103 pcap-tstamp.manmisc.in
104 MANFILEIN= pcap-savefile.manfile.in
105 CLEANFILES+= ${MAN}
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}
109 WARNS?= 4
111 .for i in ${MAN3IN}
112 ${i:S/pcap.in//}: ${i} __sed
113 .endfor
115 .for i in ${MANMISCIN}
116 ${i:S/manmisc.in/7/}: ${i} __sed
117 .endfor
119 .for i in ${MANFILEIN}
120 ${i:S/manfile.in/5/}: ${i} __sed
121 .endfor
123 CPPFLAGS+= -I${.CURDIR}/../include -I${.CURDIR} -I${SRCDIR}
124 CPPFLAGS+= -DYYBISON
125 LPREFIX= pcap_
126 YPREFIX= pcap_
127 YHEADER= 1
129 CPPFLAGS+= -DHAVE_CONFIG_H
130 CPPFLAGS+= -D_U_="__attribute__((__unused__))"
132 .if (${USE_INET6} != "no")
133 CPPFLAGS+= -DINET6
134 .endif
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
141 SRCS+= bpf_filter.c
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
151 tokdefs.h: grammar.h
152 cp $? $@
154 CLEANFILES+= tokdefs.h
155 COPTS.bpf_image.c = -Wno-format-nonliteral
157 .include <bsd.lib.mk>