xref: /freebsd/share/examples/Makefile (revision 85999a0155e389415cc476110fd5614baf543a55)
1# $FreeBSD$
2#
3# Doing a make install builds /usr/share/examples
4
5.include <bsd.own.mk>
6
7LDIRS=	BSD_daemon \
8	FreeBSD_version \
9	IPv6 \
10	atm \
11	bootforth \
12	cvsup \
13	diskless \
14	drivers \
15	etc \
16	find_interface \
17	ibcs2 \
18	ipfw \
19	isdn \
20	kld \
21	libvgl \
22	mdoc \
23	netgraph \
24	nwclient \
25	perfmon \
26	portal \
27	ppi \
28	ppp \
29	pppd \
30	printing \
31	ses \
32	scsi_target \
33	slattach \
34	sliplogin \
35	startslip \
36	sunrpc
37
38XFILES=	BSD_daemon/FreeBSD.pfa \
39	BSD_daemon/README \
40	BSD_daemon/beastie.eps \
41	BSD_daemon/beastie.fig \
42	BSD_daemon/eps.patch \
43	BSD_daemon/poster.sh \
44	FreeBSD_version/FreeBSD_version.c \
45	FreeBSD_version/Makefile \
46	FreeBSD_version/README \
47	IPv6/USAGE \
48	atm/NOTES \
49	atm/README \
50	atm/Startup \
51	atm/atm-config.sh \
52	atm/atm-sockets.txt \
53	atm/cpcs-design.txt \
54	atm/fore-microcode.txt \
55	atm/sscf-design.txt \
56	atm/sscop-design.txt \
57	bootforth/README \
58	bootforth/boot.4th \
59	bootforth/frames.4th \
60	bootforth/loader.rc \
61	bootforth/menu.4th \
62	bootforth/menuconf.4th \
63	bootforth/screen.4th \
64	cvsup/README \
65	cvsup/cvs-supfile \
66	cvsup/doc-supfile \
67	cvsup/gnats-supfile \
68	cvsup/ports-supfile \
69	cvsup/refuse \
70	cvsup/refuse.README \
71	cvsup/stable-supfile \
72	cvsup/standard-supfile \
73	cvsup/www-supfile \
74	diskless/ME \
75	diskless/README.BOOTP \
76	diskless/README.TEMPLATING \
77	diskless/clone_root \
78	drivers/README \
79	drivers/make_device_driver.sh \
80	drivers/make_pseudo_driver.sh \
81	etc/README.examples \
82	etc/bsd-style-copyright \
83	etc/make.conf \
84	find_interface/Makefile \
85	find_interface/README \
86	find_interface/find_interface.c \
87	ibcs2/README \
88	ibcs2/hello.uu \
89	ipfw/change_rules.sh \
90	isdn/FAQ \
91	isdn/KERNEL \
92	isdn/Overview \
93	isdn/README \
94	isdn/ROADMAP \
95	isdn/ReleaseNotes \
96	isdn/Resources \
97	isdn/SupportedCards \
98	isdn/ThankYou \
99	isdn/contrib/README \
100	isdn/contrib/anleitung.ppp \
101	isdn/contrib/answer.c \
102	isdn/contrib/answer.sh \
103	isdn/contrib/convert.sh \
104	isdn/contrib/hplay.c \
105	isdn/contrib/i4b-ppp-newbie.txt \
106	isdn/contrib/isdnctl \
107	isdn/contrib/isdnd_acct \
108	isdn/contrib/isdnd_acct.pl \
109	isdn/contrib/isdntelmux.c \
110	isdn/contrib/mrtg-isp0.sh \
111	isdn/i4brunppp/Makefile \
112	isdn/i4brunppp/README \
113	isdn/i4brunppp/i4brunppp-isdnd.rc \
114	isdn/i4brunppp/i4brunppp.8 \
115	isdn/i4brunppp/i4brunppp.c \
116	isdn/v21/Makefile \
117	isdn/v21/README \
118	isdn/v21/v21modem.c \
119	kld/Makefile \
120	kld/cdev/Makefile \
121	kld/cdev/README \
122	kld/cdev/module/Makefile \
123	kld/cdev/module/cdev.c \
124	kld/cdev/module/cdev.h \
125	kld/cdev/module/cdevmod.c \
126	kld/cdev/test/Makefile \
127	kld/cdev/test/testcdev.c \
128	kld/dyn_sysctl/Makefile \
129	kld/dyn_sysctl/README \
130	kld/dyn_sysctl/dyn_sysctl.c \
131	kld/syscall/Makefile \
132	kld/syscall/module/Makefile \
133	kld/syscall/module/syscall.c \
134	kld/syscall/test/Makefile \
135	kld/syscall/test/call.c \
136	libvgl/Makefile \
137	libvgl/demo.c \
138	mdoc/POSIX-copyright \
139	mdoc/deshallify.sh \
140	mdoc/example.1 \
141	mdoc/example.3 \
142	mdoc/example.4 \
143	mdoc/example.9 \
144	netgraph/ether.bridge \
145	netgraph/frame_relay \
146	netgraph/ngctl \
147	netgraph/raw \
148	netgraph/udp.tunnel \
149	nwclient/dot.nwfsrc \
150	nwclient/nwfs.sh.sample \
151	perfmon/Makefile \
152	perfmon/README \
153	perfmon/perfmon.c \
154	portal/README \
155	portal/portal.conf \
156	ppi/Makefile \
157	ppi/ppilcd.c \
158	ppp/chap-auth \
159	ppp/isdnd.rc \
160	ppp/login-auth \
161	ppp/ppp.conf.isdn \
162	ppp/ppp.conf.sample \
163	ppp/ppp.conf.span-isp \
164	ppp/ppp.conf.span-isp.working \
165	ppp/ppp.linkdown.sample \
166	ppp/ppp.linkdown.span-isp \
167	ppp/ppp.linkdown.span-isp.working \
168	ppp/ppp.linkup.sample \
169	ppp/ppp.linkup.span-isp \
170	ppp/ppp.linkup.span-isp.working \
171	ppp/ppp.secret.sample \
172	ppp/ppp.secret.span-isp \
173	ppp/ppp.secret.span-isp.working \
174	pppd/auth-down.sample \
175	pppd/auth-up.sample \
176	pppd/chap-secrets.sample \
177	pppd/chat.sh.sample \
178	pppd/ip-down.sample \
179	pppd/ip-up.sample \
180	pppd/options.sample \
181	pppd/pap-secrets.sample \
182	pppd/ppp.deny.sample \
183	pppd/ppp.shells.sample \
184	printing/README \
185	printing/diablo-if-net \
186	printing/hpdf \
187	printing/hpif \
188	printing/hpof \
189	printing/hprf \
190	printing/hpvf \
191	printing/if-simple \
192	printing/if-simpleX \
193	printing/ifhp \
194	printing/make-ps-header \
195	printing/netprint \
196	printing/psdf \
197	printing/psdfX \
198	printing/psif \
199	printing/pstf \
200	printing/pstfX \
201	ses/Makefile \
202	ses/Makefile.inc \
203	ses/getencstat/Makefile \
204	ses/getencstat/getencstat.0 \
205	ses/sesd/Makefile \
206	ses/sesd/sesd.0 \
207	ses/setencstat/Makefile \
208	ses/setencstat/setencstat.0 \
209	ses/setobjstat/Makefile \
210	ses/setobjstat/setobjstat.0 \
211	ses/srcs/chpmon.c \
212	ses/srcs/eltsub.c \
213	ses/srcs/getencstat.c \
214	ses/srcs/getnobj.c \
215	ses/srcs/getobjmap.c \
216	ses/srcs/getobjstat.c \
217	ses/srcs/inienc.c \
218	ses/srcs/sesd.c \
219	ses/srcs/setencstat.c \
220	ses/srcs/setobjstat.c \
221	scsi_target/Makefile \
222	scsi_target/scsi_target.c \
223	scsi_target/scsi_target.h \
224	scsi_target/scsi_target.8 \
225	scsi_target/scsi_cmds.c \
226	slattach/unit-command.sh \
227	sliplogin/slip.hosts \
228	sliplogin/slip.login \
229	sliplogin/slip.logout \
230	sliplogin/slip.slparms \
231	startslip/sldown.sh \
232	startslip/slip.sh \
233	startslip/slup.sh \
234	sunrpc/Makefile \
235	sunrpc/dir/Makefile \
236	sunrpc/dir/dir.x \
237	sunrpc/dir/dir_proc.c \
238	sunrpc/dir/rls.c \
239	sunrpc/msg/Makefile \
240	sunrpc/msg/msg.x \
241	sunrpc/msg/msg_proc.c \
242	sunrpc/msg/printmsg.c \
243	sunrpc/msg/rprintmsg.c \
244	sunrpc/sort/Makefile \
245	sunrpc/sort/rsort.c \
246	sunrpc/sort/sort.x \
247	sunrpc/sort/sort_proc.c
248
249BINDIR= ${SHAREDIR}/examples
250
251NO_OBJ=
252
253# Define SHARED to indicate whether you want symbolic links to the system
254# source (``symlinks''), or a separate copy (``copies''); (latter useful
255# in environments where it's not possible to keep /sys publicly readable)
256SHARED?=	copies
257
258beforeinstall: ${SHARED} etc-examples
259.ORDER: ${SHARED} etc-examples
260
261copies:
262.for i in ${LDIRS}
263	if [ -L ${DESTDIR}${BINDIR}/$i ]; then \
264		rm -f ${DESTDIR}${BINDIR}/$i; \
265	fi
266.endfor
267	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
268	    -f ${.CURDIR}/../../etc/mtree/BSD.usr.dist -p ${DESTDIR}/usr
269.for file in ${XFILES}
270	${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
271		${.CURDIR}/${file} ${DESTDIR}${BINDIR}/${file}
272.endfor
273
274symlinks:
275.for i in ${LDIRS}
276	rm -rf ${DESTDIR}${BINDIR}/$i
277	ln -s ${.CURDIR}/$i ${DESTDIR}${BINDIR}/$i
278.endfor
279
280etc-examples:
281.if ${SHARED} != "symlinks"
282	(cd ${.CURDIR}/../../etc; ${MAKE} etc-examples)
283.endif
284
285.if ${SHARED} != "symlinks"
286SUBDIR=	smbfs
287.if ${MK_IPFILTER} != "no"
288SUBDIR+=ipfilter
289.endif
290.if ${MK_PF} != "no"
291SUBDIR+=pf
292.endif
293.endif
294
295.include <bsd.subdir.mk>
296