vaseboot/VasEBoot-core/Makefile.am

449 lines
18 KiB
Makefile

AUTOMAKE_OPTIONS = subdir-objects -Wno-portability
DEPDIR=.deps-core
include $(top_srcdir)/conf/Makefile.common
CC=$(TARGET_CC)
CPP=$(TARGET_CC)
CCAS=$(TARGET_CC)
RANLIB=$(TARGET_RANLIB)
STRIP=$(TARGET_STRIP)
MACHO2IMG=$(top_builddir)/VasEBoot-macho2img
AM_CFLAGS = $(TARGET_CFLAGS)
AM_LDFLAGS = $(TARGET_LDFLAGS)
AM_CPPFLAGS = $(TARGET_CPPFLAGS) $(CPPFLAGS_DEFAULT)
AM_CCASFLAGS = $(TARGET_CCASFLAGS) $(CCASFLAGS_DEFAULT)
CFLAGS_PROGRAM += $(CFLAGS_PLATFORM)
LDFLAGS_PROGRAM += $(LDFLAGS_PLATFORM)
CPPFLAGS_PROGRAM += $(CPPFLAGS_PLATFORM)
CCASFLAGS_PROGRAM += $(CCASFLAGS_PLATFORM)
CFLAGS_LIBRARY += $(CFLAGS_PLATFORM) -fno-builtin
CPPFLAGS_LIBRARY += $(CPPFLAGS_PLATFORM)
CCASFLAGS_LIBRARY += $(CCASFLAGS_PLATFORM)
build-VasEBoot-pep2elf$(BUILD_EXEEXT): $(top_srcdir)/util/VasEBoot-pe2elf.c $(top_srcdir)/VasEBoot-core/kern/emu/misc.c $(top_srcdir)/util/misc.c
$(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DVasEBoot_BUILD=1 -DVasEBoot_TARGET_WORDSIZE=64 -DVasEBoot_UTIL=1 -DVasEBoot_BUILD_PROGRAM_NAME=\"build-VasEBoot-pep2elf\" $^
CLEANFILES += build-VasEBoot-pep2elf$(BUILD_EXEEXT)
build-VasEBoot-pe2elf$(BUILD_EXEEXT): $(top_srcdir)/util/VasEBoot-pe2elf.c $(top_srcdir)/VasEBoot-core/kern/emu/misc.c $(top_srcdir)/util/misc.c
$(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DVasEBoot_BUILD=1 -DVasEBoot_TARGET_WORDSIZE=32 -DVasEBoot_UTIL=1 -DVasEBoot_BUILD_PROGRAM_NAME=\"build-VasEBoot-pe2elf\" $^
CLEANFILES += build-VasEBoot-pe2elf$(BUILD_EXEEXT)
# gentrigtables
gentrigtables$(BUILD_EXEEXT): gentrigtables.c
$(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) $< $(BUILD_LIBM)
CLEANFILES += gentrigtables$(BUILD_EXEEXT)
build-VasEBoot-module-verifier$(BUILD_EXEEXT): $(top_srcdir)/util/VasEBoot-module-verifier.c $(top_srcdir)/util/VasEBoot-module-verifier32.c $(top_srcdir)/util/VasEBoot-module-verifier64.c $(top_srcdir)/VasEBoot-core/kern/emu/misc.c $(top_srcdir)/util/misc.c
$(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DVasEBoot_BUILD=1 -DVasEBoot_UTIL=1 -DVasEBoot_BUILD_PROGRAM_NAME=\"build-VasEBoot-module-verifier\" $^
CLEANFILES += build-VasEBoot-module-verifier$(BUILD_EXEEXT)
# trigtables.c
trigtables.c: gentrigtables$(BUILD_EXEEXT) gentrigtables.c $(top_srcdir)/configure.ac
./gentrigtables$(BUILD_EXEEXT) > $@
CLEANFILES += trigtables.c
# XXX Use Automake's LEX & YACC support
VasEBoot_script.tab.h: script/parser.y
$(YACC) -d -p VasEBoot_script_yy -b VasEBoot_script $<
VasEBoot_script.tab.c: VasEBoot_script.tab.h
CLEANFILES += VasEBoot_script.tab.c VasEBoot_script.tab.h
# For the lexer.
VasEBoot_script.yy.h: script/yylex.l
$(LEX) -o VasEBoot_script.yy.c --header-file=VasEBoot_script.yy.h $<
VasEBoot_script.yy.c: VasEBoot_script.yy.h
rs_decoder.h: $(srcdir)/lib/reed_solomon.c
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Os -I$(top_builddir) -S -DSTANDALONE -o $@ $< -g0 -mregparm=3 -ffreestanding
CLEANFILES += VasEBoot_script.yy.c VasEBoot_script.yy.h
include $(srcdir)/Makefile.core.am
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/cache.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/command.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/device.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/disk.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/dl.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/env.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/env_private.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/err.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/file.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/fs.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/i18n.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/kernel.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/list.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/misc.h
if COND_emu
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/compiler-rt-emu.h
else
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/compiler-rt.h
endif
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/mm.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/parser.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/partition.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/term.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/time.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/mm_private.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/net.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/tpm.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/memory.h
if COND_i386_pc
KERNEL_HEADER_FILES += $(top_builddir)/include/VasEBoot/machine/kernel.h
KERNEL_HEADER_FILES += $(top_builddir)/include/VasEBoot/machine/pxe.h
KERNEL_HEADER_FILES += $(top_builddir)/include/VasEBoot/machine/int.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/i386/tsc.h
endif
if COND_i386_efi
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/efi/efi.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/efi/disk.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/i386/tsc.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/acpi.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/pci.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/i386/pmtimer.h
endif
if COND_i386_coreboot
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/i386/tsc.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/i386/coreboot/lbio.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/video.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/video_fb.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/gfxterm.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/font.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/bufio.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/acpi.h
endif
if COND_i386_multiboot
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/i386/tsc.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/acpi.h
endif
if COND_i386_qemu
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/pci.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/i386/tsc.h
endif
if COND_i386_ieee1275
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/ieee1275/ieee1275.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/terminfo.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/extcmd.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/lib/arg.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/i386/tsc.h
endif
if COND_i386_xen
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/xen.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/i386/xen/hypercall.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/terminfo.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/extcmd.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/lib/arg.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/loader.h
endif
if COND_x86_64_xen
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/xen.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/x86_64/xen/hypercall.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/terminfo.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/extcmd.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/lib/arg.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/loader.h
endif
if COND_x86_64_efi
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/efi/efi.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/efi/disk.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/i386/tsc.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/pci.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/acpi.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/i386/pmtimer.h
endif
if COND_ia64_efi
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/efi/efi.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/efi/disk.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/acpi.h
endif
if COND_mips
KERNEL_HEADER_FILES += $(top_builddir)/include/VasEBoot/cpu/kernel.h
endif
if COND_mips_arc
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/extcmd.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/arc/arc.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/terminfo.h
endif
if COND_mips_qemu_mips
KERNEL_HEADER_FILES += $(top_builddir)/include/VasEBoot/keyboard_layouts.h
KERNEL_HEADER_FILES += $(top_builddir)/include/VasEBoot/machine/kernel.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/serial.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/loader.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/terminfo.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/extcmd.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/lib/arg.h
endif
if COND_mips_loongson
KERNEL_HEADER_FILES += $(top_builddir)/include/VasEBoot/keyboard_layouts.h
KERNEL_HEADER_FILES += $(top_builddir)/include/VasEBoot/machine/kernel.h
KERNEL_HEADER_FILES += $(top_builddir)/include/VasEBoot/machine/time.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/video.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/video_fb.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/gfxterm.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/font.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/bufio.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/pci.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/cs5536.h
KERNEL_HEADER_FILES += $(top_builddir)/include/VasEBoot/machine/pci.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/serial.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/loader.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/terminfo.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/extcmd.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/lib/arg.h
endif
if COND_mips_qemu_mips
KERNEL_HEADER_FILES += $(top_builddir)/include/VasEBoot/machine/memory.h
KERNEL_HEADER_FILES += $(top_builddir)/include/VasEBoot/machine/kernel.h
endif
if COND_powerpc_ieee1275
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/ieee1275/ieee1275.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/terminfo.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/extcmd.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/lib/arg.h
endif
if COND_sparc64_ieee1275
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/ieee1275/ieee1275.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/sparc64/ieee1275/ieee1275.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/terminfo.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/extcmd.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/lib/arg.h
endif
if COND_arm_uboot
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/uboot/uboot.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/uboot/disk.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/extcmd.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/lib/arg.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/arm/system.h
endif
if COND_arm_efi
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/arm/efi/loader.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/efi/efi.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/efi/disk.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/arm/system.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/acpi.h
endif
if COND_arm64_efi
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/efi/efi.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/efi/disk.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/acpi.h
endif
if COND_emu
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/datetime.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/emu/misc.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/emu/net.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/emu/hostdisk.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/emu/hostfile.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/extcmd.h
if COND_VasEBoot_EMU_SDL
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/sdl.h
endif
if COND_VasEBoot_EMU_PCI
KERNEL_HEADER_FILES += $(top_srcdir)/include/VasEBoot/libpciaccess.h
endif
endif
symlist.h: $(top_builddir)/config.h $(KERNEL_HEADER_FILES)
@list='$^'; \
for p in $$list; do \
echo "#include <$$p>" >> $@ || (rm -f $@; exit 1); \
done
CLEANFILES += symlist.h
BUILT_SOURCES += symlist.h
symlist.c: symlist.h gensymlist.sh
$(TARGET_CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) $(CPPFLAGS) -DVasEBoot_SYMBOL_GENERATOR=1 symlist.h > symlist.p || (rm -f symlist.p; exit 1)
cat symlist.p | /bin/sh $(srcdir)/gensymlist.sh $(top_builddir)/config.h $(KERNEL_HEADER_FILES) >$@ || (rm -f $@; exit 1)
rm -f symlist.p
CLEANFILES += symlist.c
BUILT_SOURCES += symlist.c
if COND_HAVE_ASM_USCORE
ASM_PREFIX=_
else
ASM_PREFIX=
endif
noinst_DATA += kernel_syms.lst
kernel_syms.lst: $(KERNEL_HEADER_FILES) $(top_builddir)/config.h
$(TARGET_CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) $(CPPFLAGS) $(CFLAGS) -DVasEBoot_SYMBOL_GENERATOR=1 $^ >kernel_syms.input
cat kernel_syms.input | grep -v '^#' | sed -n \
-e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/defined kernel '"$(ASM_PREFIX)"'\1/;p;}' \
-e '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR *(\([a-zA-Z0-9_]*\)).*/defined kernel '"$(ASM_PREFIX)"'\1/;p;}' \
| sort -u >$@
rm -f kernel_syms.input
CLEANFILES += kernel_syms.lst
if COND_emu
kern/emu/VasEBoot_emu-main.$(OBJEXT):VasEBoot_emu_init.h
VasEBoot_emu-VasEBoot_emu_init.$(OBJEXT):VasEBoot_emu_init.h
kern/emu/VasEBoot_emu_dyn-main.$(OBJEXT):VasEBoot_emu_init.h
VasEBoot_emu_dyn-VasEBoot_emu_init.$(OBJEXT):VasEBoot_emu_init.h
VasEBoot_emu_init.h: genemuinitheader.sh $(MODULE_FILES)
rm -f $@; echo $(MODULE_FILES) | sh $(srcdir)/genemuinitheader.sh $(TARGET_NM) > $@
CLEANFILES += VasEBoot_emu_init.h
VasEBoot_emu_init.c: VasEBoot_emu_init.h genemuinit.sh $(MODULE_FILES)
rm -f $@; echo $(MODULE_FILES) | sh $(srcdir)/genemuinit.sh $(TARGET_NM) > $@
CLEANFILES += VasEBoot_emu_init.c
endif
# List files
fs.lst: $(MARKER_FILES)
(for pp in $^; do \
b=`basename $$pp .marker`; \
if grep 'FS_LIST_MARKER' $$pp >/dev/null 2>&1; then \
echo $$b; \
fi; \
done) | sort -u > $@
platform_DATA += fs.lst
CLEANFILES += fs.lst
command.lst: $(MARKER_FILES)
(for pp in $^; do \
b=`basename $$pp .marker`; \
sed -n \
-e "/EXTCOMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}" \
-e "/P1COMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}" \
-e "/COMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $$b/;p;}" $$pp; \
done) | sort -u > $@
platform_DATA += command.lst
CLEANFILES += command.lst
partmap.lst: $(MARKER_FILES)
(for pp in $^; do \
b=`basename $$pp .marker`; \
if grep 'PARTMAP_LIST_MARKER' $$pp >/dev/null 2>&1; then \
echo $$b; \
fi; \
done) | sort -u > $@
platform_DATA += partmap.lst
CLEANFILES += partmap.lst
terminal.lst: $(MARKER_FILES)
(for pp in $^; do \
b=`basename $$pp .marker`; \
sed -n \
-e "/INPUT_TERMINAL_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/i\1: $$b/;p;}" \
-e "/OUTPUT_TERMINAL_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/o\1: $$b/;p;}" $$pp; \
done) | sort -u > $@
platform_DATA += terminal.lst
CLEANFILES += terminal.lst
parttool.lst: $(MARKER_FILES)
(for pp in $^; do \
b=`basename $$pp .marker`; \
sed -n \
-e "/PARTTOOL_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $$b/;p;}" $$pp; \
done) | sort -u > $@
platform_DATA += parttool.lst
CLEANFILES += parttool.lst
video.lst: $(MARKER_FILES)
(for pp in $^; do \
b=`basename $$pp .marker`; \
if grep 'VIDEO_LIST_MARKER' $$pp >/dev/null 2>&1; then \
echo $$b; \
fi; \
done) | sort -u > $@
platform_DATA += video.lst
CLEANFILES += video.lst
# but, crypto.lst is simply copied
crypto.lst: $(srcdir)/lib/libgcrypt-VasEBoot/cipher/crypto.lst
cp $^ $@
platform_DATA += crypto.lst
CLEANFILES += crypto.lst
syminfo.lst: gensyminfo.sh kernel_syms.lst $(MODULE_FILES)
cat kernel_syms.lst > $@.new
for m in $(MODULE_FILES); do \
sh $< $$m >> $@.new || exit 1; \
done
mv $@.new $@
# generate global module dependencies list
moddep.lst: syminfo.lst genmoddep.awk video.lst
cat $< | sort | $(AWK) -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1)
platform_DATA += moddep.lst
CLEANFILES += config.log syminfo.lst moddep.lst
$(MOD_FILES): %.mod : genmod.sh moddep.lst %.module$(EXEEXT) build-VasEBoot-module-verifier$(BUILD_EXEEXT)
TARGET_OBJ2ELF=@TARGET_OBJ2ELF@ sh $^ $@
platform_DATA += $(MOD_FILES)
platform_DATA += modinfo.sh
CLEANFILES += $(MOD_FILES)
if COND_ENABLE_EFIEMU
efiemu32.o: efiemu/runtime/efiemu.c $(TARGET_OBJ2ELF)
-rm -f $@
-rm -f $@.bin
$(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m32 -Wall -Werror -nostdlib -static -O2 -c -o $@.bin $<
if test "x$(TARGET_APPLE_LINKER)" = x1; then \
$(TARGET_OBJCONV) -felf32 -nu -nd $@.bin $@ || exit 1; \
rm -f $@.bin ; \
elif test ! -z "$(TARGET_OBJ2ELF)"; then \
$(TARGET_OBJ2ELF) $@.bin || (rm -f $@.bin; exit 1); \
mv $@.bin $@ ; \
else \
mv $@.bin $@ ; \
fi
# Link format -arch,x86_64 means Apple linker
efiemu64_c.o: efiemu/runtime/efiemu.c
$(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -nostdlib -Wall -Werror -O2 -mcmodel=large -mno-red-zone -c -o $@ $<
efiemu64_s.o: efiemu/runtime/efiemu.S
$(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -Wall -Werror -nostdlib -O2 -mcmodel=large -mno-red-zone -c -o $@ $<
efiemu64.o: efiemu64_c.o efiemu64_s.o $(TARGET_OBJ2ELEF)
-rm -f $@
-rm -f $@.bin
$(TARGET_CC) -m64 $(EFIEMU64_LINK_FORMAT) -nostdlib -static -Wl,-r -o $@.bin $^
if test "x$(EFIEMU64_LINK_FORMAT)" = x-arch,x86_64; then \
$(TARGET_OBJCONV) -felf64 -nu -nd $@.bin $@ || exit 1; \
rm -f $@.bin; \
else \
mv $@.bin $@ ; \
fi
platform_DATA += efiemu32.o efiemu64.o
CLEANFILES += efiemu32.o efiemu64.o efiemu64_c.o efiemu64_s.o
endif
windowsdir=$(top_builddir)/$(PACKAGE)-$(VERSION)-for-windows
windowsdir: $(PROGRAMS) $(starfield_DATA) $(platform_DATA)
test -d $(windowsdir)/$(target_cpu)-$(platform) || mkdir $(windowsdir)/$(target_cpu)-$(platform)
for x in $(platform_DATA); do \
cp -fp $$x $(windowsdir)/$(target_cpu)-$(platform)/$$x; \
done