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