2010-02-09 23:05:19 +00:00
|
|
|
# -*- makefile -*-
|
|
|
|
|
|
|
|
# Utilities.
|
|
|
|
bin_UTILITIES = grub-mkimage
|
|
|
|
|
|
|
|
# For grub-mkimage.
|
|
|
|
grub_mkimage_SOURCES = gnulib/progname.c util/i386/efi/grub-mkimage.c \
|
|
|
|
util/misc.c util/resolve.c
|
|
|
|
util/i386/efi/grub-mkimage.c_DEPENDENCIES = Makefile
|
|
|
|
|
|
|
|
# Scripts.
|
|
|
|
sbin_SCRIPTS = grub-install
|
|
|
|
|
|
|
|
# For grub-install.
|
|
|
|
grub_install_SOURCES = util/i386/efi/grub-install.in
|
|
|
|
|
|
|
|
# Modules.
|
|
|
|
pkglib_PROGRAMS = kernel.img
|
2010-04-03 20:55:57 +00:00
|
|
|
pkglib_MODULES = chain.mod appleldr.mod halt.mod \
|
2010-02-09 23:05:19 +00:00
|
|
|
datetime.mod loadbios.mod \
|
|
|
|
fixvideo.mod mmap.mod acpi.mod
|
|
|
|
|
|
|
|
# For kernel.img.
|
|
|
|
kernel_img_RELOCATABLE = yes
|
|
|
|
kernel_img_SOURCES = kern/$(target_cpu)/efi/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/term.c \
|
|
|
|
kern/rescue_parser.c kern/rescue_reader.c \
|
|
|
|
kern/$(target_cpu)/dl.c kern/i386/efi/init.c kern/parser.c kern/partition.c \
|
|
|
|
kern/env.c symlist.c kern/efi/efi.c kern/efi/init.c kern/efi/mm.c \
|
|
|
|
term/efi/console.c disk/efi/efidisk.c \
|
|
|
|
kern/time.c kern/list.c kern/handler.c kern/command.c kern/corecmd.c \
|
|
|
|
kern/i386/tsc.c kern/i386/pit.c \
|
|
|
|
kern/generic/rtc_get_time_ms.c \
|
|
|
|
kern/generic/millisleep.c
|
|
|
|
ifeq ($(target_cpu),x86_64)
|
|
|
|
kernel_img_SOURCES += kern/x86_64/efi/callwrap.S
|
|
|
|
endif
|
2010-02-10 00:05:40 +00:00
|
|
|
kernel_img_HEADERS += efi/efi.h efi/time.h efi/disk.h i386/pit.h
|
2010-02-09 23:05:19 +00:00
|
|
|
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
2010-04-10 23:14:31 +00:00
|
|
|
kernel_img_LDFLAGS += $(COMMON_LDFLAGS)
|
2010-02-09 23:05:19 +00:00
|
|
|
|
|
|
|
# For acpi.mod.
|
|
|
|
acpi_mod_SOURCES = commands/acpi.c commands/efi/acpi.c
|
|
|
|
acpi_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
acpi_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For mmap.mod.
|
|
|
|
mmap_mod_SOURCES = mmap/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c \
|
|
|
|
mmap/efi/mmap.c
|
|
|
|
mmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
mmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For chain.mod.
|
|
|
|
chain_mod_SOURCES = loader/efi/chainloader.c
|
|
|
|
chain_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For appleldr.mod.
|
|
|
|
appleldr_mod_SOURCES = loader/efi/appleloader.c
|
|
|
|
appleldr_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
appleldr_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# 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/efi/datetime.c
|
|
|
|
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For loadbios.mod
|
|
|
|
loadbios_mod_SOURCES = commands/efi/loadbios.c
|
|
|
|
loadbios_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
loadbios_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For fixvideo.mod
|
|
|
|
fixvideo_mod_SOURCES = commands/efi/fixvideo.c
|
|
|
|
fixvideo_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
fixvideo_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
pkglib_MODULES += efi_uga.mod
|
|
|
|
efi_uga_mod_SOURCES = video/efi_uga.c
|
|
|
|
efi_uga_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
efi_uga_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
pkglib_MODULES += efi_gop.mod
|
|
|
|
efi_gop_mod_SOURCES = video/efi_gop.c
|
|
|
|
efi_gop_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
efi_gop_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
pkglib_MODULES += xnu.mod
|
2010-04-03 20:55:57 +00:00
|
|
|
xnu_mod_SOURCES = loader/xnu_resume.c loader/i386/xnu.c \
|
2010-02-09 23:05:19 +00:00
|
|
|
loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c
|
|
|
|
xnu_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
xnu_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
xnu_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
|
|
|
|
|
|
|
include $(srcdir)/conf/i386.mk
|
|
|
|
include $(srcdir)/conf/common.mk
|