VirtualBox

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

Last change on this file since 60441 was 60426, checked in by vboxsync, 9 years ago

Devices/{Graphics/PC}/BIOS: build fixes for VBOX_WITH_OPEN_WATCOM unset

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.5 KB
Line 
1# $Id: Makefile.kmk 60426 2016-04-11 13:58:10Z vboxsync $
2## @file
3# Sub-Makefile for the New VGA BIOS ROM.
4#
5
6#
7# Copyright (C) 2012-2015 Oracle Corporation
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
18SUB_DEPTH = ../../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21
22ifdef VBOX_WITH_OPEN_WATCOM
23
24 #
25 # VBoxVgaBios - The VGA BIOS.
26 #
27 MISCBINS += VBoxVgaBios386
28 VBoxVgaBios386_TEMPLATE = VBoxBios
29 VBoxVgaBios386_ASFLAGS = -0
30 VBoxVgaBios386_CFLAGS = -3
31 VBoxVgaBios386_DEFS = VBE VBOX_BIOS_CPU=80386
32 VBoxVgaBios386_SOURCES = \
33 vgarom.asm \
34 vberom.asm \
35 vgabios.c \
36 vbe.c
37 VBoxVgaBios386_LDFLAGS = \
38 output raw offset=0xC0000 \
39 order \
40 clname CODE \
41 segment VGAROM segaddr=0xC000 \
42 segment _TEXT segaddr=0xC000 offset=0xA00 \
43 segment VBE32 segaddr=0xC000 offset=0x4400 \
44 clname DATA \
45 segment _DATA segaddr=0xC000 offset=0x4600 \
46
47 MISCBINS += VBoxVgaBios286
48 VBoxVgaBios286_EXTENDS = VBoxVgaBios386
49 VBoxVgaBios286_CFLAGS = -2
50 VBoxVgaBios286_DEFS = $(filter-out VBOX_BIOS_CPU=80386,$(VBoxVgaBios386_DEFS)) VBOX_BIOS_CPU=80286
51
52 MISCBINS += VBoxVgaBios8086
53 VBoxVgaBios8086_EXTENDS = VBoxVgaBios386
54 VBoxVgaBios8086_CFLAGS = -0
55 VBoxVgaBios8086_DEFS = $(filter-out VBOX_BIOS_CPU=80386,$(VBoxVgaBios386_DEFS)) VBOX_BIOS_CPU=8086
56
57 #
58 # Updates the alternative source file.
59 #
60 define def_VBoxVgaBiosUpdateAltSource
61 $$(PATH_SUB_CURRENT)/VBoxVgaBiosAlternative$(1).asm +| $$(PATH_SUB_CURRENT)/VBoxVgaBiosAlternative$(1).md5sum: \
62 $$$$(VBoxVgaBios$(1)_1_TARGET) \
63 $$(VBOX_MAKE_ALTERNATIVE_SOURCE) \
64 $$(VBOX_VBOXCMP)
65 if1of ($$(KBUILD_TYPE), release)
66 $$(VBOX_MAKE_ALTERNATIVE_SOURCE) \
67 --bios-image $$< \
68 --bios-map $$(basename $$<).map \
69 --bios-sym $$(basename $$<).sym \
70 --bios-type vga \
71 --output $$(VBoxVgaBios$(1)_0_OUTDIR)/VBoxVgaBiosAlternative$(1).asm
72 $$(QUIET)yasm -f bin \
73 -o $$(VBoxVgaBios$(1)_0_OUTDIR)/VBoxVgaBiosAlternative$(1).bin \
74 -l $$(VBoxVgaBios$(1)_0_OUTDIR)/VBoxVgaBiosAlternative$(1).lst \
75 $$(VBoxVgaBios$(1)_0_OUTDIR)/VBoxVgaBiosAlternative$(1).asm
76 $$(VBOX_VBOXCMP) $$< $$(VBoxVgaBios$(1)_0_OUTDIR)/VBoxVgaBiosAlternative$(1).bin
77 $$(CP) --changed -- $$(VBoxVgaBios$(1)_0_OUTDIR)/VBoxVgaBiosAlternative$(1).asm $$(PATH_ROOT)/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative$(1).asm
78 $$(REDIRECT) -C $$(dir $$(VBoxVgaBios$(1)_1_TARGET)) -- \
79 $$(MD5SUM_EXT) -bo $$(VBoxVgaBios$(1)_0_OUTDIR)/VBoxVgaBiosAlternative$(1).md5sum $$(notdir $$(VBoxVgaBios$(1)_1_TARGET))
80 $$(CP) --changed -- $$(VBoxVgaBios$(1)_0_OUTDIR)/VBoxVgaBiosAlternative$(1).md5sum $$(PATH_ROOT)/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative$(1).md5sum
81 $$(RM) -f -- $$(VBoxVgaBios$(1)_0_OUTDIR)/VBoxVgaBiosAlternative$(1).asm \
82 $$(VBoxVgaBios$(1)_0_OUTDIR)/VBoxVgaBiosAlternative$(1).bin \
83 $$(VBoxVgaBios$(1)_0_OUTDIR)/VBoxVgaBiosAlternative$(1).lst \
84 $$(VBoxVgaBios$(1)_0_OUTDIR)/VBoxVgaBiosAlternative$(1).md5sum
85 else
86 $$(QUIET)$$(ECHO) "Fatal error: Can only update VBoxVgaBiosAlternative$(1).asm/md5sum with a release build."
87 $$(QUIET)exit 1
88 endif
89 endef
90
91 $(evalcall2 def_VBoxVgaBiosUpdateAltSource,386)
92 $(evalcall2 def_VBoxVgaBiosUpdateAltSource,286)
93 $(evalcall2 def_VBoxVgaBiosUpdateAltSource,8086)
94
95 update-vgabios-source: \
96 $(PATH_SUB_CURRENT)/VBoxVgaBiosAlternative386.asm \
97 $(PATH_SUB_CURRENT)/VBoxVgaBiosAlternative286.asm \
98 $(PATH_SUB_CURRENT)/VBoxVgaBiosAlternative8086.asm
99
100endif # VBOX_WITH_OPEN_WATCOM
101
102
103#
104# The library containing the VGA BIOS image.
105#
106LIBRARIES += VgaBiosBin
107VgaBiosBin_TEMPLATE = VBOXR3
108VgaBiosBin_DEFS = IN_VBOXDD2
109VgaBiosBin_SOURCES =
110VgaBiosBin_DEPS = $(VgaBiosBin_0_OUTDIR)/vbetables.h
111VgaBiosBin_CLEAN = $(VgaBiosBin_0_OUTDIR)/vbetables.h
112
113define def_VBoxVgaBiosBin
114 VgaBiosBin_SOURCES += $$(VgaBiosBin_0_OUTDIR)/VgaBiosBin$(1).c
115 VgaBiosBin_CLEAN += $$(VgaBiosBin_0_OUTDIR)/VgaBiosBin$(1).c
116 ifdef VBOX_WITH_OPEN_WATCOM
117 $$$$(VgaBiosBin_0_OUTDIR)/VgaBiosBin$(1).c: $$$$(VBoxVgaBios$(1)_1_TARGET) $$(VBOX_BIN2C) | $$$$(dir $$$$@)
118 $$(call MSG_TOOL,bin2c,VgaBiosBin,$$<,$$@)
119 $$(QUIET)$$(VBOX_BIN2C) -min 32 -max 36 -mask 0x0fff -ascii -export VgaBiosBinary$(1) $$< $$@
120 else
121 VgaBiosBin_CLEAN += $$(VgaBiosBin_0_OUTDIR)/VBoxVgaBios$(1).rom
122
123 $$$$(VgaBiosBin_0_OUTDIR)/VgaBiosBin$(1).c + $$$$(VgaBiosBin_0_OUTDIR)/VBoxVgaBios$(1).rom: \
124 $$(PATH_SUB_CURRENT)/VBoxVgaBiosAlternative$(1).asm \
125 $$(PATH_SUB_CURRENT)/VBoxVgaBiosAlternative$(1).md5sum \
126 $$(VBOX_BIN2C) | $$$$(dir $$$$@)
127 $$(call MSG_TOOL,bin2c,VgaBiosBin,$$<,$$@)
128 $$(QUIET)yasm -f bin -o $$(VgaBiosBin_0_OUTDIR)/VBoxVgaBios$(1).rom $$<
129 $$(QUIET)$$(REDIRECT) -C $$(VgaBiosBin_0_OUTDIR) -- \
130 $$(MD5SUM_EXT) -c $$(basename $$<).md5sum
131 $$(QUIET)$$(VBOX_BIN2C) -min 32 -max 36 -mask 0x0fff -ascii -export VgaBiosBinary$(1) $$(VgaBiosBin_0_OUTDIR)/VBoxVgaBios$(1).rom $$@
132 $$(QUIET)$$(RM) -f -- $$$$(VgaBiosBin_0_OUTDIR)/VBoxVgaBios$(1).rom
133 endif
134endef
135$(evalcall2 def_VBoxVgaBiosBin,386)
136$(evalcall2 def_VBoxVgaBiosBin,286)
137$(evalcall2 def_VBoxVgaBiosBin,8086)
138
139
140# Rule for making the vbetables.h that DevVGA uses.
141$$(VgaBiosBin_0_OUTDIR)/vbetables.h: $(MAKEFILE_CURRENT) $$(vbetables-gen_1_TARGET) | $$(dir $$@)
142 $(QUIET)$(REDIRECT) -wo $@ -- $(vbetables-gen_1_TARGET)
143
144
145#
146# The VBE tables.
147#
148BLDPROGS += vbetables-gen
149vbetables-gen_TEMPLATE = VBoxBldProg
150vbetables-gen_SOURCES = vbetables-gen.c
151vbetables-gen_CLEAN = $(vbetables-gen)
152
153
154#
155# The VGA BIOS Logo.
156#
157LIBRARIES += VgaDefBiosLogo
158VgaDefBiosLogo_TEMPLATE = VBOXR3
159VgaDefBiosLogo_INCS = $(VBOX_PATH_DEVICES_SRC)
160VgaDefBiosLogo_SOURCES = $(VgaDefBiosLogo_0_OUTDIR)/VgaDefBiosLogo.c
161VgaDefBiosLogo_CLEAN = $(VgaDefBiosLogo_0_OUTDIR)/VgaDefBiosLogo.c
162
163# Rule for making the bios logo.
164$$(VgaDefBiosLogo_0_OUTDIR)/VgaDefBiosLogo.c: $(VBOX_BRAND_BIOS_LOGO) $(VBOX_BIN2C) | $$(dir $$@)
165 $(call MSG_TOOL,bin2c,VgaDefBiosLogo,$<,$@)
166 $(QUIET)$(VBOX_BIN2C) VgaDefBiosLogo $< $@
167
168
169ifdef VBOX_WITH_OPEN_WATCOM
170 #
171 # Install the symbol file for the BIOS.
172 #
173 INSTALLS += VBoxVgaBiosSym
174 VBoxVgaBiosSym_TEMPLATE = VBoxDbgSyms
175 VBoxVgaBiosSym_SOURCES = \
176 $(basename $(VBoxVgaBios386_1_TARGET)).sym \
177 $(basename $(VBoxVgaBios286_1_TARGET)).sym \
178 $(basename $(VBoxVgaBios8086_1_TARGET)).sym
179endif
180
181include $(FILE_KBUILD_SUB_FOOTER)
182
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