4 bin_UTILITIES += grub-mkelfimage
5 grub_mkelfimage_SOURCES = util/elf/grub-mkimage.c util/misc.c \
7 util/elf/grub-mkimage.c_DEPENDENCIES = Makefile
10 sbin_UTILITIES += grub-probe
11 util/grub-probe.c_DEPENDENCIES = grub_probe_init.h
12 grub_probe_SOURCES = util/grub-probe.c \
13 util/hostdisk.c util/misc.c util/getroot.c \
14 kern/device.c kern/disk.c kern/err.c kern/misc.c \
15 kern/parser.c kern/partition.c kern/file.c \
17 fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \
18 fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
19 fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \
20 fs/ufs.c fs/xfs.c fs/afs.c \
22 partmap/pc.c partmap/apple.c partmap/gpt.c \
23 kern/fs.c kern/env.c fs/fshelp.c \
24 disk/lvm.c disk/raid.c disk/mdraid_linux.c grub_probe_init.c
26 ifeq ($(enable_grub_fstest), yes)
27 bin_UTILITIES += grub-fstest
31 util/grub-fstest.c_DEPENDENCIES = grub_fstest_init.h
32 grub_fstest_SOURCES = util/grub-fstest.c util/hostfs.c util/misc.c \
33 kern/file.c kern/device.c kern/disk.c kern/err.c kern/misc.c \
34 disk/host.c disk/loopback.c normal/arg.c normal/misc.c \
35 lib/hexdump.c lib/crc.c commands/blocklist.c commands/ls.c \
37 fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \
38 fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
39 fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \
40 fs/ufs.c fs/xfs.c fs/afs.c \
42 kern/partition.c partmap/pc.c partmap/apple.c partmap/gpt.c \
43 kern/fs.c kern/env.c fs/fshelp.c disk/lvm.c disk/raid.c \
44 disk/raid5_recover.c disk/raid6_recover.c \
45 disk/mdraid_linux.c disk/dmraid_nvidia.c \
49 grub_script.tab.c grub_script.tab.h: normal/parser.y
50 $(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/normal/parser.y
51 DISTCLEANFILES += grub_script.tab.c grub_script.tab.h
54 grub_emu_init.lst: geninit.sh $(filter-out grub_emu_init.c,$(grub_emu_SOURCES))
55 rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@
56 DISTCLEANFILES += grub_emu_init.lst
58 grub_emu_init.h: grub_emu_init.lst $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) geninitheader.sh
59 rm -f $@; sh $(srcdir)/geninitheader.sh $< > $@
60 DISTCLEANFILES += grub_emu_init.h
62 grub_emu_init.c: grub_emu_init.lst $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) geninit.sh grub_emu_init.h
63 rm -f $@; sh $(srcdir)/geninit.sh $< $(filter %.c,$^) > $@
64 DISTCLEANFILES += grub_emu_init.c
67 grub_probe_init.lst: geninit.sh $(filter-out grub_probe_init.c,$(grub_probe_SOURCES))
68 rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@
69 DISTCLEANFILES += grub_probe_init.lst
71 grub_probe_init.h: grub_probe_init.lst $(filter-out grub_probe_init.c,$(grub_probe_SOURCES)) geninitheader.sh
72 rm -f $@; sh $(srcdir)/geninitheader.sh $< > $@
73 DISTCLEANFILES += grub_probe_init.h
75 grub_probe_init.c: grub_probe_init.lst $(filter-out grub_probe_init.c,$(grub_probe_SOURCES)) geninit.sh grub_probe_init.h
76 rm -f $@; sh $(srcdir)/geninit.sh $< $(filter %.c,$^) > $@
77 DISTCLEANFILES += grub_probe_init.c
80 grub_setup_init.lst: geninit.sh $(filter-out grub_setup_init.c,$(grub_setup_SOURCES))
81 rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@
82 DISTCLEANFILES += grub_setup_init.lst
84 grub_setup_init.h: grub_setup_init.lst $(filter-out grub_setup_init.c,$(grub_setup_SOURCES)) geninitheader.sh
85 rm -f $@; sh $(srcdir)/geninitheader.sh $< > $@
86 DISTCLEANFILES += grub_setup_init.h
88 grub_setup_init.c: grub_setup_init.lst $(filter-out grub_setup_init.c,$(grub_setup_SOURCES)) geninit.sh grub_setup_init.h
89 rm -f $@; sh $(srcdir)/geninit.sh $< $(filter %.c,$^) > $@
90 DISTCLEANFILES += grub_setup_init.c
93 grub_fstest_init.lst: geninit.sh $(filter-out grub_fstest_init.c,$(grub_fstest_SOURCES))
94 rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@
95 DISTCLEANFILES += grub_fstest_init.lst
97 grub_fstest_init.h: grub_fstest_init.lst $(filter-out grub_fstest_init.c,$(grub_fstest_SOURCES)) geninitheader.sh
98 rm -f $@; sh $(srcdir)/geninitheader.sh $< > $@
99 DISTCLEANFILES += grub_fstest_init.h
101 grub_fstest_init.c: grub_fstest_init.lst $(filter-out grub_fstest_init.c,$(grub_fstest_SOURCES)) geninit.sh grub_fstest_init.h
102 rm -f $@; sh $(srcdir)/geninit.sh $< $(filter %.c,$^) > $@
103 DISTCLEANFILES += grub_fstest_init.c
106 bin_UTILITIES += grub-editenv
107 grub_editenv_SOURCES = util/grub-editenv.c lib/envblk.c util/misc.c kern/misc.c kern/err.c
108 CLEANFILES += grub-editenv
111 ifeq ($(enable_grub_pe2elf), yes)
112 bin_UTILITIES += grub-pe2elf
115 grub_pe2elf_SOURCES = util/grub-pe2elf.c util/misc.c
116 CLEANFILES += grub-pe2elf
119 grub-mkconfig: util/grub-mkconfig.in config.status
120 ./config.status --file=$@:$<
122 sbin_SCRIPTS += grub-mkconfig
123 CLEANFILES += grub-mkconfig
125 grub-mkconfig_lib: util/grub-mkconfig_lib.in config.status
126 ./config.status --file=$@:$<
128 lib_DATA += grub-mkconfig_lib
129 CLEANFILES += grub-mkconfig_lib
131 update-grub_lib: util/update-grub_lib.in config.status
132 ./config.status --file=$@:$<
134 lib_DATA += update-grub_lib
135 CLEANFILES += update-grub_lib
137 %: util/grub.d/%.in config.status
138 ./config.status --file=$@:$<
140 grub-mkconfig_SCRIPTS = 00_header 10_linux 10_hurd 30_os-prober 40_custom
141 ifeq ($(target_os), cygwin)
142 grub-mkconfig_SCRIPTS += 10_windows
145 CLEANFILES += $(grub-mkconfig_SCRIPTS)
147 grub-mkconfig_DATA += util/grub.d/README
151 pkglib_MODULES += fshelp.mod fat.mod ufs.mod ext2.mod ntfs.mod \
152 ntfscomp.mod minix.mod hfs.mod jfs.mod iso9660.mod xfs.mod \
153 affs.mod sfs.mod hfsplus.mod reiserfs.mod cpio.mod udf.mod \
157 fshelp_mod_SOURCES = fs/fshelp.c
158 fshelp_mod_CFLAGS = $(COMMON_CFLAGS)
159 fshelp_mod_LDFLAGS = $(COMMON_LDFLAGS)
162 fat_mod_SOURCES = fs/fat.c
163 fat_mod_CFLAGS = $(COMMON_CFLAGS)
164 fat_mod_LDFLAGS = $(COMMON_LDFLAGS)
167 ufs_mod_SOURCES = fs/ufs.c
168 ufs_mod_CFLAGS = $(COMMON_CFLAGS)
169 ufs_mod_LDFLAGS = $(COMMON_LDFLAGS)
172 ext2_mod_SOURCES = fs/ext2.c
173 ext2_mod_CFLAGS = $(COMMON_CFLAGS)
174 ext2_mod_LDFLAGS = $(COMMON_LDFLAGS)
177 ntfs_mod_SOURCES = fs/ntfs.c
178 ntfs_mod_CFLAGS = $(COMMON_CFLAGS)
179 ntfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
182 ntfscomp_mod_SOURCES = fs/ntfscomp.c
183 ntfscomp_mod_CFLAGS = $(COMMON_CFLAGS)
184 ntfscomp_mod_LDFLAGS = $(COMMON_LDFLAGS)
187 minix_mod_SOURCES = fs/minix.c
188 minix_mod_CFLAGS = $(COMMON_CFLAGS)
189 minix_mod_LDFLAGS = $(COMMON_LDFLAGS)
192 hfs_mod_SOURCES = fs/hfs.c
193 hfs_mod_CFLAGS = $(COMMON_CFLAGS)
194 hfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
197 jfs_mod_SOURCES = fs/jfs.c
198 jfs_mod_CFLAGS = $(COMMON_CFLAGS)
199 jfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
202 iso9660_mod_SOURCES = fs/iso9660.c
203 iso9660_mod_CFLAGS = $(COMMON_CFLAGS)
204 iso9660_mod_LDFLAGS = $(COMMON_LDFLAGS)
207 xfs_mod_SOURCES = fs/xfs.c
208 xfs_mod_CFLAGS = $(COMMON_CFLAGS)
209 xfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
212 affs_mod_SOURCES = fs/affs.c
213 affs_mod_CFLAGS = $(COMMON_CFLAGS)
214 affs_mod_LDFLAGS = $(COMMON_LDFLAGS)
217 sfs_mod_SOURCES = fs/sfs.c
218 sfs_mod_CFLAGS = $(COMMON_CFLAGS)
219 sfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
222 hfsplus_mod_SOURCES = fs/hfsplus.c
223 hfsplus_mod_CFLAGS = $(COMMON_CFLAGS)
224 hfsplus_mod_LDFLAGS = $(COMMON_LDFLAGS)
227 reiserfs_mod_SOURCES = fs/reiserfs.c
228 reiserfs_mod_CFLAGS = $(COMMON_CFLAGS)
229 reiserfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
232 cpio_mod_SOURCES = fs/cpio.c
233 cpio_mod_CFLAGS = $(COMMON_CFLAGS)
234 cpio_mod_LDFLAGS = $(COMMON_LDFLAGS)
237 udf_mod_SOURCES = fs/udf.c
238 udf_mod_CFLAGS = $(COMMON_CFLAGS)
239 udf_mod_LDFLAGS = $(COMMON_LDFLAGS)
242 afs_mod_SOURCES = fs/afs.c
243 afs_mod_CFLAGS = $(COMMON_CFLAGS)
244 afs_mod_LDFLAGS = $(COMMON_LDFLAGS)
247 pkglib_MODULES += amiga.mod apple.mod pc.mod sun.mod acorn.mod gpt.mod
250 amiga_mod_SOURCES = partmap/amiga.c
251 amiga_mod_CFLAGS = $(COMMON_CFLAGS)
252 amiga_mod_LDFLAGS = $(COMMON_LDFLAGS)
255 apple_mod_SOURCES = partmap/apple.c
256 apple_mod_CFLAGS = $(COMMON_CFLAGS)
257 apple_mod_LDFLAGS = $(COMMON_LDFLAGS)
260 pc_mod_SOURCES = partmap/pc.c
261 pc_mod_CFLAGS = $(COMMON_CFLAGS)
262 pc_mod_LDFLAGS = $(COMMON_LDFLAGS)
265 sun_mod_SOURCES = partmap/sun.c
266 sun_mod_CFLAGS = $(COMMON_CFLAGS)
267 sun_mod_LDFLAGS = $(COMMON_LDFLAGS)
270 acorn_mod_SOURCES = partmap/acorn.c
271 acorn_mod_CFLAGS = $(COMMON_CFLAGS)
272 acorn_mod_LDFLAGS = $(COMMON_LDFLAGS)
275 gpt_mod_SOURCES = partmap/gpt.c
276 gpt_mod_CFLAGS = $(COMMON_CFLAGS)
277 gpt_mod_LDFLAGS = $(COMMON_LDFLAGS)
279 # Special disk structures and generic drivers
281 pkglib_MODULES += raid.mod raid5rec.mod raid6rec.mod mdraid.mod dm_nv.mod \
285 raid_mod_SOURCES = disk/raid.c
286 raid_mod_CFLAGS = $(COMMON_CFLAGS)
287 raid_mod_LDFLAGS = $(COMMON_LDFLAGS)
290 raid5rec_mod_SOURCES = disk/raid5_recover.c
291 raid5rec_mod_CFLAGS = $(COMMON_CFLAGS)
292 raid5rec_mod_LDFLAGS = $(COMMON_LDFLAGS)
295 raid6rec_mod_SOURCES = disk/raid6_recover.c
296 raid6rec_mod_CFLAGS = $(COMMON_CFLAGS)
297 raid6rec_mod_LDFLAGS = $(COMMON_LDFLAGS)
300 mdraid_mod_SOURCES = disk/mdraid_linux.c
301 mdraid_mod_CFLAGS = $(COMMON_CFLAGS)
302 mdraid_mod_LDFLAGS = $(COMMON_LDFLAGS)
305 dm_nv_mod_SOURCES = disk/dmraid_nvidia.c
306 dm_nv_mod_CFLAGS = $(COMMON_CFLAGS)
307 dm_nv_mod_LDFLAGS = $(COMMON_LDFLAGS)
310 lvm_mod_SOURCES = disk/lvm.c
311 lvm_mod_CFLAGS = $(COMMON_CFLAGS)
312 lvm_mod_LDFLAGS = $(COMMON_LDFLAGS)
315 scsi_mod_SOURCES = disk/scsi.c
316 scsi_mod_CFLAGS = $(COMMON_CFLAGS)
317 scsi_mod_LDFLAGS = $(COMMON_LDFLAGS)
320 pkglib_MODULES += hello.mod boot.mod terminal.mod ls.mod \
321 cmp.mod cat.mod help.mod font.mod search.mod \
322 loopback.mod fs_uuid.mod configfile.mod echo.mod \
323 terminfo.mod test.mod blocklist.mod hexdump.mod \
324 read.mod sleep.mod loadenv.mod crc.mod
327 hello_mod_SOURCES = hello/hello.c
328 hello_mod_CFLAGS = $(COMMON_CFLAGS)
329 hello_mod_LDFLAGS = $(COMMON_LDFLAGS)
332 boot_mod_SOURCES = commands/boot.c
333 boot_mod_CFLAGS = $(COMMON_CFLAGS)
334 boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
337 terminal_mod_SOURCES = commands/terminal.c
338 terminal_mod_CFLAGS = $(COMMON_CFLAGS)
339 terminal_mod_LDFLAGS = $(COMMON_LDFLAGS)
342 ls_mod_SOURCES = commands/ls.c
343 ls_mod_CFLAGS = $(COMMON_CFLAGS)
344 ls_mod_LDFLAGS = $(COMMON_LDFLAGS)
347 cmp_mod_SOURCES = commands/cmp.c
348 cmp_mod_CFLAGS = $(COMMON_CFLAGS)
349 cmp_mod_LDFLAGS = $(COMMON_LDFLAGS)
352 cat_mod_SOURCES = commands/cat.c
353 cat_mod_CFLAGS = $(COMMON_CFLAGS)
354 cat_mod_LDFLAGS = $(COMMON_LDFLAGS)
357 echo_mod_SOURCES = commands/echo.c
358 echo_mod_CFLAGS = $(COMMON_CFLAGS)
359 echo_mod_LDFLAGS = $(COMMON_LDFLAGS)
362 help_mod_SOURCES = commands/help.c
363 help_mod_CFLAGS = $(COMMON_CFLAGS)
364 help_mod_LDFLAGS = $(COMMON_LDFLAGS)
367 font_mod_SOURCES = font/manager.c
368 font_mod_CFLAGS = $(COMMON_CFLAGS)
369 font_mod_LDFLAGS = $(COMMON_LDFLAGS)
372 search_mod_SOURCES = commands/search.c
373 search_mod_CFLAGS = $(COMMON_CFLAGS)
374 search_mod_LDFLAGS = $(COMMON_LDFLAGS)
377 test_mod_SOURCES = commands/test.c
378 test_mod_CFLAGS = $(COMMON_CFLAGS)
379 test_mod_LDFLAGS = $(COMMON_LDFLAGS)
382 loopback_mod_SOURCES = disk/loopback.c
383 loopback_mod_CFLAGS = $(COMMON_CFLAGS)
384 loopback_mod_LDFLAGS = $(COMMON_LDFLAGS)
387 fs_uuid_mod_SOURCES = disk/fs_uuid.c
388 fs_uuid_mod_CFLAGS = $(COMMON_CFLAGS)
389 fs_uuid_mod_LDFLAGS = $(COMMON_LDFLAGS)
392 configfile_mod_SOURCES = commands/configfile.c
393 configfile_mod_CFLAGS = $(COMMON_CFLAGS)
394 configfile_mod_LDFLAGS = $(COMMON_LDFLAGS)
397 terminfo_mod_SOURCES = term/terminfo.c term/tparm.c
398 terminfo_mod_CFLAGS = $(COMMON_CFLAGS)
399 terminfo_mod_LDFLAGS = $(COMMON_LDFLAGS)
402 blocklist_mod_SOURCES = commands/blocklist.c
403 blocklist_mod_CFLAGS = $(COMMON_CFLAGS)
404 blocklist_mod_LDFLAGS = $(COMMON_LDFLAGS)
407 hexdump_mod_SOURCES = commands/hexdump.c lib/hexdump.c
408 hexdump_mod_CFLAGS = $(COMMON_CFLAGS)
409 hexdump_mod_LDFLAGS = $(COMMON_LDFLAGS)
412 read_mod_SOURCES = commands/read.c
413 read_mod_CFLAGS = $(COMMON_CFLAGS)
414 read_mod_LDFLAGS = $(COMMON_LDFLAGS)
417 sleep_mod_SOURCES = commands/sleep.c
418 sleep_mod_CFLAGS = $(COMMON_CFLAGS)
419 sleep_mod_LDFLAGS = $(COMMON_LDFLAGS)
422 loadenv_mod_SOURCES = commands/loadenv.c lib/envblk.c
423 loadenv_mod_CFLAGS = $(COMMON_CFLAGS)
424 loadenv_mod_LDFLAGS = $(COMMON_LDFLAGS)
427 crc_mod_SOURCES = commands/crc.c lib/crc.c
428 crc_mod_CFLAGS = $(COMMON_CFLAGS)
429 crc_mod_LDFLAGS = $(COMMON_LDFLAGS)
432 pkglib_MODULES += gzio.mod bufio.mod elf.mod
435 elf_mod_SOURCES = kern/elf.c
436 elf_mod_CFLAGS = $(COMMON_CFLAGS)
437 elf_mod_LDFLAGS = $(COMMON_LDFLAGS)
440 gzio_mod_SOURCES = io/gzio.c
441 gzio_mod_CFLAGS = $(COMMON_CFLAGS)
442 gzio_mod_LDFLAGS = $(COMMON_LDFLAGS)
445 bufio_mod_SOURCES = io/bufio.c
446 bufio_mod_CFLAGS = $(COMMON_CFLAGS)
447 bufio_mod_LDFLAGS = $(COMMON_LDFLAGS)