150476Speter# $FreeBSD: releng/10.3/share/examples/Makefile 291792 2015-12-04 18:14:31Z bdrewery $
21987Swollman#
31987Swollman# Doing a make install builds /usr/share/examples
41987Swollman
5156813Sru.include <bsd.own.mk>
6156813Sru
7100346SruLDIRS=	BSD_daemon \
8100346Sru	FreeBSD_version \
9100346Sru	IPv6 \
10100346Sru	bootforth \
11233429Seadler	csh \
12100346Sru	diskless \
13100346Sru	drivers \
14100346Sru	etc \
15100346Sru	find_interface \
16100346Sru	ibcs2 \
17206996Savg	indent \
18100346Sru	ipfw \
19214309Sjulian	jails \
20100346Sru	kld \
21100346Sru	libvgl \
22100346Sru	mdoc \
23100346Sru	netgraph \
24100346Sru	perfmon \
25100346Sru	ppi \
26100346Sru	ppp \
27100346Sru	printing \
28100346Sru	ses \
29100346Sru	scsi_target \
30282975Strasz	sunrpc \
31282975Strasz	uefisign
324257Sphk
33100346SruXFILES=	BSD_daemon/FreeBSD.pfa \
34100346Sru	BSD_daemon/README \
35100346Sru	BSD_daemon/beastie.eps \
36100346Sru	BSD_daemon/beastie.fig \
37100346Sru	BSD_daemon/eps.patch \
38100346Sru	BSD_daemon/poster.sh \
39100346Sru	FreeBSD_version/FreeBSD_version.c \
40100346Sru	FreeBSD_version/Makefile \
41100346Sru	FreeBSD_version/README \
42100346Sru	IPv6/USAGE \
43100346Sru	bootforth/README \
44100346Sru	bootforth/boot.4th \
45100346Sru	bootforth/frames.4th \
46100346Sru	bootforth/loader.rc \
47100346Sru	bootforth/menu.4th \
48100346Sru	bootforth/menuconf.4th \
49100346Sru	bootforth/screen.4th \
50233429Seadler	csh/dot.cshrc \
51100346Sru	diskless/ME \
52100346Sru	diskless/README.BOOTP \
53100346Sru	diskless/README.TEMPLATING \
54100346Sru	diskless/clone_root \
55100346Sru	drivers/README \
56100346Sru	drivers/make_device_driver.sh \
57100346Sru	drivers/make_pseudo_driver.sh \
58100346Sru	etc/README.examples \
59100346Sru	etc/bsd-style-copyright \
60100346Sru	etc/make.conf \
61100346Sru	find_interface/Makefile \
62100346Sru	find_interface/README \
63100346Sru	find_interface/find_interface.c \
64100346Sru	ibcs2/README \
65100346Sru	ibcs2/hello.uu \
66206996Savg	indent/indent.pro \
67100346Sru	ipfw/change_rules.sh \
68214309Sjulian	jails/README \
69100346Sru	kld/Makefile \
70100346Sru	kld/cdev/Makefile \
71100346Sru	kld/cdev/README \
72100346Sru	kld/cdev/module/Makefile \
73100346Sru	kld/cdev/module/cdev.c \
74100346Sru	kld/cdev/module/cdev.h \
75100346Sru	kld/cdev/module/cdevmod.c \
76100346Sru	kld/cdev/test/Makefile \
77100346Sru	kld/cdev/test/testcdev.c \
78100346Sru	kld/dyn_sysctl/Makefile \
79100346Sru	kld/dyn_sysctl/README \
80100346Sru	kld/dyn_sysctl/dyn_sysctl.c \
81200440Santoine	kld/firmware/Makefile \
82200440Santoine	kld/firmware/README \
83200440Santoine	kld/firmware/fwconsumer/Makefile \
84200440Santoine	kld/firmware/fwconsumer/fw_consumer.c \
85200440Santoine	kld/firmware/fwimage/Makefile \
86220256Semaste	kld/firmware/fwimage/firmware.img.uu \
87218914Slstewart	kld/khelp/Makefile \
88218914Slstewart	kld/khelp/README \
89218914Slstewart	kld/khelp/h_example.c \
90100346Sru	kld/syscall/Makefile \
91100346Sru	kld/syscall/module/Makefile \
92100346Sru	kld/syscall/module/syscall.c \
93100346Sru	kld/syscall/test/Makefile \
94100346Sru	kld/syscall/test/call.c \
95100346Sru	libvgl/Makefile \
96100346Sru	libvgl/demo.c \
97139989Ssimon	mdoc/POSIX-copyright \
98139989Ssimon	mdoc/deshallify.sh \
99100346Sru	mdoc/example.1 \
100100346Sru	mdoc/example.3 \
101100346Sru	mdoc/example.4 \
102140134Skeramida	mdoc/example.9 \
103100346Sru	netgraph/ether.bridge \
104100346Sru	netgraph/frame_relay \
105100346Sru	netgraph/ngctl \
106100346Sru	netgraph/raw \
107100346Sru	netgraph/udp.tunnel \
108214309Sjulian	netgraph/virtual.chain \
109214309Sjulian	netgraph/virtual.lan \
110100346Sru	perfmon/Makefile \
111100346Sru	perfmon/README \
112100346Sru	perfmon/perfmon.c \
113100346Sru	ppi/Makefile \
114100346Sru	ppi/ppilcd.c \
115100346Sru	ppp/chap-auth \
116100346Sru	ppp/login-auth \
117100346Sru	ppp/ppp.conf.sample \
118100346Sru	ppp/ppp.conf.span-isp \
119100346Sru	ppp/ppp.conf.span-isp.working \
120100346Sru	ppp/ppp.linkdown.sample \
121100346Sru	ppp/ppp.linkdown.span-isp \
122100346Sru	ppp/ppp.linkdown.span-isp.working \
123100346Sru	ppp/ppp.linkup.sample \
124100346Sru	ppp/ppp.linkup.span-isp \
125100346Sru	ppp/ppp.linkup.span-isp.working \
126100346Sru	ppp/ppp.secret.sample \
127100346Sru	ppp/ppp.secret.span-isp \
128100346Sru	ppp/ppp.secret.span-isp.working \
129100346Sru	printing/README \
130100346Sru	printing/diablo-if-net \
131100346Sru	printing/hpdf \
132100346Sru	printing/hpif \
133100346Sru	printing/hpof \
134100346Sru	printing/hprf \
135100346Sru	printing/hpvf \
136100346Sru	printing/if-simple \
137100346Sru	printing/if-simpleX \
138100346Sru	printing/ifhp \
139100346Sru	printing/make-ps-header \
140100346Sru	printing/netprint \
141100346Sru	printing/psdf \
142100346Sru	printing/psdfX \
143100346Sru	printing/psif \
144100346Sru	printing/pstf \
145100346Sru	printing/pstfX \
146100346Sru	ses/Makefile \
147100346Sru	ses/Makefile.inc \
148100346Sru	ses/getencstat/Makefile \
149100346Sru	ses/getencstat/getencstat.0 \
150100346Sru	ses/sesd/Makefile \
151100346Sru	ses/sesd/sesd.0 \
152100346Sru	ses/setencstat/Makefile \
153100346Sru	ses/setencstat/setencstat.0 \
154100346Sru	ses/setobjstat/Makefile \
155100346Sru	ses/setobjstat/setobjstat.0 \
156100346Sru	ses/srcs/chpmon.c \
157100346Sru	ses/srcs/eltsub.c \
158222337Smav	ses/srcs/eltsub.h \
159100346Sru	ses/srcs/getencstat.c \
160100346Sru	ses/srcs/getnobj.c \
161100346Sru	ses/srcs/getobjmap.c \
162100346Sru	ses/srcs/getobjstat.c \
163100346Sru	ses/srcs/inienc.c \
164100346Sru	ses/srcs/sesd.c \
165100346Sru	ses/srcs/setencstat.c \
166100346Sru	ses/srcs/setobjstat.c \
167100346Sru	scsi_target/Makefile \
168100346Sru	scsi_target/scsi_target.c \
169107215Snjl	scsi_target/scsi_target.h \
170107215Snjl	scsi_target/scsi_target.8 \
171107215Snjl	scsi_target/scsi_cmds.c \
172100346Sru	sunrpc/Makefile \
173100346Sru	sunrpc/dir/Makefile \
174100346Sru	sunrpc/dir/dir.x \
175100346Sru	sunrpc/dir/dir_proc.c \
176100346Sru	sunrpc/dir/rls.c \
177100346Sru	sunrpc/msg/Makefile \
178100346Sru	sunrpc/msg/msg.x \
179100346Sru	sunrpc/msg/msg_proc.c \
180100346Sru	sunrpc/msg/printmsg.c \
181100346Sru	sunrpc/msg/rprintmsg.c \
182100346Sru	sunrpc/sort/Makefile \
183100346Sru	sunrpc/sort/rsort.c \
184100346Sru	sunrpc/sort/sort.x \
185282975Strasz	sunrpc/sort/sort_proc.c \
186282975Strasz	uefisign/uefikeys
1874257Sphk
188100346SruBINDIR= ${SHAREDIR}/examples
1891987Swollman
190139103SruNO_OBJ=
191100346Sru
192278556Sngie.if ${MK_HAST} != "no"
193278556SngieLDIRS+=		hast
194278556SngieXFILES+=	hast/ucarp.sh \
195278556Sngie		hast/ucarp_down.sh \
196278556Sngie		hast/ucarp_up.sh \
197278556Sngie		hast/vip-down.sh \
198278556Sngie		hast/vip-up.sh
199278556Sngie.endif
200278556Sngie
201280419Sngie.if ${MK_USB} != "no"
202280419SngieLDIRS+=		libusb20
203280419SngieXFILES+=	libusb20/Makefile \
204280419Sngie		libusb20/README \
205280419Sngie		libusb20/util.c \
206280419Sngie		libusb20/util.h \
207280419Sngie		libusb20/bulk.c \
208280419Sngie		libusb20/control.c
209280419Sngie.endif
210280419Sngie
211278557Sngie.if ${MACHINE_CPUARCH} == "amd64"
212278557Sngie.if ${MK_BHYVE} != "no"
213278557SngieLDIRS+=		bhyve
214278557SngieXFILES+=	bhyve/vmrun.sh
215278557Sngie.endif
216278557Sngie.endif
217278557Sngie
21854351Smarcel# Define SHARED to indicate whether you want symbolic links to the system
21954351Smarcel# source (``symlinks''), or a separate copy (``copies''); (latter useful
22054351Smarcel# in environments where it's not possible to keep /sys publicly readable)
22154351SmarcelSHARED?=	copies
22254351Smarcel
223100346Srubeforeinstall: ${SHARED} etc-examples
224100346Sru.ORDER: ${SHARED} etc-examples
2252365Sbde
226100346Srucopies:
227100346Sru.for i in ${LDIRS}
228104288Sru	if [ -L ${DESTDIR}${BINDIR}/$i ]; then \
229100346Sru		rm -f ${DESTDIR}${BINDIR}/$i; \
230100346Sru	fi
23113537Sbde.endfor
232100346Sru	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
233100346Sru	    -f ${.CURDIR}/../../etc/mtree/BSD.usr.dist -p ${DESTDIR}/usr
234100346Sru.for file in ${XFILES}
235100872Sru	${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
236100346Sru		${.CURDIR}/${file} ${DESTDIR}${BINDIR}/${file}
23713537Sbde.endfor
2381987Swollman
239100346Srusymlinks:
240100346Sru.for i in ${LDIRS}
241100346Sru	rm -rf ${DESTDIR}${BINDIR}/$i
242100346Sru	ln -s ${.CURDIR}/$i ${DESTDIR}${BINDIR}/$i
24354351Smarcel.endfor
24454351Smarcel
24554351Smarceletc-examples:
24654351Smarcel.if ${SHARED} != "symlinks"
24754351Smarcel	(cd ${.CURDIR}/../../etc; ${MAKE} etc-examples)
24854351Smarcel.endif
24954351Smarcel
25085214Sdarrenr.if ${SHARED} != "symlinks"
251252356SdavideSUBDIR=	smbfs
252156813Sru.if ${MK_IPFILTER} != "no"
25392868SruSUBDIR+=ipfilter
25485214Sdarrenr.endif
255156813Sru.if ${MK_PF} != "no"
256135184SmlaierSUBDIR+=pf
25792868Sru.endif
258135184Smlaier.endif
25985214Sdarrenr
260260037Sjmmv.if ${MK_TESTS} != "no"
261260037SjmmvSUBDIR+=tests
262260037Sjmmv.endif
263260037Sjmmv
264291792SbdrewerySUBDIR_PARALLEL=
265291792Sbdrewery
26685214Sdarrenr.include <bsd.subdir.mk>
267