Makefile.kmk revision dcbed23b19dd4fb77ec431872986c24cb685dcf2
86b51be433c7032578ae50e94ebe590cc428448bvboxsync# VGA BIOS Sub-Makefile
86b51be433c7032578ae50e94ebe590cc428448bvboxsync# Copyright (C) 2006-2007 Sun Microsystems, Inc.
86b51be433c7032578ae50e94ebe590cc428448bvboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
86b51be433c7032578ae50e94ebe590cc428448bvboxsync# available from http://www.virtualbox.org. This file is free software;
86b51be433c7032578ae50e94ebe590cc428448bvboxsync# you can redistribute it and/or modify it under the terms of the GNU
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# General Public License (GPL) as published by the Free Software
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
86b51be433c7032578ae50e94ebe590cc428448bvboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
86b51be433c7032578ae50e94ebe590cc428448bvboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
86b51be433c7032578ae50e94ebe590cc428448bvboxsync# additional information or have any questions.
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncDEPTH ?= ../../../../..
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncSUB_DEPTH = ../..
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncinclude $(KBUILD_PATH)/subheader.kmk
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncVBOX_PATH_DEVICES_SRC = $(PATH_SUB_ROOT)
86b51be433c7032578ae50e94ebe590cc428448bvboxsync# Build program for calculating the VGA BIOS checksums.
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncBLDPROGS += vgabiossums vbetables-gen
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncvgabiossums_TEMPLATE = VBOXBLDPROG
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncvgabiossums_SOURCES = biossums.c
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncvbetables-gen_TEMPLATE = VBOXBLDPROG
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncvbetables-gen_SOURCES = vbetables-gen.c
86b51be433c7032578ae50e94ebe590cc428448bvboxsync# The library containing the VGA BIOS image.
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncLIBRARIES += VgaBiosBin
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncVgaBiosBin_TEMPLATE = VBOXR3
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncVgaBiosBin_DEFS = IN_VBOXDD2
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncVgaBiosBin_INCS = $(VBOX_PATH_DEVICES_SRC)
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncVgaBiosBin_SOURCES = $(PATH_TARGET)/VgaBiosBin.c
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncVgaBiosBin_CLEAN = \
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(PATH_TARGET)/vbetables.h \
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(PATH_TARGET)/_vgabios_.c \
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(PATH_TARGET)/vgabios0.s \
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(PATH_TARGET)/vgabios1.s \
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(PATH_TARGET)/vgabios.tmp \
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(PATH_TARGET)/vgabios.lst \
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(PATH_TARGET)/vgabios.bin \
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(PATH_TARGET)/VgaBiosBin.c \
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(PATH_TARGET)/VgaDefBiosLogo.c \
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(PATH_TARGET)/_vgabios-cirrus_.c \
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(PATH_TARGET)/vgabios-cirrus0.s \
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(PATH_TARGET)/vgabios-cirrus1.s \
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(PATH_TARGET)/vgabios-cirrus.tmp \
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(PATH_TARGET)/vgabios-cirrus.lst \
86b51be433c7032578ae50e94ebe590cc428448bvboxsync# Rule for making the bios.
86b51be433c7032578ae50e94ebe590cc428448bvboxsync$(PATH_TARGET)/VgaBiosBin.c: $(PATH_TARGET)/vgabios.bin $(VBOX_BIN2C)
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(call MSG_TOOL,bin2c,VgaBiosBin,$<,$@)
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(QUIET)$(VBOX_BIN2C) -min 32 -max 64 -mask 0x0fff -ascii -export VgaBiosBinary $< $@
86b51be433c7032578ae50e94ebe590cc428448bvboxsync$(PATH_TARGET)/vbetables.h: $(MAKEFILE_CURRENT) $(TARGET_vbetables-gen)
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(QUIET)$(REDIRECT) -wo $@ -- $(TARGET_vbetables-gen)
86b51be433c7032578ae50e94ebe590cc428448bvboxsync# 2. precompile
86b51be433c7032578ae50e94ebe590cc428448bvboxsync$(PATH_TARGET)/_vgabios_.c: $(addprefix $(PATH_SUB_CURRENT)/,vgabios.c vgabios.h vbe.h vgatables.h vgafonts.h vbe.c clext.c) $(PATH_TARGET)/vbetables.h $(VBOX_VERSION_STAMP)
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(call MSG_TOOL,cpp,VgaBiosBin,$<,$@)
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -P -DVBOX -DVBOX_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" -DVBE -DVGABIOS_DATE="''" $(addprefix -D,$(DEFS) $(DEFS.$(KBUILD_TYPE))) -o $@ $<
86b51be433c7032578ae50e94ebe590cc428448bvboxsync# 3. compile - tempfile clashes, so make sure it's built in solitude.
86b51be433c7032578ae50e94ebe590cc428448bvboxsync.NOTPARALLEL: $(PATH_TARGET)/vgabios0.s
86b51be433c7032578ae50e94ebe590cc428448bvboxsync$(PATH_TARGET)/vgabios0.s: $(PATH_TARGET)/_vgabios_.c
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(call MSG_COMPILE,VgaBiosBin,$<,$@,C)
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(QUIET)$(VBOX_BCC) -o $@ -C-c -D__i86__ -0 -S $^
86b51be433c7032578ae50e94ebe590cc428448bvboxsync# 4. preprocess intermediate assembly.
86b51be433c7032578ae50e94ebe590cc428448bvboxsync$(PATH_TARGET)/vgabios1.s: $(PATH_TARGET)/vgabios0.s
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(call MSG_TOOL,Adjusting BCC Assembly,VgaBiosBin,$<,$@)
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(QUIET)$(SED) -e 's/^\.text//' -e 's/^\.data//' --output $@ $^
86b51be433c7032578ae50e94ebe590cc428448bvboxsync# 5. assemble
86b51be433c7032578ae50e94ebe590cc428448bvboxsync$(PATH_TARGET)/vgabios.tmp $(PATH_TARGET)/vgabios.lst: $(PATH_TARGET)/vgabios1.s
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(call MSG_COMPILE,VgaBiosBin,$<,$@,AS)
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(QUIET)$(REDIRECT) -ri $^ -- $(VBOX_AS86) -b $(PATH_TARGET)/vgabios.tmp -u- -w- -g -0 -j -O -l $(PATH_TARGET)/vgabios.lst
86b51be433c7032578ae50e94ebe590cc428448bvboxsync# 6. checksums
86b51be433c7032578ae50e94ebe590cc428448bvboxsync$(PATH_TARGET)/vgabios.bin: $(PATH_TARGET)/vgabios.tmp $$(TARGET_vgabiossums)
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(call MSG_TOOL,vgabiossums,VgaBiosBin,$<,$@)
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(QUIET)$(CP) -f $(PATH_TARGET)/vgabios.tmp $@
86b51be433c7032578ae50e94ebe590cc428448bvboxsync $(QUIET)$(TARGET_vgabiossums) $@
86b51be433c7032578ae50e94ebe590cc428448bvboxsync# The VGA BIOS Logo.
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncLIBRARIES += VgaDefBiosLogo
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncVgaDefBiosLogo_TEMPLATE = VBOXR3
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncVgaDefBiosLogo_INCS = $(VBOX_PATH_DEVICES_SRC)
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncVgaDefBiosLogo_SOURCES = $(PATH_TARGET)/VgaDefBiosLogo.c
86b51be433c7032578ae50e94ebe590cc428448bvboxsync# Rule for making the bios logo.
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncifdef VBOX_OSE
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncVBOX_LOGO_FILE := ose_logo.bmp
86b51be433c7032578ae50e94ebe590cc428448bvboxsyncVBOX_LOGO_FILE := sun_logo.bmp
86b51be433c7032578ae50e94ebe590cc428448bvboxsync$(PATH_TARGET)/VgaDefBiosLogo.c: $(PATH_SUB_CURRENT)/$(VBOX_LOGO_FILE) $(VBOX_BIN2C)
include $(KBUILD_PATH)/subfooter.kmk