aboutsummaryrefslogtreecommitdiff
path: root/share/examples/Makefile
blob: 0425e36c1cf5d9ebedad36960c23d3e0a1e0b363 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
#
# Doing a make install builds /usr/share/examples

.include <src.opts.mk>

PACKAGE=examples
FILESDIR=	${SHAREDIR}/examples

LDIRS=	BSD_daemon \
	FreeBSD_version \
	bootforth \
	csh \
	drivers \
	etc \
	find_interface \
	flua \
	indent \
	ipfw \
	jails \
	kld \
	libvgl \
	mdoc \
	netgraph \
	perfmon \
	ppi \
	ppp \
	printing \
	ses \
	scsi_target \
	sound \
	sunrpc \
	ypldap


SE_DIRS+=	BSD_daemon
SE_BSD_DAEMON= \
	FreeBSD.pfa \
	README \
	beastie.eps \
	beastie.fig \
	eps.patch \
	poster.sh

.if ${MACHINE_CPUARCH} == "amd64"
.if ${MK_BHYVE} != "no"
LDIRS+=		bhyve
SE_DIRS+=	bhyve
SE_BHYVEPACKAGE=bhyve
SE_BHYVE=	vmrun.sh
PACKAGE_bhyve/vmrun.sh=	bhyve
.endif
.endif

SE_DIRS+=	FreeBSD_version
SE_FREEBSD_VERSION= \
	FreeBSD_version.c \
	Makefile \
	README

SE_DIRS+=	bootforth
SE_BOOTFORTH_PACKAGE=bootloader
SE_BOOTFORTH= \
	README \
	boot.4th \
	frames.4th \
	loader.rc \
	menu.4th \
	menuconf.4th \
	screen.4th

SE_DIRS+=	csh
SE_CSHPACKAGE=	csh
SE_CSH=		dot.cshrc

SE_DIRS+=	drivers
SE_DRIVERS= \
	README \
	make_device_driver.sh \
	make_pseudo_driver.sh

SE_DIRS+=	etc
SE_ETC= \
	README.examples \
	bsd-style-copyright \
	make.conf

SE_DIRS+=	find_interface
SE_FIND_INTERFACE= \
	Makefile \
	README \
	find_interface.c

SE_DIRS+=	flua
SE_FLUA=	libjail.lua

SE_DIRS+=	indent
SE_INDENT=	indent.pro

.if ${MK_IPFILTER} != "no"
SUBDIR+=	ipfilter
.endif

SE_DIRS+=	ipfw
SE_IPFWPACKAGE=	ipfw
SE_IPFW=	change_rules.sh

SE_DIRS+=	jails
SE_JAILPACKAGE=	jail
SE_JAILS= \
	README \
	VIMAGE \
	jail.xxx.conf \
	jib \
	jng \
	rc.conf.jails \
	rcjail.xxx.conf

SE_DIRS+=	kld
SE_KLD=	Makefile

SE_DIRS+=	kld/cdev
SE_KLD_CDEV= \
	Makefile \
	README \

SE_DIRS+=	kld/cdev/module
SE_KLD_CDEV_MODULE= \
	Makefile \
	cdev.c \
	cdev.h \
	cdevmod.c

SE_DIRS+=	kld/cdev/test
SE_KLD_CDEV_TEST= \
	Makefile \
	testcdev.c

SE_DIRS+=	kld/dyn_sysctl
SE_KLD_DYN_SYSCTL= \
	Makefile \
	README \
	dyn_sysctl.c

SE_DIRS+=	kld/firmware
SE_KLD_FIRMWARE= \
	Makefile \
	README

SE_DIRS+=	kld/firmware/fwconsumer
SE_KLD_FIRMWARE_FWCONSUMER= \
	Makefile \
	fw_consumer.c

SE_DIRS+=	kld/firmware/fwimage
SE_KLD_FIRMWARE_FWIMAGE= \
	Makefile \
	firmware.img.uu

SE_DIRS+=	kld/khelp
SE_KLD_KHELP= \
	Makefile \
	README \
	h_example.c

SE_DIRS+=	kld/syscall
SE_KLD_SYSCALL=	Makefile

SE_DIRS+=	kld/syscall/module
SE_KLD_SYSCALL_MODULE= \
	Makefile \
	syscall.c

SE_DIRS+=	kld/syscall/test
SE_KLD_SYSCALL_TEST= \
	Makefile \
	call.c

SE_DIRS+=	libvgl
SE_LIBVGL=	\
	Makefile \
	demo.c

SE_DIRS+=	mdoc
SE_MDOC= \
	POSIX-copyright \
	deshallify.sh \
	example.1 \
	example.3 \
	example.4 \
	example.9

SE_DIRS+=	netgraph
SE_NETGRAPH= \
	ether.bridge \
	frame_relay \
	ngctl \
	raw \
	udp.tunnel \
	virtual.chain \
	virtual.lan \

SE_DIRS+=	perfmon
SE_PERFMON= \
	Makefile \
	README \
	perfmon.c \

.if ${MK_PF} != "no"
SE_DIRS+=	pf
.if ${MK_STAGING} == "no"
SE_PFPACKAGE=	pf
SE_PF= \
	ackpri \
	faq-example1 \
	faq-example2 \
	faq-example3 \
	pf.conf \
	queue1 \
	queue2 \
	queue3 \
	queue4 \
	spamd
