2009-11-23 15:31:54 +00:00
|
|
|
# -*- makefile -*-
|
|
|
|
|
|
|
|
# Used by various components. These rules need to precede them.
|
2010-01-22 13:37:27 +00:00
|
|
|
script/lexer.c_DEPENDENCIES = grub_script.tab.h grub_script.yy.h
|
2009-11-23 15:31:54 +00:00
|
|
|
|
|
|
|
sbin_UTILITIES += grub-emu
|
|
|
|
util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
|
|
|
|
grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
|
|
|
|
commands/configfile.c commands/echo.c commands/help.c \
|
|
|
|
commands/handler.c commands/ls.c commands/test.c \
|
2009-11-25 22:50:54 +00:00
|
|
|
commands/search_wrap.c commands/search_file.c \
|
|
|
|
commands/search_label.c commands/search_uuid.c \
|
|
|
|
commands/blocklist.c commands/hexdump.c \
|
2009-11-23 15:31:54 +00:00
|
|
|
lib/hexdump.c commands/halt.c commands/reboot.c \
|
|
|
|
lib/envblk.c commands/loadenv.c \
|
|
|
|
commands/gptsync.c commands/probe.c commands/xnu_uuid.c \
|
|
|
|
commands/password.c commands/keystatus.c \
|
|
|
|
disk/host.c disk/loopback.c disk/scsi.c \
|
2009-11-26 00:08:42 +00:00
|
|
|
fs/fshelp.c \
|
2009-11-23 15:31:54 +00:00
|
|
|
\
|
|
|
|
io/gzio.c \
|
|
|
|
kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
|
|
|
|
kern/err.c kern/list.c kern/handler.c \
|
|
|
|
kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c \
|
|
|
|
kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
|
2010-01-10 00:47:19 +00:00
|
|
|
kern/partition.c kern/term.c \
|
2009-11-23 15:31:54 +00:00
|
|
|
kern/rescue_reader.c kern/rescue_parser.c \
|
|
|
|
lib/arg.c normal/cmdline.c normal/datetime.c normal/misc.c \
|
2009-11-24 01:54:35 +00:00
|
|
|
normal/handler.c normal/auth.c lib/crypto.c normal/autofs.c \
|
2009-11-23 15:31:54 +00:00
|
|
|
normal/completion.c normal/main.c normal/color.c \
|
2010-01-07 21:18:59 +00:00
|
|
|
normal/menu.c normal/menu_entry.c \
|
2009-12-23 23:38:41 +00:00
|
|
|
normal/menu_text.c normal/crypto.c normal/term.c \
|
2010-01-20 20:31:39 +00:00
|
|
|
commands/terminal.c normal/context.c lib/charset.c \
|
2009-11-26 00:08:42 +00:00
|
|
|
script/main.c script/execute.c script/function.c \
|
2009-11-23 15:37:33 +00:00
|
|
|
script/lexer.c script/script.c grub_script.tab.c \
|
2010-01-22 13:37:27 +00:00
|
|
|
grub_script.yy.c \
|
|
|
|
\
|
2009-11-23 15:31:54 +00:00
|
|
|
partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \
|
|
|
|
partmap/acorn.c partmap/gpt.c \
|
|
|
|
\
|
|
|
|
fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \
|
|
|
|
fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
|
|
|
|
fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \
|
|
|
|
fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c \
|
2009-11-26 00:08:42 +00:00
|
|
|
fs/befs.c fs/befs_be.c fs/tar.c \
|
2009-11-23 15:31:54 +00:00
|
|
|
\
|
|
|
|
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
|
|
|
|
util/hostdisk.c util/getroot.c \
|
|
|
|
\
|
|
|
|
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
|
|
|
|
disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
|
|
|
|
commands/parttool.c parttool/msdospart.c \
|
2009-12-05 19:45:32 +00:00
|
|
|
lib/libgcrypt-grub/cipher/md5.c \
|
2009-11-26 00:08:42 +00:00
|
|
|
grub_emu_init.c gnulib/progname.c
|
2009-12-05 19:45:32 +00:00
|
|
|
grub_emu_CFLAGS += -Wno-missing-field-initializers -Wno-error -I$(srcdir)/lib/libgcrypt_wrap
|
|
|
|
|
2009-11-23 15:31:54 +00:00
|
|
|
|
|
|
|
ifeq ($(target_cpu), i386)
|
|
|
|
grub_emu_SOURCES += commands/i386/cpuid.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
grub_emu_LDFLAGS = $(LIBCURSES)
|
|
|
|
|
|
|
|
ifeq ($(enable_grub_emu_usb), yes)
|
|
|
|
grub_emu_SOURCES += disk/usbms.c util/usb.c bus/usb/usb.c \
|
|
|
|
commands/usbtest.c
|
|
|
|
grub_emu_LDFLAGS += $(LIBCURSES) $(LIBUSB)
|
|
|
|
endif
|
2009-11-25 14:15:30 +00:00
|
|
|
|
|
|
|
ifeq ($(enable_grub_emu_pci), yes)
|
|
|
|
grub_emu_SOURCES += util/pci.c commands/lspci.c
|
|
|
|
grub_emu_LDFLAGS += $(LIBPCIACCESS)
|
|
|
|
endif
|
2009-11-23 15:31:54 +00:00
|
|
|
|
|
|
|
grub_emu_init.lst: geninit.sh $(filter-out grub_emu_init.c,$(grub_emu_SOURCES))
|
|
|
|
rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@
|
|
|
|
DISTCLEANFILES += grub_emu_init.lst
|
|
|
|
|
|
|
|
grub_emu_init.h: grub_emu_init.lst $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) geninitheader.sh
|
|
|
|
rm -f $@; sh $(srcdir)/geninitheader.sh $< > $@
|
|
|
|
DISTCLEANFILES += grub_emu_init.h
|
|
|
|
|
|
|
|
grub_emu_init.c: grub_emu_init.lst $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) geninit.sh grub_emu_init.h
|
|
|
|
rm -f $@; sh $(srcdir)/geninit.sh $< $(filter %.c,$^) > $@
|
|
|
|
DISTCLEANFILES += grub_emu_init.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# FIXME: this could be shared with common.rmk
|
|
|
|
|
|
|
|
# For grub-mkfont.
|
|
|
|
ifeq ($(enable_grub_mkfont), yes)
|
|
|
|
bin_UTILITIES += grub-mkfont
|
2009-11-25 23:52:55 +00:00
|
|
|
grub_mkfont_SOURCES = gnulib/progname.c util/grub-mkfont.c util/misc.c
|
2009-11-23 15:31:54 +00:00
|
|
|
grub_mkfont_CFLAGS = $(freetype_cflags)
|
|
|
|
grub_mkfont_LDFLAGS = $(freetype_libs)
|
|
|
|
endif
|
|
|
|
|
2009-11-23 15:37:33 +00:00
|
|
|
grub_script.tab.c grub_script.tab.h: script/parser.y
|
|
|
|
$(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/script/parser.y
|
2009-11-23 15:31:54 +00:00
|
|
|
DISTCLEANFILES += grub_script.tab.c grub_script.tab.h
|
2010-01-20 14:26:31 +00:00
|
|
|
|
2010-01-22 13:37:27 +00:00
|
|
|
grub_script.yy.c grub_script.yy.h: script/yylex.l
|
|
|
|
$(LEX) -o grub_script.yy.c --header-file=grub_script.yy.h $(srcdir)/script/yylex.l
|
|
|
|
sed -i 's/^#include.*\(<stdio\.h>\|<string\.h>\|<errno\.h>\|<stdlib\.h>\|<unistd\.h>\)//g' grub_script.yy.h
|
|
|
|
sed -i 's/^#include.*\(<stdio\.h>\|<string\.h>\|<errno\.h>\|<stdlib\.h>\|<unistd\.h>\)//g' grub_script.yy.c
|
|
|
|
DISTCLEANFILES += grub_script.yy.c grub_script.yy.h
|
|
|
|
|
2010-01-20 14:26:31 +00:00
|
|
|
bin_UTILITIES += grub-bin2h
|
|
|
|
grub_bin2h_SOURCES = gnulib/progname.c util/bin2h.c
|