1 | # $Id: Makefile.kmk 59242 2016-01-03 01:09:38Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # VirtualBox Validation Kit - Bootsector Kit v3
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2015 Oracle Corporation
|
---|
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 | # The contents of this file may alternatively be used under the terms
|
---|
18 | # of the Common Development and Distribution License Version 1.0
|
---|
19 | # (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
20 | # VirtualBox OSE distribution, in which case the provisions of the
|
---|
21 | # CDDL are applicable instead of those of the GPL.
|
---|
22 | #
|
---|
23 | # You may elect to license modified versions of this file under the
|
---|
24 | # terms and conditions of either the GPL or the CDDL or both.
|
---|
25 | #
|
---|
26 |
|
---|
27 | SUB_DEPTH = ../../../../..
|
---|
28 | include $(KBUILD_PATH)/subheader.kmk
|
---|
29 |
|
---|
30 |
|
---|
31 | #
|
---|
32 | # ----- Config.kmk: start -----
|
---|
33 | #
|
---|
34 |
|
---|
35 | # The bs3kit source directory.
|
---|
36 | VBOX_PATH_BS3KIT_SRC = $(VBOX_PATH_VALIDATIONKIT_SRC)/bootsectors/bs3kit
|
---|
37 |
|
---|
38 | # Boot Sector post-link tool used below.
|
---|
39 | BLDPROGS += VBoxBs3Linker
|
---|
40 | VBoxBs3Linker_TEMPLATE = VBoxBldProg
|
---|
41 | VBoxBs3Linker_SOURCES = $(VBOX_PATH_BS3KIT_SRC)/VBoxBs3Linker.cpp
|
---|
42 |
|
---|
43 | # 64-bit relocation conversion tool
|
---|
44 | BLDPROGS += VBoxBs3ObjConverter
|
---|
45 | VBoxBs3ObjConverter_TEMPLATE = VBoxBldProg
|
---|
46 | VBoxBs3ObjConverter_SOURCES = $(VBOX_PATH_BS3KIT_SRC)/VBoxBs3ObjConverter.cpp
|
---|
47 |
|
---|
48 | # Dummy CP "linker" tool.
|
---|
49 | TOOL_VBoxBsCpLd = Dummy copy linker.
|
---|
50 | TOOL_VBoxBsCpLd_LINK_MISCBIN_OUTPUT =
|
---|
51 | TOOL_VBoxBsCpLd_LINK_MISCBIN_DEPEND =
|
---|
52 | TOOL_VBoxBsCpLd_LINK_MISCBIN_DEPORD =
|
---|
53 | define TOOL_VBoxBsCpLd_LINK_MISCBIN_CMDS
|
---|
54 | $(CP) -- $(objs) $(othersrc) "$(out)"
|
---|
55 | endef
|
---|
56 |
|
---|
57 | # Dummy exit 1 "linker" tool.
|
---|
58 | TOOL_VBoxBsUnusedLd = Dummy unused linker.
|
---|
59 | TOOL_VBoxBsUnusedLd_LINK_MISCBIN_OUTPUT =
|
---|
60 | TOOL_VBoxBsUnusedLd_LINK_MISCBIN_DEPEND =
|
---|
61 | TOOL_VBoxBsUnusedLd_LINK_MISCBIN_DEPORD =
|
---|
62 | define TOOL_VBoxBsUnusedLd_LINK_MISCBIN_CMDS
|
---|
63 | echo "cannot use this template for linking"
|
---|
64 | exit 1
|
---|
65 | endef
|
---|
66 |
|
---|
67 | #
|
---|
68 | # elf cross compiling 64-bit gcc (mac): sudo port install x86_64-elf-gcc
|
---|
69 | #
|
---|
70 | TOOL_Bs3Gcc64Elf64 := AMD64/ELF64 gcc/g++ cross compiler for mac.
|
---|
71 | TOOL_Bs3Gcc64Elf64_CC ?= x86_64-elf-gcc$(HOSTSUFF_EXE) -m64
|
---|
72 | TOOL_Bs3Gcc64Elf64_CXX ?= x86_64-elf-g++$(HOSTSUFF_EXE) -m64
|
---|
73 | ifdef SLKRUNS
|
---|
74 | TOOL_Bs3Gcc64Elf64_CC += -fmessage-length=0
|
---|
75 | TOOL_Bs3Gcc64Elf64_CXX += -fmessage-length=0
|
---|
76 | endif
|
---|
77 | TOOL_Bs3Gcc64Elf64_COBJSUFF ?= .o
|
---|
78 | TOOL_Bs3Gcc64Elf64_CFLAGS ?=
|
---|
79 | TOOL_Bs3Gcc64Elf64_CFLAGS.debug ?= -g
|
---|
80 | TOOL_Bs3Gcc64Elf64_CFLAGS.profile ?= -O2 #-g -pg
|
---|
81 | TOOL_Bs3Gcc64Elf64_CFLAGS.release ?= -O2
|
---|
82 | TOOL_Bs3Gcc64Elf64_CINCS ?=
|
---|
83 | TOOL_Bs3Gcc64Elf64_CDEFS ?=
|
---|
84 | TOOL_Bs3Gcc64Elf64_COMPILE_C_DEPEND = $(VBoxBs3ObjConverter_1_TARGET)
|
---|
85 | TOOL_Bs3Gcc64Elf64_COMPILE_C_DEPORD =
|
---|
86 | TOOL_Bs3Gcc64Elf64_COMPILE_C_OUTPUT =
|
---|
87 | define TOOL_Bs3Gcc64Elf64_COMPILE_C_CMDS
|
---|
88 | $(QUIET)$(TOOL_Bs3Gcc64Elf64_CC) -c\
|
---|
89 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
90 | -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
|
---|
91 | -o $(obj)\
|
---|
92 | $(abspath $(source))
|
---|
93 | $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
|
---|
94 | $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
|
---|
95 | endef
|
---|
96 |
|
---|
97 | TOOL_Bs3Gcc64Elf64_CXXOBJSUFF ?= .o
|
---|
98 | TOOL_Bs3Gcc64Elf64_CXXOBJSUFF ?= .o
|
---|
99 | TOOL_Bs3Gcc64Elf64_CXXFLAGS ?=
|
---|
100 | TOOL_Bs3Gcc64Elf64_CXXFLAGS.debug ?= -g0 # no debug info, thank you
|
---|
101 | TOOL_Bs3Gcc64Elf64_CXXFLAGS.profile ?= -O2 #-g -pg
|
---|
102 | TOOL_Bs3Gcc64Elf64_CXXFLAGS.release ?= -O2
|
---|
103 | TOOL_Bs3Gcc64Elf64_CXXINCS ?=
|
---|
104 | TOOL_Bs3Gcc64Elf64_CXXDEFS ?=
|
---|
105 | TOOL_Bs3Gcc64Elf64_COMPILE_CXX_DEPEND = $(VBoxBs3ObjConverter_1_TARGET)
|
---|
106 | TOOL_Bs3Gcc64Elf64_COMPILE_CXX_DEPORD =
|
---|
107 | TOOL_Bs3Gcc64Elf64_COMPILE_CXX_OUTPUT =
|
---|
108 | define TOOL_Bs3Gcc64Elf64_COMPILE_CXX_CMDS
|
---|
109 | $(QUIET)$(TOOL_Bs3Gcc64Elf64_CXX) -c\
|
---|
110 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
111 | -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
|
---|
112 | -o $(obj)\
|
---|
113 | $(abspath $(source))
|
---|
114 | $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
|
---|
115 | $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
|
---|
116 | endef
|
---|
117 |
|
---|
118 | #
|
---|
119 | # Visual C++ tool variant that runs the object converter afterwards.
|
---|
120 | #
|
---|
121 | TOOL_Bs3Vcc64 := Visual C++ 64-bit
|
---|
122 | TOOL_Bs3Vcc64_CC = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CC)
|
---|
123 | TOOL_Bs3Vcc64_CXX = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CXX)
|
---|
124 | TOOL_Bs3Vcc64_COBJSUFF = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COBJSUFF)
|
---|
125 | TOOL_Bs3Vcc64_CFLAGS = $(filter-out -TC,$(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CFLAGS)) -TP # compile as C++
|
---|
126 | TOOL_Bs3Vcc64_CFLAGS.debug =
|
---|
127 | TOOL_Bs3Vcc64_CFLAGS.dbgopt = -O1
|
---|
128 | TOOL_Bs3Vcc64_CFLAGS.profile = -O1
|
---|
129 | TOOL_Bs3Vcc64_CFLAGS.release = -O1
|
---|
130 | TOOL_Bs3Vcc64_CINCS = $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_INC)
|
---|
131 | TOOL_Bs3Vcc64_CDEFS =
|
---|
132 | TOOL_Bs3Vcc64_COMPILE_C_DEPEND = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
|
---|
133 | TOOL_Bs3Vcc64_COMPILE_C_DEPORD = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_DEPORD)
|
---|
134 | TOOL_Bs3Vcc64_COMPILE_C_OUTPUT = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_OUTPUT)
|
---|
135 | TOOL_Bs3Vcc64_COMPILE_C_OUTPUT_MAYBE = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_OUTPUT_MAYBE)
|
---|
136 | define TOOL_Bs3Vcc64_COMPILE_C_CMDS
|
---|
137 | $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_CMDS)
|
---|
138 | $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
|
---|
139 | endef
|
---|
140 |
|
---|
141 | TOOL_Bs3Vcc64_CXXOBJSUFF = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CXXOBJSUFF)
|
---|
142 | TOOL_Bs3Vcc64_CXXFLAGS = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CXXFLAGS)
|
---|
143 | TOOL_Bs3Vcc64_CXXFLAGS.debug =
|
---|
144 | TOOL_Bs3Vcc64_CXXFLAGS.dbgopt = -O1
|
---|
145 | TOOL_Bs3Vcc64_CXXFLAGS.profile = -O1
|
---|
146 | TOOL_Bs3Vcc64_CXXFLAGS.release = -O1
|
---|
147 | TOOL_Bs3Vcc64_CXXINCS = $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_INC)
|
---|
148 | TOOL_Bs3Vcc64_CXXDEFS =
|
---|
149 | TOOL_Bs3Vcc64_COMPILE_CXX_DEPEND = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
|
---|
150 | TOOL_Bs3Vcc64_COMPILE_CXX_DEPORD = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_DEPORD)
|
---|
151 | TOOL_Bs3Vcc64_COMPILE_CXX_OUTPUT = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_OUTPUT)
|
---|
152 | TOOL_Bs3Vcc64_COMPILE_CXX_OUTPUT_MAYBE = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_OUTPUT_MAYBE)
|
---|
153 | define TOOL_Bs3Vcc64_COMPILE_CXX_CMDS
|
---|
154 | $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_CMDS)
|
---|
155 | $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
|
---|
156 | endef
|
---|
157 |
|
---|
158 | #
|
---|
159 | # 32-bit OpenWatcom C/C++ tool variant that runs the object converter afterwards
|
---|
160 | # to rename intrinsic functions so they don't clash with the 16-bit compiler.
|
---|
161 | #
|
---|
162 | TOOL_Bs3Ow32 := OpenWatcom C/C++ 32-bit with object convertsion
|
---|
163 | TOOL_Bs3Ow32_CC = $(TOOL_OPENWATCOM_CC)
|
---|
164 | TOOL_Bs3Ow32_CXX = $(TOOL_OPENWATCOM_CXX)
|
---|
165 | TOOL_Bs3Ow32_COBJSUFF = $(TOOL_OPENWATCOM_COBJSUFF)
|
---|
166 | TOOL_Bs3Ow32_CFLAGS = $(TOOL_OPENWATCOM_CFLAGS)
|
---|
167 | TOOL_Bs3Ow32_CFLAGS.debug = $(TOOL_OPENWATCOM_CFLAGS.debug)
|
---|
168 | TOOL_Bs3Ow32_CFLAGS.dbgopt = $(TOOL_OPENWATCOM_CFLAGS.dbgopt)
|
---|
169 | TOOL_Bs3Ow32_CFLAGS.profile = $(TOOL_OPENWATCOM_CFLAGS.profile)
|
---|
170 | TOOL_Bs3Ow32_CFLAGS.release = $(TOOL_OPENWATCOM_CFLAGS.release)
|
---|
171 | TOOL_Bs3Ow32_CINCS = $(TOOL_OPENWATCOM_CINCS)
|
---|
172 | TOOL_Bs3Ow32_CDEFS =
|
---|
173 | TOOL_Bs3Ow32_COMPILE_C_DEPEND = $(TOOL_OPENWATCOM_COMPILE_C_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
|
---|
174 | TOOL_Bs3Ow32_COMPILE_C_DEPORD = $(TOOL_OPENWATCOM_COMPILE_C_DEPORD)
|
---|
175 | TOOL_Bs3Ow32_COMPILE_C_OUTPUT = $(TOOL_OPENWATCOM_COMPILE_C_OUTPUT)
|
---|
176 | TOOL_Bs3Ow32_COMPILE_C_OUTPUT_MAYBE = $(TOOL_OPENWATCOM_COMPILE_C_OUTPUT_MAYBE)
|
---|
177 | define TOOL_Bs3Ow32_COMPILE_C_CMDS
|
---|
178 | $(TOOL_OPENWATCOM_COMPILE_C_CMDS)
|
---|
179 | $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
|
---|
180 | endef
|
---|
181 |
|
---|
182 | TOOL_Bs3Ow32_CXXOBJSUFF = $(TOOL_OPENWATCOM_CXXOBJSUFF)
|
---|
183 | TOOL_Bs3Ow32_CXXFLAGS = $(TOOL_OPENWATCOM_CXXFLAGS)
|
---|
184 | TOOL_Bs3Ow32_CXXFLAGS.debug = $(TOOL_OPENWATCOM_CXXFLAGS.debug)
|
---|
185 | TOOL_Bs3Ow32_CXXFLAGS.dbgopt = $(TOOL_OPENWATCOM_CXXFLAGS.dbgopt)
|
---|
186 | TOOL_Bs3Ow32_CXXFLAGS.profile = $(TOOL_OPENWATCOM_CXXFLAGS.profile)
|
---|
187 | TOOL_Bs3Ow32_CXXFLAGS.release = $(TOOL_OPENWATCOM_CXXFLAGS.release)
|
---|
188 | TOOL_Bs3Ow32_CXXINCS = $(TOOL_OPENWATCOM_CXXINCS)
|
---|
189 | TOOL_Bs3Ow32_CXXDEFS =
|
---|
190 | TOOL_Bs3Ow32_COMPILE_CXX_DEPEND = $(TOOL_OPENWATCOM_COMPILE_CXX_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
|
---|
191 | TOOL_Bs3Ow32_COMPILE_CXX_DEPORD = $(TOOL_OPENWATCOM_COMPILE_CXX_DEPORD)
|
---|
192 | TOOL_Bs3Ow32_COMPILE_CXX_OUTPUT = $(TOOL_OPENWATCOM_COMPILE_CXX_OUTPUT)
|
---|
193 | TOOL_Bs3Ow32_COMPILE_CXX_OUTPUT_MAYBE = $(TOOL_OPENWATCOM_COMPILE_CXX_OUTPUT_MAYBE)
|
---|
194 | define TOOL_Bs3Ow32_COMPILE_CXX_CMDS
|
---|
195 | $(TOOL_OPENWATCOM_COMPILE_CXX_CMDS)
|
---|
196 | $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
|
---|
197 | endef
|
---|
198 |
|
---|
199 |
|
---|
200 | #
|
---|
201 | # 16-bit OpenWatcom C/C++ tool variant that runs the object converter afterwards
|
---|
202 | # to rename intrinsic functions so they don't clash with the 16-bit compiler.
|
---|
203 | #
|
---|
204 | TOOL_Bs3Ow16 := OpenWatcom C/C++ 16-bit with object convertsion
|
---|
205 | TOOL_Bs3Ow16_CC = $(TOOL_OPENWATCOM-16_CC)
|
---|
206 | TOOL_Bs3Ow16_CXX = $(TOOL_OPENWATCOM-16_CXX)
|
---|
207 | TOOL_Bs3Ow16_COBJSUFF = $(TOOL_OPENWATCOM-16_COBJSUFF)
|
---|
208 | TOOL_Bs3Ow16_CFLAGS = $(TOOL_OPENWATCOM-16_CFLAGS)
|
---|
209 | TOOL_Bs3Ow16_CFLAGS.debug = $(TOOL_OPENWATCOM-16_CFLAGS.debug)
|
---|
210 | TOOL_Bs3Ow16_CFLAGS.dbgopt = $(TOOL_OPENWATCOM-16_CFLAGS.dbgopt)
|
---|
211 | TOOL_Bs3Ow16_CFLAGS.profile = $(TOOL_OPENWATCOM-16_CFLAGS.profile)
|
---|
212 | TOOL_Bs3Ow16_CFLAGS.release = $(TOOL_OPENWATCOM-16_CFLAGS.release)
|
---|
213 | TOOL_Bs3Ow16_CINCS = $(TOOL_OPENWATCOM-16_CINCS)
|
---|
214 | TOOL_Bs3Ow16_CDEFS =
|
---|
215 | TOOL_Bs3Ow16_COMPILE_C_DEPEND = $(TOOL_OPENWATCOM-16_COMPILE_C_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
|
---|
216 | TOOL_Bs3Ow16_COMPILE_C_DEPORD = $(TOOL_OPENWATCOM-16_COMPILE_C_DEPORD)
|
---|
217 | TOOL_Bs3Ow16_COMPILE_C_OUTPUT = $(TOOL_OPENWATCOM-16_COMPILE_C_OUTPUT)
|
---|
218 | TOOL_Bs3Ow16_COMPILE_C_OUTPUT_MAYBE = $(TOOL_OPENWATCOM-16_COMPILE_C_OUTPUT_MAYBE)
|
---|
219 | define TOOL_Bs3Ow16_COMPILE_C_CMDS
|
---|
220 | $(TOOL_OPENWATCOM-16_COMPILE_C_CMDS)
|
---|
221 | $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
|
---|
222 | endef
|
---|
223 |
|
---|
224 | TOOL_Bs3Ow16_CXXOBJSUFF = $(TOOL_OPENWATCOM-16_CXXOBJSUFF)
|
---|
225 | TOOL_Bs3Ow16_CXXFLAGS = $(TOOL_OPENWATCOM-16_CXXFLAGS)
|
---|
226 | TOOL_Bs3Ow16_CXXFLAGS.debug = $(TOOL_OPENWATCOM-16_CXXFLAGS.debug)
|
---|
227 | TOOL_Bs3Ow16_CXXFLAGS.dbgopt = $(TOOL_OPENWATCOM-16_CXXFLAGS.dbgopt)
|
---|
228 | TOOL_Bs3Ow16_CXXFLAGS.profile = $(TOOL_OPENWATCOM-16_CXXFLAGS.profile)
|
---|
229 | TOOL_Bs3Ow16_CXXFLAGS.release = $(TOOL_OPENWATCOM-16_CXXFLAGS.release)
|
---|
230 | TOOL_Bs3Ow16_CXXINCS = $(TOOL_OPENWATCOM-16_CXXINCS)
|
---|
231 | TOOL_Bs3Ow16_CXXDEFS =
|
---|
232 | TOOL_Bs3Ow16_COMPILE_CXX_DEPEND = $(TOOL_OPENWATCOM-16_COMPILE_CXX_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
|
---|
233 | TOOL_Bs3Ow16_COMPILE_CXX_DEPORD = $(TOOL_OPENWATCOM-16_COMPILE_CXX_DEPORD)
|
---|
234 | TOOL_Bs3Ow16_COMPILE_CXX_OUTPUT = $(TOOL_OPENWATCOM-16_COMPILE_CXX_OUTPUT)
|
---|
235 | TOOL_Bs3Ow16_COMPILE_CXX_OUTPUT_MAYBE = $(TOOL_OPENWATCOM-16_COMPILE_CXX_OUTPUT_MAYBE)
|
---|
236 | define TOOL_Bs3Ow16_COMPILE_CXX_CMDS
|
---|
237 | $(TOOL_OPENWATCOM-16_COMPILE_CXX_CMDS)
|
---|
238 | $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
|
---|
239 | endef
|
---|
240 |
|
---|
241 | # Debug info format depends on what we use for 64-bit.
|
---|
242 | if1of ($(KBUILD_HOST), win)
|
---|
243 | BS3_OW_DBG_OPT = -hc
|
---|
244 | BS3_OW_DBG_LDOPT = codeview
|
---|
245 | else
|
---|
246 | BS3_OW_DBG_OPT = -hd
|
---|
247 | BS3_OW_DBG_LDOPT = dwarf
|
---|
248 | endif
|
---|
249 |
|
---|
250 | #
|
---|
251 | # BS3Kit template for assembly and 16-bit code.
|
---|
252 | #
|
---|
253 | # Note! Using -d1 as -d1+ and -d2 causes suboptimal code to be generated (strlen
|
---|
254 | # reloading string pointer argument all the time).
|
---|
255 | # Note! Optimization options should come after debug stuff as -d2 for instance
|
---|
256 | # disables all optimziations.
|
---|
257 | #
|
---|
258 | # Compiler options explained:
|
---|
259 | # -nt=xxxx Sets the text segment name.
|
---|
260 | # -nc=xxxx Sets the text segment class name.
|
---|
261 | # -nd=xxxx Sets the data segment name.
|
---|
262 | # -ecc Sets the default calling convension to __cdecl
|
---|
263 | # Update: We don't use this in 16-bit code as it causes unfavorable reloading of DS before calling
|
---|
264 | # inlined functions (e.g. iprt/asm.h). Instead we use -ecw and __cdecl where needed.
|
---|
265 | # -ecw Sets the default calling convension to __watcall ()
|
---|
266 | # -q Quiet, no logos or stuff.
|
---|
267 | # -3 Use 386 instruction set (16-bit only).
|
---|
268 | # -wx Maxium warning level.
|
---|
269 | # -zl Don't emit default library information.
|
---|
270 | # -zu Assume SS != DS.
|
---|
271 | # -mc Compact memory model, far data, small code.
|
---|
272 | # -mf Flat memory model (32-bit).
|
---|
273 | # -d1 Debug info: Globals and line numbers.
|
---|
274 | # -s No stack overflow checks.
|
---|
275 | # -oa Relaxed aliasing constraints.
|
---|
276 | # -ob Branch prediction.
|
---|
277 | # -of Generate stack frames when needed.
|
---|
278 | # -oi Inline instrinsics functions.
|
---|
279 | # -ol Loop optimizations.
|
---|
280 | # -or Reorder for best pipeline.
|
---|
281 | # -os Favor size over speed.
|
---|
282 | #
|
---|
283 | TEMPLATE_VBoxBS3KitImg = Template for building BS3Kit test images.
|
---|
284 | TEMPLATE_VBoxBS3KitImg_BLD_TRG = os-agnostic
|
---|
285 | TEMPLATE_VBoxBS3KitImg_BLD_TRG_ARCH = x86
|
---|
286 | TEMPLATE_VBoxBS3KitImg_INST = $(INST_VALIDATIONKIT)bootsectors/
|
---|
287 | TEMPLATE_VBoxBS3KitImg_BINSUFF = .img
|
---|
288 | TEMPLATE_VBoxBS3KitImg_MODE = 0644
|
---|
289 | TEMPLATE_VBoxBS3KitImg_ASTOOL = NASM
|
---|
290 | TEMPLATE_VBoxBS3KitImg_ASFLAGS = -f obj -g --allow-64bit-code-anywhere -w+orphan-labels
|
---|
291 | TEMPLATE_VBoxBS3KitImg_ASDEFS = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__
|
---|
292 | TEMPLATE_VBoxBS3KitImg_DEFS = ARCH_BITS=16 IN_BS3KIT
|
---|
293 | TEMPLATE_VBoxBS3KitImg_ARTOOL = OPENWATCOM-16
|
---|
294 | TEMPLATE_VBoxBS3KitImg_CTOOL = Bs3Ow16
|
---|
295 | TEMPLATE_VBoxBS3KitImg_CXXTOOL = Bs3Ow16
|
---|
296 | TEMPLATE_VBoxBS3KitImg_CFLAGS = \
|
---|
297 | -nt=BS3TEXT16 -nd=BS3DATA16 -nc=BS3CODE16 -ecw -q -3 -wx -zl -zu -mc $(BS3_OW_DBG_OPT) -d1 -s -oa -ob -of -oi -ol -or -os
|
---|
298 | TEMPLATE_VBoxBS3KitImg_CXXFLAGS = \
|
---|
299 | -nt=BS3TEXT16 -nd=BS3DATA16 -nc=BS3CODE16 -ecw -q -3 -wx -zl -zu -mc $(BS3_OW_DBG_OPT) -d1 -s -oa -ob -of -oi -ol -or -os
|
---|
300 | TEMPLATE_VBoxBS3KitImg_INCS = $(VBOX_PATH_BS3KIT_SRC) .
|
---|
301 | TEMPLATE_VBoxBS3KitImg_LDTOOL = OPENWATCOM-WL
|
---|
302 | # option quiet, nofarcalls\
|
---|
303 | # disable 1014, 1023, 2120, 1080
|
---|
304 |
|
---|
305 | # linker options:
|
---|
306 | # system dos: Link a 16-bit DOS binary.
|
---|
307 | # output raw ...: Produce a raw DOS binary for loading at flat address 10000h.
|
---|
308 | # The following is for ordering segments.
|
---|
309 | # option start=_start: The start symbol in bs3-first-xxx.asm.
|
---|
310 | # debug codeview/dwarf all: Full debug information either in codeview or dwarf.
|
---|
311 | # option symfile: Produce a separate symbol file with the debug info.
|
---|
312 | # option map: Produce a map file.
|
---|
313 | # option statics: ?
|
---|
314 | # option verbose: Verbose map file?
|
---|
315 | # option disable 1014: Disable warning about
|
---|
316 | # option disable 1080: Disable warning about
|
---|
317 | # option disable 1150: Disable warning about
|
---|
318 | #
|
---|
319 | # Note! We're pushing DATA16 to 0x20000 because it's impossible to force wlink
|
---|
320 | # to give us a real-mode + GDT compatible alignment (0ffffff80h), i.e.
|
---|
321 | # real-mode address on the form 0fff8:0000.
|
---|
322 | TEMPLATE_VBoxBS3KitImg_LDFLAGS = system dos \
|
---|
323 | debug $(BS3_OW_DBG_LDOPT) all \
|
---|
324 | option quiet, map, statics, verbose, symfile, start=_start \
|
---|
325 | disable 1014, 1080, 1150 \
|
---|
326 | \
|
---|
327 | output raw offset=0x10000 \
|
---|
328 | order \
|
---|
329 | clname BS3FLAT segaddr=0x0000 \
|
---|
330 | segment BS3FLAT segaddr=0x0000 \
|
---|
331 | clname BS3CODE16 segaddr=0x1000 \
|
---|
332 | segment BS3TEXT16 \
|
---|
333 | segment BS3TEXT16_END \
|
---|
334 | clname BS3SYSTEM16 segaddr=0x2000 \
|
---|
335 | segment BS3SYSTEM16 \
|
---|
336 | clname FAR_DATA \
|
---|
337 | segment BS3DATA16 segaddr=0x2700 \
|
---|
338 | segment BS3DATA16CONST \
|
---|
339 | segment BS3DATA16CONST2 \
|
---|
340 | segment BS3DATA16_DATA \
|
---|
341 | segment BS3DATA16_END \
|
---|
342 | segment BS3DATA32 \
|
---|
343 | segment BS3DATA32_CONST \
|
---|
344 | segment BS3DATA32_CONST2 \
|
---|
345 | segment BS3DATA32_DATA \
|
---|
346 | segment DATA32 \
|
---|
347 | clname BS3CODE32 \
|
---|
348 | segment BS3TEXT32 \
|
---|
349 | segment TEXT32 \
|
---|
350 | clname CODE \
|
---|
351 | segment BS3TEXT64 \
|
---|
352 | segment TEXT64 \
|
---|
353 | segment .text \
|
---|
354 | segment .rdata \
|
---|
355 | clname DATA \
|
---|
356 | segment BS3DATA64 \
|
---|
357 | segment DATA64 \
|
---|
358 | segment .data \
|
---|
359 | segment .pdata \
|
---|
360 | segment .xdata \
|
---|
361 |
|
---|
362 | TEMPLATE_VBoxBS3KitImg_DEPS = \
|
---|
363 | $(bs3-bootsector_1_TARGET) \
|
---|
364 | $(VBoxBs3Linker_1_TARGET)
|
---|
365 | TEMPLATE_VBoxBS3KitImg_POST_CMDS = $(if $(eq $(tool_do),LINK_LIBRARY)\
|
---|
366 | ,,$(QUIET)$(MV_EXT) -f -- "$(out)" "$(out).tmp" \
|
---|
367 | $$(NLTAB)$(QUIET)$(VBoxBs3Linker_1_TARGET) -o $(out) $(bs3-bootsector_1_TARGET) $(out).tmp \
|
---|
368 | $$(NLTAB)$(QUIET)$(RM_EXT) -f -- "$(out).tmp")
|
---|
369 |
|
---|
370 | TEMPLATE_VBoxBS3KitImg_LIBS = \
|
---|
371 | $(PATH_OBJ)/bs3kit-common-16/bs3kit-common-16.lib \
|
---|
372 | $(PATH_OBJ)/bs3kit-common-32/bs3kit-common-32.lib \
|
---|
373 | $(PATH_OBJ)/bs3kit-common-64-asm/bs3kit-common-64-asm.lib \
|
---|
374 | $(PATH_OBJ)/bs3kit-common-64-c/bs3kit-common-64-c.lib \
|
---|
375 | \
|
---|
376 | $(PATH_OBJ)/bs3kit-rm/bs3kit-rm.lib \
|
---|
377 | $(PATH_OBJ)/bs3kit-pe16/bs3kit-pe16.lib \
|
---|
378 | $(PATH_OBJ)/bs3kit-pe32/bs3kit-pe32.lib \
|
---|
379 | $(PATH_OBJ)/bs3kit-pev86/bs3kit-pev86.lib \
|
---|
380 | $(PATH_OBJ)/bs3kit-pp16/bs3kit-pp16.lib \
|
---|
381 | $(PATH_OBJ)/bs3kit-pp32/bs3kit-pp32.lib \
|
---|
382 | $(PATH_OBJ)/bs3kit-ppv86/bs3kit-ppv86.lib \
|
---|
383 | $(PATH_OBJ)/bs3kit-pae16/bs3kit-pae16.lib \
|
---|
384 | $(PATH_OBJ)/bs3kit-pae32/bs3kit-pae32.lib \
|
---|
385 | $(PATH_OBJ)/bs3kit-paev86/bs3kit-paev86.lib \
|
---|
386 | $(PATH_OBJ)/bs3kit-lm16/bs3kit-lm16.lib \
|
---|
387 | $(PATH_OBJ)/bs3kit-lm32/bs3kit-lm32.lib \
|
---|
388 | $(PATH_OBJ)/bs3kit-lm64-asm/bs3kit-lm64-asm.lib \
|
---|
389 | $(PATH_OBJ)/bs3kit-lm64-c/bs3kit-lm64-c.lib
|
---|
390 |
|
---|
391 | # BS3Kit template for 32-bit code.
|
---|
392 | TEMPLATE_VBoxBS3KitImg32 = Template for building BS3Kit test images.
|
---|
393 | TEMPLATE_VBoxBS3KitImg32_BLD_TRG = os-agnostic
|
---|
394 | TEMPLATE_VBoxBS3KitImg32_BLD_TRG_ARCH = x86
|
---|
395 | TEMPLATE_VBoxBS3KitImg32_INSTTYPE = none
|
---|
396 | TEMPLATE_VBoxBS3KitImg32_ASTOOL = NASM
|
---|
397 | TEMPLATE_VBoxBS3KitImg32_ASFLAGS = -f obj -g --allow-64bit-code-anywhere -w+orphan-labels
|
---|
398 | TEMPLATE_VBoxBS3KitImg32_ASDEFS = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__
|
---|
399 | TEMPLATE_VBoxBS3KitImg32_DEFS = ARCH_BITS=32 IN_BS3KIT
|
---|
400 | TEMPLATE_VBoxBS3KitImg32_ARTOOL = OPENWATCOM
|
---|
401 | TEMPLATE_VBoxBS3KitImg32_CTOOL = Bs3Ow32
|
---|
402 | TEMPLATE_VBoxBS3KitImg32_CXXTOOL = Bs3Ow32
|
---|
403 | TEMPLATE_VBoxBS3KitImg32_CFLAGS = \
|
---|
404 | -nt=BS3TEXT32 -nd=BS3DATA32 -nc=BS3CODE32 -ecc -q -wx -zl -mf $(BS3_OW_DBG_OPT) -d1 -s -oa -ob -of -oi -ol -or -os
|
---|
405 | TEMPLATE_VBoxBS3KitImg32_CXXFLAGS = \
|
---|
406 | -nt=BS3TEXT32 -nd=BS3DATA32 -nc=BS3CODE32 -ecc -q -wx -zl -mf $(BS3_OW_DBG_OPT) -d1 -s -oa -ob -of -oi -ol -or -os
|
---|
407 | TEMPLATE_VBoxBS3KitImg32_INCS = $(VBOX_PATH_BS3KIT_SRC) .
|
---|
408 | TEMPLATE_VBoxBS3KitImg32_LDTOOL = VBoxBsUnusedLd
|
---|
409 |
|
---|
410 | # BS3Kit template for 64-bit code.
|
---|
411 | TEMPLATE_VBoxBS3KitImg64 = Template for building BS3Kit test images.
|
---|
412 | TEMPLATE_VBoxBS3KitImg64_BLD_TRG = os-agnostic
|
---|
413 | TEMPLATE_VBoxBS3KitImg64_BLD_TRG_ARCH = amd64
|
---|
414 | TEMPLATE_VBoxBS3KitImg64_INSTTYPE = none
|
---|
415 | TEMPLATE_VBoxBS3KitImg64_ASTOOL = NASM
|
---|
416 | TEMPLATE_VBoxBS3KitImg64_ASFLAGS = -f obj -g --allow-64bit-code-anywhere -w+orphan-labels
|
---|
417 | TEMPLATE_VBoxBS3KitImg64_ASDEFS = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__
|
---|
418 | TEMPLATE_VBoxBS3KitImg64_DEFS = IN_BS3KIT ARCH_BITS=64
|
---|
419 | TEMPLATE_VBoxBS3KitImg64_ARTOOL = OPENWATCOM
|
---|
420 | TEMPLATE_VBoxBS3KitImg64_INCS = $(VBOX_PATH_BS3KIT_SRC) .
|
---|
421 | if1of ($(KBUILD_HOST), win)
|
---|
422 | TEMPLATE_VBoxBS3KitImg64_CTOOL := Bs3Vcc64
|
---|
423 | TEMPLATE_VBoxBS3KitImg64_CXXTOOL := Bs3Vcc64
|
---|
424 | TEMPLATE_VBoxBS3KitImg64_CFLAGS = -Zi -O1 -Oi -GF -GS- -Gy -Gs65536
|
---|
425 | TEMPLATE_VBoxBS3KitImg64_CXXFLAGS = -Zi -O1 -Oi -GF -GS- -Gy -Gs65536
|
---|
426 | else
|
---|
427 | if1of ($(KBUILD_HOST), darwin)
|
---|
428 | TEMPLATE_VBoxBS3KitImg64_CTOOL := Bs3Gcc64Elf64
|
---|
429 | TEMPLATE_VBoxBS3KitImg64_CXXTOOL := Bs3Gcc64Elf64
|
---|
430 | else
|
---|
431 | TEMPLATE_VBoxBS3KitImg64_CTOOL := $(VBOX_GCC_TOOL)
|
---|
432 | TEMPLATE_VBoxBS3KitImg64_CXXTOOL := $(VBOX_GCC_TOOL)
|
---|
433 | endif
|
---|
434 | TEMPLATE_VBoxBS3KitImg64_CFLAGS = -m64 -maccumulate-outgoing-args -g -Os -fno-omit-frame-pointer $(VBOX_GCC_WARN_PEDANTIC_C)
|
---|
435 | TEMPLATE_VBoxBS3KitImg64_CXXFLAGS = -m64 -maccumulate-outgoing-args -g -Os -fno-omit-frame-pointer $(VBOX_GCC_WARN_PEDANTIC_CXX)
|
---|
436 | endif
|
---|
437 | TEMPLATE_VBoxBS3KitImg64_LDTOOL = VBoxBsUnusedLd
|
---|
438 |
|
---|
439 | # BS3Kit template for the bootsector.
|
---|
440 | TEMPLATE_VBoxBS3KitBS = Template for building BS3Kit test images.
|
---|
441 | TEMPLATE_VBoxBS3KitBS_BLD_TRG = os-agnostic
|
---|
442 | TEMPLATE_VBoxBS3KitBS_BLD_TRG_ARCH = x86
|
---|
443 | TEMPLATE_VBoxBS3KitBS_INST = $(INST_VALIDATIONKIT)bootsectors/
|
---|
444 | TEMPLATE_VBoxBS3KitBS_INSTTYPE = none
|
---|
445 | TEMPLATE_VBoxBS3KitBS_BINSUFF = .img
|
---|
446 | TEMPLATE_VBoxBS3KitBS_MODE = 0644
|
---|
447 | TEMPLATE_VBoxBS3KitBS_ASTOOL = YASM
|
---|
448 | TEMPLATE_VBoxBS3KitBS_ASFLAGS = -f bin --mapfile
|
---|
449 | TEMPLATE_VBoxBS3KitBS_ASDEFS = ASM_FORMAT_BIN RT_NOINC_SEGMENTS ARCH_BITS=16 __YASM__
|
---|
450 | TEMPLATE_VBoxBS3KitBS_INCS = $(VBOX_PATH_BS3KIT_SRC) .
|
---|
451 | TEMPLATE_VBoxBS3KitBS_LDTOOL = VBoxBsCpLd
|
---|
452 |
|
---|
453 | #
|
---|
454 | # ----- Config.kmk: end -----
|
---|
455 | #
|
---|
456 |
|
---|
457 |
|
---|
458 | # The boot sector.
|
---|
459 | MISCBINS += bs3-bootsector
|
---|
460 | bs3-bootsector_TEMPLATE = VBoxBS3KitBS
|
---|
461 | bs3-bootsector_SOURCES = bs3-bootsector.asm
|
---|
462 |
|
---|
463 | #
|
---|
464 | # Common sources to be compiled into _p16, _p32 and _p64 versions.
|
---|
465 | #
|
---|
466 | VBOX_BS3KIT_COMMON_SOURCES = \
|
---|
467 | bs3-cmn-A20Disable.asm \
|
---|
468 | bs3-cmn-A20Enable.asm \
|
---|
469 | bs3-cmn-KbdRead.asm \
|
---|
470 | bs3-cmn-KbdWait.asm \
|
---|
471 | bs3-cmn-KbdWrite.asm \
|
---|
472 | bs3-cmn-Shutdown.asm \
|
---|
473 | bs3-cmn-Panic.asm \
|
---|
474 | bs3-cmn-PrintChr.asm \
|
---|
475 | bs3-cmn-Printf.c \
|
---|
476 | bs3-cmn-PrintU32.asm \
|
---|
477 | bs3-cmn-PrintX32.asm \
|
---|
478 | bs3-cmn-PrintStr.c \
|
---|
479 | bs3-cmn-PrintStrColonSpaces.asm \
|
---|
480 | bs3-cmn-PrintStrSpacesColonSpace.c \
|
---|
481 | bs3-cmn-StrFormatV.c \
|
---|
482 | bs3-cmn-StrPrintf.c \
|
---|
483 | bs3-cmn-StrLen.c \
|
---|
484 | bs3-cmn-StrNLen.c \
|
---|
485 | bs3-cmn-StrCpy.c \
|
---|
486 | bs3-cmn-MemCpy.c \
|
---|
487 | bs3-cmn-MemPCpy.c \
|
---|
488 | bs3-cmn-MemMove.c \
|
---|
489 | bs3-cmn-MemZero.asm \
|
---|
490 | bs3-cmn-MemAlloc.c \
|
---|
491 | bs3-cmn-MemAllocZ.c \
|
---|
492 | bs3-cmn-MemFree.c \
|
---|
493 | bs3-cmn-PagingData.c \
|
---|
494 | bs3-cmn-PagingInitRootForPP.c \
|
---|
495 | bs3-cmn-SlabInit.c \
|
---|
496 | bs3-cmn-SlabAlloc.c \
|
---|
497 | bs3-cmn-SlabAllocEx.c \
|
---|
498 | bs3-cmn-SlabFree.c \
|
---|
499 | bs3-cmn-SlabListInit.c \
|
---|
500 | bs3-cmn-SlabListAdd.c \
|
---|
501 | bs3-cmn-SlabListAlloc.c \
|
---|
502 | bs3-cmn-SlabListAllocEx.c \
|
---|
503 | bs3-cmn-SlabListFree.c \
|
---|
504 | bs3-cmn-SwitchToRing0.asm \
|
---|
505 | bs3-cmn-SwitchToRing1.asm \
|
---|
506 | bs3-cmn-SwitchToRing2.asm \
|
---|
507 | bs3-cmn-SwitchToRing3.asm \
|
---|
508 | bs3-cmn-SwitchTo16Bit.asm \
|
---|
509 | bs3-cmn-SwitchTo32Bit.asm \
|
---|
510 | bs3-cmn-SwitchTo64Bit.asm \
|
---|
511 | bs3-cmn-TestData.c \
|
---|
512 | bs3-cmn-TestInit.c \
|
---|
513 | bs3-cmn-TestSendStrCmd.asm \
|
---|
514 | bs3-cmn-TestIsVmmDevTestingPresent.asm \
|
---|
515 | ../../../Runtime/common/asm/ASMBitFirstClear.asm \
|
---|
516 | ../../../Runtime/common/asm/ASMBitFirstSet.asm \
|
---|
517 | ../../../Runtime/common/asm/ASMBitNextClear.asm \
|
---|
518 | ../../../Runtime/common/asm/ASMBitNextSet.asm
|
---|
519 |
|
---|
520 | # The 16-bit BS3Kit library.
|
---|
521 | LIBRARIES += bs3kit-common-16
|
---|
522 | bs3kit-common-16_TEMPLATE = VBoxBS3KitImg
|
---|
523 | bs3kit-common-16_DEFS = TMPL_PE16 BS3_CMN_ONLY
|
---|
524 | bs3kit-common-16_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE
|
---|
525 | bs3kit-common-16_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \
|
---|
526 | bs3-system-data.asm \
|
---|
527 | bs3-rm-InitMemory.c \
|
---|
528 | bs3-cmn-hexdigits.c \
|
---|
529 | bs3-cmn-ConvertRMStackToP16UsingCxReturnToAx.asm \
|
---|
530 | bs3-wc16-U8DR.asm \
|
---|
531 | bs3-wc16-U8DQ.asm \
|
---|
532 | bs3-wc16-I8DR.asm \
|
---|
533 | bs3-wc16-I8DQ.asm \
|
---|
534 | bs3-wc16-I8RS.asm \
|
---|
535 | bs3-wc16-U8RS.asm \
|
---|
536 | bs3-wc16-U8LS.asm \
|
---|
537 | bs3-wc16-U4D.asm \
|
---|
538 | bs3-wc16-I4D.asm \
|
---|
539 |
|
---|
540 | # The 32-bit BS3Kit library.
|
---|
541 | LIBRARIES += bs3kit-common-32
|
---|
542 | bs3kit-common-32_TEMPLATE = VBoxBS3KitImg32
|
---|
543 | bs3kit-common-32_DEFS = TMPL_PE32 BS3_CMN_ONLY
|
---|
544 | bs3kit-common-32_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE
|
---|
545 | bs3kit-common-32_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \
|
---|
546 | bs3-wc32-U8D.asm \
|
---|
547 | bs3-wc32-I8D.asm \
|
---|
548 | bs3-wc32-I8RS.asm \
|
---|
549 | bs3-wc32-U8RS.asm \
|
---|
550 | bs3-wc32-U8LS.asm \
|
---|
551 |
|
---|
552 | # The 64-bit BS3Kit library.
|
---|
553 | LIBRARIES += bs3kit-common-64-asm
|
---|
554 | bs3kit-common-64-asm_TEMPLATE = VBoxBS3KitImg64
|
---|
555 | bs3kit-common-64-asm_DEFS = TMPL_LM64 BS3_CMN_ONLY
|
---|
556 | bs3kit-common-64-asm_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE
|
---|
557 | bs3kit-common-64-asm_SOURCES = $(filter %.asm,$(VBOX_BS3KIT_COMMON_SOURCES))
|
---|
558 |
|
---|
559 | # The 64-bit BS3Kit library.
|
---|
560 | LIBRARIES += bs3kit-common-64-c
|
---|
561 | bs3kit-common-64-c_TEMPLATE = VBoxBS3KitImg64
|
---|
562 | bs3kit-common-64-c_DEFS = TMPL_LM64 BS3_CMN_ONLY
|
---|
563 | bs3kit-common-64-c_SOURCES = $(filter-out %.asm,$(VBOX_BS3KIT_COMMON_SOURCES))
|
---|
564 |
|
---|
565 |
|
---|
566 | #
|
---|
567 | # Common sources to be compiled for each CPU mode.
|
---|
568 | #
|
---|
569 | VBOX_BS3KIT_MODE_SOURCES = \
|
---|
570 | bs3-mode-SwitchToRM.asm \
|
---|
571 | bs3-mode-SwitchToPE16.asm \
|
---|
572 | bs3-mode-SwitchToPE32.asm \
|
---|
573 | bs3-mode-SwitchToPP16.asm \
|
---|
574 | bs3-mode-SwitchToPP32.asm \
|
---|
575 | bs3-mode-EnteredMode.asm \
|
---|
576 | bs3-mode-PagingGetRootForPP16.asm \
|
---|
577 | bs3-mode-PagingGetRootForPP32.asm \
|
---|
578 |
|
---|
579 | # The 16-bit real mode BS3Kit library.
|
---|
580 | LIBRARIES += bs3kit-rm
|
---|
581 | bs3kit-rm_TEMPLATE = VBoxBS3KitImg
|
---|
582 | bs3kit-rm_DEFS = TMPL_RM
|
---|
583 | bs3kit-rm_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
|
---|
584 | bs3-first-rm.asm
|
---|
585 |
|
---|
586 |
|
---|
587 | # The 16-bit protected mode BS3Kit library.
|
---|
588 | LIBRARIES += bs3kit-pe16
|
---|
589 | bs3kit-pe16_TEMPLATE = VBoxBS3KitImg
|
---|
590 | bs3kit-pe16_DEFS = TMPL_PE16
|
---|
591 | bs3kit-pe16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
|
---|
592 | bs3-first-pe16.asm
|
---|
593 |
|
---|
594 | # The virtual 8086 under protected mode BS3Kit library.
|
---|
595 | LIBRARIES += bs3kit-pev86
|
---|
596 | bs3kit-pev86_TEMPLATE = VBoxBS3KitImg
|
---|
597 | bs3kit-pev86_DEFS = TMPL_PEV86
|
---|
598 | bs3kit-pev86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
|
---|
599 |
|
---|
600 | # The 32-bit protected mode BS3Kit library.
|
---|
601 | LIBRARIES += bs3kit-pe32
|
---|
602 | bs3kit-pe32_TEMPLATE = VBoxBS3KitImg
|
---|
603 | bs3kit-pe32_DEFS = TMPL_PE32
|
---|
604 | bs3kit-pe32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
|
---|
605 |
|
---|
606 |
|
---|
607 | # The 16-bit paged protected mode BS3Kit library.
|
---|
608 | LIBRARIES += bs3kit-pp16
|
---|
609 | bs3kit-pp16_TEMPLATE = VBoxBS3KitImg
|
---|
610 | bs3kit-pp16_DEFS = TMPL_PP16
|
---|
611 | bs3kit-pp16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
|
---|
612 |
|
---|
613 | # The 32-bit paged protected mode BS3Kit library.
|
---|
614 | LIBRARIES += bs3kit-pp32
|
---|
615 | bs3kit-pp32_TEMPLATE = VBoxBS3KitImg
|
---|
616 | bs3kit-pp32_DEFS = TMPL_PP32
|
---|
617 | bs3kit-pp32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
|
---|
618 |
|
---|
619 | # The virtual 8086 under protected mode BS3Kit library.
|
---|
620 | LIBRARIES += bs3kit-ppv86
|
---|
621 | bs3kit-ppv86_TEMPLATE = VBoxBS3KitImg
|
---|
622 | bs3kit-ppv86_DEFS = TMPL_PPV86
|
---|
623 | bs3kit-ppv86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
|
---|
624 |
|
---|
625 |
|
---|
626 | # The 16-bit paged protected mode BS3Kit library.
|
---|
627 | LIBRARIES += bs3kit-pae16
|
---|
628 | bs3kit-pae16_TEMPLATE = VBoxBS3KitImg
|
---|
629 | bs3kit-pae16_DEFS = TMPL_PAE16
|
---|
630 | bs3kit-pae16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
|
---|
631 |
|
---|
632 | # The 32-bit paged protected mode BS3Kit library.
|
---|
633 | LIBRARIES += bs3kit-pae32
|
---|
634 | bs3kit-pae32_TEMPLATE = VBoxBS3KitImg
|
---|
635 | bs3kit-pae32_DEFS = TMPL_PAE32
|
---|
636 | bs3kit-pae32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
|
---|
637 |
|
---|
638 | # The virtual 8086 under protected mode BS3Kit library.
|
---|
639 | LIBRARIES += bs3kit-paev86
|
---|
640 | bs3kit-paev86_TEMPLATE = VBoxBS3KitImg
|
---|
641 | bs3kit-paev86_DEFS = TMPL_PAEV86
|
---|
642 | bs3kit-paev86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
|
---|
643 |
|
---|
644 |
|
---|
645 | # The 16-bit long mode BS3Kit library.
|
---|
646 | LIBRARIES += bs3kit-lm16
|
---|
647 | bs3kit-lm16_TEMPLATE = VBoxBS3KitImg
|
---|
648 | bs3kit-lm16_DEFS = TMPL_LM16
|
---|
649 | bs3kit-lm16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
|
---|
650 |
|
---|
651 | # The 32-bit long mode BS3Kit library.
|
---|
652 | LIBRARIES += bs3kit-lm32
|
---|
653 | bs3kit-lm32_TEMPLATE = VBoxBS3KitImg
|
---|
654 | bs3kit-lm32_DEFS = TMPL_LM32
|
---|
655 | bs3kit-lm32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
|
---|
656 |
|
---|
657 | # The 64-bit long mode BS3Kit library.
|
---|
658 | LIBRARIES += bs3kit-lm64-asm
|
---|
659 | bs3kit-lm64-asm_TEMPLATE = VBoxBS3KitImg
|
---|
660 | bs3kit-lm64-asm_DEFS = TMPL_LM64
|
---|
661 | bs3kit-lm64-asm_SOURCES = $(filter %.asm,$(VBOX_BS3KIT_MODE_SOURCES)) \
|
---|
662 |
|
---|
663 | # The 64-bit long mode BS3Kit library.
|
---|
664 | LIBRARIES += bs3kit-lm64-c
|
---|
665 | bs3kit-lm64-c_TEMPLATE = VBoxBS3KitImg
|
---|
666 | bs3kit-lm64-c_DEFS = TMPL_LM64
|
---|
667 | bs3kit-lm64-c_SOURCES = $(filter-out %.asm, $(VBOX_BS3KIT_MODE_SOURCES)) \
|
---|
668 |
|
---|
669 |
|
---|
670 | #
|
---|
671 | # shutdown example.
|
---|
672 | #
|
---|
673 | MISCBINS += bs3-shutdown
|
---|
674 | bs3-shutdown_TEMPLATE = VBoxBS3KitImg
|
---|
675 | bs3-shutdown_SOURCES = \
|
---|
676 | bs3-first-pe16.asm \
|
---|
677 | bs3-shutdown.c
|
---|
678 |
|
---|
679 |
|
---|
680 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
681 |
|
---|
682 | .PRECIOUS: $(PATH_OBJ)/bs3-shutdown/bs3-shutdown.map
|
---|