.endif
.endif

SE_DIRS+=	ppi
SE_PPI= \
	Makefile \
	ppilcd.c

SE_DIRS+=	ppp
SE_PPPPACKAGE=	ppp
SE_PPP= \
	chap-auth \
	login-auth \
	ppp.conf.sample \
	ppp.conf.span-isp \
	ppp.conf.span-isp.working \
	ppp.linkdown.sample \
	ppp.linkdown.span-isp \
	ppp.linkdown.span-isp.working \
	ppp.linkup.sample \
	ppp.linkup.span-isp \
	ppp.linkup.span-isp.working \
	ppp.secret.sample \
	ppp.secret.span-isp \
	ppp.secret.span-isp.working

SE_DIRS+=	printing
SE_PRINTINGPACKAGE=lp
SE_PRINTING= \
	diablo-if-net \
	hpdf \
	hpif \
	hpof \
	hprf \
	hpvf \
	if-simple \
	if-simpleX \
	ifhp \
	make-ps-header \
	netprint \
	psdf \
	psdfX \
	psif \
	pstf \
	pstfX

SE_DIRS+=	ses
SE_SES= \
	Makefile \
	Makefile.inc

SE_DIRS+=	ses/getencstat
SE_SES_GETENCSTAT= \
	Makefile \
	getencstat.0

SE_DIRS+=	ses/sesd
SE_SES_SESD= \
	Makefile \
	sesd.0

SE_DIRS+=	ses/setencstat
SE_SES_SETENCSTAT= \
	Makefile \
	setencstat.0

SE_DIRS+=	ses/setobjstat
SE_SES_SETOBJSTAT= \
	Makefile \
	setobjstat.0

SE_DIRS+=	ses/srcs
SE_SES_SRCS= \
	chpmon.c \
	eltsub.c \
	eltsub.h \
	getencstat.c \
	getnobj.c \
	getobjmap.c \
	getobjstat.c \
	inienc.c \
	sesd.c \
	setencstat.c \
	setobjstat.c

SE_DIRS+=	scsi_target
SE_SCSI_TARGET= \
	Makefile \
	scsi_target.c \
	scsi_target.h \
	scsi_target.8 \
	scsi_cmds.c

SE_DIRS+=	sound
SE_SOUND= \
	basic.c \
	ossinit.h \
	ossmidi.h \
	midi.c \
	README

SE_DIRS+=	sunrpc
SE_SUNRPC=	Makefile

SE_DIRS+=	sunrpc/dir
SE_SUNRPC_DIR= \
	Makefile \
	dir.x \
	dir_proc.c \
	rls.c

SE_DIRS+=	sunrpc/msg
SE_SUNRPC_MSG= \
	Makefile \
	msg.x \
	msg_proc.c \
	printmsg.c \
	rprintmsg.c

SE_DIRS+=	sunrpc/sort
SE_SUNRPC_SORT= \
	Makefile \
	rsort.c \
	sort.x \
	sort_proc.c

.if ${MK_EFI} != "no"
LDIRS+=		uefisign
SE_DIRS+=	uefisign
SE_UEFISIGN=	uefikeys
SE_UEFISIGNPACKAGE=efi-tools
.endif

SE_DIRS+=	ypldap
SE_YPLDAP=	ypldap.conf
SE_YPLDAPPACKAGE=yp

.if ${MK_HAST} != "no"
LDIRS+=		hast
SE_HASTPACKAGE=	hast
SE_DIRS+=	hast
SE_HAST=	ucarp.sh \
	ucarp_down.sh \
	ucarp_up.sh \
	vip-down.sh \
	vip-up.sh
.endif

.if ${MK_USB} != "no"
LDIRS+=		libusb20
SE_DIRS+=	libusb20
SE_LIBUSB20= \
	Makefile \
	README \
	util.c \
	util.h \
	bulk.c \
	control.c
.endif


# Setup the FILES_GROUPS for all DIRS variables above.
# The variables are prefixed by 'SE_' to prevent variable collision in
# other parts of the system
.for d in ${SE_DIRS}
.for f in ${SE_${d:tu:C/\//_/g}}
SER_${d:tu:C/\//_/g}+=	${d}/${f}
.endfor
FILESGROUPS+=	SER_${d:tu:C/\//_/g}
SER_${d:tu:C/\//_/g}DIR+=	${SHAREDIR}/examples/${d}
.if ${SE_${d:tu:C/\//_/g}PACKAGE:U} != ""
SER_${d:tu:C/\//_/g}PACKAGE=	${SE_${d:tu:C/\//_/g}PACKAGE}
.else
SER_${d:tu:C/\//_/g}PACKAGE=	examples
.endif
.endfor

BINDIR= ${SHAREDIR}/examples

beforeinstall: copies
META_TARGETS+=	copies

copies:
.for i in ${LDIRS}
	if [ -L ${DESTDIR}${BINDIR}/$i ]; then \
		rm -f ${DESTDIR}${BINDIR}/$i; \
	fi
.endfor

SUBDIR+=	smbfs

HAS_TESTS=
SUBDIR.${MK_TESTS}+= tests

SUBDIR_PARALLEL=

.include <bsd.prog.mk>