4 COMMON_ASFLAGS = -nostdinc -D__ASSEMBLY__
5 COMMON_CFLAGS = -ffreestanding -msoft-float
6 COMMON_LDFLAGS += -nostdlib
10 MOSTLYCLEANFILES += kernel_elf_symlist.c kernel_syms.lst
11 DEFSYMFILES += kernel_syms.lst
13 kernel_elf_HEADERS = arg.h boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
14 env.h err.h file.h fs.h kernel.h misc.h mm.h net.h parser.h rescue.h \
15 symbol.h term.h types.h powerpc/libgcc.h loader.h partition.h \
16 pc_partition.h ieee1275/ieee1275.h machine/time.h machine/kernel.h
18 kernel_elf_symlist.c: $(addprefix include/grub/,$(kernel_elf_HEADERS)) config.h gensymlist.sh
19 /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
21 kernel_syms.lst: $(addprefix include/grub/,$(kernel_elf_HEADERS)) config.h genkernsyms.sh
22 /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
25 pkgdata_PROGRAMS = kernel.elf
28 bin_UTILITIES = grub-mkimage
29 sbin_UTILITIES = grub-emu
32 grub_mkimage_SOURCES = util/powerpc/ieee1275/grub-mkimage.c util/misc.c \
36 grub_emu_DEPENDENCIES = grub_script.tab.c grub_script.tab.h \
38 grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \
39 commands/configfile.c commands/help.c \
40 commands/search.c commands/terminal.c commands/test.c \
41 commands/ls.c commands/blocklist.c \
42 commands/ieee1275/halt.c commands/ieee1275/reboot.c \
44 fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c \
45 fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c fs/hfsplus.c \
47 kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
48 kern/err.c kern/file.c kern/fs.c kern/loader.c kern/main.c \
49 kern/misc.c kern/parser.c kern/partition.c kern/rescue.c \
51 normal/arg.c normal/cmdline.c normal/command.c \
52 normal/completion.c normal/execute.c \
53 normal/function.c normal/lexer.c normal/main.c normal/menu.c \
54 normal/menu_entry.c normal/misc.c normal/script.c \
55 partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \
57 util/console.c util/grub-emu.c util/misc.c \
58 util/i386/pc/biosdisk.c util/i386/pc/getroot.c \
59 util/powerpc/ieee1275/misc.c grub_script.tab.c grub_emu_init.c
61 grub_emu_LDFLAGS = $(LIBCURSES)
63 kernel_elf_SOURCES = kern/powerpc/ieee1275/crt0.S kern/powerpc/ieee1275/cmain.c \
64 kern/ieee1275/ieee1275.c kern/main.c kern/device.c \
65 kern/disk.c kern/dl.c kern/err.c kern/file.c kern/fs.c \
66 kern/misc.c kern/mm.c kern/loader.c kern/rescue.c kern/term.c \
67 kern/powerpc/ieee1275/init.c term/ieee1275/ofconsole.c \
68 kern/powerpc/ieee1275/openfw.c disk/ieee1275/ofdisk.c \
69 kern/parser.c kern/partition.c kern/env.c kern/powerpc/dl.c \
70 kernel_elf_symlist.c kern/powerpc/cache.S
71 kernel_elf_HEADERS = grub/powerpc/ieee1275/ieee1275.h
72 kernel_elf_CFLAGS = $(COMMON_CFLAGS)
73 kernel_elf_ASFLAGS = $(COMMON_ASFLAGS)
74 kernel_elf_LDFLAGS = $(COMMON_LDFLAGS) -static-libgcc -lgcc \
75 -Wl,-N,-S,-Ttext,0x200000,-Bstatic
78 sbin_SCRIPTS = grub-install
81 grub_install_SOURCES = util/powerpc/ieee1275/grub-install.in
84 pkgdata_MODULES = halt.mod \
92 _linux_mod_SOURCES = loader/powerpc/ieee1275/linux.c
93 _linux_mod_CFLAGS = $(COMMON_CFLAGS)
94 _linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
97 linux_mod_SOURCES = loader/powerpc/ieee1275/linux_normal.c
98 linux_mod_CFLAGS = $(COMMON_CFLAGS)
99 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
102 normal_mod_DEPENDENCIES = grub_script.tab.c grub_script.tab.h
103 normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
104 normal/completion.c normal/execute.c \
105 normal/function.c normal/lexer.c normal/main.c normal/menu.c \
106 normal/menu_entry.c normal/misc.c grub_script.tab.c \
107 normal/script.c normal/powerpc/setjmp.S
108 normal_mod_CFLAGS = $(COMMON_CFLAGS)
109 normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
110 normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
113 suspend_mod_SOURCES = commands/ieee1275/suspend.c
114 suspend_mod_CFLAGS = $(COMMON_CFLAGS)
115 suspend_mod_LDFLAGS = $(COMMON_LDFLAGS)
118 reboot_mod_SOURCES = commands/ieee1275/reboot.c
119 reboot_mod_CFLAGS = $(COMMON_CFLAGS)
120 reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
123 halt_mod_SOURCES = commands/ieee1275/halt.c
124 halt_mod_CFLAGS = $(COMMON_CFLAGS)
125 halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
127 include $(srcdir)/conf/common.mk