Makefile revision 9d3a6dcdf5659c385fd193a59927d74c92ce401d
6466N/A#
6466N/A# VGA BIOS Makefile
6466N/A#
6466N/A
6466N/A#
6466N/A# Copyright (C) 2006 InnoTek Systemberatung GmbH
6466N/A#
6466N/A# This file is part of VirtualBox Open Source Edition (OSE), as
6466N/A# available from http://www.virtualbox.org. This file is free software;
6466N/A# you can redistribute it and/or modify it under the terms of the GNU
6466N/A# General Public License as published by the Free Software Foundation,
6466N/A# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
6466N/A# distribution. VirtualBox OSE is distributed in the hope that it will
6466N/A# be useful, but WITHOUT ANY WARRANTY of any kind.
6466N/A#
6466N/A# If you received this file as part of a commercial VirtualBox
6466N/A# distribution, then only the terms of your commercial VirtualBox
6466N/A# license agreement apply instead of the previous paragraph.
6466N/A#
6466N/A
6466N/ADEPTH = ../../../../..
6466N/Ainclude $(PATH_KBUILD)/header.kmk
6466N/A
6466N/ABLDPROGS = biossums
6466N/ALIBRARIES = VgaBiosBin
6466N/AOTHERS = $(PATH_TARGET)/vgabios.bin
6466N/AOTHER_CLEAN = \
6466N/A $(PATH_TARGET)/_vgabios_.c \
6466N/A $(PATH_TARGET)/vgabios0.s \
6466N/A $(PATH_TARGET)/vgabios1.s \
6466N/A $(PATH_TARGET)/vgabios.tmp \
6466N/A $(PATH_TARGET)/vgabios.lst \
6466N/A $(PATH_TARGET)/vgabios.bin \
6466N/A $(PATH_TARGET)/VgaBiosBin.c \
6466N/A \
6466N/A $(PATH_TARGET)/_vgabios-cirrus_.c \
6466N/A $(PATH_TARGET)/vgabios-cirrus0.s \
6466N/A $(PATH_TARGET)/vgabios-cirrus1.s \
6470N/A $(PATH_TARGET)/vgabios-cirrus.tmp \
6470N/A $(PATH_TARGET)/vgabios-cirrus.lst \
6470N/A $(PATH_TARGET)/vgabios-cirrus.bin
6470N/A
6470N/Abiossums_TEMPLATE = VBOXBLDPROG
6470N/Abiossums_SOURCES = biossums.c
6470N/A
6466N/AVgaBiosBin_TEMPLATE = VBOXR3
6470N/AVgaBiosBin_DEFS = IN_VBOXDD2
6470N/AVgaBiosBin_INCS = ../..
6470N/AVgaBiosBin_SOURCES = $(PATH_TARGET)/VgaBiosBin.c
6470N/A
6470N/A
6470N/Ainclude $(PATH_KBUILD)/footer.kmk
6470N/A
6470N/A
6470N/A#
6466N/A# Rule for making the bios.
6466N/A#
6466N/A$(PATH_TARGET)/VgaBiosBin.c: $(PATH_TARGET)/vgabios.bin $(VBOX_BIN2C)
6470N/A $(call MSG_L1,bin2c $< => $@)
6470N/A $(QUIET)$(VBOX_BIN2C) -min 32 -max 64 -mask 0x0fff -ascii -export VgaBiosBinary $< $@
6470N/A
6466N/A#
6466N/A# vgabios
6466N/A#
6466N/A
6466N/A# 1. precompile
6466N/A$(PATH_TARGET)/_vgabios_.c: vgabios.c vgabios.h vbe.h vgatables.h vgafonts.h vbe.c clext.c
6466N/A $(call MSG_L1,Precompiling $<,=> $@)
6466N/A $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -DVBOX -DVBOX_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" -E -P $< -DVBE -DVGABIOS_DATE="''" $(addprefix -D,$(DEFS) $(DEFS.$(BUILD_TYPE))) > $@
6470N/A
6470N/A# 2. compile
6466N/A$(PATH_TARGET)/vgabios0.s: $(PATH_TARGET)/_vgabios_.c
6466N/A $(call MSG_L1,Compiling $<,=> $@)
6529N/A $(QUIET)$(VBOX_BCC) -o $@ -C-c -D__i86__ -0 -S $^
6525N/A
6529N/A# 3. preprocess intermediate assembly.
6466N/A$(PATH_TARGET)/vgabios1.s: $(PATH_TARGET)/vgabios0.s
6466N/A $(call Adjusting BCC Assembly $<,=> $@)
6466N/A $(QUIET)$(SED) -e 's/^\.text//' -e 's/^\.data//' $^ > $@
# 4. assemble
$(PATH_TARGET)/vgabios.tmp $(PATH_TARGET)/vgabios.lst: $(PATH_TARGET)/vgabios1.s
$(call MSG_L1,Compiling $<,=> $@)
$(QUIET)$(VBOX_AS86) -b $(PATH_TARGET)/vgabios.tmp -u- -w- -g -0 -j -O -l $(PATH_TARGET)/vgabios.lst < $^
# 5. checksums
$(PATH_TARGET)/vgabios.bin: $(PATH_TARGET)/vgabios.tmp $(TARGET_biossums)
$(call MSG_L1,biossums $@)
$(QUIET)$(CP) -f $(PATH_TARGET)/vgabios.tmp $@
$(QUIET)$(TARGET_biossums) $@