]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/examples/Makefile
THIS BRANCH IS OBSOLETE, PLEASE READ:
[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 LDIRS=  BSD_daemon \
11         FreeBSD_version \
12         IPv6 \
13         bootforth \
14         csh \
15         diskless \
16         drivers \
17         etc \
18         find_interface \
19         flua \
20         indent \
21         ipfw \
22         jails \
23         kld \
24         libvgl \
25         mdoc \
26         netgraph \
27         perfmon \
28         ppi \
29         ppp \
30         printing \
31         ses \
32         scsi_target \
33         sunrpc \
34         ypldap
35
36
37 SE_DIRS+=       BSD_daemon
38 SE_BSD_DAEMON= \
39         FreeBSD.pfa \
40         README \
41         beastie.eps \
42         beastie.fig \
43         eps.patch \
44         poster.sh
45
46 .if ${MACHINE_CPUARCH} == "amd64"
47 .if ${MK_BHYVE} != "no"
48 LDIRS+=         bhyve
49 SE_DIRS+=       bhyve
50 SE_BHYVE=       vmrun.sh
51 PACKAGE_bhyve/vmrun.sh= bhyve
52 .endif
53 .endif
54
55 SE_DIRS+=       FreeBSD_version
56 SE_FREEBSD_VERSION= \
57         FreeBSD_version.c \
58         Makefile \
59         README
60
61 SE_DIRS+=       IPv6
62 SE_IPV6=        USAGE
63
64 SE_DIRS+=       bootforth
65 SE_BOOTFORTH= \
66         README \
67         boot.4th \
68         frames.4th \
69         loader.rc \
70         menu.4th \
71         menuconf.4th \
72         screen.4th
73
74 SE_DIRS+=       csh
75 SE_CSH= dot.cshrc
76
77 SE_DIRS+=       diskless
78 SE_DISKLESS= \
79         ME \
80         README.BOOTP \
81         README.TEMPLATING \
82         clone_root
83
84 SE_DIRS+=       drivers
85 SE_DRIVERS= \
86         README \
87         make_device_driver.sh \
88         make_pseudo_driver.sh
89
90 SE_DIRS+=       etc
91 SE_ETC= \
92         README.examples \
93         bsd-style-copyright \
94         make.conf
95
96 SE_DIRS+=       find_interface
97 SE_FIND_INTERFACE= \
98         Makefile \
99         README \
100         find_interface.c
101
102 SE_DIRS+=       flua
103 SE_FLUA=        libjail.lua
104
105 SE_DIRS+=       indent
106 SE_INDENT=      indent.pro
107
108 .if ${MK_IPFILTER} != "no"
109 SUBDIR+=        ipfilter
110 .endif
111
112 SE_DIRS+=       ipfw
113 SE_IPFW=        change_rules.sh
114
115 SE_DIRS+=       jails
116 SE_JAILS= \
117         README \
118         VIMAGE \
119         jail.xxx.conf \
120         jib \
121         jng \
122         rc.conf.jails \
123         rcjail.xxx.conf
124
125 SE_DIRS+=       kld
126 SE_KLD= Makefile
127
128 SE_DIRS+=       kld/cdev
129 SE_KLD_CDEV= \
130         Makefile \
131         README \
132
133 SE_DIRS+=       kld/cdev/module
134 SE_KLD_CDEV_MODULE= \
135         Makefile \
136         cdev.c \
137         cdev.h \
138         cdevmod.c
139
140 SE_DIRS+=       kld/cdev/test
141 SE_KLD_CDEV_TEST= \
142         Makefile \
143         testcdev.c
144
145 SE_DIRS+=       kld/dyn_sysctl
146 SE_KLD_DYN_SYSCTL= \
147         Makefile \
148         README \
149         dyn_sysctl.c
150
151 SE_DIRS+=       kld/firmware
152 SE_KLD_FIRMWARE= \
153         Makefile \
154         README
155
156 SE_DIRS+=       kld/firmware/fwconsumer
157 SE_KLD_FIRMWARE_FWCONSUMER= \
158         Makefile \
159         fw_consumer.c
160
161 SE_DIRS+=       kld/firmware/fwimage
162 SE_KLD_FIRMWARE_FWIMAGE= \
163         Makefile \
164         firmware.img.uu
165
166 SE_DIRS+=       kld/khelp
167 SE_KLD_KHELP= \
168         Makefile \
169         README \
170         h_example.c
171
172 SE_DIRS+=       kld/syscall
173 SE_KLD_SYSCALL= Makefile
174
175 SE_DIRS+=       kld/syscall/module
176 SE_KLD_SYSCALL_MODULE= \
177         Makefile \
178         syscall.c
179
180 SE_DIRS+=       kld/syscall/test
181 SE_KLD_SYSCALL_TEST= \
182         Makefile \
183         call.c
184
185 SE_DIRS+=       libvgl
186 SE_LIBVGL=      \
187         Makefile \
188         demo.c
189
190 SE_DIRS+=       mdoc
191 SE_MDOC= \
192         POSIX-copyright \
193         deshallify.sh \
194         example.1 \
195         example.3 \
196         example.4 \
197         example.9
198
199 SE_DIRS+=       netgraph
200 SE_NETGRAPH= \
201         ether.bridge \
202         frame_relay \
203         ngctl \
204         raw \
205         udp.tunnel \
206         virtual.chain \
207         virtual.lan \
208
209 SE_DIRS+=       perfmon
210 SE_PERFMON= \
211         Makefile \
212         README \
213         perfmon.c \
214
215 .if ${MK_PF} != "no"
216 SE_DIRS+=       pf
217 SE_PF= \
218         ackpri \
219         faq-example1 \
220         faq-example2 \
221         faq-example3 \
222         pf.conf \
223         queue1 \
224         queue2 \
225         queue3 \
226         queue4 \
227         spamd
228 .endif
229
230 SE_DIRS+=       ppi
231 SE_PPI= \
232         Makefile \
233         ppilcd.c
234
235 SE_DIRS+=       ppp
236 SE_PPP= \
237         chap-auth \
238         login-auth \
239         ppp.conf.sample \
240         ppp.conf.span-isp \
241         ppp.conf.span-isp.working \
242         ppp.linkdown.sample \
243         ppp.linkdown.span-isp \
244         ppp.linkdown.span-isp.working \
245         ppp.linkup.sample \
246         ppp.linkup.span-isp \
247         ppp.linkup.span-isp.working \
248         ppp.secret.sample \
249         ppp.secret.span-isp \
250         ppp.secret.span-isp.working
251
252 SE_DIRS+=       printing
253 SE_PRINTING= \
254         diablo-if-net \
255         hpdf \
256         hpif \
257         hpof \
258         hprf \
259         hpvf \
260         if-simple \
261         if-simpleX \
262         ifhp \
263         make-ps-header \
264         netprint \
265         psdf \
266         psdfX \
267         psif \
268         pstf \
269         pstfX
270
271 SE_DIRS+=       ses
272 SE_SES= \
273         Makefile \
274         Makefile.inc
275
276 SE_DIRS+=       ses/getencstat
277 SE_SES_GETENCSTAT= \
278         Makefile \
279         getencstat.0
280
281 SE_DIRS+=       ses/sesd
282 SE_SES_SESD= \
283         Makefile \
284         sesd.0
285
286 SE_DIRS+=       ses/setencstat
287 SE_SES_SETENCSTAT= \
288         Makefile \
289         setencstat.0
290
291 SE_DIRS+=       ses/setobjstat
292 SE_SES_SETOBJSTAT= \
293         Makefile \
294         setobjstat.0
295
296 SE_DIRS+=       ses/srcs
297 SE_SES_SRCS= \
298         chpmon.c \
299         eltsub.c \
300         eltsub.h \
301         getencstat.c \
302         getnobj.c \
303         getobjmap.c \
304         getobjstat.c \
305         inienc.c \
306         sesd.c \
307         setencstat.c \
308         setobjstat.c
309
310 SE_DIRS+=       scsi_target
311 SE_SCSI_TARGET= \
312         Makefile \
313         scsi_target.c \
314         scsi_target.h \
315         scsi_target.8 \
316         scsi_cmds.c
317
318 SE_DIRS+=       sunrpc
319 SE_SUNRPC=      Makefile
320
321 SE_DIRS+=       sunrpc/dir
322 SE_SUNRPC_DIR= \
323         Makefile \
324         dir.x \
325         dir_proc.c \
326         rls.c
327
328 SE_DIRS+=       sunrpc/msg
329 SE_SUNRPC_MSG= \
330         Makefile \
331         msg.x \
332         msg_proc.c \
333         printmsg.c \
334         rprintmsg.c
335
336 SE_DIRS+=       sunrpc/sort
337 SE_SUNRPC_SORT= \
338         Makefile \
339         rsort.c \
340         sort.x \
341         sort_proc.c
342
343 .if ${MK_EFI} != "no"
344 LDIRS+=         uefisign
345 SE_DIRS+=       uefisign
346 SE_UEFISIGN=    uefikeys
347 .endif
348
349 SE_DIRS+=       ypldap
350 SE_YPLDAP=      ypldap.conf
351
352 .if ${MK_HAST} != "no"
353 LDIRS+=         hast
354 SE_DIRS+=       hast
355 SE_HAST=        ucarp.sh \
356         ucarp_down.sh \
357         ucarp_up.sh \
358         vip-down.sh \
359         vip-up.sh
360 .endif
361
362 .if ${MK_USB} != "no"
363 LDIRS+=         libusb20
364 SE_DIRS+=       libusb20
365 SE_LIBUSB20= \
366         Makefile \
367         README \
368         util.c \
369         util.h \
370         bulk.c \
371         control.c
372 .endif
373
374
375 # Setup the FILES_GROUPS for all DIRS variables above.
376 # The variables are prefixed by 'SE_' to prevent variable collision in
377 # other parts of the system
378 .for d in ${SE_DIRS}
379 .for f in ${SE_${d:tu:C/\//_/g}}
380 SER_${d:tu:C/\//_/g}+=  ${d}/${f}
381 .endfor
382 FILESGROUPS+=   SER_${d:tu:C/\//_/g}
383 SER_${d:tu:C/\//_/g}DIR+=       ${SHAREDIR}/examples/${d}
384 .endfor
385
386 BINDIR= ${SHAREDIR}/examples
387
388 beforeinstall: copies
389 META_TARGETS+=  copies
390
391 copies:
392 .for i in ${LDIRS}
393         if [ -L ${DESTDIR}${BINDIR}/$i ]; then \
394                 rm -f ${DESTDIR}${BINDIR}/$i; \
395         fi
396 .endfor
397
398 SUBDIR+=        smbfs
399
400 HAS_TESTS=
401 SUBDIR.${MK_TESTS}+= tests
402
403 SUBDIR_PARALLEL=
404
405 .include <bsd.prog.mk>