]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/examples/Makefile
Fix insufficient message length validation in bsnmp library.
[FreeBSD/FreeBSD.git] / share / examples / Makefile
1 # $FreeBSD$
2 #
3 # Doing a make install builds /usr/share/examples
4
5 .include <src.opts.mk>
6
7 PACKAGE=examples
8 FILESDIR=       ${SHAREDIR}/examples
9
10 .for _XFILE in ${XFILES}
11 FILESGROUPS+=   ${_XFILE}
12 PACKAGE_${_XFILE}?=examples
13 ${_XFILE}DIR=   ${SHAREDIR}/examples/${_XFILE:H}
14 .endfor
15
16 LDIRS=  BSD_daemon \
17         FreeBSD_version \
18         IPv6 \
19         bootforth \
20         csh \
21         diskless \
22         drivers \
23         etc \
24         find_interface \
25         ibcs2 \
26         indent \
27         ipfw \
28         jails \
29         kld \
30         libvgl \
31         mdoc \
32         netgraph \
33         perfmon \
34         ppi \
35         ppp \
36         printing \
37         ses \
38         scsi_target \
39         sunrpc \
40         uefisign \
41         ypldap
42
43 XFILES= BSD_daemon/FreeBSD.pfa \
44         BSD_daemon/README \
45         BSD_daemon/beastie.eps \
46         BSD_daemon/beastie.fig \
47         BSD_daemon/eps.patch \
48         BSD_daemon/poster.sh \
49         FreeBSD_version/FreeBSD_version.c \
50         FreeBSD_version/Makefile \
51         FreeBSD_version/README \
52         IPv6/USAGE \
53         bootforth/README \
54         bootforth/boot.4th \
55         bootforth/frames.4th \
56         bootforth/loader.rc \
57         bootforth/menu.4th \
58         bootforth/menuconf.4th \
59         bootforth/screen.4th \
60         csh/dot.cshrc \
61         diskless/ME \
62         diskless/README.BOOTP \
63         diskless/README.TEMPLATING \
64         diskless/clone_root \
65         drivers/README \
66         drivers/make_device_driver.sh \
67         drivers/make_pseudo_driver.sh \
68         etc/README.examples \
69         etc/bsd-style-copyright \
70         etc/make.conf \
71         find_interface/Makefile \
72         find_interface/README \
73         find_interface/find_interface.c \
74         ibcs2/README \
75         ibcs2/hello.uu \
76         indent/indent.pro \
77         ipfw/change_rules.sh \
78         jails/README \
79         jails/VIMAGE \
80         jails/jail.xxx.conf \
81         jails/jib \
82         jails/jng \
83         jails/rc.conf.jails \
84         jails/rcjail.xxx.conf \
85         kld/Makefile \
86         kld/cdev/Makefile \
87         kld/cdev/README \
88         kld/cdev/module/Makefile \
89         kld/cdev/module/cdev.c \
90         kld/cdev/module/cdev.h \
91         kld/cdev/module/cdevmod.c \
92         kld/cdev/test/Makefile \
93         kld/cdev/test/testcdev.c \
94         kld/dyn_sysctl/Makefile \
95         kld/dyn_sysctl/README \
96         kld/dyn_sysctl/dyn_sysctl.c \
97         kld/firmware/Makefile \
98         kld/firmware/README \
99         kld/firmware/fwconsumer/Makefile \
100         kld/firmware/fwconsumer/fw_consumer.c \
101         kld/firmware/fwimage/Makefile \
102         kld/firmware/fwimage/firmware.img.uu \
103         kld/khelp/Makefile \
104         kld/khelp/README \
105         kld/khelp/h_example.c \
106         kld/syscall/Makefile \
107         kld/syscall/module/Makefile \
108         kld/syscall/module/syscall.c \
109         kld/syscall/test/Makefile \
110         kld/syscall/test/call.c \
111         libvgl/Makefile \
112         libvgl/demo.c \
113         mdoc/POSIX-copyright \
114         mdoc/deshallify.sh \
115         mdoc/example.1 \
116         mdoc/example.3 \
117         mdoc/example.4 \
118         mdoc/example.9 \
119         netgraph/ether.bridge \
120         netgraph/frame_relay \
121         netgraph/ngctl \
122         netgraph/raw \
123         netgraph/udp.tunnel \
124         netgraph/virtual.chain \
125         netgraph/virtual.lan \
126         perfmon/Makefile \
127         perfmon/README \
128         perfmon/perfmon.c \
129         ppi/Makefile \
130         ppi/ppilcd.c \
131         ppp/chap-auth \
132         ppp/login-auth \
133         ppp/ppp.conf.sample \
134         ppp/ppp.conf.span-isp \
135         ppp/ppp.conf.span-isp.working \
136         ppp/ppp.linkdown.sample \
137         ppp/ppp.linkdown.span-isp \
138         ppp/ppp.linkdown.span-isp.working \
139         ppp/ppp.linkup.sample \
140         ppp/ppp.linkup.span-isp \
141         ppp/ppp.linkup.span-isp.working \
142         ppp/ppp.secret.sample \
143         ppp/ppp.secret.span-isp \
144         ppp/ppp.secret.span-isp.working \
145         printing/README \
146         printing/diablo-if-net \
147         printing/hpdf \
148         printing/hpif \
149         printing/hpof \
150         printing/hprf \
151         printing/hpvf \
152         printing/if-simple \
153         printing/if-simpleX \
154         printing/ifhp \
155         printing/make-ps-header \
156         printing/netprint \
157         printing/psdf \
158         printing/psdfX \
159         printing/psif \
160         printing/pstf \
161         printing/pstfX \
162         ses/Makefile \
163         ses/Makefile.inc \
164         ses/getencstat/Makefile \
165         ses/getencstat/getencstat.0 \
166         ses/sesd/Makefile \
167         ses/sesd/sesd.0 \
168         ses/setencstat/Makefile \
169         ses/setencstat/setencstat.0 \
170         ses/setobjstat/Makefile \
171         ses/setobjstat/setobjstat.0 \
172         ses/srcs/chpmon.c \
173         ses/srcs/eltsub.c \
174         ses/srcs/eltsub.h \
175         ses/srcs/getencstat.c \
176         ses/srcs/getnobj.c \
177         ses/srcs/getobjmap.c \
178         ses/srcs/getobjstat.c \
179         ses/srcs/inienc.c \
180         ses/srcs/sesd.c \
181         ses/srcs/setencstat.c \
182         ses/srcs/setobjstat.c \
183         scsi_target/Makefile \
184         scsi_target/scsi_target.c \
185         scsi_target/scsi_target.h \
186         scsi_target/scsi_target.8 \
187         scsi_target/scsi_cmds.c \
188         sunrpc/Makefile \
189         sunrpc/dir/Makefile \
190         sunrpc/dir/dir.x \
191         sunrpc/dir/dir_proc.c \
192         sunrpc/dir/rls.c \
193         sunrpc/msg/Makefile \
194         sunrpc/msg/msg.x \
195         sunrpc/msg/msg_proc.c \
196         sunrpc/msg/printmsg.c \
197         sunrpc/msg/rprintmsg.c \
198         sunrpc/sort/Makefile \
199         sunrpc/sort/rsort.c \
200         sunrpc/sort/sort.x \
201         sunrpc/sort/sort_proc.c \
202         uefisign/uefikeys \
203         ypldap/ypldap.conf
204
205 BINDIR= ${SHAREDIR}/examples
206
207 .if ${MK_HAST} != "no"
208 LDIRS+=         hast
209 XFILES+=        hast/ucarp.sh \
210                 hast/ucarp_down.sh \
211                 hast/ucarp_up.sh \
212                 hast/vip-down.sh \
213                 hast/vip-up.sh
214 .endif
215
216 .if ${MK_USB} != "no"
217 LDIRS+=         libusb20
218 XFILES+=        libusb20/Makefile \
219                 libusb20/README \
220                 libusb20/util.c \
221                 libusb20/util.h \
222                 libusb20/bulk.c \
223                 libusb20/control.c
224 .endif
225
226 .if ${MACHINE_CPUARCH} == "amd64"
227 .if ${MK_BHYVE} != "no"
228 LDIRS+=         bhyve
229 XFILES+=        bhyve/vmrun.sh
230 PACKAGE_bhyve/vmrun.sh= bhyve
231 .endif
232 .endif
233
234 # Define SHARED to indicate whether you want symbolic links to the system
235 # source (``symlinks''), or a separate copy (``copies''); (latter useful
236 # in environments where it's not possible to keep /sys publicly readable)
237 SHARED?=        copies
238
239 beforeinstall: ${SHARED} etc-examples
240 META_TARGETS+=  copies symlinks
241 .ORDER: ${SHARED} etc-examples
242
243 copies:
244 .for i in ${LDIRS}
245         if [ -L ${DESTDIR}${BINDIR}/$i ]; then \
246                 rm -f ${DESTDIR}${BINDIR}/$i; \
247         fi
248 .endfor
249         mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
250             -f ${.CURDIR}/../../etc/mtree/BSD.usr.dist -p ${DESTDIR}/usr
251 .for file in ${XFILES}
252         ${INSTALL} -T package=${PACKAGE_${file}:Uexamples} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
253                 ${.CURDIR}/${file} ${DESTDIR}${BINDIR}/${file}
254 .endfor
255
256 symlinks:
257 .for i in ${LDIRS}
258         rm -rf ${DESTDIR}${BINDIR}/$i
259         ${INSTALL} ${TAG_ARGS} -l s ${.CURDIR}/$i ${DESTDIR}${BINDIR}/$i
260 .endfor
261
262 etc-examples:
263 .if ${SHARED} != "symlinks"
264         ${_+_}(cd ${.CURDIR}/../../etc; ${MAKE} etc-examples)
265 .endif
266
267 .if ${SHARED} != "symlinks"
268 SUBDIR= smbfs
269 .if ${MK_IPFILTER} != "no"
270 SUBDIR+=ipfilter
271 .endif
272 .if ${MK_PF} != "no"
273 SUBDIR+=pf
274 .endif
275 .endif
276
277 .if ${MK_TESTS} != "no"
278 SUBDIR+=tests
279 .endif
280
281 SUBDIR_PARALLEL=
282
283 .include <bsd.prog.mk>