VirtualBox

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

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

The Giant CDDL Dual-License Header Change.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.3 KB
Line 
1# $Id: Makefile.kmk 5999 2007-12-07 15:05:06Z vboxsync $
2## @file
3# VGA BIOS Sub-Makefile
4#
5
6#
7# Copyright (C) 2006-2007 innotek GmbH
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
18DEPTH ?= ../../../../..
19SUB_DEPTH = ../..
20include $(PATH_KBUILD)/subheader.kmk
21
22VBOX_PATH_DEVICES_SRC = $(PATH_SUB_ROOT)
23
24#
25# Build program for calculating the VGA BIOS checksums.
26#
27BLDPROGS += vgabiossums vbetables-gen
28vgabiossums_TEMPLATE = VBOXBLDPROG
29vgabiossums_SOURCES = biossums.c
30vbetables-gen_TEMPLATE = VBOXBLDPROG
31vbetables-gen_SOURCES = vbetables-gen.c
32
33#
34# The library containing the VGA BIOS image.
35#
36LIBRARIES += VgaBiosBin
37VgaBiosBin_TEMPLATE = VBOXR3
38VgaBiosBin_DEFS = IN_VBOXDD2
39VgaBiosBin_INCS = $(VBOX_PATH_DEVICES_SRC)
40VgaBiosBin_SOURCES = $(PATH_TARGET)/VgaBiosBin.c
41VgaBiosBin_CLEAN = \
42 $(PATH_TARGET)/_vgabios_.c \
43 $(PATH_TARGET)/vgabios0.s \
44 $(PATH_TARGET)/vgabios1.s \
45 $(PATH_TARGET)/vgabios.tmp \
46 $(PATH_TARGET)/vgabios.lst \
47 $(PATH_TARGET)/vgabios.bin \
48 $(PATH_TARGET)/VgaBiosBin.c \
49 \
50 $(PATH_TARGET)/_vgabios-cirrus_.c \
51 $(PATH_TARGET)/vgabios-cirrus0.s \
52 $(PATH_TARGET)/vgabios-cirrus1.s \
53 $(PATH_TARGET)/vgabios-cirrus.tmp \
54 $(PATH_TARGET)/vgabios-cirrus.lst \
55 $(PATH_TARGET)/vgabios-cirrus.bin
56
57#
58# Rule for making the bios.
59#
60$(PATH_TARGET)/VgaBiosBin.c: $(PATH_TARGET)/vgabios.bin $(VBOX_BIN2C)
61 $(call MSG_TOOL,bin2c,VgaBiosBin,$<,$@)
62 $(QUIET)$(VBOX_BIN2C) -min 32 -max 64 -mask 0x0fff -ascii -export VgaBiosBinary $< $@
63
64#
65# vgabios
66#
67
68# 1. create vbetables.h
69$(PATH_TARGET)/vbetables.h: $(MAKEFILE_CURRENT) $(TARGET_vbetables-gen)
70 $(QUIET)$(REDIRECT) -wo $@ -- $(TARGET_vbetables-gen)
71
72# 2. precompile
73$(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
74 $(call MSG_TOOL,cpp,VgaBiosBin,$<,$@)
75 $(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 $@ $<
76
77# 3. compile - tempfile clashes, so make sure it's built in solitude.
78.NOTPARALLEL: $(PATH_TARGET)/vgabios0.s
79$(PATH_TARGET)/vgabios0.s: $(PATH_TARGET)/_vgabios_.c
80 $(call MSG_COMPILE,VgaBiosBin,$<,$@,C)
81 $(QUIET)$(VBOX_BCC) -o $@ -C-c -D__i86__ -0 -S $^
82
83# 4. preprocess intermediate assembly.
84$(PATH_TARGET)/vgabios1.s: $(PATH_TARGET)/vgabios0.s
85 $(call MSG_TOOL,Adjusting BCC Assembly,VgaBiosBin,$<,$@)
86 $(QUIET)$(SED) -e 's/^\.text//' -e 's/^\.data//' --output $@ $^
87
88# 5. assemble
89$(PATH_TARGET)/vgabios.tmp $(PATH_TARGET)/vgabios.lst: $(PATH_TARGET)/vgabios1.s
90 $(call MSG_COMPILE,VgaBiosBin,$<,$@,AS)
91 $(QUIET)$(REDIRECT) -ri $^ -- $(VBOX_AS86) -b $(PATH_TARGET)/vgabios.tmp -u- -w- -g -0 -j -O -l $(PATH_TARGET)/vgabios.lst
92
93# 6. checksums
94$(PATH_TARGET)/vgabios.bin: $(PATH_TARGET)/vgabios.tmp $$(TARGET_vgabiossums)
95 $(call MSG_TOOL,vgabiossums,VgaBiosBin,$<,$@)
96 $(QUIET)$(CP) -f $(PATH_TARGET)/vgabios.tmp $@
97 $(QUIET)$(TARGET_vgabiossums) $@
98
99
100include $(PATH_KBUILD)/subfooter.kmk
101
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