]>
Commit | Line | Data |
---|---|---|
83709125 | 1 | # -*- makefile -*- |
2 | ||
3 | COMMON_ASFLAGS = -nostdinc -fno-builtin -m32 | |
4 | COMMON_CFLAGS = -fno-builtin -m32 | |
ff04ec24 | 5 | COMMON_LDFLAGS = -melf_i386 -nostdlib |
83709125 | 6 | |
7 | # Utilities. | |
8 | bin_UTILITIES = grub-mkimage | |
46b9d128 | 9 | sbin_UTILITIES = grub-mkdevicemap grub-probe |
4fe9862e | 10 | #ifeq ($(enable_grub_emu), yes) |
11 | #sbin_UTILITIES += grub-emu | |
12 | #endif | |
83709125 | 13 | |
14 | # For grub-mkimage. | |
15 | grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \ | |
16 | util/resolve.c | |
17 | ||
18 | # For grub-setup. | |
3572d015 | 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 \ | |
83709125 | 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 | |
25 | ||
26 | # For grub-mkdevicemap. | |
29d0928c | 27 | grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c \ |
28 | util/i386/get_disk_name.c | |
83709125 | 29 | |
ddd5cee9 | 30 | # For grub-probe. |
38da6516 | 31 | util/grub-probe.c_DEPENDENCIES = grub_probe_init.h |
46b9d128 | 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 \ | |
fb36dc26 | 35 | fs/ext2.c kern/parser.c kern/partition.c \ |
36 | partmap/pc.c partmap/apple.c partmap/gpt.c \ | |
8f096014 | 37 | fs/ufs.c fs/minix.c fs/hfs.c fs/jfs.c fs/ntfs.c kern/fs.c \ |
46b9d128 | 38 | kern/env.c fs/fshelp.c fs/xfs.c fs/affs.c fs/sfs.c fs/hfsplus.c \ |
daf0f0ba | 39 | disk/lvm.c disk/raid.c grub_probe_init.c |
83709125 | 40 | |
41 | # For grub-emu. | |
6ba4688b | 42 | grub_emu_DEPENDENCIES = grub_script.tab.c grub_script.tab.h \ |
daf0f0ba | 43 | grub_emu_init.h |
4e93851c | 44 | grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \ |
45 | commands/configfile.c commands/help.c \ | |
83709125 | 46 | commands/terminal.c commands/ls.c commands/test.c \ |
c405c391 | 47 | commands/search.c commands/hexdump.c \ |
83709125 | 48 | commands/i386/pc/halt.c commands/i386/pc/reboot.c \ |
5beb2291 | 49 | commands/i386/cpuid.c \ |
83709125 | 50 | disk/loopback.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 \ | |
8f096014 | 53 | fs/ntfs.c \ |
83709125 | 54 | io/gzio.c \ |
2166cc83 | 55 | kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \ |
56 | kern/err.c \ | |
83709125 | 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 \ | |
1a477ed6 | 65 | util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ |
46b9d128 | 66 | util/biosdisk.c util/getroot.c \ |
83709125 | 67 | util/i386/pc/misc.c grub_emu_init.c |
68 | ||
69 | grub_emu_LDFLAGS = $(LIBCURSES) | |
70 | ||
83709125 | 71 | # Scripts. |
46b9d128 | 72 | sbin_SCRIPTS = grub-install |
83709125 | 73 | |
74 | # For grub-install. | |
46b9d128 | 75 | grub_install_SOURCES = util/i386/efi/grub-install.in |
83709125 | 76 | |
77 | # Modules. | |
118f4fb3 | 78 | pkgdata_MODULES = kernel.mod normal.mod _chain.mod chain.mod \ |
5beb2291 | 79 | _linux.mod linux.mod cpuid.mod |
83709125 | 80 | |
81 | # For kernel.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 \ | |
976a4ea0 | 87 | kern/env.c symlist.c kern/efi/efi.c kern/efi/init.c kern/efi/mm.c \ |
9cacaa17 | 88 | term/efi/console.c disk/efi/efidisk.c |
2166cc83 | 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 \ | |
3381d274 | 91 | partition.h pc_partition.h rescue.h symbol.h term.h time.h types.h \ |
92 | efi/efi.h efi/time.h efi/disk.h | |
83709125 | 93 | kernel_mod_CFLAGS = $(COMMON_CFLAGS) |
94 | kernel_mod_ASFLAGS = $(COMMON_ASFLAGS) | |
95 | kernel_mod_LDFLAGS = $(COMMON_LDFLAGS) | |
96 | ||
97 | MOSTLYCLEANFILES += symlist.c | |
98 | MOSTLYCLEANFILES += symlist.c kernel_syms.lst | |
99 | DEFSYMFILES += kernel_syms.lst | |
100 | ||
7b455f4d | 101 | symlist.c: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h gensymlist.sh |
102 | /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1) | |
83709125 | 103 | |
7b455f4d | 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) | |
83709125 | 106 | |
107 | # For normal.mod. | |
6ba4688b | 108 | normal_mod_DEPENDENCIES = grub_script.tab.c grub_script.tab.h |
83709125 | 109 | normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \ |
4e93851c | 110 | normal/completion.c normal/execute.c \ |
83709125 | 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) | |
117 | ||
7f362539 | 118 | # For _chain.mod. |
119 | _chain_mod_SOURCES = loader/efi/chainloader.c | |
120 | _chain_mod_CFLAGS = $(COMMON_CFLAGS) | |
121 | _chain_mod_LDFLAGS = $(COMMON_LDFLAGS) | |
122 | ||
123 | # For chain.mod. | |
124 | chain_mod_SOURCES = loader/efi/chainloader_normal.c | |
125 | chain_mod_CFLAGS = $(COMMON_CFLAGS) | |
126 | chain_mod_LDFLAGS = $(COMMON_LDFLAGS) | |
127 | ||
118f4fb3 | 128 | # For _linux.mod. |
129 | _linux_mod_SOURCES = loader/i386/efi/linux.c | |
130 | _linux_mod_CFLAGS = $(COMMON_CFLAGS) | |
131 | _linux_mod_LDFLAGS = $(COMMON_LDFLAGS) | |
132 | ||
133 | # For linux.mod. | |
134 | linux_mod_SOURCES = loader/i386/efi/linux_normal.c | |
135 | linux_mod_CFLAGS = $(COMMON_CFLAGS) | |
136 | linux_mod_LDFLAGS = $(COMMON_LDFLAGS) | |
137 | ||
5beb2291 | 138 | # For cpuid.mod. |
139 | cpuid_mod_SOURCES = commands/i386/cpuid.c | |
140 | cpuid_mod_CFLAGS = $(COMMON_CFLAGS) | |
141 | cpuid_mod_LDFLAGS = $(COMMON_LDFLAGS) | |
142 | ||
83709125 | 143 | include $(srcdir)/conf/common.mk |