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
12 pkglib_IMAGES = boot.img diskboot.img kernel.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
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/sparc64/dl.c \
47 kern/generic/millisleep.c kern/time.c \
48 symlist.c kern/sparc64/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)
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
68 grub_mkimage_SOURCES = util/sparc64/ieee1275/grub-mkimage.c util/misc.c \
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 \
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 \
83 partmap/amiga.c partmap/apple.c partmap/pc.c \
84 partmap/sun.c partmap/acorn.c \
86 disk/raid.c disk/mdraid_linux.c disk/lvm.c \
87 util/raid.c util/lvm.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
99 util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
100 grub_emu_SOURCES = commands/boot.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 \
107 fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \
108 fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
109 fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \
110 fs/ufs.c fs/xfs.c fs/afs.c fs/tar.c \
113 kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
114 kern/err.c kern/file.c kern/fs.c kern/loader.c kern/main.c \
115 kern/misc.c kern/parser.c kern/partition.c kern/reader.c \
116 kern/rescue_reader.c kern/rescue_parser.c \
117 kern/term.c fs/fshelp.c \
118 kern/list.c kern/handler.c \
119 lib/arg.c normal/cmdline.c \
120 normal/completion.c \
121 normal/main.c normal/menu.c \
123 normal/menu_entry.c normal/menu_viewer.c normal/misc.c \
125 script/sh/main.c script/sh/execute.c script/sh/function.c \
126 script/sh/lexer.c script/sh/script.c \
127 partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \
129 util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
130 util/hostdisk.c util/getroot.c \
131 util/sparc64/ieee1275/misc.c \
133 disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
134 disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
135 grub_script.tab.c grub_emu_init.c
137 grub_emu_LDFLAGS = $(LIBCURSES)
140 sbin_SCRIPTS = grub-install
143 grub_install_SOURCES = util/sparc64/ieee1275/grub-install.in
146 pkglib_MODULES = halt.mod \
153 pkglib_MODULES += boot.mod
154 boot_mod_SOURCES = commands/boot.c lib/i386/pc/biosnum.c
155 boot_mod_CFLAGS = $(COMMON_CFLAGS)
156 boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
159 linux_mod_SOURCES = loader/sparc64/ieee1275/linux.c
160 linux_mod_CFLAGS = $(COMMON_CFLAGS)
161 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
164 reboot_mod_SOURCES = commands/reboot.c
165 reboot_mod_CFLAGS = $(COMMON_CFLAGS)
166 reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
169 halt_mod_SOURCES = commands/halt.c
170 halt_mod_CFLAGS = $(COMMON_CFLAGS)
171 halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
174 memdisk_mod_SOURCES = disk/memdisk.c
175 memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
176 memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
179 lsmmap_mod_SOURCES = commands/lsmmap.c
180 lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
181 lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
184 pkglib_MODULES += setjmp.mod
185 setjmp_mod_SOURCES = lib/sparc64/setjmp.S
186 setjmp_mod_ASFLAGS = $(COMMON_ASFLAGS)
187 setjmp_mod_LDFLAGS = $(COMMON_LDFLAGS)
189 include $(srcdir)/conf/common.mk