Makefile revision 248484
150476Speter# $FreeBSD: head/share/examples/Makefile 248484 2013-03-18 23:46:14Z neel $
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 \
10248484Sneel	bhyve \
11100346Sru	bootforth \
12233429Seadler	csh \
13100346Sru	cvsup \
14100346Sru	diskless \
15100346Sru	drivers \
16100346Sru	etc \
17100346Sru	find_interface \
18204076Spjd	hast \
19100346Sru	ibcs2 \
20206996Savg	indent \
21100346Sru	ipfw \
22214309Sjulian	jails \
23100346Sru	kld \
24238603Sjoerg	libusb20 \
25100346Sru	libvgl \
26100346Sru	mdoc \
27100346Sru	netgraph \
28100346Sru	perfmon \
29100346Sru	ppi \
30100346Sru	ppp \
31100346Sru	printing \
32100346Sru	ses \
33100346Sru	scsi_target \
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 \
46248484Sneel	bhyve/vmrun.sh \
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/stable-supfile \
58100346Sru	cvsup/standard-supfile \
59100346Sru	diskless/ME \
60100346Sru	diskless/README.BOOTP \
61100346Sru	diskless/README.TEMPLATING \
62100346Sru	diskless/clone_root \
63100346Sru	drivers/README \
64100346Sru	drivers/make_device_driver.sh \
65100346Sru	drivers/make_pseudo_driver.sh \
66100346Sru	etc/README.examples \
67100346Sru	etc/bsd-style-copyright \
68100346Sru	etc/make.conf \
69100346Sru	find_interface/Makefile \
70100346Sru	find_interface/README \
71100346Sru	find_interface/find_interface.c \
72204076Spjd	hast/ucarp.sh \
73204076Spjd	hast/ucarp_down.sh \
74204076Spjd	hast/ucarp_up.sh \
75204076Spjd	hast/vip-down.sh \
76204076Spjd	hast/vip-up.sh \
77100346Sru	ibcs2/README \
78100346Sru	ibcs2/hello.uu \
79206996Savg	indent/indent.pro \
80100346Sru	ipfw/change_rules.sh \
81214309Sjulian	jails/README \
82100346Sru	kld/Makefile \
83100346Sru	kld/cdev/Makefile \
84100346Sru	kld/cdev/README \
85100346Sru	kld/cdev/module/Makefile \
86100346Sru	kld/cdev/module/cdev.c \
87100346Sru	kld/cdev/module/cdev.h \
88100346Sru	kld/cdev/module/cdevmod.c \
89100346Sru	kld/cdev/test/Makefile \
90100346Sru	kld/cdev/test/testcdev.c \
91100346Sru	kld/dyn_sysctl/Makefile \
92100346Sru	kld/dyn_sysctl/README \
93100346Sru	kld/dyn_sysctl/dyn_sysctl.c \
94200440Santoine	kld/firmware/Makefile \
95200440Santoine	kld/firmware/README \
96200440Santoine	kld/firmware/fwconsumer/Makefile \
97200440Santoine	kld/firmware/fwconsumer/fw_consumer.c \
98200440Santoine	kld/firmware/fwimage/Makefile \
99220256Semaste	kld/firmware/fwimage/firmware.img.uu \
100218914Slstewart	kld/khelp/Makefile \
101218914Slstewart	kld/khelp/README \
102218914Slstewart	kld/khelp/h_example.c \
103100346Sru	kld/syscall/Makefile \
104100346Sru	kld/syscall/module/Makefile \
105100346Sru	kld/syscall/module/syscall.c \
106100346Sru	kld/syscall/test/Makefile \
107100346Sru	kld/syscall/test/call.c \
108238603Sjoerg	libusb20/Makefile \
109238603Sjoerg	libusb20/README \
110238603Sjoerg	libusb20/aux.c \
111238603Sjoerg	libusb20/aux.h \
112238603Sjoerg	libusb20/bulk.c \
113238603Sjoerg	libusb20/control.c \
114100346Sru	libvgl/Makefile \
115100346Sru	libvgl/demo.c \
116139989Ssimon	mdoc/POSIX-copyright \
117139989Ssimon	mdoc/deshallify.sh \
118100346Sru	mdoc/example.1 \
119100346Sru	mdoc/example.3 \
120100346Sru	mdoc/example.4 \
121140134Skeramida	mdoc/example.9 \
122100346Sru	netgraph/ether.bridge \
123100346Sru	netgraph/frame_relay \
124100346Sru	netgraph/ngctl \
125100346Sru	netgraph/raw \
126100346Sru	netgraph/udp.tunnel \
127214309Sjulian	netgraph/virtual.chain \
128214309Sjulian	netgraph/virtual.lan \
129100346Sru	perfmon/Makefile \
130100346Sru	perfmon/README \
131100346Sru	perfmon/perfmon.c \
132100346Sru	ppi/Makefile \
133100346Sru	ppi/ppilcd.c \
134100346Sru	ppp/chap-auth \
135100346Sru	ppp/login-auth \
136100346Sru	ppp/ppp.conf.sample \
137100346Sru	ppp/ppp.conf.span-isp \
138100346Sru	ppp/ppp.conf.span-isp.working \
139100346Sru	ppp/ppp.linkdown.sample \
140100346Sru	ppp/ppp.linkdown.span-isp \
141100346Sru	ppp/ppp.linkdown.span-isp.working \
142100346Sru	ppp/ppp.linkup.sample \
143100346Sru	ppp/ppp.linkup.span-isp \
144100346Sru	ppp/ppp.linkup.span-isp.working \
145100346Sru	ppp/ppp.secret.sample \
146100346Sru	ppp/ppp.secret.span-isp \
147100346Sru	ppp/ppp.secret.span-isp.working \
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 \
177222337Smav	ses/srcs/eltsub.h \
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"
243241823Smarcel.if ${MK_ATF} != "no"
244241823SmarcelSUBDIR+=atf
245241823Smarcel.endif
246156813Sru.if ${MK_IPFILTER} != "no"
24792868SruSUBDIR+=ipfilter
24885214Sdarrenr.endif
249156813Sru.if ${MK_PF} != "no"
250135184SmlaierSUBDIR+=pf
25192868Sru.endif
252135184Smlaier.endif
25385214Sdarrenr
25485214Sdarrenr.include <bsd.subdir.mk>
255