1 | #
|
---|
2 | # VGA BIOS Makefile
|
---|
3 | #
|
---|
4 |
|
---|
5 | #
|
---|
6 | # Copyright (C) 2006 InnoTek Systemberatung GmbH
|
---|
7 | #
|
---|
8 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
9 | # available from http://www.virtualbox.org. This file is free software;
|
---|
10 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
11 | # General Public License as published by the Free Software Foundation,
|
---|
12 | # in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
13 | # distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
14 | # be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | #
|
---|
16 | # If you received this file as part of a commercial VirtualBox
|
---|
17 | # distribution, then only the terms of your commercial VirtualBox
|
---|
18 | # license agreement apply instead of the previous paragraph.
|
---|
19 | #
|
---|
20 |
|
---|
21 | DEPTH = ../../../../..
|
---|
22 | include $(PATH_KBUILD)/header.kmk
|
---|
23 |
|
---|
24 | BLDPROGS = biossums
|
---|
25 | LIBRARIES = VgaBiosBin
|
---|
26 | OTHERS = $(PATH_TARGET)/vgabios.bin
|
---|
27 | OTHER_CLEAN = \
|
---|
28 | $(PATH_TARGET)/_vgabios_.c \
|
---|
29 | $(PATH_TARGET)/vgabios0.s \
|
---|
30 | $(PATH_TARGET)/vgabios1.s \
|
---|
31 | $(PATH_TARGET)/vgabios.tmp \
|
---|
32 | $(PATH_TARGET)/vgabios.lst \
|
---|
33 | $(PATH_TARGET)/vgabios.bin \
|
---|
34 | $(PATH_TARGET)/VgaBiosBin.c \
|
---|
35 | \
|
---|
36 | $(PATH_TARGET)/_vgabios-cirrus_.c \
|
---|
37 | $(PATH_TARGET)/vgabios-cirrus0.s \
|
---|
38 | $(PATH_TARGET)/vgabios-cirrus1.s \
|
---|
39 | $(PATH_TARGET)/vgabios-cirrus.tmp \
|
---|
40 | $(PATH_TARGET)/vgabios-cirrus.lst \
|
---|
41 | $(PATH_TARGET)/vgabios-cirrus.bin
|
---|
42 |
|
---|
43 | biossums_TEMPLATE = VBOXBLDPROG
|
---|
44 | biossums_SOURCES = biossums.c
|
---|
45 |
|
---|
46 | VgaBiosBin_TEMPLATE = VBOXR3
|
---|
47 | VgaBiosBin_DEFS = IN_VBOXDD2
|
---|
48 | VgaBiosBin_INCS = ../..
|
---|
49 | VgaBiosBin_SOURCES = $(PATH_TARGET)/VgaBiosBin.c
|
---|
50 |
|
---|
51 |
|
---|
52 | include $(PATH_KBUILD)/footer.kmk
|
---|
53 |
|
---|
54 |
|
---|
55 | #
|
---|
56 | # Rule for making the bios.
|
---|
57 | #
|
---|
58 | $(PATH_TARGET)/VgaBiosBin.c: $(PATH_TARGET)/vgabios.bin $(VBOX_BIN2C)
|
---|
59 | $(call MSG_L1,bin2c $< => $@)
|
---|
60 | $(QUIET)$(VBOX_BIN2C) -min 32 -max 64 -mask 0x0fff -ascii -export VgaBiosBinary $< $@
|
---|
61 |
|
---|
62 | #
|
---|
63 | # vgabios
|
---|
64 | #
|
---|
65 |
|
---|
66 | # 1. precompile
|
---|
67 | $(PATH_TARGET)/_vgabios_.c: vgabios.c vgabios.h vbe.h vgatables.h vgafonts.h vbe.c clext.c
|
---|
68 | $(call MSG_L1,Precompiling $<,=> $@)
|
---|
69 | $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -DVBOX -DVBOX_VERSION=\"$(VBOX_VERSION)\" -E -P $< -DVBE -DVGABIOS_DATE="''" $(addprefix -D,$(DEFS) $(DEFS.$(BUILD_TYPE))) > $@
|
---|
70 |
|
---|
71 | # 2. compile
|
---|
72 | $(PATH_TARGET)/vgabios0.s: $(PATH_TARGET)/_vgabios_.c
|
---|
73 | $(call MSG_L1,Compiling $<,=> $@)
|
---|
74 | $(QUIET)$(VBOX_BCC) -o $@ -C-c -D__i86__ -0 -S $^
|
---|
75 |
|
---|
76 | # 3. preprocess intermediate assembly.
|
---|
77 | $(PATH_TARGET)/vgabios1.s: $(PATH_TARGET)/vgabios0.s
|
---|
78 | $(call Adjusting BCC Assembly $<,=> $@)
|
---|
79 | $(QUIET)$(SED) -e 's/^\.text//' -e 's/^\.data//' $^ > $@
|
---|
80 |
|
---|
81 | # 4. assemble
|
---|
82 | $(PATH_TARGET)/vgabios.tmp $(PATH_TARGET)/vgabios.lst: $(PATH_TARGET)/vgabios1.s
|
---|
83 | $(call MSG_L1,Compiling $<,=> $@)
|
---|
84 | $(QUIET)$(VBOX_AS86) -b $(PATH_TARGET)/vgabios.tmp -u- -w- -g -0 -j -O -l $(PATH_TARGET)/vgabios.lst < $^
|
---|
85 |
|
---|
86 | # 5. checksums
|
---|
87 | $(PATH_TARGET)/vgabios.bin: $(PATH_TARGET)/vgabios.tmp $(TARGET_biossums)
|
---|
88 | $(call MSG_L1,biossums $@)
|
---|
89 | $(QUIET)$(CP) -f $(PATH_TARGET)/vgabios.tmp $@
|
---|
90 | $(QUIET)$(TARGET_biossums) $@
|
---|
91 |
|
---|