]>
Commit | Line | Data |
---|---|---|
e56cdf21 | 1 | |
2 | # -*- makefile -*- | |
3 | ||
9304c1f8 | 4 | COMMON_ASFLAGS = -nostdinc -D__ASSEMBLY__ |
5 | COMMON_CFLAGS = -ffreestanding -msoft-float | |
e56cdf21 | 6 | |
7 | # Images. | |
8 | ||
e4b47e0c | 9 | MOSTLYCLEANFILES += grubof_symlist.c kernel_syms.lst |
e56cdf21 | 10 | DEFSYMFILES += kernel_syms.lst |
11 | ||
e4b47e0c | 12 | grubof_HEADERS = arg.h boot.h device.h disk.h dl.h elf.h env.h err.h \ |
04ccf3ec | 13 | file.h fs.h kernel.h misc.h mm.h net.h parser.h rescue.h symbol.h \ |
f4c5e67c | 14 | term.h types.h powerpc/libgcc.h loader.h \ |
3be7266d | 15 | partition.h pc_partition.h ieee1275/ieee1275.h machine/time.h \ |
16 | machine/kernel.h | |
e4b47e0c | 17 | |
18 | grubof_symlist.c: $(addprefix include/grub/,$(grubof_HEADERS)) gensymlist.sh | |
e56cdf21 | 19 | sh $(srcdir)/gensymlist.sh $(filter %.h,$^) > $@ |
20 | ||
e4b47e0c | 21 | kernel_syms.lst: $(addprefix include/grub/,$(grubof_HEADERS)) genkernsyms.sh |
e56cdf21 | 22 | sh $(srcdir)/genkernsyms.sh $(filter %h,$^) > $@ |
23 | ||
b6b32745 | 24 | # For the parser. |
25 | grub_script.tab.c: normal/parser.y | |
26 | $(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/normal/parser.y | |
27 | grub_script.tab.h: normal/parser.y | |
28 | $(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/normal/parser.y | |
29 | ||
924b6140 | 30 | # Programs |
31 | pkgdata_PROGRAMS = grubof | |
32 | ||
e56cdf21 | 33 | # Utilities. |
4b60267d | 34 | bin_UTILITIES = grub-emu |
35 | sbin_UTILITIES = grub-mkimage | |
e56cdf21 | 36 | noinst_UTILITIES = genmoddep |
37 | ||
0b412211 | 38 | # For grub-mkimage. |
39 | grub_mkimage_SOURCES = util/powerpc/ieee1275/grub-mkimage.c util/misc.c \ | |
40 | util/resolve.c | |
41 | ||
4b13b216 | 42 | # For grub-emu |
93f3a1d8 | 43 | grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \ |
062aaf39 | 44 | commands/configfile.c commands/default.c commands/help.c \ |
b6b32745 | 45 | commands/search.c commands/terminal.c commands/test.c \ |
46 | commands/ls.c commands/timeout.c \ | |
a5ce3a4a | 47 | commands/ieee1275/halt.c commands/ieee1275/reboot.c \ |
93f3a1d8 | 48 | disk/loopback.c \ |
57bdbde3 | 49 | fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c \ |
9a909877 | 50 | fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c \ |
d9864ee1 | 51 | io/gzio.c \ |
93f3a1d8 | 52 | kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c \ |
53 | kern/file.c kern/fs.c kern/loader.c kern/main.c kern/misc.c \ | |
04ccf3ec | 54 | kern/parser.c kern/partition.c kern/rescue.c kern/term.c \ |
8de3495c | 55 | normal/arg.c normal/cmdline.c normal/command.c \ |
b6b32745 | 56 | normal/completion.c normal/context.c normal/execute.c \ |
57 | normal/function.c normal/lexer.c normal/main.c normal/menu.c \ | |
58 | normal/menu_entry.c normal/misc.c normal/script.c \ | |
93f3a1d8 | 59 | partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \ |
60 | util/console.c util/grub-emu.c util/misc.c \ | |
61 | util/i386/pc/biosdisk.c util/i386/pc/getroot.c \ | |
b6b32745 | 62 | util/powerpc/ieee1275/misc.c grub_script.tab.c |
93f3a1d8 | 63 | |
f4917dfd | 64 | grub_emu_LDFLAGS = $(LIBCURSES) |
e56cdf21 | 65 | |
48b671ff | 66 | grubof_SOURCES = kern/powerpc/ieee1275/crt0.S kern/powerpc/ieee1275/cmain.c \ |
04ccf3ec | 67 | kern/ieee1275/ieee1275.c kern/main.c kern/device.c \ |
68 | kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \ | |
69 | kern/misc.c kern/mm.c kern/loader.c kern/rescue.c kern/term.c \ | |
70 | kern/powerpc/ieee1275/init.c term/ieee1275/ofconsole.c \ | |
71 | kern/powerpc/ieee1275/openfw.c disk/ieee1275/ofdisk.c \ | |
72 | kern/parser.c kern/partition.c kern/env.c kern/powerpc/dl.c \ | |
73 | grubof_symlist.c kern/powerpc/cache.S | |
4b13b216 | 74 | grubof_HEADERS = grub/powerpc/ieee1275/ieee1275.h |
924b6140 | 75 | grubof_CFLAGS = $(COMMON_CFLAGS) |
4b13b216 | 76 | grubof_ASFLAGS = $(COMMON_ASFLAGS) |
da75ac71 | 77 | grubof_LDFLAGS = -nostdlib -static-libgcc -lgcc -Wl,-N,-S,-Ttext,0x200000,-Bstatic |
e56cdf21 | 78 | |
79 | # For genmoddep. | |
80 | genmoddep_SOURCES = util/genmoddep.c | |
81 | ||
4b60267d | 82 | # Scripts. |
83 | sbin_SCRIPTS = grub-install | |
84 | ||
85 | # For grub-install. | |
86 | grub_install_SOURCES = util/powerpc/ieee1275/grub-install.in | |
87 | ||
e56cdf21 | 88 | # Modules. |
924b6140 | 89 | pkgdata_MODULES = _linux.mod linux.mod fat.mod ufs.mod ext2.mod minix.mod \ |
5eabe94b | 90 | hfs.mod jfs.mod normal.mod hello.mod font.mod ls.mod \ |
6f1c18bd | 91 | boot.mod cmp.mod cat.mod terminal.mod fshelp.mod amiga.mod apple.mod \ |
93f3a1d8 | 92 | pc.mod suspend.mod loopback.mod help.mod reboot.mod halt.mod sun.mod \ |
57bdbde3 | 93 | default.mod timeout.mod configfile.mod search.mod gzio.mod xfs.mod \ |
b6b32745 | 94 | affs.mod sfs.mod test.mod |
924b6140 | 95 | |
96 | # For fshelp.mod. | |
97 | fshelp_mod_SOURCES = fs/fshelp.c | |
98 | fshelp_mod_CFLAGS = $(COMMON_CFLAGS) | |
99 | ||
100 | # For fat.mod. | |
101 | fat_mod_SOURCES = fs/fat.c | |
102 | fat_mod_CFLAGS = $(COMMON_CFLAGS) | |
103 | ||
104 | # For ext2.mod. | |
105 | ext2_mod_SOURCES = fs/ext2.c | |
106 | ext2_mod_CFLAGS = $(COMMON_CFLAGS) | |
107 | ||
108 | # For ufs.mod. | |
109 | ufs_mod_SOURCES = fs/ufs.c | |
110 | ufs_mod_CFLAGS = $(COMMON_CFLAGS) | |
111 | ||
112 | # For minix.mod. | |
113 | minix_mod_SOURCES = fs/minix.c | |
114 | minix_mod_CFLAGS = $(COMMON_CFLAGS) | |
115 | ||
116 | # For hfs.mod. | |
117 | hfs_mod_SOURCES = fs/hfs.c | |
118 | hfs_mod_CFLAGS = $(COMMON_CFLAGS) | |
119 | ||
120 | # For jfs.mod. | |
121 | jfs_mod_SOURCES = fs/jfs.c | |
122 | jfs_mod_CFLAGS = $(COMMON_CFLAGS) | |
123 | ||
124 | # For iso9660.mod. | |
125 | iso9660_mod_SOURCES = fs/iso9660.c | |
126 | iso9660_mod_CFLAGS = $(COMMON_CFLAGS) | |
127 | ||
b2499b29 | 128 | # For xfs.mod. |
129 | xfs_mod_SOURCES = fs/xfs.c | |
130 | xfs_mod_CFLAGS = $(COMMON_CFLAGS) | |
131 | ||
57bdbde3 | 132 | # For affs.mod. |
5a2e94fb | 133 | affs_mod_SOURCES = fs/affs.c |
134 | affs_mod_CFLAGS = $(COMMON_CFLAGS) | |
57bdbde3 | 135 | |
9a909877 | 136 | # For sfs.mod. |
137 | sfs_mod_SOURCES = fs/sfs.c | |
138 | sfs_mod_CFLAGS = $(COMMON_CFLAGS) | |
139 | ||
924b6140 | 140 | # For _linux.mod. |
141 | _linux_mod_SOURCES = loader/powerpc/ieee1275/linux.c | |
142 | _linux_mod_CFLAGS = $(COMMON_CFLAGS) | |
57bdbde3 | 143 | |
924b6140 | 144 | # For linux.mod. |
145 | linux_mod_SOURCES = loader/powerpc/ieee1275/linux_normal.c | |
146 | linux_mod_CFLAGS = $(COMMON_CFLAGS) | |
147 | ||
148 | # For normal.mod. | |
4d4e372e | 149 | normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \ |
b6b32745 | 150 | normal/completion.c normal/context.c normal/execute.c \ |
151 | normal/function.c normal/lexer.c normal/main.c normal/menu.c \ | |
152 | normal/menu_entry.c normal/misc.c grub_script.tab.c \ | |
153 | normal/script.c normal/powerpc/setjmp.S | |
924b6140 | 154 | normal_mod_CFLAGS = $(COMMON_CFLAGS) |
155 | normal_mod_ASFLAGS = $(COMMON_ASFLAGS) | |
156 | ||
157 | # For hello.mod. | |
158 | hello_mod_SOURCES = hello/hello.c | |
159 | hello_mod_CFLAGS = $(COMMON_CFLAGS) | |
160 | ||
161 | # For boot.mod. | |
162 | boot_mod_SOURCES = commands/boot.c | |
163 | boot_mod_CFLAGS = $(COMMON_CFLAGS) | |
164 | ||
165 | # For terminal.mod. | |
166 | terminal_mod_SOURCES = commands/terminal.c | |
167 | terminal_mod_CFLAGS = $(COMMON_CFLAGS) | |
168 | ||
169 | # For ls.mod. | |
170 | ls_mod_SOURCES = commands/ls.c | |
171 | ls_mod_CFLAGS = $(COMMON_CFLAGS) | |
172 | ||
173 | # For cmp.mod. | |
174 | cmp_mod_SOURCES = commands/cmp.c | |
175 | cmp_mod_CFLAGS = $(COMMON_CFLAGS) | |
176 | ||
177 | # For cat.mod. | |
178 | cat_mod_SOURCES = commands/cat.c | |
179 | cat_mod_CFLAGS = $(COMMON_CFLAGS) | |
180 | ||
181 | # For font.mod. | |
182 | font_mod_SOURCES = font/manager.c | |
183 | font_mod_CFLAGS = $(COMMON_CFLAGS) | |
184 | ||
185 | # For amiga.mod | |
186 | amiga_mod_SOURCES = partmap/amiga.c | |
187 | amiga_mod_CFLAGS = $(COMMON_CFLAGS) | |
188 | ||
189 | # For apple.mod | |
190 | apple_mod_SOURCES = partmap/apple.c | |
191 | apple_mod_CFLAGS = $(COMMON_CFLAGS) | |
192 | ||
193 | # For pc.mod | |
194 | pc_mod_SOURCES = partmap/pc.c | |
195 | pc_mod_CFLAGS = $(COMMON_CFLAGS) | |
6f1c18bd | 196 | |
4ed2e1dd | 197 | # For sun.mod |
198 | sun_mod_SOURCES = partmap/sun.c | |
199 | sun_mod_CFLAGS = $(COMMON_CFLAGS) | |
200 | ||
67bbaf0f | 201 | # For loopback.mod |
202 | loopback_mod_SOURCES = disk/loopback.c | |
203 | loopback_mod_CFLAGS = $(COMMON_CFLAGS) | |
204 | ||
6f1c18bd | 205 | # For suspend.mod |
206 | suspend_mod_SOURCES = commands/ieee1275/suspend.c | |
207 | suspend_mod_CFLAGS = $(COMMON_CFLAGS) | |
0f79cdc1 | 208 | |
209 | # For reboot.mod | |
210 | reboot_mod_SOURCES = commands/ieee1275/reboot.c | |
211 | reboot_mod_CFLAGS = $(COMMON_CFLAGS) | |
212 | ||
213 | # For halt.mod | |
214 | halt_mod_SOURCES = commands/ieee1275/halt.c | |
215 | halt_mod_CFLAGS = $(COMMON_CFLAGS) | |
990cf3aa | 216 | |
217 | # For help.mod. | |
218 | help_mod_SOURCES = commands/help.c | |
219 | help_mod_CFLAGS = $(COMMON_CFLAGS) | |
93f3a1d8 | 220 | |
221 | # For default.mod | |
222 | default_mod_SOURCES = commands/default.c | |
223 | default_mod_CFLAGS = $(COMMON_CFLAGS) | |
224 | ||
225 | # For timeout.mod | |
226 | timeout_mod_SOURCES = commands/timeout.c | |
227 | timeout_mod_CFLAGS = $(COMMON_CFLAGS) | |
062aaf39 | 228 | |
229 | # For configfile.mod | |
230 | configfile_mod_SOURCES = commands/configfile.c | |
231 | configfile_mod_CFLAGS = $(COMMON_CFLAGS) | |
6a85ce79 | 232 | |
233 | # For search.mod. | |
234 | search_mod_SOURCES = commands/search.c | |
235 | search_mod_CFLAGS = $(COMMON_CFLAGS) | |
d9864ee1 | 236 | |
237 | # For gzio.mod. | |
238 | gzio_mod_SOURCES = io/gzio.c | |
239 | gzio_mod_CFLAGS = $(COMMON_CFLAGS) | |
b6b32745 | 240 | |
241 | # For test.mod. | |
242 | test_mod_SOURCES = commands/test.c | |
243 | test_mod_CFLAGS = $(COMMON_CFLAGS) |