VirtualBox

source: vbox/trunk/src/VBox/Devices/PC/BIOS/Makefile@ 227

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

added some missing CLEANs

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1#
2# PC BIOS Makefile
3#
4
5# Copyright (C) 2006 InnoTek Systemberatung GmbH
6#
7# This file is part of VirtualBox Open Source Edition (OSE), as
8# available from http://www.virtualbox.org. This file is free software;
9# you can redistribute it and/or modify it under the terms of the GNU
10# General Public License as published by the Free Software Foundation,
11# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
12# distribution. VirtualBox OSE is distributed in the hope that it will
13# be useful, but WITHOUT ANY WARRANTY of any kind.
14#
15# If you received this file as part of a commercial VirtualBox
16# distribution, then only the terms of your commercial VirtualBox
17# license agreement apply instead of the previous paragraph.
18#
19
20DEPTH = ../../../../../
21include $(PATH_KBUILD)/header.kmk
22
23BLDPROGS = biossums
24LIBRARIES = PcBiosBin PcDefBiosLogo
25
26OTHERS = $(PATH_TARGET)/bios.bin
27
28OTHER_CLEAN = $(addprefix $(PATH_TARGET)/,_rombios_.c rombios0.s rombios1.s \
29 bios.lst bios.tmp bios.bin PcBiosBin.c PcDefBiosLogo.c bios-syms.h)
30
31TEMPLATE = VBOXBLDPROG
32biossums_SOURCES = biossums.c
33
34PcBiosBin_TEMPLATE = VBOXR3
35PcBiosBin_DEFS = IN_VBOXDD2
36PcBiosBin_INCS = ../..
37PcBiosBin_SOURCES = $(PATH_TARGET)/PcBiosBin.c
38$(PATH_TARGET)/PcBiosBin.c_DEPS = $(PATH_TARGET)/bios-syms.h
39
40PcDefBiosLogo_TEMPLATE = VBOXR3
41PcDefBiosLogo_INCS = ../..
42PcDefBiosLogo_SOURCES = $(PATH_TARGET)/PcDefBiosLogo.c
43
44
45include $(PATH_KBUILD)/footer.kmk
46
47
48#
49# Rule for making the bios.
50#
51$(PATH_TARGET)/PcBiosBin.c: $(PATH_TARGET)/bios.bin $(VBOX_BIN2C)
52 $(call MSG_L1,bin2c $< => $@)
53 $(QUIET)$(VBOX_BIN2C) -min 64 -max 256 -mask 0xffff -ascii -export PcBiosBinary $< $@
54
55#
56# Rule for making the bios logo.
57#
58$(PATH_TARGET)/PcDefBiosLogo.c: innotek_logo.bmp $(VBOX_BIN2C)
59 $(call MSG_L1,bin2c $< => $@)
60 $(QUIET)$(VBOX_BIN2C) -max 64 PcDefBiosLogo $< $@
61
62#
63# Six steps to bios.bin and bios-syms.h
64#
65
66# 1. precompile rombios.c
67$(PATH_TARGET)/_rombios_.c: rombios.c logo.c apmbios.S
68 $(call MSG_L1,Precompiling $<,=> $@)
69 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -I$(PATH_TARGET) -I$(PATH_CURRENT)/.. -DBX_SMP_PROCESSORS=1 -DVBOX $(addprefix -D,$(DEFS) $(DEFS.$(BUILD_TYPE))) -P $< > $@
70
71# 2. compile to intermediate asm file.
72$(PATH_TARGET)/rombios0.s: $(PATH_TARGET)/_rombios_.c
73 $(call MSG_L1,Compiling $<,=> $@)
74 $(QUIET)$(VBOX_BCC) -o $@ -C-c -D__i86__ -0 -S $^
75
76# 3. post process intermediate asm file.
77$(PATH_TARGET)/rombios1.s: $(PATH_TARGET)/rombios0.s
78 $(call MSG_L1,Adjusting BCC Assembly $<,=> $@)
79 $(QUIET)$(SED) -e 's/^\.text//' -e 's/^\.data//' $^ > $@
80
81# 4. assemble the intermediate asm file. (also creates a listing rombios.lst)
82$(PATH_TARGET)/bios.tmp $(PATH_TARGET)/bios.lst: $(PATH_TARGET)/rombios1.s
83 $(call MSG_L1,Compiling $<,=> $@)
84 $(QUIET)$(VBOX_AS86) -b $(PATH_TARGET)/bios.tmp -u- -w- -g -0 -j -O -l $(PATH_TARGET)/bios.lst - < $^
85
86# 5. calculate checksums for the final BIOS image.
87$(PATH_TARGET)/bios.bin: $(PATH_TARGET)/bios.tmp $(TARGET_biossums)
88 $(call MSG_L1,biossums $@)
89 $(QUIET)$(CP) -f $(PATH_TARGET)/bios.tmp $(PATH_TARGET)/bios.bin
90 $(QUIET)$(TARGET_biossums) $(PATH_TARGET)/bios.bin
91
92# 6. create the symbol table.
93$(PATH_TARGET)/bios-syms.h: $(PATH_TARGET)/bios.lst Makefile
94 $(call MSG_L1,symtable $<,=> $@)
95 $(QUIET)$(SED) \
96 -e '/^[0-9][0-9][0-9][0-9][0-9] 000[0-9A-F]* [[:space:]]*[a-zA-Z0-9_]*:/!d' \
97 -e 's/^[0-9][0-9][0-9][0-9][0-9] \(000[0-9A-F]*\) [[:space:]]*\([a-zA-Z0-9_]*\):.*$$/ DEFSYM(0x\1, "\2"),/' \
98 $(PATH_TARGET)/bios.lst > $@
99
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