]> git.proxmox.com Git - grub2.git/blob - conf/any-emu.rmk
2010-01-07 Vladimir Serbinenko <phcoder@gmail.com>
[grub2.git] / conf / any-emu.rmk
1 # -*- makefile -*-
2
3 # Used by various components. These rules need to precede them.
4 script/lexer.c_DEPENDENCIES = grub_script.tab.h
5
6 sbin_UTILITIES += grub-emu
7 util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
8 grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
9 commands/configfile.c commands/echo.c commands/help.c \
10 commands/handler.c commands/ls.c commands/test.c \
11 commands/search_wrap.c commands/search_file.c \
12 commands/search_label.c commands/search_uuid.c \
13 commands/blocklist.c commands/hexdump.c \
14 lib/hexdump.c commands/halt.c commands/reboot.c \
15 lib/envblk.c commands/loadenv.c \
16 commands/gptsync.c commands/probe.c commands/xnu_uuid.c \
17 commands/password.c commands/keystatus.c \
18 disk/host.c disk/loopback.c disk/scsi.c \
19 fs/fshelp.c \
20 \
21 io/gzio.c \
22 kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
23 kern/err.c kern/list.c kern/handler.c \
24 kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c \
25 kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
26 kern/partition.c kern/reader.c kern/term.c \
27 kern/rescue_reader.c kern/rescue_parser.c \
28 lib/arg.c normal/cmdline.c normal/datetime.c normal/misc.c \
29 normal/handler.c normal/auth.c lib/crypto.c normal/autofs.c \
30 normal/completion.c normal/main.c normal/color.c \
31 normal/menu.c normal/menu_entry.c normal/menu_viewer.c \
32 normal/menu_text.c normal/crypto.c \
33 script/main.c script/execute.c script/function.c \
34 script/lexer.c script/script.c grub_script.tab.c \
35 partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \
36 partmap/acorn.c partmap/gpt.c \
37 \
38 fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \
39 fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
40 fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \
41 fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c \
42 fs/befs.c fs/befs_be.c fs/tar.c \
43 \
44 util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
45 util/hostdisk.c util/getroot.c \
46 \
47 disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
48 disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
49 commands/parttool.c parttool/msdospart.c \
50 lib/libgcrypt-grub/cipher/md5.c \
51 grub_emu_init.c gnulib/progname.c
52 grub_emu_CFLAGS += -Wno-missing-field-initializers -Wno-error -I$(srcdir)/lib/libgcrypt_wrap
53
54
55 ifeq ($(target_cpu), i386)
56 grub_emu_SOURCES += commands/i386/cpuid.c
57 endif
58
59 grub_emu_LDFLAGS = $(LIBCURSES)
60
61 ifeq ($(enable_grub_emu_usb), yes)
62 grub_emu_SOURCES += disk/usbms.c util/usb.c bus/usb/usb.c \
63 commands/usbtest.c
64 grub_emu_LDFLAGS += $(LIBCURSES) $(LIBUSB)
65 endif
66
67 ifeq ($(enable_grub_emu_pci), yes)
68 grub_emu_SOURCES += util/pci.c commands/lspci.c
69 grub_emu_LDFLAGS += $(LIBPCIACCESS)
70 endif
71
72 grub_emu_init.lst: geninit.sh $(filter-out grub_emu_init.c,$(grub_emu_SOURCES))
73 rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@
74 DISTCLEANFILES += grub_emu_init.lst
75
76 grub_emu_init.h: grub_emu_init.lst $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) geninitheader.sh
77 rm -f $@; sh $(srcdir)/geninitheader.sh $< > $@
78 DISTCLEANFILES += grub_emu_init.h
79
80 grub_emu_init.c: grub_emu_init.lst $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) geninit.sh grub_emu_init.h
81 rm -f $@; sh $(srcdir)/geninit.sh $< $(filter %.c,$^) > $@
82 DISTCLEANFILES += grub_emu_init.c
83
84
85
86
87 # FIXME: this could be shared with common.rmk
88
89 # For grub-mkfont.
90 ifeq ($(enable_grub_mkfont), yes)
91 bin_UTILITIES += grub-mkfont
92 grub_mkfont_SOURCES = gnulib/progname.c util/grub-mkfont.c util/misc.c
93 grub_mkfont_CFLAGS = $(freetype_cflags)
94 grub_mkfont_LDFLAGS = $(freetype_libs)
95 endif
96
97 grub_script.tab.c grub_script.tab.h: script/parser.y
98 $(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/script/parser.y
99 DISTCLEANFILES += grub_script.tab.c grub_script.tab.h