3 COMMON_ASFLAGS = -nostdinc -fno-builtin -m32
4 COMMON_CFLAGS = -fno-builtin -m32
5 COMMON_LDFLAGS = -melf_i386 -nostdlib
8 bin_UTILITIES = grub-mkimage
9 sbin_UTILITIES = grub-mkdevicemap grub-probe
10 #ifeq ($(enable_grub_emu), yes)
11 #sbin_UTILITIES += grub-emu
15 grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
19 #grub_setup_SOURCES = util/i386/pc/grub-setup.c util/biosdisk.c \
20 # util/misc.c util/getroot.c kern/device.c kern/disk.c \
21 # kern/err.c kern/misc.c fs/fat.c fs/ext2.c fs/xfs.c fs/affs.c \
22 # fs/sfs.c kern/parser.c kern/partition.c partmap/pc.c \
23 # fs/ufs.c fs/minix.c fs/hfs.c fs/jfs.c fs/hfsplus.c kern/file.c \
24 # kern/fs.c kern/env.c fs/fshelp.c
26 # For grub-mkdevicemap.
27 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c \
28 util/i386/get_disk_name.c
31 util/grub-probe.c_DEPENDENCIES = grub_probe_init.h
32 grub_probe_SOURCES = util/grub-probe.c \
33 util/biosdisk.c util/misc.c util/getroot.c \
34 kern/device.c kern/disk.c kern/err.c kern/misc.c fs/fat.c \
35 fs/ext2.c kern/parser.c kern/partition.c \
36 partmap/pc.c partmap/apple.c partmap/gpt.c \
37 fs/ufs.c fs/minix.c fs/hfs.c fs/jfs.c fs/ntfs.c kern/fs.c \
38 kern/env.c fs/fshelp.c fs/xfs.c fs/affs.c fs/sfs.c fs/hfsplus.c \
39 disk/lvm.c disk/raid.c grub_probe_init.c
42 grub_emu_DEPENDENCIES = grub_script.tab.c grub_script.tab.h \
44 grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \
45 commands/configfile.c commands/help.c \
46 commands/terminal.c commands/ls.c commands/test.c \
48 commands/i386/pc/halt.c commands/i386/pc/reboot.c \
49 commands/i386/cpuid.c \
51 fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c \
52 fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c fs/hfsplus.c \
55 kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
57 normal/execute.c kern/file.c kern/fs.c normal/lexer.c \
58 kern/loader.c kern/main.c kern/misc.c kern/parser.c \
59 grub_script.tab.c kern/partition.c kern/rescue.c kern/term.c \
60 normal/arg.c normal/cmdline.c normal/command.c normal/function.c\
61 normal/completion.c normal/context.c normal/main.c \
62 normal/menu.c normal/menu_entry.c normal/misc.c normal/script.c \
63 partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \
64 partmap/acorn.c partmap/gpt.c \
65 util/console.c util/grub-emu.c util/misc.c \
66 util/biosdisk.c util/getroot.c \
67 util/i386/pc/misc.c grub_emu_init.c
69 grub_emu_LDFLAGS = $(LIBCURSES)
72 sbin_SCRIPTS = grub-install
75 grub_install_SOURCES = util/i386/efi/grub-install.in
78 pkgdata_MODULES = kernel.mod normal.mod _chain.mod chain.mod \
79 _linux.mod linux.mod cpuid.mod
82 kernel_mod_EXPORTS = no
83 kernel_mod_SOURCES = kern/i386/efi/startup.S kern/main.c kern/device.c \
84 kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
85 kern/misc.c kern/mm.c kern/loader.c kern/rescue.c kern/term.c \
86 kern/i386/dl.c kern/i386/efi/init.c kern/parser.c kern/partition.c \
87 kern/env.c symlist.c kern/efi/efi.c kern/efi/init.c kern/efi/mm.c \
88 term/efi/console.c disk/efi/efidisk.c
89 kernel_mod_HEADERS = arg.h boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
90 env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
91 partition.h pc_partition.h rescue.h symbol.h term.h types.h \
92 i386/efi/time.h efi/efi.h efi/time.h efi/disk.h
93 kernel_mod_CFLAGS = $(COMMON_CFLAGS)
94 kernel_mod_ASFLAGS = $(COMMON_ASFLAGS)
95 kernel_mod_LDFLAGS = $(COMMON_LDFLAGS)
97 MOSTLYCLEANFILES += symlist.c
98 MOSTLYCLEANFILES += symlist.c kernel_syms.lst
99 DEFSYMFILES += kernel_syms.lst
101 symlist.c: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h gensymlist.sh
102 /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
104 kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h genkernsyms.sh
105 /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
108 normal_mod_DEPENDENCIES = grub_script.tab.c grub_script.tab.h
109 normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
110 normal/completion.c normal/execute.c \
111 normal/function.c normal/lexer.c normal/main.c normal/menu.c \
112 normal/menu_entry.c normal/misc.c grub_script.tab.c \
113 normal/script.c normal/i386/setjmp.S
114 normal_mod_CFLAGS = $(COMMON_CFLAGS)
115 normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
116 normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
119 _chain_mod_SOURCES = loader/efi/chainloader.c
120 _chain_mod_CFLAGS = $(COMMON_CFLAGS)
121 _chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
124 chain_mod_SOURCES = loader/efi/chainloader_normal.c
125 chain_mod_CFLAGS = $(COMMON_CFLAGS)
126 chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
129 _linux_mod_SOURCES = loader/i386/efi/linux.c
130 _linux_mod_CFLAGS = $(COMMON_CFLAGS)
131 _linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
134 linux_mod_SOURCES = loader/i386/efi/linux_normal.c
135 linux_mod_CFLAGS = $(COMMON_CFLAGS)
136 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
139 cpuid_mod_SOURCES = commands/i386/cpuid.c
140 cpuid_mod_CFLAGS = $(COMMON_CFLAGS)
141 cpuid_mod_LDFLAGS = $(COMMON_LDFLAGS)
143 include $(srcdir)/conf/common.mk