# Used by various components. These rules need to precede them.
script/lexer.c_DEPENDENCIES = grub_script.tab.h
- #sbin_UTILITIES += grub-emu
-util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
kernel_img_RELOCATABLE = yes
pkglib_PROGRAMS = kernel.img
kernel_img_SOURCES = kern/device.c kern/disk.c kern/dl.c kern/env.c \
kern/rescue_reader.c kern/rescue_parser.c \
\
util/console.c util/grub-emu.c util/misc.c \
- util/hostdisk.c util/getroot.c \
+ util/hostdisk.c util/getroot.c util/mm.c \
\
- grub_emu_init.c gnulib/progname.c util/hostfs.c disk/host.c
-kernel_img_CFLAGS = $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-undef -I$(srcdir)/gnulib
+ gnulib/progname.c util/hostfs.c disk/host.c
+kernel_img_HEADERS = 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 msdos_partition.h reader.h symbol.h term.h time.h types.h \
+ list.h handler.h command.h i18n.h env_private.h
+kernel_img_CFLAGS = $(CPPFLAGS) $(CFLAGS) -Wno-undef
kernel_img_LDFLAGS = $(COMMON_LDFLAGS)
TARGET_NO_STRIP = yes
-TARGET_NO_DYNAMIC_MODULES = yes
+
+ifneq ($(TARGET_NO_MODULES), yes)
+kernel_img_SOURCES += symlist.c kern/$(target_cpu)/dl.c
+ifneq ($(target_cpu), i386)
+ifneq ($(target_cpu), x86_64)
+kernel_img_SOURCES += kern/$(target_cpu)/cache.S
+endif
+endif
+else
+kernel_img_SOURCES += grub_emu_init.c
- grub_emu_init.c_DEPENDENCIES = grub_emu_init.h
+endif
+
+# For boot.mod.
+pkglib_MODULES += boot.mod
+boot_mod_SOURCES = commands/boot.c lib/i386/pc/biosnum.c
+boot_mod_CFLAGS = $(COMMON_CFLAGS)
+boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
# For reboot.mod.
pkglib_MODULES += reboot.mod
ifeq ($(enable_grub_emu_sdl), yes)
pkglib_MODULES += sdl.mod
sdl_mod_SOURCES = util/sdl.c
- sdl_mod_CFLAGS = $(COMMON_CFLAGS)
+ sdl_mod_CFLAGS =
sdl_mod_LDFLAGS = $(COMMON_LDFLAGS)
grub_emu_LDFLAGS += $(LIBSDL)
+kernel_img_HEADERS += sdl.h
endif
ifeq ($(enable_grub_emu_pci), yes)
rm -f $@; echo $(pkglib_MODULES) | sh $(srcdir)/genemuinitheader.sh $(NM) > $@
DISTCLEANFILES += grub_emu_init.h
--grub_emu_init.c: genemuinit.sh $(pkglib_MODULES)
++grub_emu_init.c: genemuinit.sh $(pkglib_MODULES) grub_emu_init.h
rm -f $@; echo $(pkglib_MODULES) | sh $(srcdir)/genemuinit.sh $(NM) > $@
DISTCLEANFILES += grub_emu_init.c