71b9f36193
* commands/terminal.c: Removed. * commands/handler.c: New file. * include/grub/list.h: Likewise. * include/grub/handler.h: Likewise. * kern/list.c: Likewise. * kern/handler.c: Likewise. * kern/term.h: Include header file <grub/handler.h>. (grub_term_input): Move next field to the beginning. (grub_term_output): Likewise. (grub_term_input_class): New variable. (grub_term_output_class): Likewise. (grub_term_register_input): Changed to inline function. (grub_term_register_output): Likewise. (grub_term_unregister_input): Likewise. (grub_term_unregister_output): Likewise. (grub_term_set_current_input): Likewise. (grub_term_set_current_output): Likewise. (grub_term_get_current_input): Likewise. (grub_term_get_current_output): Likewise. (grub_term_iterate_input): Removed. (grub_term_iterate_output): Likewise. * kern/term.c (grub_term_list_input): Removed. (grub_term_list_output): Likewise. (grub_term_input_class): New variable. (grub_term_output_class): Likewise. (grub_cur_term_input): Change varaible as macro. (grub_cur_term_output): Likewise. (grub_term_register_input): Removed. (grub_term_register_output): Likewise. (grub_term_unregister_input): Likewise. (grub_term_unregister_output): Likewise. (grub_term_set_current_input): Likewise. (grub_term_set_current_output): Likewise. (grub_term_iterate_input): Likewise. (grub_term_iterate_output): Likewise. (grub_term_get_current_input): Likewise. (grub_term_get_current_output): Likewise. * util/grub-editenv.c: Include header file <grub/handler.h>. (grub_term_get_current_input): Removed. (grub_term_get_current_output): Likewise. (grub_term_input_class): New variable. (grub_term_outout_class): Likewise. * util/grub-fstest.c (grub_term_get_current_input): Removed. (grub_term_get_current_output): Likewise. (grub_term_input_class): New variable. (grub_term_outout_class): Likewise. * util/grub-probe.c (grub_term_get_current_input): Removed. (grub_term_get_current_output): Likewise. (grub_term_input_class): New variable. (grub_term_outout_class): Likewise. * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed. (grub_term_get_current_output): Likewise. (grub_term_input_class): New variable. (grub_term_outout_class): Likewise. * conf/common.rmk (pkglib_MODULES): Replace terminal with handler. (terminal_mod_SOURCES): Likewise. (terminal_mod_CFLAGS): Likewise. (terminal_mod_LDFLAGS): Likewise. * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with handler.c. (kernel_img_SOURCES): Add list.c and handler.c. (kernel_img_HEADERS): Add list.h and handler.h. * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with handler.c. (kernel_mod_SOURCES): Add list.c and handler.c. (kernel_mod_HEADERS): Add list.h and handler.h. * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with handler.c. (kernel_elf_SOURCES): Add list.c and handler.c. (kernel_elf_HEADERS): Add list.h and handler.h. * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with handler.c. (kernel_elf_SOURCES): Add list.c and handler.c. (kernel_elf_HEADERS): Add list.h and handler.h. * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with handler.c. (kernel_mod_SOURCES): Add list.c and handler.c. (kernel_mod_HEADERS): Add list.h and handler.h. * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with handler.c. (kernel_elf_SOURCES): Add list.c and handler.c. (kernel_elf_HEADERS): Add list.h and handler.h.
185 lines
6 KiB
Makefile
185 lines
6 KiB
Makefile
|
|
# -*- makefile -*-
|
|
|
|
COMMON_ASFLAGS = -nostdinc -D__ASSEMBLY__
|
|
COMMON_CFLAGS = -ffreestanding
|
|
COMMON_LDFLAGS += -nostdlib
|
|
|
|
# Used by various components. These rules need to precede them.
|
|
normal/lexer.c_DEPENDENCIES = grub_script.tab.h
|
|
|
|
# Images.
|
|
|
|
MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
|
DEFSYMFILES += kernel_syms.lst
|
|
|
|
kernel_elf_HEADERS = arg.h boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
|
env.h err.h file.h fs.h kernel.h misc.h mm.h net.h parser.h rescue.h \
|
|
symbol.h term.h time.h types.h powerpc/libgcc.h loader.h partition.h \
|
|
pc_partition.h ieee1275/ieee1275.h machine/kernel.h
|
|
|
|
symlist.c: $(addprefix include/grub/,$(kernel_elf_HEADERS)) config.h gensymlist.sh
|
|
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
|
|
kernel_syms.lst: $(addprefix include/grub/,$(kernel_elf_HEADERS)) config.h genkernsyms.sh
|
|
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
|
|
# Programs
|
|
pkglib_PROGRAMS = kernel.elf
|
|
|
|
# Utilities.
|
|
sbin_UTILITIES = grub-mkdevicemap
|
|
ifeq ($(enable_grub_emu), yes)
|
|
sbin_UTILITIES += grub-emu
|
|
endif
|
|
|
|
# For grub-mkdevicemap.
|
|
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c
|
|
|
|
# For grub-emu
|
|
util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
|
|
grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \
|
|
commands/configfile.c commands/help.c \
|
|
commands/search.c commands/handler.c commands/test.c \
|
|
commands/ls.c commands/blocklist.c commands/hexdump.c \
|
|
lib/hexdump.c commands/halt.c commands/reboot.c \
|
|
disk/loopback.c \
|
|
\
|
|
fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/ext2.c fs/hfs.c \
|
|
fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
|
|
fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \
|
|
fs/ufs.c fs/xfs.c fs/afs.c fs/tar.c \
|
|
\
|
|
io/gzio.c \
|
|
kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
|
|
kern/err.c kern/file.c kern/fs.c kern/loader.c kern/main.c \
|
|
kern/misc.c kern/parser.c kern/partition.c kern/rescue.c \
|
|
kern/term.c fs/fshelp.c \
|
|
normal/arg.c normal/cmdline.c normal/command.c \
|
|
normal/completion.c normal/execute.c \
|
|
normal/function.c normal/lexer.c normal/main.c normal/menu.c \
|
|
normal/menu_text.c \
|
|
normal/menu_entry.c normal/menu_viewer.c normal/misc.c \
|
|
normal/script.c \
|
|
normal/color.c \
|
|
partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \
|
|
partmap/acorn.c \
|
|
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
|
|
util/hostdisk.c util/getroot.c \
|
|
util/powerpc/ieee1275/misc.c \
|
|
\
|
|
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
|
|
disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
|
|
grub_script.tab.c grub_emu_init.c
|
|
|
|
grub_emu_LDFLAGS = $(LIBCURSES)
|
|
|
|
kernel_elf_SOURCES = kern/powerpc/ieee1275/startup.S kern/ieee1275/cmain.c \
|
|
kern/ieee1275/ieee1275.c kern/main.c kern/device.c \
|
|
kern/disk.c kern/dl.c kern/err.c kern/file.c kern/fs.c \
|
|
kern/misc.c kern/mm.c kern/loader.c kern/rescue.c kern/term.c \
|
|
kern/ieee1275/init.c \
|
|
kern/ieee1275/mmap.c \
|
|
term/ieee1275/ofconsole.c \
|
|
kern/ieee1275/openfw.c disk/ieee1275/ofdisk.c \
|
|
kern/parser.c kern/partition.c kern/env.c kern/powerpc/dl.c \
|
|
kern/generic/millisleep.c kern/time.c \
|
|
symlist.c kern/powerpc/cache.S
|
|
kernel_elf_HEADERS = grub/powerpc/ieee1275/ieee1275.h
|
|
kernel_elf_CFLAGS = $(COMMON_CFLAGS)
|
|
kernel_elf_ASFLAGS = $(COMMON_ASFLAGS)
|
|
kernel_elf_LDFLAGS = $(COMMON_LDFLAGS) -static-libgcc -lgcc \
|
|
-Wl,-N,-S,-Ttext,0x200000,-Bstatic
|
|
|
|
# Scripts.
|
|
sbin_SCRIPTS = grub-install
|
|
bin_SCRIPTS = grub-mkrescue
|
|
|
|
# For grub-install.
|
|
grub_install_SOURCES = util/ieee1275/grub-install.in
|
|
|
|
# For grub-mkrescue.
|
|
grub_mkrescue_SOURCES = util/powerpc/ieee1275/grub-mkrescue.in
|
|
|
|
# Modules.
|
|
pkglib_MODULES = halt.mod \
|
|
_linux.mod \
|
|
linux.mod \
|
|
normal.mod \
|
|
reboot.mod \
|
|
suspend.mod \
|
|
_multiboot.mod \
|
|
multiboot.mod \
|
|
memdisk.mod \
|
|
lsmmap.mod
|
|
|
|
# For _linux.mod.
|
|
_linux_mod_SOURCES = loader/powerpc/ieee1275/linux.c
|
|
_linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
_linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For linux.mod.
|
|
linux_mod_SOURCES = loader/powerpc/ieee1275/linux_normal.c
|
|
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
#
|
|
# Only arch dependant part of normal.mod will be here. Common part for
|
|
# all architecures of normal.mod is at start and should be kept at sync
|
|
# with other makefiles.
|
|
#
|
|
# Please put arch dependant part of normal.mod at the end of list to
|
|
# keep it simpler to update to different architectures.
|
|
#
|
|
normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
|
|
normal/completion.c normal/execute.c \
|
|
normal/function.c normal/lexer.c normal/main.c normal/menu.c \
|
|
normal/menu_text.c \
|
|
normal/color.c \
|
|
normal/menu_viewer.c normal/menu_entry.c \
|
|
normal/misc.c grub_script.tab.c \
|
|
normal/script.c \
|
|
normal/powerpc/setjmp.S
|
|
normal_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
|
normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For suspend.mod
|
|
suspend_mod_SOURCES = commands/ieee1275/suspend.c
|
|
suspend_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
suspend_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For reboot.mod
|
|
reboot_mod_SOURCES = commands/reboot.c
|
|
reboot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For halt.mod
|
|
halt_mod_SOURCES = commands/halt.c
|
|
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For _multiboot.mod
|
|
_multiboot_mod_SOURCES = loader/ieee1275/multiboot2.c \
|
|
loader/multiboot2.c \
|
|
loader/multiboot_loader.c
|
|
_multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
_multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For multiboot.mod
|
|
multiboot_mod_SOURCES = loader/multiboot_loader_normal.c
|
|
multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For memdisk.mod.
|
|
memdisk_mod_SOURCES = disk/memdisk.c
|
|
memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For lsmmap.mod
|
|
lsmmap_mod_SOURCES = commands/lsmmap.c
|
|
lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
include $(srcdir)/conf/common.mk
|
|
|