xref: /dflybsd-src/initrd/rescue/Makefile (revision 8958ea92bf5d1c8be83222ba6d1d977b01c2d368)
1# $FreeBSD: head/rescue/rescue/Makefile 252356 2013-06-28 21:00:08Z davide $
2#	@(#)Makefile	8.1 (Berkeley) 6/2/93
3
4# To include '../Makefine.inc' for use in <bsd.crunchgen.mk>
5.include <bsd.init.mk>
6
7PROG= rescue
8
9SCRIPTS= dowpa ${.CURDIR}/../../sbin/dhclient/dhclient-script
10
11# Programs from 'bin'
12#
13CRUNCH_SRCDIRS+= bin
14CRUNCH_PATH_bin= ${.CURDIR}/../..
15CRUNCH_PROGS_bin=	\
16	cat		\
17	chmod		\
18	cp		\
19	cpdup		\
20	date		\
21	dd		\
22	df		\
23	echo		\
24	expr		\
25	hostname	\
26	kill		\
27	ln		\
28	ls		\
29	mined		\
30	mkdir		\
31	mv		\
32	pax		\
33	ps		\
34	pwd		\
35	realpath	\
36	rm		\
37	rmdir		\
38	sh		\
39	sleep		\
40	stty		\
41	sync		\
42	test		\
43	varsym
44
45# Additional options for specific programs
46CRUNCH_ALIAS_test= [
47CRUNCH_ALIAS_sh= -sh
48# The -sh alias shouldn't appear as a link
49CRUNCH_SUPPRESS_LINK_-sh= 1
50CRUNCH_ALIAS_ln= link
51CRUNCH_ALIAS_rm= unlink
52
53# Programs from 'usr.bin'
54#
55# Ignore diff3: a shell script that invokes /libexec/diff3prog
56CRUNCH_SRCDIRS+= usr.bin
57CRUNCH_PATH_usr.bin= ${.CURDIR}/../..
58CRUNCH_PROGS_usr.bin=	\
59	awk		\
60	basename	\
61	bc		\
62	bzip2		\
63	cap_mkdb	\
64	chflags		\
65	cmp		\
66	cut		\
67	diff		\
68	dirname		\
69	du		\
70	env		\
71	false		\
72	find		\
73	gzip		\
74	head		\
75	hexdump		\
76	kcollect	\
77	kdump		\
78	kenv		\
79	ktrace		\
80	id		\
81	join		\
82	less		\
83	lsvfs		\
84	paste		\
85	patch		\
86	pkill		\
87	printf		\
88	relpath		\
89	sdiff		\
90	sed		\
91	sort		\
92	stat		\
93	tail		\
94	tee		\
95	touch		\
96	tput		\
97	tr		\
98	true		\
99	truss		\
100	uname		\
101	undo		\
102	uniq		\
103	vi		\
104	wall		\
105	wc		\
106	xz		\
107	yes
108
109CRUNCH_ALIAS_bzip2= bunzip2 bzcat
110CRUNCH_ALIAS_gzip= gunzip gzcat zcat
111CRUNCH_ALIAS_hexdump= hd od
112CRUNCH_ALIAS_id= groups whoami
113CRUNCH_ALIAS_less= more
114CRUNCH_ALIAS_pkill= pgrep
115CRUNCH_ALIAS_stat= readlink
116CRUNCH_ALIAS_vi= ex nex nvi nview view
117CRUNCH_ALIAS_xz= lzcat lzma unlzma unxz xzcat
118
119# Programs from 'sbin'
120#
121CRUNCH_SRCDIRS+= sbin
122CRUNCH_PATH_sbin= ${.CURDIR}/../..
123CRUNCH_PROGS_sbin=	\
124	camcontrol	\
125	ccdconfig	\
126	dhclient	\
127	diskinfo	\
128	disklabel32	\
129	disklabel64	\
130	dmesg		\
131	dump		\
132	dumpfs		\
133	dumpon		\
134	fdisk		\
135	ffsinfo		\
136	fsck		\
137	fsck_msdosfs	\
138	gpt		\
139	growfs		\
140	ifconfig	\
141	kldconfig	\
142	kldload		\
143	kldstat		\
144	kldunload	\
145	ldconfig	\
146	mount		\
147	mount_cd9660	\
148	mount_devfs	\
149	mount_hammer	\
150	mount_hammer2	\
151	mount_msdos	\
152	mount_nfs	\
153	mount_ntfs	\
154	mount_null	\
155	mount_tmpfs	\
156	mount_ufs	\
157	natacontrol	\
158	newfs		\
159	newfs_hammer	\
160	newfs_hammer2	\
161	newfs_msdos	\
162	ping		\
163	rconfig		\
164	rcorder		\
165	reboot		\
166	restore		\
167	route		\
168	savecore	\
169	shutdown	\
170	swapon		\
171	sysctl		\
172	tunefs		\
173	udevd		\
174	umount		\
175	vinum
176
177CRUNCH_ALIAS_disklabel64= disklabel
178CRUNCH_ALIAS_dump= rdump
179CRUNCH_ALIAS_newfs= mount_mfs
180CRUNCH_ALIAS_reboot= halt
181CRUNCH_ALIAS_restore= rrestore
182CRUNCH_ALIAS_shutdown= poweroff
183CRUNCH_ALIAS_swapon= swapoff swapctl
184
185# Programs from 'usr.sbin'
186#
187CRUNCH_SRCDIRS+= usr.sbin
188CRUNCH_PATH_usr.sbin= ${.CURDIR}/../..
189CRUNCH_PROGS_usr.sbin=	\
190	boot0cfg	\
191	chown		\
192	chroot		\
193	fstyp		\
194	pw		\
195	pwd_mkdb	\
196	rtsold		\
197	traceroute	\
198	traceroute6	\
199	vnconfig	\
200	vipw
201
202CRUNCH_ALIAS_chown= chgrp
203CRUNCH_ALIAS_rtsold= rtsol
204
205CRUNCH_SRCDIRS+= gnu/sbin
206CRUNCH_PATH_gnu/sbin= ${.CURDIR}/../..
207CRUNCH_PROGS_gnu/sbin= dmsetup lvm
208
209CRUNCH_ALIAS_lvm= \
210	lvchange lvconvert lvcreate lvdisplay lvextend \
211	lvmchange lvmdiskscan lvmdump \
212	lvreduce lvremove lvrename lvresize lvs lvscan \
213	pvchange pvck pvcreate pvdisplay pvmove pvremove \
214	pvresize pvs pvscan \
215	vgcfgbackup vgcfgrestore vgchange vgck vgconvert \
216	vgcreate vgdisplay vgexport vgextend vgimport \
217	vgmerge vgmknodes vgreduce vgremove vgrename \
218	vgs vgscan vgsplit
219
220CRUNCH_SRCDIRS+= grep
221CRUNCH_PATH_grep= ${.CURDIR}/../../gnu/usr.bin
222CRUNCH_PROGS_grep= grep
223CRUNCH_INTLIB_grep= ${CRUNCH_PATH_grep}/grep/libgreputils/libgreputils.a
224SCRIPTS+= \
225	${CRUNCH_PATH_grep}/grep/egrep/egrep \
226	${CRUNCH_PATH_grep}/grep/fgrep/fgrep
227
228CRUNCH_LIBS+= -llvm -ldevmapper -ldevattr -ldm -lprop  # lvm
229CRUNCH_LIBS+= -ldevstat  # vinum
230CRUNCH_LIBS+= -lbsdxml  # ifconfig
231CRUNCH_LIBS+= -lcam # camcontrol
232CRUNCH_LIBS+= -lsbuf  # camcontrol, ifconfig
233CRUNCH_LIBS+= -lkiconv  # mount_{cd9660,msdos,ntfs}
234CRUNCH_LIBS+= -llzma  # xz
235CRUNCH_LIBS+= -lbz2  # bzip2
236CRUNCH_LIBS+= -lkvm  # ccdconfig, dmesg, pkill, ps
237CRUNCH_LIBS+= -lcrypt  # pw
238CRUNCH_LIBS+= -lprivate_edit  # bc, sh, vinum
239#CRUNCH_LIBS+= -lprivate_ncurses  # bc, less, ls, tput, vinum (=> ncursesw)
240CRUNCH_LIBS+= -lprivate_ncursesw  # vi
241CRUNCH_LIBS+= -lutil
242CRUNCH_LIBS+= -lz  # savecore
243CRUNCH_LIBS+= -lprivate_zstd  # multiple
244CRUNCH_LIBS+= -lm  # awk, ps, ping
245CRUNCH_LIBS+= -lpthread
246CRUNCH_LINKOPTS+= ${PRIVATELIB_LDFLAGS}
247
248.include <bsd.crunchgen.mk>
249.include <bsd.prog.mk>
250