Merge branch 'nestpart' into phcoder
[grub2/phcoder.git] / conf / i386-ieee1275.rmk
blobcd31408e037859051e7981189d6508273eb72cb4
1 # -*- makefile -*-
3 COMMON_ASFLAGS  = -m32 -nostdinc -fno-builtin
4 COMMON_CFLAGS   = -ffreestanding -mrtd -mregparm=3
5 COMMON_LDFLAGS  = -nostdlib
7 # Used by various components.  These rules need to precede them.
8 script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h
10 # Images.
11 pkglib_PROGRAMS = kernel.img
13 # For kernel.img.
14 kernel_img_SOURCES = kern/i386/ieee1275/startup.S \
15         kern/i386/misc.S \
16         kern/i386/ieee1275/init.c \
17         kern/ieee1275/init.c \
18         kern/ieee1275/mmap.c \
19         kern/ieee1275/cmain.c kern/ieee1275/openfw.c \
20         kern/main.c kern/device.c \
21         kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
22         kern/misc.c kern/mm.c kern/reader.c kern/term.c \
23         kern/rescue_parser.c kern/rescue_reader.c \
24         kern/$(target_cpu)/dl.c kern/parser.c kern/partition.c \
25         kern/env.c \
26         kern/time.c kern/list.c kern/handler.c kern/command.c kern/corecmd.c \
27         kern/generic/millisleep.c \
28         kern/ieee1275/ieee1275.c \
29         term/ieee1275/ofconsole.c \
30         disk/ieee1275/ofdisk.c \
31         symlist.c
32 kernel_img_HEADERS = cache.h device.h disk.h dl.h elf.h elfload.h \
33         env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
34         partition.h pc_partition.h reader.h symbol.h term.h time.h types.h \
35         ieee1275/ieee1275.h machine/kernel.h machine/loader.h machine/memory.h \
36         list.h handler.h command.h
37 kernel_img_CFLAGS = $(COMMON_CFLAGS)
38 kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
39 kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-S,-Ttext,0x10000,-Bstatic
41 MOSTLYCLEANFILES += symlist.c kernel_syms.lst
42 DEFSYMFILES += kernel_syms.lst
44 symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
45         /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
47 kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
48         /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
50 # Utilities.
51 sbin_UTILITIES = grub-mkdevicemap
52 ifeq ($(enable_grub_emu), yes)
53 sbin_UTILITIES += grub-emu
54 endif
56 # For grub-mkdevicemap.
57 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
58         util/devicemap.c util/misc.c
60 # For grub-emu.
61 util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
62 grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c     \
63         commands/configfile.c commands/echo.c commands/help.c           \
64         commands/handler.c commands/ls.c commands/test.c                \
65         commands/search.c commands/blocklist.c commands/hexdump.c       \
66         lib/hexdump.c commands/halt.c commands/reboot.c                 \
67         commands/gptsync.c commands/probe.c  commands/xnu_uuid.c        \
68         commands/i386/cpuid.c   \
69         disk/host.c disk/loopback.c                                     \
70         \
71         fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c                 \
72         fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c          \
73         fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c                  \
74         fs/ufs.c fs/xfs.c fs/afs.c fs/befs.c fs/tar.c                           \
75         \
76         fs/fshelp.c                                                     \
77         io/gzio.c                                                       \
78         kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c       \
79         kern/err.c kern/list.c kern/handler.c                           \
80         kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c     \
81         kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
82         kern/partition.c kern/reader.c kern/term.c                      \
83         kern/rescue_reader.c kern/rescue_parser.c                       \
84         lib/arg.c normal/cmdline.c normal/datetime.c normal/misc.c      \
85         normal/handler.c normal/autofs.c                                \
86         normal/completion.c normal/main.c normal/menu_text.c            \
87         normal/menu.c normal/menu_entry.c normal/menu_viewer.c          \
88         normal/color.c                                                  \
89         script/sh/main.c script/sh/execute.c script/sh/function.c       \
90         script/sh/lexer.c script/sh/script.c grub_script.tab.c          \
91         partmap/amiga.c partmap/apple.c partmap/pc.c partmap/bsdlabel.c \
92         partmap/sun.c partmap/acorn.c partmap/gpt.c                     \
93         util/console.c util/hostfs.c util/grub-emu.c util/misc.c        \
94         util/hostdisk.c util/getroot.c                                  \
95         \
96         disk/raid.c disk/raid5_recover.c disk/raid6_recover.c           \
97         disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c             \
98         grub_emu_init.c
100 grub_emu_LDFLAGS = $(LIBCURSES)
102 # Scripts.
103 sbin_SCRIPTS = grub-install
105 # For grub-install.
106 grub_install_SOURCES = util/ieee1275/grub-install.in
108 # Modules.
109 pkglib_MODULES = halt.mod reboot.mod suspend.mod                \
110         multiboot.mod aout.mod serial.mod linux.mod             \
111         nand.mod memdisk.mod pci.mod lspci.mod datetime.mod     \
112         date.mod datehook.mod lsmmap.mod mmap.mod
114 # For boot.mod.
115 pkglib_MODULES += boot.mod 
116 boot_mod_SOURCES = commands/boot.c
117 boot_mod_CFLAGS = $(COMMON_CFLAGS)
118 boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
120 # For mmap.mod.
121 mmap_mod_SOURCES = mmap/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c
122 mmap_mod_CFLAGS = $(COMMON_CFLAGS)
123 mmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
124 mmap_mod_ASFLAGS = $(COMMON_ASFLAGS)
126 # For multiboot.mod.
127 multiboot_mod_SOURCES = loader/ieee1275/multiboot2.c \
128                         loader/i386/multiboot_helper.S \
129                          loader/multiboot2.c \
130                          loader/multiboot_loader.c
131 multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
132 multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
133 multiboot_mod_ASFLAGS = $(COMMON_ASFLAGS)
135 # For aout.mod.
136 aout_mod_SOURCES = loader/aout.c
137 aout_mod_CFLAGS = $(COMMON_CFLAGS)
138 aout_mod_LDFLAGS = $(COMMON_LDFLAGS)
140 # For suspend.mod
141 suspend_mod_SOURCES = commands/ieee1275/suspend.c
142 suspend_mod_CFLAGS = $(COMMON_CFLAGS)
143 suspend_mod_LDFLAGS = $(COMMON_LDFLAGS)
145 # For reboot.mod
146 reboot_mod_SOURCES = commands/reboot.c
147 reboot_mod_CFLAGS = $(COMMON_CFLAGS)
148 reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
150 # For halt.mod
151 halt_mod_SOURCES = commands/halt.c
152 halt_mod_CFLAGS = $(COMMON_CFLAGS)
153 halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
155 # For serial.mod.
156 serial_mod_SOURCES = term/i386/pc/serial.c
157 serial_mod_CFLAGS = $(COMMON_CFLAGS)
158 serial_mod_LDFLAGS = $(COMMON_LDFLAGS)
160 # For linux.mod.
161 linux_mod_SOURCES = loader/i386/ieee1275/linux.c
162 linux_mod_CFLAGS = $(COMMON_CFLAGS)
163 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
165 # For nand.mod.
166 nand_mod_SOURCES = disk/ieee1275/nand.c
167 nand_mod_CFLAGS = $(COMMON_CFLAGS)
168 nand_mod_LDFLAGS = $(COMMON_LDFLAGS)
170 # For memdisk.mod.
171 memdisk_mod_SOURCES = disk/memdisk.c
172 memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
173 memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
175 # For pci.mod
176 pci_mod_SOURCES = bus/pci.c
177 pci_mod_CFLAGS = $(COMMON_CFLAGS)
178 pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
180 # For lspci.mod
181 lspci_mod_SOURCES = commands/lspci.c
182 lspci_mod_CFLAGS = $(COMMON_CFLAGS)
183 lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
185 # For datetime.mod
186 datetime_mod_SOURCES = lib/i386/datetime.c
187 datetime_mod_CFLAGS = $(COMMON_CFLAGS)
188 datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
190 # For date.mod
191 date_mod_SOURCES = commands/date.c
192 date_mod_CFLAGS = $(COMMON_CFLAGS)
193 date_mod_LDFLAGS = $(COMMON_LDFLAGS)
195 # For datehook.mod
196 datehook_mod_SOURCES = hook/datehook.c
197 datehook_mod_CFLAGS = $(COMMON_CFLAGS)
198 datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
200 # For lsmmap.mod
201 lsmmap_mod_SOURCES = commands/lsmmap.c
202 lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
203 lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
205 include $(srcdir)/conf/i386.mk
206 include $(srcdir)/conf/common.mk