VirtualBox

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

Last change on this file since 2784 was 2784, checked in by vboxsync, 18 years ago

Converted to sub-makefiles.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1# $Id: Makefile.kmk 2784 2007-05-23 00:10:23Z vboxsync $
2## @file
3# VGA BIOS Sub-Makefile
4#
5
6#
7# Copyright (C) 2006 InnoTek Systemberatung 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 as published by the Free Software Foundation,
13# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14# distribution. VirtualBox OSE is distributed in the hope that it will
15# be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17# If you received this file as part of a commercial VirtualBox
18# distribution, then only the terms of your commercial VirtualBox
19# license agreement apply instead of the previous paragraph.
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
32vgabiossums_TEMPLATE = VBOXBLDPROG
33vgabiossums_SOURCES = biossums.c
34
35#
36# The library containing the VGA BIOS image.
37#
38LIBRARIES += VgaBiosBin
39VgaBiosBin_TEMPLATE = VBOXR3
40VgaBiosBin_DEFS = IN_VBOXDD2
41VgaBiosBin_INCS = $(VBOX_PATH_DEVICES_SRC)
42VgaBiosBin_SOURCES = $(PATH_TARGET)/VgaBiosBin.c
43VgaBiosBin_CLEAN = \
44 $(PATH_TARGET)/_vgabios_.c \
45 $(PATH_TARGET)/vgabios0.s \
46 $(PATH_TARGET)/vgabios1.s \
47 $(PATH_TARGET)/vgabios.tmp \
48 $(PATH_TARGET)/vgabios.lst \
49 $(PATH_TARGET)/vgabios.bin \
50 $(PATH_TARGET)/VgaBiosBin.c \
51 \
52 $(PATH_TARGET)/_vgabios-cirrus_.c \
53 $(PATH_TARGET)/vgabios-cirrus0.s \
54 $(PATH_TARGET)/vgabios-cirrus1.s \
55 $(PATH_TARGET)/vgabios-cirrus.tmp \
56 $(PATH_TARGET)/vgabios-cirrus.lst \
57 $(PATH_TARGET)/vgabios-cirrus.bin
58
59#
60# Rule for making the bios.
61#
62$(PATH_TARGET)/VgaBiosBin.c: $(PATH_TARGET)/vgabios.bin $(VBOX_BIN2C)
63 $(call MSG_TOOL,bin2c,VgaBiosBin,$<,$@)
64 $(QUIET)$(VBOX_BIN2C) -min 32 -max 64 -mask 0x0fff -ascii -export VgaBiosBinary $< $@
65
66#
67# vgabios
68#
69
70# 1. precompile
71$(PATH_TARGET)/_vgabios_.c: $(addprefix $(PATH_SUB_CURRENT)/,vgabios.c vgabios.h vbe.h vgatables.h vgafonts.h vbe.c clext.c)
72 $(call MSG_TOOL,cpp,VgaBiosBin,$<,$@)
73 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -DVBOX -DVBOX_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" -E -P $< -DVBE -DVGABIOS_DATE="''" $(addprefix -D,$(DEFS) $(DEFS.$(BUILD_TYPE))) > $@
74
75# 2. compile
76$(PATH_TARGET)/vgabios0.s: $(PATH_TARGET)/_vgabios_.c
77 $(call MSG_COMPILE,VgaBiosBin,$<,$@,C)
78 $(QUIET)$(VBOX_BCC) -o $@ -C-c -D__i86__ -0 -S $^
79
80# 3. preprocess intermediate assembly.
81$(PATH_TARGET)/vgabios1.s: $(PATH_TARGET)/vgabios0.s
82 $(call MSG_TOOL,Adjusting BCC Assembly,VgaBiosBin,$<,$@)
83 $(QUIET)$(SED) -e 's/^\.text//' -e 's/^\.data//' $^ > $@
84
85# 4. assemble
86$(PATH_TARGET)/vgabios.tmp $(PATH_TARGET)/vgabios.lst: $(PATH_TARGET)/vgabios1.s
87 $(call MSG_COMPILE,VgaBiosBin,$<,$@,AS)
88 $(QUIET)$(VBOX_AS86) -b $(PATH_TARGET)/vgabios.tmp -u- -w- -g -0 -j -O -l $(PATH_TARGET)/vgabios.lst < $^
89
90# 5. checksums
91$(PATH_TARGET)/vgabios.bin: $(PATH_TARGET)/vgabios.tmp $$(TARGET_biossums)
92 $(call MSG_TOOL,vgabiossums,VgaBiosBin,$<,$@)
93 $(QUIET)$(CP) -f $(PATH_TARGET)/vgabios.tmp $@
94 $(QUIET)$(TARGET_vgabiossums) $@
95
96
97include $(PATH_KBUILD)/subfooter.kmk
98
Note: See TracBrowser for help on using the repository browser.

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