2009-06-27 11:18:10 +00:00
|
|
|
# -*- makefile -*-
|
2010-02-07 22:49:49 +00:00
|
|
|
|
2010-02-10 00:39:23 +00:00
|
|
|
COMMON_CFLAGS = -mrtd -mregparm=3
|
2010-02-07 22:49:49 +00:00
|
|
|
|
|
|
|
# Images.
|
|
|
|
|
|
|
|
GRUB_KERNEL_MACHINE_LINK_ADDR = 0x8200
|
|
|
|
GRUB_BOOT_MACHINE_LINK_ADDR = 0xffe00
|
|
|
|
|
|
|
|
pkglib_IMAGES += boot.img
|
|
|
|
boot_img_SOURCES = boot/i386/qemu/boot.S
|
|
|
|
boot_img_ASFLAGS = $(COMMON_ASFLAGS) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)
|
|
|
|
boot_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_BOOT_MACHINE_LINK_ADDR)
|
|
|
|
boot_img_FORMAT = binary
|
|
|
|
|
2010-04-24 23:54:46 +00:00
|
|
|
pkglib_PROGRAMS += kernel.img
|
2010-02-07 22:49:49 +00:00
|
|
|
kernel_img_SOURCES = kern/i386/qemu/startup.S \
|
|
|
|
kern/i386/misc.S \
|
|
|
|
kern/i386/coreboot/init.c \
|
|
|
|
kern/i386/qemu/mmap.c \
|
|
|
|
kern/i386/halt.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/term.c \
|
|
|
|
kern/rescue_parser.c kern/rescue_reader.c \
|
|
|
|
kern/time.c kern/list.c kern/handler.c kern/command.c kern/corecmd.c \
|
|
|
|
kern/$(target_cpu)/dl.c kern/parser.c kern/partition.c \
|
|
|
|
kern/i386/tsc.c kern/i386/pit.c \
|
|
|
|
kern/generic/rtc_get_time_ms.c \
|
|
|
|
kern/generic/millisleep.c \
|
|
|
|
kern/env.c \
|
|
|
|
term/i386/pc/vga_text.c term/i386/vga_common.c \
|
|
|
|
symlist.c
|
2010-05-02 20:06:44 +00:00
|
|
|
kernel_img_HEADERS += i386/pit.h
|
2010-02-07 22:49:49 +00:00
|
|
|
kernel_img_CFLAGS = $(COMMON_CFLAGS) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)
|
|
|
|
kernel_img_ASFLAGS = $(COMMON_ASFLAGS) -DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR)
|
2010-04-10 23:14:31 +00:00
|
|
|
kernel_img_LDFLAGS += $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_KERNEL_MACHINE_LINK_ADDR)
|
2010-02-07 22:49:49 +00:00
|
|
|
kernel_img_FORMAT = binary
|
|
|
|
|
|
|
|
sbin_SCRIPTS += grub-install
|
|
|
|
grub_install_SOURCES = util/grub-install.in
|
|
|
|
|
|
|
|
bin_SCRIPTS += grub-mkrescue
|
|
|
|
grub_mkrescue_SOURCES = util/grub-mkrescue.in
|
|
|
|
|
|
|
|
# Modules.
|
2010-04-29 11:28:46 +00:00
|
|
|
pkglib_MODULES = halt.mod datetime.mod mmap.mod
|
2010-02-07 22:49:49 +00:00
|
|
|
|
|
|
|
# For mmap.mod.
|
|
|
|
mmap_mod_SOURCES = mmap/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c
|
|
|
|
mmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
mmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
mmap_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
|
|
|
|
|
|
|
# For halt.mod.
|
|
|
|
halt_mod_SOURCES = commands/halt.c
|
|
|
|
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For datetime.mod
|
|
|
|
datetime_mod_SOURCES = lib/cmos_datetime.c
|
|
|
|
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
2010-05-02 20:06:44 +00:00
|
|
|
pkglib_MODULES += efiemu.mod
|
|
|
|
efiemu_mod_SOURCES = efiemu/main.c efiemu/i386/loadcore32.c \
|
|
|
|
efiemu/i386/loadcore64.c efiemu/i386/nocfgtables.c \
|
|
|
|
efiemu/mm.c efiemu/loadcore_common.c efiemu/symbols.c \
|
|
|
|
efiemu/loadcore32.c efiemu/loadcore64.c \
|
|
|
|
efiemu/prepare32.c efiemu/prepare64.c efiemu/pnvram.c \
|
|
|
|
efiemu/i386/coredetect.c
|
|
|
|
efiemu_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
efiemu_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
2010-05-01 14:33:22 +00:00
|
|
|
BOOTTARGET=qemu
|
|
|
|
QEMU32=qemu-system-i386
|
|
|
|
|
2010-02-07 22:49:49 +00:00
|
|
|
include $(srcdir)/conf/i386.mk
|
|
|
|
include $(srcdir)/conf/common.mk
|