Makefile revision 218914
150476Speter# $FreeBSD: head/share/examples/Makefile 218914 2011-02-21 13:22:29Z lstewart $
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 \
16204076Spjd	hast \
17100346Sru	ibcs2 \
18206996Savg	indent \
19100346Sru	ipfw \
20214309Sjulian	jails \
21100346Sru	kld \
22100346Sru	libvgl \
23100346Sru	mdoc \
24100346Sru	netgraph \
25100346Sru	nwclient \
26100346Sru	perfmon \
27100346Sru	portal \
28100346Sru	ppi \
29100346Sru	ppp \
30100346Sru	printing \
31100346Sru	ses \
32100346Sru	scsi_target \
33132211Sscottl	sunrpc
344257Sphk
35100346SruXFILES=	BSD_daemon/FreeBSD.pfa \
36100346Sru	BSD_daemon/README \
37100346Sru	BSD_daemon/beastie.eps \
38100346Sru	BSD_daemon/beastie.fig \
39100346Sru	BSD_daemon/eps.patch \
40100346Sru	BSD_daemon/poster.sh \
41100346Sru	FreeBSD_version/FreeBSD_version.c \
42100346Sru	FreeBSD_version/Makefile \
43100346Sru	FreeBSD_version/README \
44100346Sru	IPv6/USAGE \
45100346Sru	bootforth/README \
46100346Sru	bootforth/boot.4th \
47100346Sru	bootforth/frames.4th \
48100346Sru	bootforth/loader.rc \
49100346Sru	bootforth/menu.4th \
50100346Sru	bootforth/menuconf.4th \
51100346Sru	bootforth/screen.4th \
52100346Sru	cvsup/README \
53100346Sru	cvsup/cvs-supfile \
54100346Sru	cvsup/doc-supfile \
55100346Sru	cvsup/gnats-supfile \
56100346Sru	cvsup/ports-supfile \
57100346Sru	cvsup/refuse \
58100346Sru	cvsup/refuse.README \
59100346Sru	cvsup/stable-supfile \
60100346Sru	cvsup/standard-supfile \
61100346Sru	cvsup/www-supfile \
62100346Sru	diskless/ME \
63100346Sru	diskless/README.BOOTP \
64100346Sru	diskless/README.TEMPLATING \
65100346Sru	diskless/clone_root \
66100346Sru	drivers/README \
67100346Sru	drivers/make_device_driver.sh \
68100346Sru	drivers/make_pseudo_driver.sh \
69100346Sru	etc/README.examples \
70100346Sru	etc/bsd-style-copyright \
71100346Sru	etc/make.conf \
72100346Sru	find_interface/Makefile \
73100346Sru	find_interface/README \
74100346Sru	find_interface/find_interface.c \
75204076Spjd	hast/ucarp.sh \
76204076Spjd	hast/ucarp_down.sh \
77204076Spjd	hast/ucarp_up.sh \
78204076Spjd	hast/vip-down.sh \
79204076Spjd	hast/vip-up.sh \
80100346Sru	ibcs2/README \
81100346Sru	ibcs2/hello.uu \
82206996Savg	indent/indent.pro \
83100346Sru	ipfw/change_rules.sh \
84214309Sjulian	jails/README \
85100346Sru	kld/Makefile \
86100346Sru	kld/cdev/Makefile \
87100346Sru	kld/cdev/README \
88100346Sru	kld/cdev/module/Makefile \
89100346Sru	kld/cdev/module/cdev.c \
90100346Sru	kld/cdev/module/cdev.h \
91100346Sru	kld/cdev/module/cdevmod.c \
92100346Sru	kld/cdev/test/Makefile \
93100346Sru	kld/cdev/test/testcdev.c \
94100346Sru	kld/dyn_sysctl/Makefile \
95100346Sru	kld/dyn_sysctl/README \
96100346Sru	kld/dyn_sysctl/dyn_sysctl.c \
97200440Santoine	kld/firmware/Makefile \
98200440Santoine	kld/firmware/README \
99200440Santoine	kld/firmware/fwconsumer/Makefile \
100200440Santoine	kld/firmware/fwconsumer/fw_consumer.c \
101200440Santoine	kld/firmware/fwimage/Makefile \
102200440Santoine	kld/firmware/fwimage/firmware.img \
103218914Slstewart	kld/khelp/Makefile \
104218914Slstewart	kld/khelp/README \
105218914Slstewart	kld/khelp/h_example.c \
106100346Sru	kld/syscall/Makefile \
107100346Sru	kld/syscall/module/Makefile \
108100346Sru	kld/syscall/module/syscall.c \
109100346Sru	kld/syscall/test/Makefile \
110100346Sru	kld/syscall/test/call.c \
111100346Sru	libvgl/Makefile \
112100346Sru	libvgl/demo.c \
113139989Ssimon	mdoc/POSIX-copyright \
114139989Ssimon	mdoc/deshallify.sh \
115100346Sru	mdoc/example.1 \
116100346Sru	mdoc/example.3 \
117100346Sru	mdoc/example.4 \
118140134Skeramida	mdoc/example.9 \
119100346Sru	netgraph/ether.bridge \
120100346Sru	netgraph/frame_relay \
121100346Sru	netgraph/ngctl \
122100346Sru	netgraph/raw \
123100346Sru	netgraph/udp.tunnel \
124214309Sjulian	netgraph/virtual.chain \
125214309Sjulian	netgraph/virtual.lan \
126100346Sru	nwclient/dot.nwfsrc \
127100346Sru	nwclient/nwfs.sh.sample \
128100346Sru	perfmon/Makefile \
129100346Sru	perfmon/README \
130100346Sru	perfmon/perfmon.c \
131100346Sru	portal/README \
132100346Sru	portal/portal.conf \
133100346Sru	ppi/Makefile \
134100346Sru	ppi/ppilcd.c \
135100346Sru	ppp/chap-auth \
136100346Sru	ppp/login-auth \
137100346Sru	ppp/ppp.conf.sample \
138100346Sru	ppp/ppp.conf.span-isp \
139100346Sru	ppp/ppp.conf.span-isp.working \
140100346Sru	ppp/ppp.linkdown.sample \
141100346Sru	ppp/ppp.linkdown.span-isp \
142100346Sru	ppp/ppp.linkdown.span-isp.working \
143100346Sru	ppp/ppp.linkup.sample \
144100346Sru	ppp/ppp.linkup.span-isp \
145100346Sru	ppp/ppp.linkup.span-isp.working \
146100346Sru	ppp/ppp.secret.sample \
147100346Sru	ppp/ppp.secret.span-isp \
148100346Sru	ppp/ppp.secret.span-isp.working \
149100346Sru	printing/README \
150100346Sru	printing/diablo-if-net \
151100346Sru	printing/hpdf \
152100346Sru	printing/hpif \
153100346Sru	printing/hpof \
154100346Sru	printing/hprf \
155100346Sru	printing/hpvf \
156100346Sru	printing/if-simple \
157100346Sru	printing/if-simpleX \
158100346Sru	printing/ifhp \
159100346Sru	printing/make-ps-header \
160100346Sru	printing/netprint \
161100346Sru	printing/psdf \
162100346Sru	printing/psdfX \
163100346Sru	printing/psif \
164100346Sru	printing/pstf \
165100346Sru	printing/pstfX \
166100346Sru	ses/Makefile \
167100346Sru	ses/Makefile.inc \
168100346Sru	ses/getencstat/Makefile \
169100346Sru	ses/getencstat/getencstat.0 \
170100346Sru	ses/sesd/Makefile \
171100346Sru	ses/sesd/sesd.0 \
172100346Sru	ses/setencstat/Makefile \
173100346Sru	ses/setencstat/setencstat.0 \
174100346Sru	ses/setobjstat/Makefile \
175100346Sru	ses/setobjstat/setobjstat.0 \
176100346Sru	ses/srcs/chpmon.c \
177100346Sru	ses/srcs/eltsub.c \
178100346Sru	ses/srcs/getencstat.c \
179100346Sru	ses/srcs/getnobj.c \
180100346Sru	ses/srcs/getobjmap.c \
181100346Sru	ses/srcs/getobjstat.c \
182100346Sru	ses/srcs/inienc.c \
183100346Sru	ses/srcs/sesd.c \
184100346Sru	ses/srcs/setencstat.c \
185100346Sru	ses/srcs/setobjstat.c \
186100346Sru	scsi_target/Makefile \
187100346Sru	scsi_target/scsi_target.c \
188107215Snjl	scsi_target/scsi_target.h \
189107215Snjl	scsi_target/scsi_target.8 \
190107215Snjl	scsi_target/scsi_cmds.c \
191100346Sru	sunrpc/Makefile \
192100346Sru	sunrpc/dir/Makefile \
193100346Sru	sunrpc/dir/dir.x \
194100346Sru	sunrpc/dir/dir_proc.c \
195100346Sru	sunrpc/dir/rls.c \
196100346Sru	sunrpc/msg/Makefile \
197100346Sru	sunrpc/msg/msg.x \
198100346Sru	sunrpc/msg/msg_proc.c \
199100346Sru	sunrpc/msg/printmsg.c \
200100346Sru	sunrpc/msg/rprintmsg.c \
201100346Sru	sunrpc/sort/Makefile \
202100346Sru	sunrpc/sort/rsort.c \
203100346Sru	sunrpc/sort/sort.x \
204132211Sscottl	sunrpc/sort/sort_proc.c
2054257Sphk
206100346SruBINDIR= ${SHAREDIR}/examples
2071987Swollman
208139103SruNO_OBJ=
209100346Sru
21054351Smarcel# Define SHARED to indicate whether you want symbolic links to the system
21154351Smarcel# source (``symlinks''), or a separate copy (``copies''); (latter useful
21254351Smarcel# in environments where it's not possible to keep /sys publicly readable)
21354351SmarcelSHARED?=	copies
21454351Smarcel
215100346Srubeforeinstall: ${SHARED} etc-examples
216100346Sru.ORDER: ${SHARED} etc-examples
2172365Sbde
218100346Srucopies:
219100346Sru.for i in ${LDIRS}
220104288Sru	if [ -L ${DESTDIR}${BINDIR}/$i ]; then \
221100346Sru		rm -f ${DESTDIR}${BINDIR}/$i; \
222100346Sru	fi
22313537Sbde.endfor
224100346Sru	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
225100346Sru	    -f ${.CURDIR}/../../etc/mtree/BSD.usr.dist -p ${DESTDIR}/usr
226100346Sru.for file in ${XFILES}
227100872Sru	${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
228100346Sru		${.CURDIR}/${file} ${DESTDIR}${BINDIR}/${file}
22913537Sbde.endfor
2301987Swollman
231100346Srusymlinks:
232100346Sru.for i in ${LDIRS}
233100346Sru	rm -rf ${DESTDIR}${BINDIR}/$i
234100346Sru	ln -s ${.CURDIR}/$i ${DESTDIR}${BINDIR}/$i
23554351Smarcel.endfor
23654351Smarcel
23754351Smarceletc-examples:
23854351Smarcel.if ${SHARED} != "symlinks"
23954351Smarcel	(cd ${.CURDIR}/../../etc; ${MAKE} etc-examples)
24054351Smarcel.endif
24154351Smarcel
24285214Sdarrenr.if ${SHARED} != "symlinks"
24392868SruSUBDIR=	smbfs
244156813Sru.if ${MK_IPFILTER} != "no"
24592868SruSUBDIR+=ipfilter
24685214Sdarrenr.endif
247156813Sru.if ${MK_PF} != "no"
248135184SmlaierSUBDIR+=pf
24992868Sru.endif
250135184Smlaier.endif
25185214Sdarrenr
25285214Sdarrenr.include <bsd.subdir.mk>
253