2009-07-01 Pavel Roskin <proski@gnu.org>
[grub2/bean.git] / conf / sparc64-ieee1275.rmk
blob8183cbc057595f629aa85b6df91e409b6a0f830d
2 # -*- makefile -*-
4 COMMON_ASFLAGS = -nostdinc -m64
5 COMMON_CFLAGS = -ffreestanding -m64 -mno-app-regs
6 COMMON_LDFLAGS = -melf64_sparc -nostdlib -mno-relax
8 # Used by various components.  These rules need to precede them.
9 script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h
11 # Images.
12 pkglib_IMAGES = boot.img diskboot.img kernel.img
14 # For boot.img.
15 boot_img_SOURCES = boot/sparc64/ieee1275/boot.S
16 boot_img_ASFLAGS = $(COMMON_ASFLAGS)
17 boot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,0x4000
18 boot_img_FORMAT = a.out-sunos-big
20 # For diskboot.img.
21 diskboot_img_SOURCES = boot/sparc64/ieee1275/diskboot.S
22 diskboot_img_ASFLAGS = $(COMMON_ASFLAGS)
23 diskboot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,0x4200
24 diskboot_img_FORMAT = binary
26 MOSTLYCLEANFILES += symlist.c kernel_syms.lst
27 DEFSYMFILES += kernel_syms.lst
29 kernel_img_HEADERS = boot.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 reader.h symbol.h term.h time.h types.h \
32         list.h handler.h command.h \
33         sparc64/libgcc.h ieee1275/ieee1275.h machine/kernel.h \
34         sparc64/ieee1275/ieee1275.h
35 kernel_img_SOURCES = kern/sparc64/ieee1275/crt0.S kern/ieee1275/cmain.c \
36         kern/ieee1275/ieee1275.c kern/main.c kern/device.c              \
37         kern/disk.c kern/dl.c kern/err.c kern/file.c kern/fs.c          \
38         kern/misc.c kern/mm.c kern/reader.c kern/term.c                 \
39         kern/rescue_parser.c kern/rescue_reader.c \
40         kern/list.c kern/handler.c kern/command.c kern/corecmd.c        \
41         kern/sparc64/ieee1275/ieee1275.c                                \
42         kern/sparc64/ieee1275/init.c                                    \
43         kern/ieee1275/mmap.c                                            \
44         term/ieee1275/ofconsole.c                                       \
45         kern/ieee1275/openfw.c disk/ieee1275/ofdisk.c                   \
46         kern/parser.c kern/partition.c kern/env.c kern/$(target_cpu)/dl.c       \
47         kern/generic/millisleep.c kern/time.c                           \
48         symlist.c kern/$(target_cpu)/cache.S
49 kernel_img_CFLAGS = $(COMMON_CFLAGS)
50 kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
51 kernel_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,0x200000,-Bstatic,-melf64_sparc -static-libgcc -lgcc
52 kernel_img_FORMAT = binary
54 symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
55         /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
57 kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
58         /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
60 # Utilities.
61 bin_UTILITIES = grub-mkimage
62 sbin_UTILITIES = grub-setup grub-mkdevicemap grub-ofpathname
63 ifeq ($(enable_grub_emu), yes)
64 sbin_UTILITIES += grub-emu
65 endif
67 # For grub-mkimage.
68 grub_mkimage_SOURCES = util/sparc64/ieee1275/grub-mkimage.c util/misc.c \
69         util/resolve.c
71 # For grub-setup.
72 util/sparc64/ieee1275/grub-setup.c_DEPENDENCIES = grub_setup_init.h
73 grub_setup_SOURCES = util/sparc64/ieee1275/grub-setup.c util/hostdisk.c \
74         util/misc.c util/getroot.c kern/device.c kern/disk.c    \
75         kern/err.c kern/misc.c kern/parser.c kern/partition.c   \
76         kern/file.c kern/fs.c kern/env.c fs/fshelp.c            \
77         \
78         fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c         \
79         fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c  \
80         fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c          \
81         fs/ufs.c fs/xfs.c fs/afs.c fs/tar.c                     \
82         \
83         partmap/amiga.c partmap/apple.c partmap/pc.c            \
84         partmap/sun.c partmap/acorn.c                           \
85         \
86         disk/raid.c disk/mdraid_linux.c disk/lvm.c              \
87         util/raid.c util/lvm.c                                  \
88         grub_setup_init.c
90 # For grub-mkdevicemap.
91 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
92         util/ieee1275/ofpath.c util/ieee1275/devicemap.c util/misc.c
94 # For grub-ofpathname.
95 grub_ofpathname_SOURCES = util/sparc64/ieee1275/grub-ofpathname.c \
96         util/ieee1275/ofpath.c util/misc.c
98 # For grub-emu
99 util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
100 grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c     \
101         commands/configfile.c commands/help.c                           \
102         commands/search.c commands/handler.c commands/test.c            \
103         commands/ls.c commands/blocklist.c commands/hexdump.c           \
104         lib/hexdump.c commands/halt.c commands/reboot.c                 \
105         commands/gptsync.c commands/probe.c commands/xnu_uuid.c         \
106         disk/loopback.c                                                 \
107         \
108         fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c                 \
109         fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c          \
110         fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c                  \
111         fs/ufs.c fs/xfs.c fs/afs.c fs/tar.c                             \
112         \
113         io/gzio.c                                                       \
114         kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c       \
115         kern/err.c kern/file.c kern/fs.c commands/boot.c kern/main.c    \
116         kern/misc.c kern/parser.c kern/partition.c kern/reader.c        \
117         kern/rescue_reader.c kern/rescue_parser.c                       \
118         kern/term.c kern/list.c kern/handler.c fs/fshelp.c              \
119         kern/command.c kern/corecmd.c commands/extcmd.c                 \
120         lib/arg.c normal/cmdline.c normal/datetime.c                    \
121         normal/completion.c normal/misc.c                               \
122         normal/handler.c normal/autofs.c normal/main.c                  \
123         normal/menu.c                                                   \
124         normal/menu_text.c                                              \
125         normal/menu_entry.c normal/menu_viewer.c                        \
126         normal/color.c                                                  \
127         script/sh/main.c script/sh/execute.c script/sh/function.c       \
128         script/sh/lexer.c script/sh/script.c                            \
129         partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c      \
130         partmap/acorn.c                                                 \
131         util/console.c util/hostfs.c util/grub-emu.c util/misc.c        \
132         util/hostdisk.c util/getroot.c                                  \
133         \
134         disk/raid.c disk/raid5_recover.c disk/raid6_recover.c           \
135         disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c             \
136         commands/parttool.c parttool/pcpart.c                           \
137         grub_script.tab.c grub_emu_init.c
139 grub_emu_LDFLAGS = $(LIBCURSES)
141 # Scripts.
142 sbin_SCRIPTS = grub-install
144 # For grub-install.
145 grub_install_SOURCES = util/sparc64/ieee1275/grub-install.in
147 # Modules.
148 pkglib_MODULES = halt.mod \
149         linux.mod \
150         reboot.mod \
151         memdisk.mod \
152         lsmmap.mod
154 # For boot.mod.
155 pkglib_MODULES += boot.mod 
156 boot_mod_SOURCES = commands/boot.c lib/i386/pc/biosnum.c
157 boot_mod_CFLAGS = $(COMMON_CFLAGS)
158 boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
160 # For linux.mod.
161 linux_mod_SOURCES = loader/sparc64/ieee1275/linux.c
162 linux_mod_CFLAGS = $(COMMON_CFLAGS)
163 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
165 # For reboot.mod.
166 reboot_mod_SOURCES = commands/reboot.c
167 reboot_mod_CFLAGS = $(COMMON_CFLAGS)
168 reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
170 # For halt.mod.
171 halt_mod_SOURCES = commands/halt.c
172 halt_mod_CFLAGS = $(COMMON_CFLAGS)
173 halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
175 # For memdisk.mod.
176 memdisk_mod_SOURCES = disk/memdisk.c
177 memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
178 memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
180 # For lsmmap.mod
181 lsmmap_mod_SOURCES = commands/lsmmap.c
182 lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
183 lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
185 include $(srcdir)/conf/common.mk