3 COMMON_ASFLAGS = -nostdinc -fno-builtin -m64
4 COMMON_CFLAGS = -fno-builtin -m64
5 COMMON_LDFLAGS = -melf_x86_64 -nostdlib
7 # Used by various components. These rules need to precede them.
8 normal/execute.c_DEPENDENCIES = grub_script.tab.h
9 normal/command.c_DEPENDENCIES = grub_script.tab.h
10 normal/function.c_DEPENDENCIES = grub_script.tab.h
11 normal/lexer.c_DEPENDENCIES = grub_script.tab.h
14 bin_UTILITIES = grub-mkimage
15 #sbin_UTILITIES = grub-mkdevicemap
16 #ifeq ($(enable_grub_emu), yes)
17 #sbin_UTILITIES += grub-emu
21 grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
25 #grub_setup_SOURCES = util/i386/pc/grub-setup.c util/hostdisk.c \
26 # util/misc.c util/getroot.c kern/device.c kern/disk.c \
27 # kern/err.c kern/misc.c fs/fat.c fs/ext2.c fs/xfs.c fs/affs.c \
28 # fs/sfs.c kern/parser.c kern/partition.c partmap/pc.c \
29 # fs/ufs.c fs/minix.c fs/hfs.c fs/jfs.c fs/hfsplus.c kern/file.c \
30 # kern/fs.c kern/env.c fs/fshelp.c
32 # For grub-mkdevicemap.
33 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c
36 util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
37 grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \
38 commands/configfile.c commands/help.c \
39 commands/terminal.c commands/ls.c commands/test.c \
40 commands/search.c commands/hexdump.c lib/hexdump.c \
41 commands/halt.c commands/reboot.c \
42 commands/i386/cpuid.c \
45 fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \
46 fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
47 fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \
48 fs/ufs.c fs/xfs.c fs/afs.c \
51 kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
53 normal/execute.c kern/file.c kern/fs.c normal/lexer.c \
54 kern/loader.c kern/main.c kern/misc.c kern/parser.c \
55 grub_script.tab.c kern/partition.c kern/rescue.c kern/term.c \
56 normal/arg.c normal/cmdline.c normal/command.c normal/function.c\
57 normal/completion.c normal/context.c normal/main.c \
58 normal/menu.c normal/menu_entry.c normal/misc.c normal/script.c \
60 partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \
61 partmap/acorn.c partmap/gpt.c \
62 util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
63 util/hostdisk.c util/getroot.c \
66 disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
67 disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
70 grub_emu_LDFLAGS = $(LIBCURSES)
73 sbin_SCRIPTS = grub-install
76 grub_install_SOURCES = util/i386/efi/grub-install.in
79 pkglib_MODULES = kernel.mod normal.mod _chain.mod chain.mod appleldr.mod \
80 halt.mod reboot.mod _linux.mod linux.mod pci.mod lspci.mod \
81 datetime.mod date.mod datehook.mod
84 kernel_mod_EXPORTS = no
85 kernel_mod_SOURCES = kern/x86_64/efi/startup.S kern/x86_64/efi/callwrap.S \
86 kern/main.c kern/device.c \
87 kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
88 kern/misc.c kern/mm.c kern/loader.c kern/rescue.c kern/term.c \
89 kern/x86_64/dl.c kern/i386/efi/init.c kern/parser.c kern/partition.c \
90 kern/env.c symlist.c kern/efi/efi.c kern/efi/init.c kern/efi/mm.c \
92 kern/i386/tsc.c kern/i386/pit.c \
93 kern/generic/millisleep.c kern/generic/rtc_get_time_ms.c \
94 term/efi/console.c disk/efi/efidisk.c
95 kernel_mod_HEADERS = arg.h boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
96 env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
97 partition.h pc_partition.h rescue.h symbol.h term.h time.h types.h \
98 efi/efi.h efi/time.h efi/disk.h machine/loader.h
99 kernel_mod_CFLAGS = $(COMMON_CFLAGS)
100 kernel_mod_ASFLAGS = $(COMMON_ASFLAGS)
101 kernel_mod_LDFLAGS = $(COMMON_LDFLAGS)
103 MOSTLYCLEANFILES += symlist.c
104 MOSTLYCLEANFILES += symlist.c kernel_syms.lst
105 DEFSYMFILES += kernel_syms.lst
107 symlist.c: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h gensymlist.sh
108 /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
110 kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h genkernsyms.sh
111 /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
114 normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
115 normal/completion.c normal/execute.c \
116 normal/function.c normal/lexer.c normal/main.c normal/menu.c \
117 normal/menu_entry.c normal/misc.c grub_script.tab.c \
118 normal/script.c normal/x86_64/setjmp.S normal/color.c
119 normal_mod_CFLAGS = $(COMMON_CFLAGS)
120 normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
121 normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
124 _chain_mod_SOURCES = loader/efi/chainloader.c
125 _chain_mod_CFLAGS = $(COMMON_CFLAGS)
126 _chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
129 chain_mod_SOURCES = loader/efi/chainloader_normal.c
130 chain_mod_CFLAGS = $(COMMON_CFLAGS)
131 chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
134 appleldr_mod_SOURCES = loader/efi/appleloader.c
135 appleldr_mod_CFLAGS = $(COMMON_CFLAGS)
136 appleldr_mod_LDFLAGS = $(COMMON_LDFLAGS)
139 _linux_mod_SOURCES = loader/i386/efi/linux.c
140 _linux_mod_CFLAGS = $(COMMON_CFLAGS)
141 _linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
144 linux_mod_SOURCES = loader/linux_normal.c
145 linux_mod_CFLAGS = $(COMMON_CFLAGS)
146 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
149 halt_mod_SOURCES = commands/halt.c
150 halt_mod_CFLAGS = $(COMMON_CFLAGS)
151 halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
154 reboot_mod_SOURCES = commands/reboot.c
155 reboot_mod_CFLAGS = $(COMMON_CFLAGS)
156 reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
159 pci_mod_SOURCES = bus/pci.c
160 pci_mod_CFLAGS = $(COMMON_CFLAGS)
161 pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
164 lspci_mod_SOURCES = commands/lspci.c
165 lspci_mod_CFLAGS = $(COMMON_CFLAGS)
166 lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
169 datetime_mod_SOURCES = lib/datetime.c lib/efi/datetime.c
170 datetime_mod_CFLAGS = $(COMMON_CFLAGS)
171 datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
174 date_mod_SOURCES = commands/date.c
175 date_mod_CFLAGS = $(COMMON_CFLAGS)
176 date_mod_LDFLAGS = $(COMMON_LDFLAGS)
179 datehook_mod_SOURCES = hook/datehook.c
180 datehook_mod_CFLAGS = $(COMMON_CFLAGS)
181 datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
183 include $(srcdir)/conf/i386.mk
184 include $(srcdir)/conf/common.mk