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-setup grub-emu grub-mkdevicemap grub-probe
12 grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
16 #grub_setup_SOURCES = util/i386/pc/grub-setup.c util/i386/pc/biosdisk.c \
17 # util/misc.c util/i386/pc/getroot.c kern/device.c kern/disk.c \
18 # kern/err.c kern/misc.c fs/fat.c fs/ext2.c fs/xfs.c fs/affs.c \
19 # fs/sfs.c kern/parser.c kern/partition.c partmap/pc.c \
20 # fs/ufs.c fs/minix.c fs/hfs.c fs/jfs.c fs/hfsplus.c kern/file.c \
21 # kern/fs.c kern/env.c fs/fshelp.c
23 # For grub-mkdevicemap.
24 #grub_mkdevicemap_SOURCES = util/i386/pc/grub-mkdevicemap.c util/misc.c
27 #grub_probe_SOURCES = util/i386/pc/grub-probe.c \
28 # util/i386/pc/biosdisk.c util/misc.c util/i386/pc/getroot.c \
29 # kern/device.c kern/disk.c kern/err.c kern/misc.c fs/fat.c \
30 # fs/ext2.c kern/parser.c kern/partition.c partmap/pc.c fs/ufs.c \
31 # fs/minix.c fs/hfs.c fs/jfs.c kern/fs.c kern/env.c fs/fshelp.c \
32 # fs/xfs.c fs/affs.c fs/sfs.c fs/hfsplus.c
35 grub_emu_DEPENDENCIES = grub_script.tab.c grub_script.tab.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 \
41 commands/i386/pc/halt.c commands/i386/pc/reboot.c \
43 fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c \
44 fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c fs/hfsplus.c \
46 kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
48 normal/execute.c kern/file.c kern/fs.c normal/lexer.c \
49 kern/loader.c kern/main.c kern/misc.c kern/parser.c \
50 grub_script.tab.c kern/partition.c kern/rescue.c kern/term.c \
51 normal/arg.c normal/cmdline.c normal/command.c normal/function.c\
52 normal/completion.c normal/context.c normal/main.c \
53 normal/menu.c normal/menu_entry.c normal/misc.c normal/script.c \
54 partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \
55 partmap/acorn.c partmap/gpt.c \
56 util/console.c util/grub-emu.c util/misc.c \
57 util/i386/pc/biosdisk.c util/i386/pc/getroot.c \
58 util/i386/pc/misc.c grub_emu_init.c
60 grub_emu_LDFLAGS = $(LIBCURSES)
63 #sbin_SCRIPTS = grub-install
66 #grub_install_SOURCES = util/efi/pc/grub-install.in
69 pkgdata_MODULES = kernel.mod normal.mod _chain.mod chain.mod \
73 kernel_mod_EXPORTS = no
74 kernel_mod_SOURCES = kern/i386/efi/startup.S kern/main.c kern/device.c \
75 kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
76 kern/misc.c kern/mm.c kern/loader.c kern/rescue.c kern/term.c \
77 kern/i386/dl.c kern/i386/efi/init.c kern/parser.c kern/partition.c \
78 kern/env.c symlist.c kern/efi/efi.c kern/efi/init.c kern/efi/mm.c \
79 term/efi/console.c disk/efi/efidisk.c
80 kernel_mod_HEADERS = arg.h boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
81 env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
82 partition.h pc_partition.h rescue.h symbol.h term.h types.h \
83 i386/efi/time.h efi/efi.h efi/time.h efi/disk.h
84 kernel_mod_CFLAGS = $(COMMON_CFLAGS)
85 kernel_mod_ASFLAGS = $(COMMON_ASFLAGS)
86 kernel_mod_LDFLAGS = $(COMMON_LDFLAGS)
88 MOSTLYCLEANFILES += symlist.c
89 MOSTLYCLEANFILES += symlist.c kernel_syms.lst
90 DEFSYMFILES += kernel_syms.lst
92 symlist.c: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h gensymlist.sh
93 /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
95 kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h genkernsyms.sh
96 /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
99 normal_mod_DEPENDENCIES = grub_script.tab.c grub_script.tab.h
100 normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
101 normal/completion.c normal/execute.c \
102 normal/function.c normal/lexer.c normal/main.c normal/menu.c \
103 normal/menu_entry.c normal/misc.c grub_script.tab.c \
104 normal/script.c normal/i386/setjmp.S
105 normal_mod_CFLAGS = $(COMMON_CFLAGS)
106 normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
107 normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
110 _chain_mod_SOURCES = loader/efi/chainloader.c
111 _chain_mod_CFLAGS = $(COMMON_CFLAGS)
112 _chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
115 chain_mod_SOURCES = loader/efi/chainloader_normal.c
116 chain_mod_CFLAGS = $(COMMON_CFLAGS)
117 chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
120 _linux_mod_SOURCES = loader/i386/efi/linux.c
121 _linux_mod_CFLAGS = $(COMMON_CFLAGS)
122 _linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
125 linux_mod_SOURCES = loader/i386/efi/linux_normal.c
126 linux_mod_CFLAGS = $(COMMON_CFLAGS)
127 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
129 include $(srcdir)/conf/common.mk