2009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
[grub2/jjazz.git] / conf / powerpc-ieee1275.rmk
blobee7f9ec27e65b0648dca4c3f9a86168332cbc5aa
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 script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h
11 # Images.
13 MOSTLYCLEANFILES += symlist.c kernel_syms.lst
14 DEFSYMFILES += kernel_syms.lst
16 kernel_img_HEADERS = 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 reader.h \
18         symbol.h term.h time.h types.h powerpc/libgcc.h loader.h partition.h \
19         msdos_partition.h ieee1275/ieee1275.h machine/kernel.h handler.h list.h \
20         command.h
22 symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
23         /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
25 kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
26         /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
28 # Programs
29 pkglib_PROGRAMS = kernel.img
31 # Utilities.
32 sbin_UTILITIES = grub-mkdevicemap
33 ifeq ($(enable_grub_emu), yes)
34 sbin_UTILITIES += grub-emu
35 endif
37 # For grub-mkdevicemap.
38 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
39         util/devicemap.c util/misc.c
41 # For grub-emu
42 util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
43 grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c     \
44         commands/configfile.c commands/help.c                           \
45         commands/search.c commands/handler.c commands/test.c            \
46         commands/ls.c commands/blocklist.c commands/hexdump.c           \
47         lib/hexdump.c commands/halt.c commands/reboot.c                 \
48         lib/envblk.c commands/loadenv.c                                 \
49         commands/gptsync.c commands/probe.c commands/xnu_uuid.c         \
50         commands/password.c commands/keystatus.c                        \
51         disk/loopback.c                                                 \
52         \
53         fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c                 \
54         fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c          \
55         fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c                  \
56         fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c                \
57         fs/befs.c fs/befs_be.c fs/tar.c                         \
58         \
59         io/gzio.c                                                       \
60         kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c       \
61         kern/err.c kern/file.c kern/fs.c commands/boot.c kern/main.c    \
62         kern/misc.c kern/parser.c kern/partition.c kern/reader.c        \
63         kern/rescue_reader.c kern/rescue_parser.c                       \
64         kern/term.c kern/list.c kern/handler.c fs/fshelp.c              \
65         kern/command.c kern/corecmd.c commands/extcmd.c                 \
66         lib/arg.c normal/cmdline.c normal/datetime.c                    \
67         normal/completion.c normal/misc.c                               \
68         normal/handler.c normal/auth.c normal/autofs.c normal/main.c    \
69         normal/menu.c                                                   \
70         normal/menu_text.c                                              \
71         normal/menu_entry.c normal/menu_viewer.c                        \
72         normal/color.c                                                  \
73         script/sh/main.c script/sh/execute.c script/sh/function.c       \
74         script/sh/lexer.c script/sh/script.c                            \
75         partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c   \
76         partmap/acorn.c                                                 \
77         util/console.c util/hostfs.c util/grub-emu.c util/misc.c        \
78         util/hostdisk.c util/getroot.c                                  \
79         \
80         disk/raid.c disk/raid5_recover.c disk/raid6_recover.c           \
81         disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c             \
82         commands/parttool.c parttool/msdospart.c                                \
83         grub_script.tab.c grub_emu_init.c
85 grub_emu_LDFLAGS = $(LIBCURSES)
87 kernel_img_SOURCES = kern/powerpc/ieee1275/startup.S kern/ieee1275/cmain.c \
88         kern/ieee1275/ieee1275.c kern/main.c kern/device.c              \
89         kern/disk.c kern/dl.c kern/err.c kern/file.c kern/fs.c          \
90         kern/misc.c kern/mm.c kern/reader.c kern/term.c         \
91         kern/rescue_parser.c kern/rescue_reader.c \
92         kern/list.c kern/handler.c kern/command.c kern/corecmd.c        \
93         kern/ieee1275/init.c                                            \
94         kern/ieee1275/mmap.c                                            \
95         term/ieee1275/ofconsole.c               \
96         kern/ieee1275/openfw.c disk/ieee1275/ofdisk.c           \
97         kern/parser.c kern/partition.c kern/env.c kern/$(target_cpu)/dl.c       \
98         kern/generic/millisleep.c kern/time.c                            \
99         symlist.c kern/$(target_cpu)/cache.S
100 kernel_img_CFLAGS = $(COMMON_CFLAGS)
101 kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
102 kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -static-libgcc -lgcc \
103         -Wl,-N,-S,-Ttext,0x200000,-Bstatic
105 # Scripts.
106 sbin_SCRIPTS = grub-install
107 bin_SCRIPTS = grub-mkrescue
109 # For grub-install.
110 grub_install_SOURCES = util/ieee1275/grub-install.in
112 # For grub-mkrescue.
113 grub_mkrescue_SOURCES = util/powerpc/ieee1275/grub-mkrescue.in
115 # Modules.
116 pkglib_MODULES = halt.mod \
117         linux.mod \
118         reboot.mod \
119         suspend.mod \
120         multiboot.mod \
121         memdisk.mod \
122         lsmmap.mod
124 # For boot.mod.
125 pkglib_MODULES += boot.mod 
126 boot_mod_SOURCES = commands/boot.c lib/i386/pc/biosnum.c
127 boot_mod_CFLAGS = $(COMMON_CFLAGS)
128 boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
130 # For linux.mod.
131 linux_mod_SOURCES = loader/powerpc/ieee1275/linux.c
132 linux_mod_CFLAGS = $(COMMON_CFLAGS)
133 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
135 # For suspend.mod
136 suspend_mod_SOURCES = commands/ieee1275/suspend.c
137 suspend_mod_CFLAGS = $(COMMON_CFLAGS)
138 suspend_mod_LDFLAGS = $(COMMON_LDFLAGS)
140 # For reboot.mod
141 reboot_mod_SOURCES = commands/reboot.c
142 reboot_mod_CFLAGS = $(COMMON_CFLAGS)
143 reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
145 # For halt.mod
146 halt_mod_SOURCES = commands/halt.c
147 halt_mod_CFLAGS = $(COMMON_CFLAGS)
148 halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
150 # For multiboot.mod
151 multiboot_mod_SOURCES = loader/ieee1275/multiboot2.c \
152                          loader/multiboot2.c \
153                          loader/multiboot_loader.c
154 multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
155 multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
157 # For memdisk.mod.
158 memdisk_mod_SOURCES = disk/memdisk.c
159 memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
160 memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
162 # For lsmmap.mod
163 lsmmap_mod_SOURCES = commands/lsmmap.c
164 lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
165 lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
167 include $(srcdir)/conf/common.mk