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