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 msdos_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)
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/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c \
82 fs/befs.c fs/befs_be.c fs/tar.c \
84 partmap/amiga.c partmap/apple.c partmap/msdos.c \
85 partmap/sun.c partmap/acorn.c \
87 disk/raid.c disk/mdraid_linux.c disk/lvm.c \
88 util/raid.c util/lvm.c \
91 # For grub-mkdevicemap.
92 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
93 util/ieee1275/ofpath.c util/ieee1275/devicemap.c util/misc.c
95 # For grub-ofpathname.
96 grub_ofpathname_SOURCES = util/sparc64/ieee1275/grub-ofpathname.c \
97 util/ieee1275/ofpath.c util/misc.c
100 util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
101 grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
102 commands/configfile.c commands/help.c \
103 commands/search.c commands/handler.c commands/test.c \
104 commands/ls.c commands/blocklist.c commands/hexdump.c \
105 lib/hexdump.c commands/halt.c commands/reboot.c \
106 lib/envblk.c commands/loadenv.c \
107 commands/gptsync.c commands/probe.c commands/xnu_uuid.c \
108 commands/password.c commands/keystatus.c \
111 fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \
112 fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
113 fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \
114 fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c \
115 fs/befs.c fs/befs_be.c fs/tar.c \
118 kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
119 kern/err.c kern/file.c kern/fs.c commands/boot.c kern/main.c \
120 kern/misc.c kern/parser.c kern/partition.c kern/reader.c \
121 kern/rescue_reader.c kern/rescue_parser.c \
122 kern/term.c kern/list.c kern/handler.c fs/fshelp.c \
123 kern/command.c kern/corecmd.c commands/extcmd.c \
124 lib/arg.c normal/cmdline.c normal/datetime.c \
125 normal/completion.c normal/misc.c \
126 normal/handler.c normal/auth.c normal/autofs.c normal/main.c \
129 normal/menu_entry.c normal/menu_viewer.c \
131 script/sh/main.c script/sh/execute.c script/sh/function.c \
132 script/sh/lexer.c script/sh/script.c \
133 partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \
135 util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
136 util/hostdisk.c util/getroot.c \
138 disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
139 disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
140 commands/parttool.c parttool/msdospart.c \
141 grub_script.tab.c grub_emu_init.c
143 grub_emu_LDFLAGS = $(LIBCURSES)
146 sbin_SCRIPTS = grub-install
149 grub_install_SOURCES = util/sparc64/ieee1275/grub-install.in
152 pkglib_MODULES = halt.mod \
159 pkglib_MODULES += boot.mod
160 boot_mod_SOURCES = commands/boot.c lib/i386/pc/biosnum.c
161 boot_mod_CFLAGS = $(COMMON_CFLAGS)
162 boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
165 linux_mod_SOURCES = loader/sparc64/ieee1275/linux.c
166 linux_mod_CFLAGS = $(COMMON_CFLAGS)
167 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
170 reboot_mod_SOURCES = commands/reboot.c
171 reboot_mod_CFLAGS = $(COMMON_CFLAGS)
172 reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
175 halt_mod_SOURCES = commands/halt.c
176 halt_mod_CFLAGS = $(COMMON_CFLAGS)
177 halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
180 memdisk_mod_SOURCES = disk/memdisk.c
181 memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
182 memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
185 lsmmap_mod_SOURCES = commands/lsmmap.c
186 lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
187 lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
189 include $(srcdir)/conf/common.mk