]> git.proxmox.com Git - grub2.git/blob - conf/i386-ieee1275.rmk
73a07597c53300f08e650a5aba09b4503497b9e5
[grub2.git] / conf / i386-ieee1275.rmk
1 # -*- makefile -*-
2
3 COMMON_ASFLAGS = -m32 -nostdinc -fno-builtin
4 COMMON_CFLAGS = -ffreestanding -mrtd -mregparm=3
5 COMMON_LDFLAGS = -nostdlib -static -lgcc
6
7 # Used by various components. These rules need to precede them.
8 normal/lexer.c_DEPENDENCIES = grub_script.tab.h
9
10 # Images.
11 pkglib_PROGRAMS = kernel.elf
12
13 # For kernel.elf.
14 kernel_elf_SOURCES = kern/i386/ieee1275/startup.S kern/i386/ieee1275/init.c \
15 kern/ieee1275/init.c \
16 kern/ieee1275/mmap.c \
17 kern/ieee1275/cmain.c kern/ieee1275/openfw.c \
18 kern/main.c kern/device.c \
19 kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
20 kern/misc.c kern/mm.c kern/loader.c kern/rescue.c kern/term.c \
21 kern/i386/dl.c kern/parser.c kern/partition.c \
22 kern/env.c \
23 kern/time.c \
24 kern/generic/millisleep.c \
25 kern/ieee1275/ieee1275.c \
26 term/ieee1275/ofconsole.c \
27 disk/ieee1275/ofdisk.c \
28 symlist.c
29 kernel_elf_HEADERS = arg.h cache.h device.h disk.h dl.h elf.h elfload.h \
30 env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
31 partition.h pc_partition.h rescue.h symbol.h term.h time.h types.h \
32 ieee1275/ieee1275.h machine/kernel.h machine/loader.h machine/memory.h
33 kernel_elf_CFLAGS = $(COMMON_CFLAGS)
34 kernel_elf_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-S,-Ttext,0x10000,-Bstatic
35
36 MOSTLYCLEANFILES += symlist.c kernel_syms.lst
37 DEFSYMFILES += kernel_syms.lst
38
39 symlist.c: $(addprefix include/grub/,$(kernel_elf_HEADERS)) config.h gensymlist.sh
40 /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
41
42 kernel_syms.lst: $(addprefix include/grub/,$(kernel_elf_HEADERS)) config.h genkernsyms.sh
43 /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
44
45 # Utilities.
46 sbin_UTILITIES = grub-mkdevicemap
47 ifeq ($(enable_grub_emu), yes)
48 sbin_UTILITIES += grub-emu
49 endif
50
51 # For grub-mkdevicemap.
52 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c
53
54 # For grub-emu.
55 util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
56 grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \
57 commands/configfile.c commands/echo.c commands/help.c \
58 commands/terminal.c commands/ls.c commands/test.c \
59 commands/search.c commands/blocklist.c commands/hexdump.c \
60 lib/hexdump.c commands/halt.c commands/reboot.c \
61 commands/i386/cpuid.c \
62 disk/host.c disk/loopback.c \
63 \
64 fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \
65 fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
66 fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \
67 fs/ufs.c fs/xfs.c fs/afs.c \
68 \
69 fs/fshelp.c \
70 io/gzio.c \
71 kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
72 kern/err.c \
73 normal/execute.c kern/file.c kern/fs.c normal/lexer.c \
74 kern/loader.c kern/main.c kern/misc.c kern/parser.c \
75 grub_script.tab.c kern/partition.c kern/rescue.c kern/term.c \
76 normal/arg.c normal/cmdline.c normal/command.c normal/function.c\
77 normal/completion.c normal/main.c \
78 normal/menu.c normal/menu_entry.c normal/menu_viewer.c \
79 normal/misc.c normal/script.c \
80 normal/color.c \
81 partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \
82 partmap/acorn.c partmap/gpt.c \
83 util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
84 util/hostdisk.c util/getroot.c \
85 util/i386/pc/misc.c \
86 \
87 disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
88 disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
89 grub_emu_init.c
90
91 grub_emu_LDFLAGS = $(LIBCURSES)
92
93 # Scripts.
94 sbin_SCRIPTS = grub-install
95
96 # For grub-install.
97 grub_install_SOURCES = util/ieee1275/grub-install.in
98
99 # Modules.
100 pkglib_MODULES = normal.mod halt.mod reboot.mod suspend.mod \
101 multiboot.mod _multiboot.mod aout.mod serial.mod linux.mod \
102 _linux.mod nand.mod memdisk.mod pci.mod lspci.mod datetime.mod \
103 date.mod datehook.mod lsmmap.mod
104
105 #
106 # Only arch dependant part of normal.mod will be here. Common part for
107 # all architecures of normal.mod is at start and should be kept at sync
108 # with other makefiles.
109 #
110 # Please put arch dependant part of normal.mod at the end of list to
111 # keep it simpler to update to different architectures.
112 #
113 normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
114 normal/completion.c normal/execute.c \
115 normal/function.c normal/lexer.c normal/main.c normal/menu.c \
116 normal/color.c \
117 normal/menu_viewer.c normal/menu_entry.c \
118 normal/misc.c grub_script.tab.c \
119 normal/script.c \
120 normal/i386/setjmp.S
121 normal_mod_CFLAGS = $(COMMON_CFLAGS)
122 normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
123 normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
124
125 # For _multiboot.mod.
126 _multiboot_mod_SOURCES = loader/ieee1275/multiboot2.c \
127 loader/multiboot2.c \
128 loader/multiboot_loader.c
129 _multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
130 _multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
131
132 # For multiboot.mod.
133 multiboot_mod_SOURCES = loader/multiboot_loader_normal.c
134 multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
135 multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
136
137 # For aout.mod.
138 aout_mod_SOURCES = loader/aout.c
139 aout_mod_CFLAGS = $(COMMON_CFLAGS)
140 aout_mod_LDFLAGS = $(COMMON_LDFLAGS)
141
142 # For suspend.mod
143 suspend_mod_SOURCES = commands/ieee1275/suspend.c
144 suspend_mod_CFLAGS = $(COMMON_CFLAGS)
145 suspend_mod_LDFLAGS = $(COMMON_LDFLAGS)
146
147 # For reboot.mod
148 reboot_mod_SOURCES = commands/reboot.c
149 reboot_mod_CFLAGS = $(COMMON_CFLAGS)
150 reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
151
152 # For halt.mod
153 halt_mod_SOURCES = commands/halt.c
154 halt_mod_CFLAGS = $(COMMON_CFLAGS)
155 halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
156
157 # For serial.mod.
158 serial_mod_SOURCES = term/i386/pc/serial.c
159 serial_mod_CFLAGS = $(COMMON_CFLAGS)
160 serial_mod_LDFLAGS = $(COMMON_LDFLAGS)
161
162 # For _linux.mod.
163 _linux_mod_SOURCES = loader/i386/ieee1275/linux.c
164 _linux_mod_CFLAGS = $(COMMON_CFLAGS)
165 _linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
166
167 # For linux.mod.
168 linux_mod_SOURCES = loader/linux_normal.c
169 linux_mod_CFLAGS = $(COMMON_CFLAGS)
170 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
171
172 # For nand.mod.
173 nand_mod_SOURCES = disk/ieee1275/nand.c
174 nand_mod_CFLAGS = $(COMMON_CFLAGS)
175 nand_mod_LDFLAGS = $(COMMON_LDFLAGS)
176
177 # For memdisk.mod.
178 memdisk_mod_SOURCES = disk/memdisk.c
179 memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
180 memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
181
182 # For pci.mod
183 pci_mod_SOURCES = bus/pci.c
184 pci_mod_CFLAGS = $(COMMON_CFLAGS)
185 pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
186
187 # For lspci.mod
188 lspci_mod_SOURCES = commands/lspci.c
189 lspci_mod_CFLAGS = $(COMMON_CFLAGS)
190 lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
191
192 # For datetime.mod
193 datetime_mod_SOURCES = lib/datetime.c lib/i386/datetime.c
194 datetime_mod_CFLAGS = $(COMMON_CFLAGS)
195 datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
196
197 # For date.mod
198 date_mod_SOURCES = commands/date.c
199 date_mod_CFLAGS = $(COMMON_CFLAGS)
200 date_mod_LDFLAGS = $(COMMON_LDFLAGS)
201
202 # For datehook.mod
203 datehook_mod_SOURCES = hook/datehook.c
204 datehook_mod_CFLAGS = $(COMMON_CFLAGS)
205 datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
206
207 # For lsmmap.mod
208 lsmmap_mod_SOURCES = commands/lsmmap.c
209 lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
210 lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
211
212 include $(srcdir)/conf/i386.mk
213 include $(srcdir)/conf/common.mk