VirtualBox

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

Last change on this file since 8732 was 8732, checked in by vboxsync, 17 years ago

Some cleanup fixes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1# $Id: Makefile.kmk 8732 2008-05-09 02:53:07Z 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
22DEPTH ?= ../../../../..
23SUB_DEPTH = ../..
24include $(PATH_KBUILD)/subheader.kmk
25
26VBOX_PATH_DEVICES_SRC = $(PATH_SUB_ROOT)
27
28#
29# Build program for calculating the VGA BIOS checksums.
30#
31BLDPROGS += vgabiossums vbetables-gen
32vgabiossums_TEMPLATE = VBOXBLDPROG
33vgabiossums_SOURCES = biossums.c
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_TARGET)/VgaBiosBin.c
45VgaBiosBin_CLEAN = \
46 $(PATH_TARGET)/vbetables.h \
47 \
48 $(PATH_TARGET)/_vgabios_.c \
49 $(PATH_TARGET)/vgabios0.s \
50 $(PATH_TARGET)/vgabios1.s \
51 $(PATH_TARGET)/vgabios.tmp \
52 $(PATH_TARGET)/vgabios.lst \
53 $(PATH_TARGET)/vgabios.bin \
54 $(PATH_TARGET)/VgaBiosBin.c \
55 $(PATH_TARGET)/VgaDefBiosLogo.c \
56 \
57 $(PATH_TARGET)/_vgabios-cirrus_.c \
58 $(PATH_TARGET)/vgabios-cirrus0.s \
59 $(PATH_TARGET)/vgabios-cirrus1.s \
60 $(PATH_TARGET)/vgabios-cirrus.tmp \
61 $(PATH_TARGET)/vgabios-cirrus.lst \
62 $(PATH_TARGET)/vgabios-cirrus.bin
63
64#
65# Rule for making the bios.
66#
67$(PATH_TARGET)/VgaBiosBin.c: $(PATH_TARGET)/vgabios.bin $(VBOX_BIN2C)
68 $(call MSG_TOOL,bin2c,VgaBiosBin,$<,$@)
69 $(QUIET)$(VBOX_BIN2C) -min 32 -max 64 -mask 0x0fff -ascii -export VgaBiosBinary $< $@
70
71#
72# vgabios
73#
74
75# 1. create vbetables.h
76$(PATH_TARGET)/vbetables.h: $(MAKEFILE_CURRENT) $(TARGET_vbetables-gen)
77 $(QUIET)$(REDIRECT) -wo $@ -- $(TARGET_vbetables-gen)
78
79# 2. precompile
80$(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
81 $(call MSG_TOOL,cpp,VgaBiosBin,$<,$@)
82 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -P -DVBOX -DVBOX_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" -DVBE -DVGABIOS_DATE="''" $(addprefix -D,$(DEFS) $(DEFS.$(BUILD_TYPE))) -o $@ $<
83
84# 3. compile - tempfile clashes, so make sure it's built in solitude.
85.NOTPARALLEL: $(PATH_TARGET)/vgabios0.s
86$(PATH_TARGET)/vgabios0.s: $(PATH_TARGET)/_vgabios_.c
87 $(call MSG_COMPILE,VgaBiosBin,$<,$@,C)
88 $(QUIET)$(VBOX_BCC) -o $@ -C-c -D__i86__ -0 -S $^
89
90# 4. preprocess intermediate assembly.
91$(PATH_TARGET)/vgabios1.s: $(PATH_TARGET)/vgabios0.s
92 $(call MSG_TOOL,Adjusting BCC Assembly,VgaBiosBin,$<,$@)
93 $(QUIET)$(SED) -e 's/^\.text//' -e 's/^\.data//' --output $@ $^
94
95# 5. assemble
96$(PATH_TARGET)/vgabios.tmp $(PATH_TARGET)/vgabios.lst: $(PATH_TARGET)/vgabios1.s
97 $(call MSG_COMPILE,VgaBiosBin,$<,$@,AS)
98 $(QUIET)$(REDIRECT) -ri $^ -- $(VBOX_AS86) -b $(PATH_TARGET)/vgabios.tmp -u- -w- -g -0 -j -O -l $(PATH_TARGET)/vgabios.lst
99
100# 6. checksums
101$(PATH_TARGET)/vgabios.bin: $(PATH_TARGET)/vgabios.tmp $$(TARGET_vgabiossums)
102 $(call MSG_TOOL,vgabiossums,VgaBiosBin,$<,$@)
103 $(QUIET)$(CP) -f $(PATH_TARGET)/vgabios.tmp $@
104 $(QUIET)$(TARGET_vgabiossums) $@
105
106#
107# The VGA BIOS Logo.
108#
109LIBRARIES += VgaDefBiosLogo
110VgaDefBiosLogo_TEMPLATE = VBOXR3
111VgaDefBiosLogo_INCS = $(VBOX_PATH_DEVICES_SRC)
112VgaDefBiosLogo_SOURCES = $(PATH_TARGET)/VgaDefBiosLogo.c
113
114#
115# Rule for making the bios logo.
116#
117ifdef VBOX_OSE
118VBOX_LOGO_FILE := ose_logo.bmp
119else
120VBOX_LOGO_FILE := sun_logo.bmp
121endif
122$(PATH_TARGET)/VgaDefBiosLogo.c: $(PATH_SUB_CURRENT)/$(VBOX_LOGO_FILE) $(VBOX_BIN2C)
123 $(call MSG_TOOL,bin2c,VgaBiosBin,$<,$@)
124 $(QUIET)$(VBOX_BIN2C) VgaDefBiosLogo $< $@
125
126
127include $(PATH_KBUILD)/subfooter.kmk
128
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