Makefile revision 238603
150476Speter# $FreeBSD: head/share/examples/Makefile 238603 2012-07-18 21:30:17Z joerg $
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	cvsup \
13100346Sru	diskless \
14100346Sru	drivers \
15100346Sru	etc \
16100346Sru	find_interface \
17204076Spjd	hast \
18100346Sru	ibcs2 \
19206996Savg	indent \
20100346Sru	ipfw \
21214309Sjulian	jails \
22100346Sru	kld \
23238603Sjoerg	libusb20 \
24100346Sru	libvgl \
25100346Sru	mdoc \
26100346Sru	netgraph \
27100346Sru	nwclient \
28100346Sru	perfmon \
29100346Sru	portal \
30100346Sru	ppi \
31100346Sru	ppp \
32100346Sru	printing \
33100346Sru	ses \
34100346Sru	scsi_target \
35132211Sscottl	sunrpc
364257Sphk
37100346SruXFILES=	BSD_daemon/FreeBSD.pfa \
38100346Sru	BSD_daemon/README \
39100346Sru	BSD_daemon/beastie.eps \
40100346Sru	BSD_daemon/beastie.fig \
41100346Sru	BSD_daemon/eps.patch \
42100346Sru	BSD_daemon/poster.sh \
43100346Sru	FreeBSD_version/FreeBSD_version.c \
44100346Sru	FreeBSD_version/Makefile \
45100346Sru	FreeBSD_version/README \
46100346Sru	IPv6/USAGE \
47100346Sru	bootforth/README \
48100346Sru	bootforth/boot.4th \
49100346Sru	bootforth/frames.4th \
50100346Sru	bootforth/loader.rc \
51100346Sru	bootforth/menu.4th \
52100346Sru	bootforth/menuconf.4th \
53100346Sru	bootforth/screen.4th \
54233429Seadler	csh/dot.cshrc \
55100346Sru	cvsup/README \
56100346Sru	cvsup/cvs-supfile \
57100346Sru	cvsup/doc-supfile \
58100346Sru	cvsup/gnats-supfile \
59100346Sru	cvsup/ports-supfile \
60100346Sru	cvsup/refuse \
61100346Sru	cvsup/refuse.README \
62100346Sru	cvsup/stable-supfile \
63100346Sru	cvsup/standard-supfile \
64100346Sru	cvsup/www-supfile \
65100346Sru	diskless/ME \
66100346Sru	diskless/README.BOOTP \
67100346Sru	diskless/README.TEMPLATING \
68100346Sru	diskless/clone_root \
69100346Sru	drivers/README \
70100346Sru	drivers/make_device_driver.sh \
71100346Sru	drivers/make_pseudo_driver.sh \
72100346Sru	etc/README.examples \
73100346Sru	etc/bsd-style-copyright \
74100346Sru	etc/make.conf \
75100346Sru	find_interface/Makefile \
76100346Sru	find_interface/README \
77100346Sru	find_interface/find_interface.c \
78204076Spjd	hast/ucarp.sh \
79204076Spjd	hast/ucarp_down.sh \
80204076Spjd	hast/ucarp_up.sh \
81204076Spjd	hast/vip-down.sh \
82204076Spjd	hast/vip-up.sh \
83100346Sru	ibcs2/README \
84100346Sru	ibcs2/hello.uu \
85206996Savg	indent/indent.pro \
86100346Sru	ipfw/change_rules.sh \
87214309Sjulian	jails/README \
88100346Sru	kld/Makefile \
89100346Sru	kld/cdev/Makefile \
90100346Sru	kld/cdev/README \
91100346Sru	kld/cdev/module/Makefile \
92100346Sru	kld/cdev/module/cdev.c \
93100346Sru	kld/cdev/module/cdev.h \
94100346Sru	kld/cdev/module/cdevmod.c \
95100346Sru	kld/cdev/test/Makefile \
96100346Sru	kld/cdev/test/testcdev.c \
97100346Sru	kld/dyn_sysctl/Makefile \
98100346Sru	kld/dyn_sysctl/README \
99100346Sru	kld/dyn_sysctl/dyn_sysctl.c \
100200440Santoine	kld/firmware/Makefile \
101200440Santoine	kld/firmware/README \
102200440Santoine	kld/firmware/fwconsumer/Makefile \
103200440Santoine	kld/firmware/fwconsumer/fw_consumer.c \
104200440Santoine	kld/firmware/fwimage/Makefile \
105220256Semaste	kld/firmware/fwimage/firmware.img.uu \
106218914Slstewart	kld/khelp/Makefile \
107218914Slstewart	kld/khelp/README \
108218914Slstewart	kld/khelp/h_example.c \
109100346Sru	kld/syscall/Makefile \
110100346Sru	kld/syscall/module/Makefile \
111100346Sru	kld/syscall/module/syscall.c \
112100346Sru	kld/syscall/test/Makefile \
113100346Sru	kld/syscall/test/call.c \
114238603Sjoerg	libusb20/Makefile \
115238603Sjoerg	libusb20/README \
116238603Sjoerg	libusb20/aux.c \
117238603Sjoerg	libusb20/aux.h \
118238603Sjoerg	libusb20/bulk.c \
119238603Sjoerg	libusb20/control.c \
120100346Sru	libvgl/Makefile \
121100346Sru	libvgl/demo.c \
122139989Ssimon	mdoc/POSIX-copyright \
123139989Ssimon	mdoc/deshallify.sh \
124100346Sru	mdoc/example.1 \
125100346Sru	mdoc/example.3 \
126100346Sru	mdoc/example.4 \
127140134Skeramida	mdoc/example.9 \
128100346Sru	netgraph/ether.bridge \
129100346Sru	netgraph/frame_relay \
130100346Sru	netgraph/ngctl \
131100346Sru	netgraph/raw \
132100346Sru	netgraph/udp.tunnel \
133214309Sjulian	netgraph/virtual.chain \
134214309Sjulian	netgraph/virtual.lan \
135100346Sru	nwclient/dot.nwfsrc \
136100346Sru	nwclient/nwfs.sh.sample \
137100346Sru	perfmon/Makefile \
138100346Sru	perfmon/README \
139100346Sru	perfmon/perfmon.c \
140100346Sru	portal/README \
141100346Sru	portal/portal.conf \
142100346Sru	ppi/Makefile \
143100346Sru	ppi/ppilcd.c \
144100346Sru	ppp/chap-auth \
145100346Sru	ppp/login-auth \
146100346Sru	ppp/ppp.conf.sample \
147100346Sru	ppp/ppp.conf.span-isp \
148100346Sru	ppp/ppp.conf.span-isp.working \
149100346Sru	ppp/ppp.linkdown.sample \
150100346Sru	ppp/ppp.linkdown.span-isp \
151100346Sru	ppp/ppp.linkdown.span-isp.working \
152100346Sru	ppp/ppp.linkup.sample \
153100346Sru	ppp/ppp.linkup.span-isp \
154100346Sru	ppp/ppp.linkup.span-isp.working \
155100346Sru	ppp/ppp.secret.sample \
156100346Sru	ppp/ppp.secret.span-isp \
157100346Sru	ppp/ppp.secret.span-isp.working \
158100346Sru	printing/README \
159100346Sru	printing/diablo-if-net \
160100346Sru	printing/hpdf \
161100346Sru	printing/hpif \
162100346Sru	printing/hpof \
163100346Sru	printing/hprf \
164100346Sru	printing/hpvf \
165100346Sru	printing/if-simple \
166100346Sru	printing/if-simpleX \
167100346Sru	printing/ifhp \
168100346Sru	printing/make-ps-header \
169100346Sru	printing/netprint \
170100346Sru	printing/psdf \
171100346Sru	printing/psdfX \
172100346Sru	printing/psif \
173100346Sru	printing/pstf \
174100346Sru	printing/pstfX \
175100346Sru	ses/Makefile \
176100346Sru	ses/Makefile.inc \
177100346Sru	ses/getencstat/Makefile \
178100346Sru	ses/getencstat/getencstat.0 \
179100346Sru	ses/sesd/Makefile \
180100346Sru	ses/sesd/sesd.0 \
181100346Sru	ses/setencstat/Makefile \
182100346Sru	ses/setencstat/setencstat.0 \
183100346Sru	ses/setobjstat/Makefile \
184100346Sru	ses/setobjstat/setobjstat.0 \
185100346Sru	ses/srcs/chpmon.c \
186100346Sru	ses/srcs/eltsub.c \
187222337Smav	ses/srcs/eltsub.h \
188100346Sru	ses/srcs/getencstat.c \
189100346Sru	ses/srcs/getnobj.c \
190100346Sru	ses/srcs/getobjmap.c \
191100346Sru	ses/srcs/getobjstat.c \
192100346Sru	ses/srcs/inienc.c \
193100346Sru	ses/srcs/sesd.c \
194100346Sru	ses/srcs/setencstat.c \
195100346Sru	ses/srcs/setobjstat.c \
196100346Sru	scsi_target/Makefile \
197100346Sru	scsi_target/scsi_target.c \
198107215Snjl	scsi_target/scsi_target.h \
199107215Snjl	scsi_target/scsi_target.8 \
200107215Snjl	scsi_target/scsi_cmds.c \
201100346Sru	sunrpc/Makefile \
202100346Sru	sunrpc/dir/Makefile \
203100346Sru	sunrpc/dir/dir.x \
204100346Sru	sunrpc/dir/dir_proc.c \
205100346Sru	sunrpc/dir/rls.c \
206100346Sru	sunrpc/msg/Makefile \
207100346Sru	sunrpc/msg/msg.x \
208100346Sru	sunrpc/msg/msg_proc.c \
209100346Sru	sunrpc/msg/printmsg.c \
210100346Sru	sunrpc/msg/rprintmsg.c \
211100346Sru	sunrpc/sort/Makefile \
212100346Sru	sunrpc/sort/rsort.c \
213100346Sru	sunrpc/sort/sort.x \
214132211Sscottl	sunrpc/sort/sort_proc.c
2154257Sphk
216100346SruBINDIR= ${SHAREDIR}/examples
2171987Swollman
218139103SruNO_OBJ=
219100346Sru
22054351Smarcel# Define SHARED to indicate whether you want symbolic links to the system
22154351Smarcel# source (``symlinks''), or a separate copy (``copies''); (latter useful
22254351Smarcel# in environments where it's not possible to keep /sys publicly readable)
22354351SmarcelSHARED?=	copies
22454351Smarcel
225100346Srubeforeinstall: ${SHARED} etc-examples
226100346Sru.ORDER: ${SHARED} etc-examples
2272365Sbde
228100346Srucopies:
229100346Sru.for i in ${LDIRS}
230104288Sru	if [ -L ${DESTDIR}${BINDIR}/$i ]; then \
231100346Sru		rm -f ${DESTDIR}${BINDIR}/$i; \
232100346Sru	fi
23313537Sbde.endfor
234100346Sru	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
235100346Sru	    -f ${.CURDIR}/../../etc/mtree/BSD.usr.dist -p ${DESTDIR}/usr
236100346Sru.for file in ${XFILES}
237100872Sru	${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
238100346Sru		${.CURDIR}/${file} ${DESTDIR}${BINDIR}/${file}
23913537Sbde.endfor
2401987Swollman
241100346Srusymlinks:
242100346Sru.for i in ${LDIRS}
243100346Sru	rm -rf ${DESTDIR}${BINDIR}/$i
244100346Sru	ln -s ${.CURDIR}/$i ${DESTDIR}${BINDIR}/$i
24554351Smarcel.endfor
24654351Smarcel
24754351Smarceletc-examples:
24854351Smarcel.if ${SHARED} != "symlinks"
24954351Smarcel	(cd ${.CURDIR}/../../etc; ${MAKE} etc-examples)
25054351Smarcel.endif
25154351Smarcel
25285214Sdarrenr.if ${SHARED} != "symlinks"
25392868SruSUBDIR=	smbfs
254156813Sru.if ${MK_IPFILTER} != "no"
25592868SruSUBDIR+=ipfilter
25685214Sdarrenr.endif
257156813Sru.if ${MK_PF} != "no"
258135184SmlaierSUBDIR+=pf
25992868Sru.endif
260135184Smlaier.endif
26185214Sdarrenr
26285214Sdarrenr.include <bsd.subdir.mk>
263