Makefile revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
#
# PC BIOS Makefile
#
# Copyright (C) 2006 InnoTek Systemberatung GmbH
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# General Public License as published by the Free Software Foundation,
# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
# distribution. VirtualBox OSE is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY of any kind.
#
# If you received this file as part of a commercial VirtualBox
# distribution, then only the terms of your commercial VirtualBox
# license agreement apply instead of the previous paragraph.
#
DEPTH = ../../../../../
OTHER_CLEAN = \
$(PATH_TARGET)/_rombios_.c \
$(PATH_TARGET)/rombios0.s \
$(PATH_TARGET)/rombios1.s \
$(PATH_TARGET)/bios.lst \
$(PATH_TARGET)/bios.tmp \
$(PATH_TARGET)/bios.bin \
$(PATH_TARGET)/PcBiosBin.c \
PcBiosBin_INCS = ../..
PcDefBiosLogo_INCS = ../..
#
# Rule for making the bios.
#
#
# Rule for making the bios logo.
#
#
# Six steps to bios.bin and bios-syms.h
#
# 1. precompile rombios.c
$(call MSG_L1,Precompiling $<,=> $@)
$(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -I$(PATH_TARGET) -I$(PATH_CURRENT)/.. -DBX_SMP_PROCESSORS=1 -DVBOX $(addprefix -D,$(DEFS) $(DEFS.$(BUILD_TYPE))) -P $< > $@
# 2. compile to intermediate asm file.
# 3. post process intermediate asm file.
# 4. assemble the intermediate asm file. (also creates a listing rombios.lst)
$(QUIET)$(VBOX_AS86) -b $(PATH_TARGET)/bios.tmp -u- -w- -g -0 -j -O -l $(PATH_TARGET)/bios.lst - < $^
# 5. calculate checksums for the final BIOS image.
# 6. create the symbol table.
-e '/^[0-9][0-9][0-9][0-9][0-9] 000[0-9A-F]* [[:space:]]*[a-zA-Z0-9_]*:/!d' \
-e 's/^[0-9][0-9][0-9][0-9][0-9] \(000[0-9A-F]*\) [[:space:]]*\([a-zA-Z0-9_]*\):.*$$/ DEFSYM(0x\1, "\2"),/' \
$(PATH_TARGET)/bios.lst > $@