VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/BIOS/Makefile.kmk@ 26837

Last change on this file since 26837 was 26028, checked in by vboxsync, 15 years ago

Hmm, not yet

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.2 KB
Line 
1# $Id: Makefile.kmk 26028 2010-01-25 17:00:10Z vboxsync $
2## @file
3# VGA BIOS Sub-Makefile
4#
5
6#
7# Copyright (C) 2006-2007 Sun Microsystems, Inc.
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22SUB_DEPTH = ../../../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25#
26# Globals
27#
28VBOX_PATH_DEVICES_SRC ?= $(PATH_ROOT)/src/VBox/Devices
29
30#
31# Build program for calculating the VGA BIOS checksums.
32#
33BLDPROGS += vbetables-gen
34vbetables-gen_TEMPLATE = VBOXBLDPROG
35vbetables-gen_SOURCES = vbetables-gen.c
36
37#
38# The library containing the VGA BIOS image.
39#
40LIBRARIES += VgaBiosBin
41VgaBiosBin_TEMPLATE = VBOXR3
42VgaBiosBin_DEFS = IN_VBOXDD2
43VgaBiosBin_INCS = $(VBOX_PATH_DEVICES_SRC)
44VgaBiosBin_SOURCES = $(PATH_VgaBiosBin)/VgaBiosBin.c
45VgaBiosBin_CLEAN = \
46 $(PATH_VgaBiosBin)/vbetables.h \
47 \
48 $(PATH_VgaBiosBin)/_vgabios_.c \
49 $(PATH_VgaBiosBin)/vgabios0.s \
50 $(PATH_VgaBiosBin)/vgabios1.s \
51 $(PATH_VgaBiosBin)/vgabios.tmp \
52 $(PATH_VgaBiosBin)/vgabios.lst \
53 $(PATH_VgaBiosBin)/vgabios.bin \
54 $(PATH_VgaBiosBin)/VgaBiosBin.c \
55 $(PATH_VgaBiosBin)/VgaDefBiosLogo.c \
56 \
57 $(PATH_VgaBiosBin)/_vgabios-cirrus_.c \
58 $(PATH_VgaBiosBin)/vgabios-cirrus0.s \
59 $(PATH_VgaBiosBin)/vgabios-cirrus1.s \
60 $(PATH_VgaBiosBin)/vgabios-cirrus.tmp \
61 $(PATH_VgaBiosBin)/vgabios-cirrus.lst \
62 $(PATH_VgaBiosBin)/vgabios-cirrus.bin
63
64#
65# Rule for making the bios.
66#
67$$(PATH_VgaBiosBin)/VgaBiosBin.c: $$(PATH_VgaBiosBin)/vgabios.bin $(VBOX_BIN2C)
68 $(call MSG_TOOL,bin2c,VgaBiosBin,$<,$@)
69 $(QUIET)$(VBOX_BIN2C) -min 36 -max 36 -mask 0x0fff -ascii -export VgaBiosBinary $< $@
70
71#
72# vgabios
73#
74
75# 1. create vbetables.h
76$$(PATH_VgaBiosBin)/vbetables.h: $(MAKEFILE_CURRENT) $$(TARGET_vbetables-gen) | $$(dir $$@)
77 $(QUIET)$(REDIRECT) -wo $@ -- $(TARGET_vbetables-gen)
78
79# 2. precompile
80# WARNING! DEBUG is undefined here to keep the image size stable between debug and release builds.
81$$(PATH_VgaBiosBin)/_vgabios_.c: $(addprefix $(PATH_SUB_CURRENT)/,vgabios.c vgabios.h vbe.h vgatables.h vgafonts.h vbe.c clext.c) $$(PATH_VgaBiosBin)/vbetables.h $(VBOX_VERSION_STAMP)
82 $(call MSG_TOOL,cpp,VgaBiosBin,$<,$@)
83 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -P -DVBOX -DVBOX_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" \
84 -DVBE -DVGABIOS_DATE="''" $(addprefix -D,$(DEFS) $(DEFS.$(KBUILD_TYPE))) \
85 -UDEBUG \
86 -o $@ $<
87
88# 3. compile
89# BCC tempfile clashes, order the BCC jobs to make sure they don't interfere with one another.
90$$(PATH_VgaBiosBin)/vgabios0.s: $$(PATH_VgaBiosBin)/_vgabios_.c | $(VBOX_BCC_JOBS)
91 $(call MSG_COMPILE,VgaBiosBin,$<,$@,C)
92 $(QUIET)$(VBOX_BCC) -o $@ -C-c -D__i86__ -0 -S $^
93VBOX_BCC_JOBS += $(PATH_VgaBiosBin)/vgabios0.s
94
95# 4. preprocess intermediate assembly.
96$$(PATH_VgaBiosBin)/vgabios1.s: $$(PATH_VgaBiosBin)/vgabios0.s
97 $(call MSG_TOOL,Adjusting BCC Assembly,VgaBiosBin,$<,$@)
98 $(QUIET)$(SED) -e 's/^\.text//' -e 's/^\.data//' --output $@ $^
99
100# 5. assemble
101$$(PATH_VgaBiosBin)/vgabios.tmp $$(PATH_VgaBiosBin)/vgabios.lst: $$(PATH_VgaBiosBin)/vgabios1.s
102 $(call MSG_COMPILE,VgaBiosBin,$<,$@,AS)
103 $(QUIET)$(REDIRECT) -ri $^ -- $(VBOX_AS86) -b $(PATH_VgaBiosBin)/vgabios.tmp -u- -w- -g -0 -j -O -l $(PATH_VgaBiosBin)/vgabios.lst
104
105# 6. checksums
106$$(PATH_VgaBiosBin)/vgabios.bin: $$(PATH_VgaBiosBin)/vgabios.tmp $$(VBOX_BIOSSUMS)
107 $(call MSG_TOOL,biossums,VgaBiosBin,$<,$@)
108 $(QUIET)$(VBOX_BIOSSUMS) $< $@
109
110#
111# The VGA BIOS Logo.
112#
113LIBRARIES += VgaDefBiosLogo
114VgaDefBiosLogo_TEMPLATE = VBOXR3
115VgaDefBiosLogo_INCS = $(VBOX_PATH_DEVICES_SRC)
116VgaDefBiosLogo_SOURCES = $(PATH_VgaBiosBin)/VgaDefBiosLogo.c
117
118#
119# Rule for making the bios logo.
120#
121$$(PATH_VgaBiosBin)/VgaDefBiosLogo.c: $(VBOX_BRAND_BIOS_LOGO) $(VBOX_BIN2C)
122 $(call MSG_TOOL,bin2c,VgaBiosBin,$<,$@)
123 $(QUIET)$(VBOX_BIN2C) VgaDefBiosLogo $< $@
124
125
126include $(KBUILD_PATH)/subfooter.kmk
127
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette