]>
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 | |
ddd5cee9 | 9 | #sbin_UTILITIES = grub-setup grub-emu grub-mkdevicemap grub-probe |
83709125 | 10 | |
11 | # For grub-mkimage. | |
12 | grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \ | |
13 | util/resolve.c | |
14 | ||
15 | # For grub-setup. | |
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 | |
22 | ||
23 | # For grub-mkdevicemap. | |
24 | #grub_mkdevicemap_SOURCES = util/i386/pc/grub-mkdevicemap.c util/misc.c | |
25 | ||
ddd5cee9 | 26 | # For grub-probe. |
27 | #grub_probe_SOURCES = util/i386/pc/grub-probe.c \ | |
83709125 | 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 | |
33 | ||
34 | # For grub-emu. | |
6ba4688b | 35 | grub_emu_DEPENDENCIES = grub_script.tab.c grub_script.tab.h \ |
36 | grub_modules_init.h | |
4e93851c | 37 | grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \ |
38 | commands/configfile.c commands/help.c \ | |
83709125 | 39 | commands/terminal.c commands/ls.c commands/test.c \ |
4e93851c | 40 | commands/search.c \ |
83709125 | 41 | commands/i386/pc/halt.c commands/i386/pc/reboot.c \ |
42 | disk/loopback.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 \ | |
45 | io/gzio.c \ | |
2166cc83 | 46 | kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \ |
47 | kern/err.c \ | |
83709125 | 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 | |
59 | ||
60 | grub_emu_LDFLAGS = $(LIBCURSES) | |
61 | ||
83709125 | 62 | # Scripts. |
63 | #sbin_SCRIPTS = grub-install | |
64 | ||
65 | # For grub-install. | |
66 | #grub_install_SOURCES = util/efi/pc/grub-install.in | |
67 | ||
68 | # Modules. | |
118f4fb3 | 69 | pkgdata_MODULES = kernel.mod normal.mod _chain.mod chain.mod \ |
70 | _linux.mod linux.mod | |
83709125 | 71 | |
72 | # For kernel.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 \ | |
976a4ea0 | 78 | kern/env.c symlist.c kern/efi/efi.c kern/efi/init.c kern/efi/mm.c \ |
9cacaa17 | 79 | term/efi/console.c disk/efi/efidisk.c |
2166cc83 | 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 \ | |
7f362539 | 83 | i386/efi/time.h efi/efi.h efi/time.h efi/disk.h |
83709125 | 84 | kernel_mod_CFLAGS = $(COMMON_CFLAGS) |
85 | kernel_mod_ASFLAGS = $(COMMON_ASFLAGS) | |
86 | kernel_mod_LDFLAGS = $(COMMON_LDFLAGS) | |
87 | ||
88 | MOSTLYCLEANFILES += symlist.c | |
89 | MOSTLYCLEANFILES += symlist.c kernel_syms.lst | |
90 | DEFSYMFILES += kernel_syms.lst | |
91 | ||
7b455f4d | 92 | symlist.c: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h gensymlist.sh |
93 | /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1) | |
83709125 | 94 | |
7b455f4d | 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) | |
83709125 | 97 | |
98 | # For normal.mod. | |
6ba4688b | 99 | normal_mod_DEPENDENCIES = grub_script.tab.c grub_script.tab.h |
83709125 | 100 | normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \ |
4e93851c | 101 | normal/completion.c normal/execute.c \ |
83709125 | 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) | |
108 | ||
7f362539 | 109 | # For _chain.mod. |
110 | _chain_mod_SOURCES = loader/efi/chainloader.c | |
111 | _chain_mod_CFLAGS = $(COMMON_CFLAGS) | |
112 | _chain_mod_LDFLAGS = $(COMMON_LDFLAGS) | |
113 | ||
114 | # For chain.mod. | |
115 | chain_mod_SOURCES = loader/efi/chainloader_normal.c | |
116 | chain_mod_CFLAGS = $(COMMON_CFLAGS) | |
117 | chain_mod_LDFLAGS = $(COMMON_LDFLAGS) | |
118 | ||
118f4fb3 | 119 | # For _linux.mod. |
120 | _linux_mod_SOURCES = loader/i386/efi/linux.c | |
121 | _linux_mod_CFLAGS = $(COMMON_CFLAGS) | |
122 | _linux_mod_LDFLAGS = $(COMMON_LDFLAGS) | |
123 | ||
124 | # For linux.mod. | |
125 | linux_mod_SOURCES = loader/i386/efi/linux_normal.c | |
126 | linux_mod_CFLAGS = $(COMMON_CFLAGS) | |
127 | linux_mod_LDFLAGS = $(COMMON_LDFLAGS) | |
128 | ||
83709125 | 129 | include $(srcdir)/conf/common.mk |