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