7b455f4dd3
* util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments explicitly to suppress gcc's warnings. * fs/fat.c (grub_fat_find_dir): Likewise. (grub_fat_label): Likewise. * fs/xfs.c (grub_xfs_read_inode): Likewise. (grub_xfs_mount): Likewise. (grub_xfs_label): Likewise. * fs/affs.c (grub_affs_mount): Likewise. (grub_affs_label): Likewise. (grub_affs_iterate_dir): Likewise. * fs/sfs.c (grub_sfs_mount): Likewise. (grub_sfs_iterate_dir): Likewise. * fs/ufs.c (grub_ufs_lookup_symlink): Likewise. * fs/hfs.c (grub_hfs_mount): Likewise. (grub_hfs_cmp_catkeys): Likewise. (grub_hfs_find_dir): Likewise. (grub_hfs_dir): Likewise. (grub_hfs_label): Likewise. * fs/jfs.c (grub_jfs_mount): Likewise. (grub_jfs_opendir): Likewise. (grub_jfs_getent): Likewise. (grub_jfs_lookup_symlink): Likewise. (grub_jfs_label): Likewise. * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise. (grub_hfsplus_iterate_dir): Likewise. (grub_hfsplus_btree_iterate_node): Made static. * util/grub-emu.c (prefix): New variable. (grub_machine_set_prefix): New function. (main): Do not set the environment variable "prefix" here. Only set PREFIX, which is used later by grub_machine_set_prefix. * include/grub/video.h: Do not include grub/symbol.h. (grub_video_register): Not exported. This symbol is not defined in the kernel. (grub_video_unregister): Likewise. (grub_video_iterate): Likewise. (grub_video_setup): Likewise. (grub_video_restore): Likewise. (grub_video_get_info): Likewise. (grub_video_get_blit_format): Likewise. (grub_video_set_palette): Likewise. (grub_video_get_palette): Likewise. (grub_video_set_viewport): Likewise. (grub_video_get_viewport): Likewise. (grub_video_map_color): Likewise. (grub_video_map_rgb): Likewise. (grub_video_map_rgba): Likewise. (grub_video_fill_rect): Likewise. (grub_video_blit_glyph): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. (grub_video_scroll): Likewise. (grub_video_swap_buffers): Likewise. (grub_video_create_render_target): Likewise. (grub_video_delete_render_target): Likewise. (grub_video_set_active_render_target): Likewise. * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC): Undefined. [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise. * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh. (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh instead of $(srcdir)/genkernsyms.sh. * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh. (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh instead of $(srcdir)/genkernsyms.sh. * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh. (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh instead of $(srcdir)/genkernsyms.sh. * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh. (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh instead of $(srcdir)/genkernsyms.sh. * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and genkernsyms.sh. * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and genkernsyms.sh. (gensymlist.sh): New target. (genkernsyms.sh): Likewise. * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added genkernsyms.sh.in and gensymlist.sh.in. * genkernsyms.sh: Removed. * gensymlist.sh: Likewise. * genkernsyms.sh.in: New file. * gensymlist.sh.in: Likewise.
212 lines
7.2 KiB
Makefile
212 lines
7.2 KiB
Makefile
# -*- makefile -*-
|
|
|
|
COMMON_ASFLAGS = -nostdinc -fno-builtin
|
|
COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3 -m32
|
|
COMMON_LDFLAGS = -melf_i386 -nostdlib
|
|
|
|
# Images.
|
|
pkgdata_IMAGES = boot.img diskboot.img kernel.img pxeboot.img
|
|
|
|
# For boot.img.
|
|
boot_img_SOURCES = boot/i386/pc/boot.S
|
|
boot_img_ASFLAGS = $(COMMON_ASFLAGS)
|
|
boot_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00
|
|
|
|
# For pxeboot.img
|
|
pxeboot_img_SOURCES = boot/i386/pc/pxeboot.S
|
|
pxeboot_img_ASFLAGS = $(COMMON_ASFLAGS)
|
|
pxeboot_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00
|
|
|
|
# For diskboot.img.
|
|
diskboot_img_SOURCES = boot/i386/pc/diskboot.S
|
|
diskboot_img_ASFLAGS = $(COMMON_ASFLAGS)
|
|
diskboot_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,8000
|
|
|
|
# For kernel.img.
|
|
kernel_img_SOURCES = kern/i386/pc/startup.S kern/main.c kern/device.c \
|
|
kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
|
|
kern/misc.c kern/mm.c kern/loader.c kern/rescue.c kern/term.c \
|
|
kern/i386/dl.c kern/i386/pc/init.c kern/parser.c kern/partition.c \
|
|
kern/env.c disk/i386/pc/biosdisk.c \
|
|
term/i386/pc/console.c \
|
|
symlist.c
|
|
kernel_img_HEADERS = arg.h boot.h device.h disk.h dl.h elf.h env.h err.h \
|
|
file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h partition.h \
|
|
pc_partition.h rescue.h symbol.h term.h types.h \
|
|
machine/biosdisk.h machine/boot.h machine/console.h machine/init.h \
|
|
machine/memory.h machine/loader.h machine/time.h machine/vga.h \
|
|
machine/vbe.h
|
|
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
|
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
|
kernel_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,8200 $(COMMON_CFLAGS)
|
|
|
|
MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
|
DEFSYMFILES += kernel_syms.lst
|
|
|
|
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
|
|
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
|
|
kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
|
|
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
|
|
# Utilities.
|
|
bin_UTILITIES = grub-mkimage
|
|
sbin_UTILITIES = grub-setup grub-emu grub-mkdevicemap grub-probefs
|
|
noinst_UTILITIES = genmoddep
|
|
|
|
# For grub-mkimage.
|
|
grub_mkimage_SOURCES = util/i386/pc/grub-mkimage.c util/misc.c \
|
|
util/resolve.c
|
|
grub_mkimage_LDFLAGS = $(LIBLZO)
|
|
|
|
# For grub-setup.
|
|
grub_setup_SOURCES = util/i386/pc/grub-setup.c util/i386/pc/biosdisk.c \
|
|
util/misc.c util/i386/pc/getroot.c kern/device.c kern/disk.c \
|
|
kern/err.c kern/misc.c fs/fat.c fs/ext2.c fs/xfs.c fs/affs.c \
|
|
fs/sfs.c kern/parser.c kern/partition.c partmap/pc.c \
|
|
fs/ufs.c fs/minix.c fs/hfs.c fs/jfs.c fs/hfsplus.c kern/file.c \
|
|
kern/fs.c kern/env.c fs/fshelp.c
|
|
|
|
# For grub-mkdevicemap.
|
|
grub_mkdevicemap_SOURCES = util/i386/pc/grub-mkdevicemap.c util/misc.c
|
|
|
|
# For grub-probefs.
|
|
grub_probefs_SOURCES = util/i386/pc/grub-probefs.c \
|
|
util/i386/pc/biosdisk.c util/misc.c util/i386/pc/getroot.c \
|
|
kern/device.c kern/disk.c kern/err.c kern/misc.c fs/fat.c \
|
|
fs/ext2.c kern/parser.c kern/partition.c partmap/pc.c fs/ufs.c \
|
|
fs/minix.c fs/hfs.c fs/jfs.c kern/fs.c kern/env.c fs/fshelp.c \
|
|
fs/xfs.c fs/affs.c fs/sfs.c fs/hfsplus.c
|
|
|
|
# For grub-emu.
|
|
grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \
|
|
commands/configfile.c commands/default.c commands/help.c \
|
|
commands/terminal.c commands/ls.c commands/test.c \
|
|
commands/search.c commands/timeout.c \
|
|
commands/i386/pc/halt.c commands/i386/pc/reboot.c \
|
|
disk/loopback.c \
|
|
fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c \
|
|
fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c fs/hfsplus.c \
|
|
io/gzio.c \
|
|
kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c \
|
|
normal/execute.c kern/file.c kern/fs.c normal/lexer.c \
|
|
kern/loader.c kern/main.c kern/misc.c kern/parser.c \
|
|
grub_script.tab.c kern/partition.c kern/rescue.c kern/term.c \
|
|
normal/arg.c normal/cmdline.c normal/command.c normal/function.c\
|
|
normal/completion.c normal/context.c normal/main.c \
|
|
normal/menu.c normal/menu_entry.c normal/misc.c normal/script.c \
|
|
partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \
|
|
partmap/acorn.c partmap/gpt.c \
|
|
util/console.c util/grub-emu.c util/misc.c \
|
|
util/i386/pc/biosdisk.c util/i386/pc/getroot.c \
|
|
util/i386/pc/misc.c grub_emu_init.c
|
|
|
|
grub_emu_LDFLAGS = $(LIBCURSES)
|
|
|
|
# For genmoddep.
|
|
genmoddep_SOURCES = util/genmoddep.c
|
|
|
|
# Scripts.
|
|
sbin_SCRIPTS = grub-install
|
|
|
|
# For grub-install.
|
|
grub_install_SOURCES = util/i386/pc/grub-install.in
|
|
|
|
# Modules.
|
|
pkgdata_MODULES = _chain.mod _linux.mod linux.mod normal.mod \
|
|
_multiboot.mod chain.mod multiboot.mod reboot.mod halt.mod \
|
|
vbe.mod vbetest.mod vbeinfo.mod video.mod gfxterm.mod \
|
|
videotest.mod play.mod
|
|
|
|
# For _chain.mod.
|
|
_chain_mod_SOURCES = loader/i386/pc/chainloader.c
|
|
_chain_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
_chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For chain.mod.
|
|
chain_mod_SOURCES = loader/i386/pc/chainloader_normal.c
|
|
chain_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For _linux.mod.
|
|
_linux_mod_SOURCES = loader/i386/pc/linux.c
|
|
_linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
_linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For linux.mod.
|
|
linux_mod_SOURCES = loader/i386/pc/linux_normal.c
|
|
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For normal.mod.
|
|
normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
|
|
normal/completion.c normal/context.c normal/execute.c \
|
|
normal/function.c normal/lexer.c normal/main.c normal/menu.c \
|
|
normal/menu_entry.c normal/misc.c grub_script.tab.c \
|
|
normal/script.c normal/i386/setjmp.S
|
|
normal_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
normal_mod_ASFLAGS = $(COMMON_ASFLAGS) -m32
|
|
normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For reboot.mod.
|
|
reboot_mod_SOURCES = commands/i386/pc/reboot.c
|
|
reboot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For halt.mod.
|
|
halt_mod_SOURCES = commands/i386/pc/halt.c
|
|
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For serial.mod.
|
|
serial_mod_SOURCES = term/i386/pc/serial.c
|
|
serial_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
serial_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For _multiboot.mod.
|
|
_multiboot_mod_SOURCES = loader/i386/pc/multiboot.c
|
|
_multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
_multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For multiboot.mod.
|
|
multiboot_mod_SOURCES = loader/i386/pc/multiboot_normal.c
|
|
multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For vbe.mod.
|
|
vbe_mod_SOURCES = video/i386/pc/vbe.c video/i386/pc/vbeblit.c \
|
|
video/i386/pc/vbefill.c
|
|
vbe_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
vbe_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For vbeinfo.mod.
|
|
vbeinfo_mod_SOURCES = commands/i386/pc/vbeinfo.c
|
|
vbeinfo_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
vbeinfo_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For vbetest.mod.
|
|
vbetest_mod_SOURCES = commands/i386/pc/vbetest.c
|
|
vbetest_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
vbetest_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For play.mod.
|
|
play_mod_SOURCES = commands/i386/pc/play.c
|
|
play_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
play_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For video.mod.
|
|
video_mod_SOURCES = video/video.c
|
|
video_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
video_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For gfxterm.mod.
|
|
gfxterm_mod_SOURCES = term/gfxterm.c
|
|
gfxterm_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
gfxterm_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For videotest.mod.
|
|
videotest_mod_SOURCES = commands/videotest.c
|
|
videotest_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
videotest_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
include $(srcdir)/conf/common.mk
|