2008-11-28 Robert Millan <rmh@aybabtu.com>
[grub2/jjazz.git] / conf / powerpc-ieee1275.rmk
blobf22540f0a3c58d5cb3aa7df068a28cbd77e18f0c
2 # -*- makefile -*-
4 COMMON_ASFLAGS = -nostdinc -D__ASSEMBLY__
5 COMMON_CFLAGS = -ffreestanding
6 COMMON_LDFLAGS += -nostdlib
8 # Used by various components.  These rules need to precede them.
9 normal/lexer.c_DEPENDENCIES = grub_script.tab.h
11 # Images.
13 MOSTLYCLEANFILES += symlist.c kernel_syms.lst
14 DEFSYMFILES += kernel_syms.lst
16 kernel_elf_HEADERS = arg.h boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
17         env.h err.h file.h fs.h kernel.h misc.h mm.h net.h parser.h rescue.h \
18         symbol.h term.h time.h types.h powerpc/libgcc.h loader.h partition.h \
19         pc_partition.h ieee1275/ieee1275.h machine/kernel.h
21 symlist.c: $(addprefix include/grub/,$(kernel_elf_HEADERS)) config.h gensymlist.sh
22         /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
24 kernel_syms.lst: $(addprefix include/grub/,$(kernel_elf_HEADERS)) config.h genkernsyms.sh
25         /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
27 # Programs
28 pkglib_PROGRAMS = kernel.elf
30 # Utilities.
31 sbin_UTILITIES = grub-mkdevicemap
32 ifeq ($(enable_grub_emu), yes)
33 sbin_UTILITIES += grub-emu
34 endif
36 # For grub-mkdevicemap.
37 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c
39 # For grub-emu
40 util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
41 grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c        \
42         commands/configfile.c commands/help.c                           \
43         commands/search.c commands/terminal.c commands/test.c           \
44         commands/ls.c commands/blocklist.c commands/hexdump.c           \
45         lib/hexdump.c commands/halt.c commands/reboot.c                 \
46         disk/loopback.c                                                 \
47         \
48         fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c         \
49         fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c  \
50         fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c          \
51         fs/ufs.c fs/xfs.c fs/afs.c                              \
52         \
53         io/gzio.c                                                       \
54         kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c       \
55         kern/err.c kern/file.c kern/fs.c kern/loader.c kern/main.c      \
56         kern/misc.c kern/parser.c kern/partition.c kern/rescue.c        \
57         kern/term.c fs/fshelp.c                                         \
58         normal/arg.c normal/cmdline.c normal/command.c                  \
59         normal/completion.c normal/execute.c                            \
60         normal/function.c normal/lexer.c normal/main.c normal/menu.c    \
61         normal/menu_entry.c normal/misc.c normal/script.c               \
62         normal/color.c                                                  \
63         partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c      \
64         partmap/acorn.c                                                 \
65         util/console.c util/hostfs.c util/grub-emu.c util/misc.c        \
66         util/hostdisk.c util/getroot.c                                  \
67         util/powerpc/ieee1275/misc.c                                    \
68         \
69         disk/raid.c disk/raid5_recover.c disk/raid6_recover.c           \
70         disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c             \
71         grub_script.tab.c grub_emu_init.c
73 grub_emu_LDFLAGS = $(LIBCURSES)
75 kernel_elf_SOURCES = kern/powerpc/ieee1275/startup.S kern/ieee1275/cmain.c \
76         kern/ieee1275/ieee1275.c kern/main.c kern/device.c              \
77         kern/disk.c kern/dl.c kern/err.c kern/file.c kern/fs.c          \
78         kern/misc.c kern/mm.c kern/loader.c kern/rescue.c kern/term.c   \
79         kern/ieee1275/init.c                                            \
80         kern/ieee1275/mmap.c                                            \
81         term/ieee1275/ofconsole.c               \
82         kern/ieee1275/openfw.c disk/ieee1275/ofdisk.c           \
83         kern/parser.c kern/partition.c kern/env.c kern/powerpc/dl.c     \
84         kern/generic/millisleep.c kern/time.c                            \
85         symlist.c kern/powerpc/cache.S
86 kernel_elf_HEADERS = grub/powerpc/ieee1275/ieee1275.h
87 kernel_elf_CFLAGS = $(COMMON_CFLAGS)
88 kernel_elf_ASFLAGS = $(COMMON_ASFLAGS)
89 kernel_elf_LDFLAGS = $(COMMON_LDFLAGS) -static-libgcc -lgcc \
90         -Wl,-N,-S,-Ttext,0x200000,-Bstatic
92 # Scripts.
93 sbin_SCRIPTS = grub-install
94 bin_SCRIPTS = grub-mkrescue
96 # For grub-install.
97 grub_install_SOURCES = util/ieee1275/grub-install.in
99 # For grub-mkrescue.
100 grub_mkrescue_SOURCES = util/powerpc/ieee1275/grub-mkrescue.in
102 # Modules.
103 pkglib_MODULES = halt.mod \
104         _linux.mod \
105         linux.mod \
106         normal.mod \
107         reboot.mod \
108         suspend.mod \
109         _multiboot.mod \
110         multiboot.mod \
111         memdisk.mod \
112         lsmmap.mod
114 # For _linux.mod.
115 _linux_mod_SOURCES = loader/powerpc/ieee1275/linux.c
116 _linux_mod_CFLAGS = $(COMMON_CFLAGS)
117 _linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
119 # For linux.mod.
120 linux_mod_SOURCES = loader/powerpc/ieee1275/linux_normal.c
121 linux_mod_CFLAGS = $(COMMON_CFLAGS)
122 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
124 # For normal.mod.
125 normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c     \
126         normal/completion.c normal/execute.c                            \
127         normal/function.c normal/lexer.c normal/main.c normal/menu.c    \
128         normal/menu_entry.c normal/misc.c grub_script.tab.c             \
129         normal/script.c normal/powerpc/setjmp.S normal/color.c
130 normal_mod_CFLAGS = $(COMMON_CFLAGS)
131 normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
132 normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
134 # For suspend.mod
135 suspend_mod_SOURCES = commands/ieee1275/suspend.c
136 suspend_mod_CFLAGS = $(COMMON_CFLAGS)
137 suspend_mod_LDFLAGS = $(COMMON_LDFLAGS)
139 # For reboot.mod
140 reboot_mod_SOURCES = commands/reboot.c
141 reboot_mod_CFLAGS = $(COMMON_CFLAGS)
142 reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
144 # For halt.mod
145 halt_mod_SOURCES = commands/halt.c
146 halt_mod_CFLAGS = $(COMMON_CFLAGS)
147 halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
149 # For _multiboot.mod
150 _multiboot_mod_SOURCES = loader/ieee1275/multiboot2.c \
151                          loader/multiboot2.c \
152                          loader/multiboot_loader.c
153 _multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
154 _multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
156 # For multiboot.mod
157 multiboot_mod_SOURCES = loader/multiboot_loader_normal.c
158 multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
159 multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS) 
161 # For memdisk.mod.
162 memdisk_mod_SOURCES = disk/memdisk.c
163 memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
164 memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
166 # For lsmmap.mod
167 lsmmap_mod_SOURCES = commands/lsmmap.c
168 lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
169 lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
171 include $(srcdir)/conf/common.mk