Makefile revision 200440
150476Speter# $FreeBSD: head/share/examples/Makefile 200440 2009-12-12 17:04:36Z antoine $
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 \
11100346Sru	cvsup \
12100346Sru	diskless \
13100346Sru	drivers \
14100346Sru	etc \
15100346Sru	find_interface \
16100346Sru	ibcs2 \
17100346Sru	ipfw \
18100346Sru	kld \
19100346Sru	libvgl \
20100346Sru	mdoc \
21100346Sru	netgraph \
22100346Sru	nwclient \
23100346Sru	perfmon \
24100346Sru	portal \
25100346Sru	ppi \
26100346Sru	ppp \
27100346Sru	pppd \
28100346Sru	printing \
29100346Sru	ses \
30100346Sru	scsi_target \
31100346Sru	slattach \
32100346Sru	sliplogin \
33100346Sru	startslip \
34132211Sscottl	sunrpc
354257Sphk
36100346SruXFILES=	BSD_daemon/FreeBSD.pfa \
37100346Sru	BSD_daemon/README \
38100346Sru	BSD_daemon/beastie.eps \
39100346Sru	BSD_daemon/beastie.fig \
40100346Sru	BSD_daemon/eps.patch \
41100346Sru	BSD_daemon/poster.sh \
42100346Sru	FreeBSD_version/FreeBSD_version.c \
43100346Sru	FreeBSD_version/Makefile \
44100346Sru	FreeBSD_version/README \
45100346Sru	IPv6/USAGE \
46100346Sru	bootforth/README \
47100346Sru	bootforth/boot.4th \
48100346Sru	bootforth/frames.4th \
49100346Sru	bootforth/loader.rc \
50100346Sru	bootforth/menu.4th \
51100346Sru	bootforth/menuconf.4th \
52100346Sru	bootforth/screen.4th \
53100346Sru	cvsup/README \
54100346Sru	cvsup/cvs-supfile \
55100346Sru	cvsup/doc-supfile \
56100346Sru	cvsup/gnats-supfile \
57100346Sru	cvsup/ports-supfile \
58100346Sru	cvsup/refuse \
59100346Sru	cvsup/refuse.README \
60100346Sru	cvsup/stable-supfile \
61100346Sru	cvsup/standard-supfile \
62100346Sru	cvsup/www-supfile \
63100346Sru	diskless/ME \
64100346Sru	diskless/README.BOOTP \
65100346Sru	diskless/README.TEMPLATING \
66100346Sru	diskless/clone_root \
67100346Sru	drivers/README \
68100346Sru	drivers/make_device_driver.sh \
69100346Sru	drivers/make_pseudo_driver.sh \
70100346Sru	etc/README.examples \
71100346Sru	etc/bsd-style-copyright \
72100346Sru	etc/make.conf \
73100346Sru	find_interface/Makefile \
74100346Sru	find_interface/README \
75100346Sru	find_interface/find_interface.c \
76100346Sru	ibcs2/README \
77100346Sru	ibcs2/hello.uu \
78100346Sru	ipfw/change_rules.sh \
79100346Sru	kld/Makefile \
80100346Sru	kld/cdev/Makefile \
81100346Sru	kld/cdev/README \
82100346Sru	kld/cdev/module/Makefile \
83100346Sru	kld/cdev/module/cdev.c \
84100346Sru	kld/cdev/module/cdev.h \
85100346Sru	kld/cdev/module/cdevmod.c \
86100346Sru	kld/cdev/test/Makefile \
87100346Sru	kld/cdev/test/testcdev.c \
88100346Sru	kld/dyn_sysctl/Makefile \
89100346Sru	kld/dyn_sysctl/README \
90100346Sru	kld/dyn_sysctl/dyn_sysctl.c \
91200440Santoine	kld/firmware/Makefile \
92200440Santoine	kld/firmware/README \
93200440Santoine	kld/firmware/fwconsumer/Makefile \
94200440Santoine	kld/firmware/fwconsumer/fw_consumer.c \
95200440Santoine	kld/firmware/fwimage/Makefile \
96200440Santoine	kld/firmware/fwimage/firmware.img \
97100346Sru	kld/syscall/Makefile \
98100346Sru	kld/syscall/module/Makefile \
99100346Sru	kld/syscall/module/syscall.c \
100100346Sru	kld/syscall/test/Makefile \
101100346Sru	kld/syscall/test/call.c \
102100346Sru	libvgl/Makefile \
103100346Sru	libvgl/demo.c \
104139989Ssimon	mdoc/POSIX-copyright \
105139989Ssimon	mdoc/deshallify.sh \
106100346Sru	mdoc/example.1 \
107100346Sru	mdoc/example.3 \
108100346Sru	mdoc/example.4 \
109140134Skeramida	mdoc/example.9 \
110100346Sru	netgraph/ether.bridge \
111100346Sru	netgraph/frame_relay \
112100346Sru	netgraph/ngctl \
113100346Sru	netgraph/raw \
114100346Sru	netgraph/udp.tunnel \
115100346Sru	nwclient/dot.nwfsrc \
116100346Sru	nwclient/nwfs.sh.sample \
117100346Sru	perfmon/Makefile \
118100346Sru	perfmon/README \
119100346Sru	perfmon/perfmon.c \
120100346Sru	portal/README \
121100346Sru	portal/portal.conf \
122100346Sru	ppi/Makefile \
123100346Sru	ppi/ppilcd.c \
124100346Sru	ppp/chap-auth \
125100346Sru	ppp/login-auth \
126100346Sru	ppp/ppp.conf.sample \
127100346Sru	ppp/ppp.conf.span-isp \
128100346Sru	ppp/ppp.conf.span-isp.working \
129100346Sru	ppp/ppp.linkdown.sample \
130100346Sru	ppp/ppp.linkdown.span-isp \
131100346Sru	ppp/ppp.linkdown.span-isp.working \
132100346Sru	ppp/ppp.linkup.sample \
133100346Sru	ppp/ppp.linkup.span-isp \
134100346Sru	ppp/ppp.linkup.span-isp.working \
135100346Sru	ppp/ppp.secret.sample \
136100346Sru	ppp/ppp.secret.span-isp \
137100346Sru	ppp/ppp.secret.span-isp.working \
138100346Sru	pppd/auth-down.sample \
139100346Sru	pppd/auth-up.sample \
140100346Sru	pppd/chap-secrets.sample \
141100346Sru	pppd/chat.sh.sample \
142100346Sru	pppd/ip-down.sample \
143100346Sru	pppd/ip-up.sample \
144100346Sru	pppd/options.sample \
145100346Sru	pppd/pap-secrets.sample \
146100346Sru	pppd/ppp.deny.sample \
147100346Sru	pppd/ppp.shells.sample \
148100346Sru	printing/README \
149100346Sru	printing/diablo-if-net \
150100346Sru	printing/hpdf \
151100346Sru	printing/hpif \
152100346Sru	printing/hpof \
153100346Sru	printing/hprf \
154100346Sru	printing/hpvf \
155100346Sru	printing/if-simple \
156100346Sru	printing/if-simpleX \
157100346Sru	printing/ifhp \
158100346Sru	printing/make-ps-header \
159100346Sru	printing/netprint \
160100346Sru	printing/psdf \
161100346Sru	printing/psdfX \
162100346Sru	printing/psif \
163100346Sru	printing/pstf \
164100346Sru	printing/pstfX \
165100346Sru	ses/Makefile \
166100346Sru	ses/Makefile.inc \
167100346Sru	ses/getencstat/Makefile \
168100346Sru	ses/getencstat/getencstat.0 \
169100346Sru	ses/sesd/Makefile \
170100346Sru	ses/sesd/sesd.0 \
171100346Sru	ses/setencstat/Makefile \
172100346Sru	ses/setencstat/setencstat.0 \
173100346Sru	ses/setobjstat/Makefile \
174100346Sru	ses/setobjstat/setobjstat.0 \
175100346Sru	ses/srcs/chpmon.c \
176100346Sru	ses/srcs/eltsub.c \
177100346Sru	ses/srcs/getencstat.c \
178100346Sru	ses/srcs/getnobj.c \
179100346Sru	ses/srcs/getobjmap.c \
180100346Sru	ses/srcs/getobjstat.c \
181100346Sru	ses/srcs/inienc.c \
182100346Sru	ses/srcs/sesd.c \
183100346Sru	ses/srcs/setencstat.c \
184100346Sru	ses/srcs/setobjstat.c \
185100346Sru	scsi_target/Makefile \
186100346Sru	scsi_target/scsi_target.c \
187107215Snjl	scsi_target/scsi_target.h \
188107215Snjl	scsi_target/scsi_target.8 \
189107215Snjl	scsi_target/scsi_cmds.c \
190100346Sru	slattach/unit-command.sh \
191100346Sru	sliplogin/slip.hosts \
192100346Sru	sliplogin/slip.login \
193100346Sru	sliplogin/slip.logout \
194100346Sru	sliplogin/slip.slparms \
195100346Sru	startslip/sldown.sh \
196100346Sru	startslip/slip.sh \
197100346Sru	startslip/slup.sh \
198100346Sru	sunrpc/Makefile \
199100346Sru	sunrpc/dir/Makefile \
200100346Sru	sunrpc/dir/dir.x \
201100346Sru	sunrpc/dir/dir_proc.c \
202100346Sru	sunrpc/dir/rls.c \
203100346Sru	sunrpc/msg/Makefile \
204100346Sru	sunrpc/msg/msg.x \
205100346Sru	sunrpc/msg/msg_proc.c \
206100346Sru	sunrpc/msg/printmsg.c \
207100346Sru	sunrpc/msg/rprintmsg.c \
208100346Sru	sunrpc/sort/Makefile \
209100346Sru	sunrpc/sort/rsort.c \
210100346Sru	sunrpc/sort/sort.x \
211132211Sscottl	sunrpc/sort/sort_proc.c
2124257Sphk
213100346SruBINDIR= ${SHAREDIR}/examples
2141987Swollman
215139103SruNO_OBJ=
216100346Sru
21754351Smarcel# Define SHARED to indicate whether you want symbolic links to the system
21854351Smarcel# source (``symlinks''), or a separate copy (``copies''); (latter useful
21954351Smarcel# in environments where it's not possible to keep /sys publicly readable)
22054351SmarcelSHARED?=	copies
22154351Smarcel
222100346Srubeforeinstall: ${SHARED} etc-examples
223100346Sru.ORDER: ${SHARED} etc-examples
2242365Sbde
225100346Srucopies:
226100346Sru.for i in ${LDIRS}
227104288Sru	if [ -L ${DESTDIR}${BINDIR}/$i ]; then \
228100346Sru		rm -f ${DESTDIR}${BINDIR}/$i; \
229100346Sru	fi
23013537Sbde.endfor
231100346Sru	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
232100346Sru	    -f ${.CURDIR}/../../etc/mtree/BSD.usr.dist -p ${DESTDIR}/usr
233100346Sru.for file in ${XFILES}
234100872Sru	${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
235100346Sru		${.CURDIR}/${file} ${DESTDIR}${BINDIR}/${file}
23613537Sbde.endfor
2371987Swollman
238100346Srusymlinks:
239100346Sru.for i in ${LDIRS}
240100346Sru	rm -rf ${DESTDIR}${BINDIR}/$i
241100346Sru	ln -s ${.CURDIR}/$i ${DESTDIR}${BINDIR}/$i
24254351Smarcel.endfor
24354351Smarcel
24454351Smarceletc-examples:
24554351Smarcel.if ${SHARED} != "symlinks"
24654351Smarcel	(cd ${.CURDIR}/../../etc; ${MAKE} etc-examples)
24754351Smarcel.endif
24854351Smarcel
24985214Sdarrenr.if ${SHARED} != "symlinks"
25092868SruSUBDIR=	smbfs
251156813Sru.if ${MK_IPFILTER} != "no"
25292868SruSUBDIR+=ipfilter
25385214Sdarrenr.endif
254156813Sru.if ${MK_PF} != "no"
255135184SmlaierSUBDIR+=pf
25692868Sru.endif
257135184Smlaier.endif
25885214Sdarrenr
25985214Sdarrenr.include <bsd.subdir.mk>
260