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.dep: grub_script.tab.h
13 pkglib_IMAGES = boot.img diskboot.img kernel.img
16 boot_img_SOURCES = boot/sparc64/ieee1275/boot.S
17 boot_img_ASFLAGS = $(COMMON_ASFLAGS)
18 boot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,0x4000
19 boot_img_FORMAT = a.out-sunos-big
22 diskboot_img_SOURCES = boot/sparc64/ieee1275/diskboot.S
23 diskboot_img_ASFLAGS = $(COMMON_ASFLAGS)
24 diskboot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,0x4200
25 diskboot_img_FORMAT = binary
27 MOSTLYCLEANFILES += symlist.c kernel_syms.lst
28 DEFSYMFILES += kernel_syms.lst
30 kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
31 env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
32 partition.h pc_partition.h reader.h symbol.h term.h time.h types.h \
33 list.h handler.h command.h \
34 sparc64/libgcc.h ieee1275/ieee1275.h machine/kernel.h \
35 sparc64/ieee1275/ieee1275.h
36 kernel_img_SOURCES = kern/sparc64/ieee1275/crt0.S kern/ieee1275/cmain.c \
37 kern/ieee1275/ieee1275.c kern/main.c kern/device.c \
38 kern/disk.c kern/dl.c kern/err.c kern/file.c kern/fs.c \
39 kern/misc.c kern/mm.c kern/reader.c kern/term.c \
40 kern/rescue_parser.c kern/rescue_reader.c \
41 kern/list.c kern/handler.c kern/command.c kern/corecmd.c \
42 kern/sparc64/ieee1275/ieee1275.c \
43 kern/sparc64/ieee1275/init.c \
44 kern/ieee1275/mmap.c \
45 term/ieee1275/ofconsole.c \
46 kern/ieee1275/openfw.c disk/ieee1275/ofdisk.c \
47 kern/parser.c kern/partition.c kern/env.c kern/$(target_cpu)/dl.c \
48 kern/generic/millisleep.c kern/time.c \
49 symlist.c kern/$(target_cpu)/cache.S
50 kernel_img_CFLAGS = $(COMMON_CFLAGS)
51 kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
52 kernel_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,0x200000,-Bstatic,-melf64_sparc -static-libgcc -lgcc
53 kernel_img_FORMAT = binary
55 symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
56 /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
58 kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
59 /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
62 bin_UTILITIES = grub-mkimage
63 sbin_UTILITIES = grub-setup grub-mkdevicemap grub-ofpathname
64 ifeq ($(enable_grub_emu), yes)
65 sbin_UTILITIES += grub-emu
69 grub_mkimage_SOURCES = util/sparc64/ieee1275/grub-mkimage.c util/misc.c \
73 util/sparc64/ieee1275/grub-setup.c.dep: grub_setup_init.h
76 grub_setup_SOURCES = util/sparc64/ieee1275/grub-setup.c util/hostdisk.c \
77 util/misc.c util/getroot.c kern/device.c kern/disk.c \
78 kern/err.c kern/misc.c kern/parser.c kern/partition.c \
79 kern/file.c kern/fs.c kern/env.c fs/fshelp.c \
81 fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \
82 fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
83 fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \
84 fs/ufs.c fs/xfs.c fs/afs.c fs/befs.c fs/tar.c \
86 partmap/amiga.c partmap/apple.c partmap/pc.c \
87 partmap/bsdlabel.c partmap/sun.c partmap/acorn.c \
89 disk/raid.c disk/mdraid_linux.c disk/lvm.c \
90 util/raid.c util/lvm.c \
93 # For grub-mkdevicemap.
94 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
95 util/ieee1275/ofpath.c util/ieee1275/devicemap.c util/misc.c
97 # For grub-ofpathname.
98 grub_ofpathname_SOURCES = util/sparc64/ieee1275/grub-ofpathname.c \
99 util/ieee1275/ofpath.c util/misc.c
102 util/grub-emu.c.dep: grub_emu_init.h
105 grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
106 commands/configfile.c commands/help.c \
107 commands/search.c commands/handler.c commands/test.c \
108 commands/ls.c commands/blocklist.c commands/hexdump.c \
109 lib/hexdump.c commands/halt.c commands/reboot.c \
110 commands/gptsync.c commands/probe.c commands/xnu_uuid.c \
113 fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \
114 fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
115 fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \
116 fs/ufs.c fs/xfs.c fs/afs.c fs/befs.c fs/tar.c \
119 kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
120 kern/err.c kern/file.c kern/fs.c commands/boot.c kern/main.c \
121 kern/misc.c kern/parser.c kern/partition.c kern/reader.c \
122 kern/rescue_reader.c kern/rescue_parser.c \
123 kern/term.c kern/list.c kern/handler.c fs/fshelp.c \
124 kern/command.c kern/corecmd.c commands/extcmd.c \
125 lib/arg.c normal/cmdline.c normal/datetime.c \
126 normal/completion.c normal/misc.c \
127 normal/handler.c normal/autofs.c normal/main.c \
130 normal/menu_entry.c normal/menu_viewer.c \
132 script/sh/main.c script/sh/execute.c script/sh/function.c \
133 script/sh/lexer.c script/sh/script.c \
134 partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \
136 util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
137 util/hostdisk.c util/getroot.c \
139 disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
140 disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
141 commands/parttool.c parttool/pcpart.c \
142 grub_script.tab.c grub_emu_init.c
144 grub_emu_LDFLAGS = $(LIBCURSES)
147 sbin_SCRIPTS = grub-install
150 grub_install_SOURCES = util/sparc64/ieee1275/grub-install.in
153 pkglib_MODULES = halt.mod \
160 pkglib_MODULES += boot.mod
161 boot_mod_SOURCES = commands/boot.c lib/i386/pc/biosnum.c
162 boot_mod_CFLAGS = $(COMMON_CFLAGS)
163 boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
166 linux_mod_SOURCES = loader/sparc64/ieee1275/linux.c
167 linux_mod_CFLAGS = $(COMMON_CFLAGS)
168 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
171 reboot_mod_SOURCES = commands/reboot.c
172 reboot_mod_CFLAGS = $(COMMON_CFLAGS)
173 reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
176 halt_mod_SOURCES = commands/halt.c
177 halt_mod_CFLAGS = $(COMMON_CFLAGS)
178 halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
181 memdisk_mod_SOURCES = disk/memdisk.c
182 memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
183 memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
186 lsmmap_mod_SOURCES = commands/lsmmap.c
187 lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
188 lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
190 include $(srcdir)/conf/common.mk