2007-10-31 22:35:13 +00:00
|
|
|
# -*- makefile -*-
|
|
|
|
|
2008-08-04 11:38:45 +00:00
|
|
|
COMMON_ASFLAGS = -nostdinc -fno-builtin -m32
|
|
|
|
COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3 -m32
|
|
|
|
COMMON_LDFLAGS = -m32 -nostdlib
|
2007-10-31 22:35:13 +00:00
|
|
|
|
2008-02-01 15:45:17 +00:00
|
|
|
# Used by various components. These rules need to precede them.
|
2008-02-24 15:06:30 +00:00
|
|
|
normal/lexer.c_DEPENDENCIES = grub_script.tab.h
|
2008-02-01 15:45:17 +00:00
|
|
|
|
2007-10-31 22:35:13 +00:00
|
|
|
# Images.
|
2007-12-25 09:09:43 +00:00
|
|
|
pkglib_PROGRAMS = kernel.elf
|
2007-10-31 22:35:13 +00:00
|
|
|
|
|
|
|
# For kernel.elf.
|
|
|
|
kernel_elf_SOURCES = kern/i386/linuxbios/startup.S kern/i386/linuxbios/init.c \
|
|
|
|
kern/i386/linuxbios/table.c \
|
|
|
|
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 \
|
2008-08-05 11:54:37 +00:00
|
|
|
kern/time.c \
|
2007-10-31 22:35:13 +00:00
|
|
|
kern/i386/dl.c kern/parser.c kern/partition.c \
|
2008-08-05 20:24:00 +00:00
|
|
|
kern/i386/tsc.c kern/i386/pit.c \
|
|
|
|
kern/generic/rtc_get_time_ms.c \
|
|
|
|
kern/generic/millisleep.c \
|
2007-10-31 22:35:13 +00:00
|
|
|
kern/env.c \
|
|
|
|
term/i386/pc/console.c \
|
|
|
|
term/i386/pc/at_keyboard.c term/i386/pc/vga_text.c \
|
|
|
|
symlist.c
|
|
|
|
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 loader.h misc.h mm.h net.h parser.h \
|
|
|
|
partition.h pc_partition.h rescue.h symbol.h term.h time.h types.h \
|
|
|
|
machine/boot.h machine/console.h machine/init.h \
|
|
|
|
machine/memory.h machine/loader.h
|
|
|
|
kernel_elf_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
kernel_elf_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-S,-Ttext,0x8200,-Bstatic
|
|
|
|
|
|
|
|
MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
|
|
|
DEFSYMFILES += kernel_syms.lst
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
# Utilities.
|
|
|
|
bin_UTILITIES = grub-mkimage
|
2008-01-30 15:32:56 +00:00
|
|
|
sbin_UTILITIES = grub-mkdevicemap
|
2007-10-31 22:35:13 +00:00
|
|
|
ifeq ($(enable_grub_emu), yes)
|
|
|
|
sbin_UTILITIES += grub-emu
|
|
|
|
endif
|
|
|
|
|
|
|
|
# For grub-mkimage.
|
|
|
|
grub_mkimage_SOURCES = util/elf/grub-mkimage.c util/misc.c \
|
|
|
|
util/resolve.c
|
|
|
|
grub_mkimage_LDFLAGS = $(LIBLZO)
|
2008-06-19 05:14:16 +00:00
|
|
|
util/elf/grub-mkimage.c_DEPENDENCIES = Makefile
|
2007-10-31 22:35:13 +00:00
|
|
|
|
|
|
|
# For grub-mkdevicemap.
|
|
|
|
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c \
|
|
|
|
util/i386/get_disk_name.c
|
|
|
|
|
|
|
|
# For grub-emu.
|
2008-01-27 22:44:02 +00:00
|
|
|
util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
|
2007-10-31 22:35:13 +00:00
|
|
|
grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \
|
|
|
|
commands/configfile.c commands/echo.c commands/help.c \
|
|
|
|
commands/terminal.c commands/ls.c commands/test.c \
|
2007-11-18 06:41:46 +00:00
|
|
|
commands/search.c commands/blocklist.c commands/hexdump.c \
|
2008-07-27 13:51:30 +00:00
|
|
|
lib/hexdump.c commands/i386/cpuid.c \
|
2008-02-10 20:00:37 +00:00
|
|
|
disk/host.c disk/loopback.c \
|
2008-01-25 Robert Millan <rmh@aybabtu.com>
* conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
make all filesystem sources appear together (possibly fixing omissions
while at it).
* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
* conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
* conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
add `kern/file.c'.
* conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
* conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
* conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
* conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
* util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
(probe): Add a sanity check to make sure of our ability to read
requested files when probing for filesystem type.
* genmk.rb: Update copyright year (2007).
* include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
(grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
(grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
(grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
(grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
: Remove function prototypes.
2008-01-25 22:33:57 +00:00
|
|
|
\
|
|
|
|
fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \
|
2008-02-24 15:34:15 +00:00
|
|
|
fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
|
2008-01-25 Robert Millan <rmh@aybabtu.com>
* conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
make all filesystem sources appear together (possibly fixing omissions
while at it).
* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
* conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
* conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
add `kern/file.c'.
* conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
* conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
* conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
* conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
* util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
(probe): Add a sanity check to make sure of our ability to read
requested files when probing for filesystem type.
* genmk.rb: Update copyright year (2007).
* include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
(grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
(grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
(grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
(grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
: Remove function prototypes.
2008-01-25 22:33:57 +00:00
|
|
|
fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \
|
2008-03-31 11:18:00 +00:00
|
|
|
fs/ufs.c fs/xfs.c fs/afs.c \
|
2008-01-25 Robert Millan <rmh@aybabtu.com>
* conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
make all filesystem sources appear together (possibly fixing omissions
while at it).
* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
* conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
* conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
add `kern/file.c'.
* conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
* conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
* conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
* conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
* util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
(probe): Add a sanity check to make sure of our ability to read
requested files when probing for filesystem type.
* genmk.rb: Update copyright year (2007).
* include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
(grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
(grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
(grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
(grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
: Remove function prototypes.
2008-01-25 22:33:57 +00:00
|
|
|
\
|
|
|
|
fs/fshelp.c \
|
2007-10-31 22:35:13 +00:00
|
|
|
io/gzio.c \
|
|
|
|
kern/device.c kern/disk.c kern/dl.c kern/elf.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/main.c \
|
|
|
|
normal/menu.c normal/menu_entry.c normal/misc.c normal/script.c \
|
2008-01-05 12:10:28 +00:00
|
|
|
normal/color.c \
|
2007-10-31 22:35:13 +00:00
|
|
|
partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \
|
|
|
|
partmap/acorn.c partmap/gpt.c \
|
|
|
|
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
|
2008-02-10 20:00:37 +00:00
|
|
|
util/biosdisk.c util/getroot.c \
|
|
|
|
util/i386/pc/misc.c \
|
|
|
|
\
|
|
|
|
disk/raid.c disk/lvm.c \
|
|
|
|
grub_emu_init.c
|
2007-10-31 22:35:13 +00:00
|
|
|
|
|
|
|
grub_emu_LDFLAGS = $(LIBCURSES)
|
|
|
|
|
|
|
|
# Modules.
|
2007-12-25 09:09:43 +00:00
|
|
|
pkglib_MODULES = _linux.mod linux.mod normal.mod \
|
2008-02-28 13:04:35 +00:00
|
|
|
_multiboot.mod multiboot.mod aout.mod \
|
2008-08-03 18:14:07 +00:00
|
|
|
play.mod cpuid.mod serial.mod ata.mod \
|
|
|
|
memdisk.mod pci.mod lspci.mod
|
2007-10-31 22:35:13 +00:00
|
|
|
|
|
|
|
# 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/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 \
|
2008-01-05 17:13:08 +00:00
|
|
|
normal/script.c normal/i386/setjmp.S normal/color.c
|
2007-10-31 22:35:13 +00:00
|
|
|
normal_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
|
|
|
normal_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 \
|
|
|
|
loader/i386/pc/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)
|
|
|
|
|
2008-02-28 13:04:35 +00:00
|
|
|
# For aout.mod.
|
|
|
|
aout_mod_SOURCES = loader/aout.c
|
|
|
|
aout_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
aout_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
2007-10-31 22:35:13 +00:00
|
|
|
# For play.mod.
|
|
|
|
play_mod_SOURCES = commands/i386/pc/play.c
|
|
|
|
play_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
play_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For cpuid.mod.
|
|
|
|
cpuid_mod_SOURCES = commands/i386/cpuid.c
|
|
|
|
cpuid_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
cpuid_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
2007-11-05 16:15:27 +00:00
|
|
|
# For ata.mod.
|
|
|
|
ata_mod_SOURCES = disk/ata.c
|
|
|
|
ata_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
ata_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
2008-08-02 12:17:44 +00:00
|
|
|
# For memdisk.mod.
|
|
|
|
memdisk_mod_SOURCES = disk/memdisk.c
|
|
|
|
memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
2008-08-03 18:14:07 +00:00
|
|
|
# For pci.mod
|
|
|
|
pci_mod_SOURCES = bus/pci.c
|
|
|
|
pci_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For lspci.mod
|
|
|
|
lspci_mod_SOURCES = commands/lspci.c
|
|
|
|
lspci_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
2007-10-31 22:35:13 +00:00
|
|
|
include $(srcdir)/conf/common.mk
|