1 | # $Id: Config.kmk 96407 2022-08-22 17:43:14Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # kBuild Configuration file for VirtualBox Boot Sector Kit 3.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2010-2022 Oracle and/or its affiliates.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox base platform packages, as
|
---|
10 | # available from https://www.virtualbox.org.
|
---|
11 | #
|
---|
12 | # This program is free software; you can redistribute it and/or
|
---|
13 | # modify it under the terms of the GNU General Public License
|
---|
14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
15 | # License.
|
---|
16 | #
|
---|
17 | # This program is distributed in the hope that it will be useful, but
|
---|
18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | # General Public License for more details.
|
---|
21 | #
|
---|
22 | # You should have received a copy of the GNU General Public License
|
---|
23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | #
|
---|
25 | # The contents of this file may alternatively be used under the terms
|
---|
26 | # of the Common Development and Distribution License Version 1.0
|
---|
27 | # (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
|
---|
28 | # in the VirtualBox distribution, in which case the provisions of the
|
---|
29 | # CDDL are applicable instead of those of the GPL.
|
---|
30 | #
|
---|
31 | # You may elect to license modified versions of this file under the
|
---|
32 | # terms and conditions of either the GPL or the CDDL or both.
|
---|
33 | #
|
---|
34 | # SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
|
---|
35 | #
|
---|
36 |
|
---|
37 | VBOX_BOOTSECTORS_CONFIG_KMK_INCLUDED = 1
|
---|
38 |
|
---|
39 | # Include the parent configure file.
|
---|
40 | ifndef VBOX_VALIDATIONKIT_CONFIG_KMK_INCLUDED
|
---|
41 | include $(PATH_ROOT)/src/VBox/ValidationKit/Config.kmk
|
---|
42 | endif
|
---|
43 |
|
---|
44 | # Add our 32-bit and 64-bit C properties.
|
---|
45 | KBUILD_COMPILE_CATEGTORIES += C32 C64
|
---|
46 | PROPS_TOOLS += C32TOOL C64TOOL
|
---|
47 | PROPS_SINGLE += C32TOOL C64TOOL C32OBJSUFF C64OBJSUFF
|
---|
48 | PROPS_ACCUMULATE_R += C32FLAGS C64FLAGS C32DEFS C64DEFS
|
---|
49 | PROPS_ACCUMULATE_L += C32INCS C64INCS
|
---|
50 |
|
---|
51 | if 0 # Adding as few as possible new properties.
|
---|
52 | KBUILD_COMPILE_CATEGTORIES += C16
|
---|
53 | PROPS_TOOLS += C16TOOL
|
---|
54 | PROPS_SINGLE += C16TOOL C16OBJSUFF
|
---|
55 | PROPS_ACCUMULATE_R += C16FLAGS C16DEFS
|
---|
56 | PROPS_ACCUMULATE_L += C16INCS
|
---|
57 | endif
|
---|
58 |
|
---|
59 | # Add noarch to the architectures list (will be there by default in a new kBuild).
|
---|
60 | KBUILD_ARCHES += noarch
|
---|
61 |
|
---|
62 |
|
---|
63 | # The bootsector directory.
|
---|
64 | VBOX_PATH_BOOTSECTORS_SRC = $(VBOX_PATH_VALIDATIONKIT_SRC)/bootsectors
|
---|
65 |
|
---|
66 | # The bs3kit source directory.
|
---|
67 | VBOX_PATH_BS3KIT_SRC = $(VBOX_PATH_BOOTSECTORS_SRC)/bs3kit
|
---|
68 |
|
---|
69 |
|
---|
70 | # The 16-bit code & data segment classes.
|
---|
71 | if 1
|
---|
72 | BS3KIT_CLASS_CODE16 = CODE
|
---|
73 | BS3KIT_SEGNM_DATA16 =
|
---|
74 | BS3KIT_CLASS_DATA16 = DATA
|
---|
75 | BS3KIT_GRPNM_DATA16 = DGROUP
|
---|
76 | BS3KIT_CLASS_BSS16 = BSS
|
---|
77 | else
|
---|
78 | BS3KIT_CLASS_CODE16 = BS3CLASS16CODE
|
---|
79 | BS3KIT_SEGNM_DATA16 = BS3DATA16
|
---|
80 | BS3KIT_CLASS_DATA16 = FAR_DATA
|
---|
81 | BS3KIT_GRPNM_DATA16 = BS3DATA16_GROUP
|
---|
82 | BS3KIT_CLASS_BSS16 = ???
|
---|
83 | endif
|
---|
84 |
|
---|
85 |
|
---|
86 | ##
|
---|
87 | # Macro for generating near-call aliases for one 16-bit C function.
|
---|
88 | # @param 1 The target name.
|
---|
89 | # @param 2 The common function.
|
---|
90 | BS3KIT_FN_GEN_CMN_NEARSTUB = $(evalcall2 def_Bs3KitGenNearStubSource,$1,_$2_c16,_$2_f16)
|
---|
91 |
|
---|
92 | ##
|
---|
93 | # Macro for generating near-call aliases for one 16-bit C mode function.
|
---|
94 | # @param 1 The target name.
|
---|
95 | # @param 2 The mode function.
|
---|
96 | BS3KIT_FN_GEN_MODE_NEARSTUB = $(foreach suff, \
|
---|
97 | _rm \
|
---|
98 | _pe16 \
|
---|
99 | _pe16_v86 \
|
---|
100 | _pe32_16 \
|
---|
101 | _pev86 \
|
---|
102 | _pp16 \
|
---|
103 | _pp16_v86 \
|
---|
104 | _pp32_16 \
|
---|
105 | _ppv86 \
|
---|
106 | _pae16 \
|
---|
107 | _pae16_v86 \
|
---|
108 | _pae32_16 \
|
---|
109 | _paev86 \
|
---|
110 | _lm16 \
|
---|
111 | ,$(evalcall2 def_Bs3KitGenNearStubSource,$1,_$2$(suff),_$2$(suff)_far))
|
---|
112 |
|
---|
113 | # @param 1 The target name.
|
---|
114 | # @param 2 The near function name.
|
---|
115 | # @param 3 The far function name.
|
---|
116 | define def_Bs3KitGenNearStubSource
|
---|
117 | $1_SOURCES += $$($1_0_OUTDIR)/stub$2.asm
|
---|
118 | $1_CLEAN += $$($1_0_OUTDIR)/stub$2.asm
|
---|
119 | $$$$($1_0_OUTDIR)/stub$2.asm: $$(VBOX_PATH_BOOTSECTORS_SRC)/Config.kmk | $$$$(dir $$$$@)
|
---|
120 | $(QUIET)$(APPEND) -tn $$@ \
|
---|
121 | '%include "bs3kit.mac"' \
|
---|
122 | 'BS3_BEGIN_TEXT16' \
|
---|
123 | ' extern $3' \
|
---|
124 | 'BS3_BEGIN_TEXT16_NEARSTUBS' \
|
---|
125 | 'BS3_GLOBAL_NAME_EX $2, function, 6' \
|
---|
126 | ' pop ax' \
|
---|
127 | ' push cs' \
|
---|
128 | ' push ax' \
|
---|
129 | ' jmp $3 wrt CGROUP16'
|
---|
130 | endef
|
---|
131 |
|
---|
132 |
|
---|
133 | ##
|
---|
134 | # Macro for generating far-call aliases for zero or more 16-bit C or assembly functions.
|
---|
135 | # @param 1 The target name.
|
---|
136 | # @param 2 The common function.
|
---|
137 | # @param 3 The parameter size in bytes.
|
---|
138 | BS3KIT_FN_GEN_CMN_FARSTUB = $(evalcall2 def_Bs3KitGenFarStubSource,$1,$2,_f16,_c16,$3)
|
---|
139 |
|
---|
140 | ##
|
---|
141 | # Macro for generating far-call aliases for zero or more 16-bit C mode functions.
|
---|
142 | # @param 1 The target name.
|
---|
143 | # @param 2 The mode function.
|
---|
144 | # @param 3 The parameter size in bytes.
|
---|
145 | BS3KIT_FN_GEN_MODE_FARSTUB = $(foreach suff, \
|
---|
146 | _rm \
|
---|
147 | _pe16 \
|
---|
148 | _pe16_v86 \
|
---|
149 | _pe32_16 \
|
---|
150 | _pev86 \
|
---|
151 | _pp16 \
|
---|
152 | _pp16_v86 \
|
---|
153 | _pp32_16 \
|
---|
154 | _ppv86 \
|
---|
155 | _pae16 \
|
---|
156 | _pae16_v86 \
|
---|
157 | _pae32_16 \
|
---|
158 | _paev86 \
|
---|
159 | _lm16 \
|
---|
160 | ,$(evalcall2 def_Bs3KitGenFarStubSource,$1,$2,$(suff)_far,$(suff),$3))
|
---|
161 |
|
---|
162 | # @param 1 The target name.
|
---|
163 | # @param 2 The function name.
|
---|
164 | # @param 3 The far function suffix.
|
---|
165 | # @param 4 The near function suffix.
|
---|
166 | # @param 5 The parameter size in bytes.
|
---|
167 | define def_Bs3KitGenFarStubSource
|
---|
168 | $1_SOURCES += $$($1_0_OUTDIR)/stub_$2$3.asm
|
---|
169 | $1_CLEAN += $$($1_0_OUTDIR)/stub_$2$3.asm
|
---|
170 | $$$$($1_0_OUTDIR)/stub_$2$3.asm: $$(VBOX_PATH_BOOTSECTORS_SRC)/Config.kmk | $$$$(dir $$$$@)
|
---|
171 | $(QUIET)$(APPEND) -tn $$@ \
|
---|
172 | '%include "bs3kit.mac"' \
|
---|
173 | 'BS3_BEGIN_TEXT16' \
|
---|
174 | ' extern _$2$4' \
|
---|
175 | 'BS3_BEGIN_TEXT16_FARSTUBS' \
|
---|
176 | 'BS3_PROC_BEGIN _$2$3' \
|
---|
177 | ' CPU 8086' \
|
---|
178 | ' inc bp' \
|
---|
179 | ' push bp' \
|
---|
180 | ' mov bp, sp' \
|
---|
181 | '%assign offParam $5' \
|
---|
182 | '%rep $5 / 2' \
|
---|
183 | ' push word [bp + 2 + 4 + offParam - 2]' \
|
---|
184 | '%assign offParam offParam - 2' \
|
---|
185 | '%endrep' \
|
---|
186 | ' call _$2$4' \
|
---|
187 | ' add sp, $5' \
|
---|
188 | ' pop bp' \
|
---|
189 | ' dec bp' \
|
---|
190 | ' retf' \
|
---|
191 | 'BS3_PROC_END _$2$3' \
|
---|
192 | ''
|
---|
193 | endef
|
---|
194 |
|
---|
195 |
|
---|
196 | #
|
---|
197 | # Tools Tools Tools
|
---|
198 | # Tools Tools Tools
|
---|
199 | # Tools Tools Tools
|
---|
200 | #
|
---|
201 |
|
---|
202 | if defined(VBOX_USE_KSUBMIT) && "$(KBUILD_HOST)" == "win"
|
---|
203 | VBOX_BS3KIT_KSUBMIT_OBJ_CONV := kmk_builtin_kSubmit --
|
---|
204 | else
|
---|
205 | VBOX_BS3KIT_KSUBMIT_OBJ_CONV :=
|
---|
206 | endif
|
---|
207 |
|
---|
208 | # Dummy CP "linker" tool.
|
---|
209 | TOOL_VBoxBsCpLd = Dummy copy linker.
|
---|
210 | TOOL_VBoxBsCpLd_LINK_MISCBIN_OUTPUT =
|
---|
211 | TOOL_VBoxBsCpLd_LINK_MISCBIN_DEPEND =
|
---|
212 | TOOL_VBoxBsCpLd_LINK_MISCBIN_DEPORD =
|
---|
213 | define TOOL_VBoxBsCpLd_LINK_MISCBIN_CMDS
|
---|
214 | $(CP) -- $(objs) $(othersrc) "$(out)"
|
---|
215 | endef
|
---|
216 |
|
---|
217 | # Dummy exit 1 "linker" tool.
|
---|
218 | TOOL_VBoxBsUnusedLd = Dummy unused linker.
|
---|
219 | TOOL_VBoxBsUnusedLd_LINK_MISCBIN_OUTPUT =
|
---|
220 | TOOL_VBoxBsUnusedLd_LINK_MISCBIN_DEPEND =
|
---|
221 | TOOL_VBoxBsUnusedLd_LINK_MISCBIN_DEPORD =
|
---|
222 | define TOOL_VBoxBsUnusedLd_LINK_MISCBIN_CMDS
|
---|
223 | echo "cannot use this template for linking"
|
---|
224 | exit 1
|
---|
225 | endef
|
---|
226 |
|
---|
227 | # NASM tool with dependency workarounds (change dir to force consistent results; add -MP).
|
---|
228 | # Requires http://permalink.gmane.org/gmane.comp.lang.nasm.devel/3704 to work.
|
---|
229 | include $(KBUILD_PATH)/tools/NASM.kmk
|
---|
230 | TOOL_VBoxNasm = Our version of the NASM tool
|
---|
231 | ifndef TOOL_VBoxNasm_PATH
|
---|
232 | TOOL_VBoxNasm_PATH := $(firstword $(rsort $(wildcard $(KBUILD_DEVTOOLS_HST)/nasm/v*.*)))
|
---|
233 | if "$(TOOL_VBoxNasm_PATH)" == "" && "$(KBUILD_DEVTOOLS_HST_ALT)" != ""
|
---|
234 | TOOL_VBoxNasm_PATH := $(firstword $(rsort $(wildcard $(KBUILD_DEVTOOLS_HST_ALT)/nasm/v*.*)))
|
---|
235 | endif
|
---|
236 | endif
|
---|
237 | ifneq ($(TOOL_VBoxNasm_PATH),)
|
---|
238 | TOOL_VBoxNasm_AS ?= $(TOOL_VBoxNasm_PATH)/nasm$(HOSTSUFF_EXE)
|
---|
239 | else
|
---|
240 | TOOL_VBoxNasm_AS ?= nasm$(HOSTSUFF_EXE)
|
---|
241 | endif
|
---|
242 | TOOL_VBoxNasm_ASFLAGS ?= $(TOOL_NASM_ASFLAGS)
|
---|
243 | TOOL_VBoxNasm_COMPILE_AS_OUTPUT = $(outbase).lst
|
---|
244 | TOOL_VBoxNasm_COMPILE_AS_OUTPUT_MAYBE = $(obj).original
|
---|
245 | TOOL_VBoxNasm_COMPILE_AS_DEPEND = $(VBoxBs3ObjConverter_1_TARGET)
|
---|
246 | TOOL_VBoxNasm_COMPILE_AS_DEPORD =
|
---|
247 | define TOOL_VBoxNasm_COMPILE_AS_CMDS
|
---|
248 | ifdef TOOL_VBoxNasm_USE_KSUBMIT
|
---|
249 | $(QUIET)kmk_builtin_kSubmit -C $(PATH_OUT_BASE) -- $(TOOL_VBoxNasm_AS)\
|
---|
250 | $(flags) $(addsuffix /,$(addprefix -i, $(incs))) $(addprefix -D, $(defs))\
|
---|
251 | -l $(outbase).lst\
|
---|
252 | -o $(obj)\
|
---|
253 | -MD "$(dep)" -MP\
|
---|
254 | $(abspath $(source))
|
---|
255 | else
|
---|
256 | $(QUIET)$(REDIRECT) -C $(PATH_OUT_BASE) -- $(TOOL_VBoxNasm_AS)\
|
---|
257 | $(flags) $(addsuffix /,$(addprefix -i, $(incs))) $(addprefix -D, $(defs))\
|
---|
258 | -l $(outbase).lst\
|
---|
259 | -o $(obj)\
|
---|
260 | -MD "$(dep)" -MP\
|
---|
261 | $(abspath $(source))
|
---|
262 | endif
|
---|
263 | $(QUIET)$(VBOX_BS3KIT_KSUBMIT_OBJ_CONV) $(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
|
---|
264 | endef
|
---|
265 |
|
---|
266 | #
|
---|
267 | # ELF 64-bit compiler tool with object conversion.
|
---|
268 | #
|
---|
269 | # Mac needs cross compiler: sudo port install x86_64-elf-gcc
|
---|
270 | #
|
---|
271 | TOOL_Bs3Gcc64Elf64 := AMD64/ELF64 gcc/g++ (cross) compiler.
|
---|
272 | ifeq ($(KBUILD_HOST),darwin)
|
---|
273 | TOOL_Bs3Gcc64Elf64_CC ?= x86_64-elf-gcc$(HOSTSUFF_EXE) -m64
|
---|
274 | TOOL_Bs3Gcc64Elf64_CXX ?= x86_64-elf-g++$(HOSTSUFF_EXE) -m64
|
---|
275 | else
|
---|
276 | TOOL_Bs3Gcc64Elf64_CC ?= gcc$(HOSTSUFF_EXE) -m64
|
---|
277 | TOOL_Bs3Gcc64Elf64_CXX ?= g++$(HOSTSUFF_EXE) -m64
|
---|
278 | endif
|
---|
279 | ifdef SLKRUNS
|
---|
280 | TOOL_Bs3Gcc64Elf64_CC += -fmessage-length=0
|
---|
281 | TOOL_Bs3Gcc64Elf64_CXX += -fmessage-length=0
|
---|
282 | endif
|
---|
283 | TOOL_Bs3Gcc64Elf64_COBJSUFF = .o64
|
---|
284 | TOOL_Bs3Gcc64Elf64_CFLAGS = -fno-pie -x c $(VBOX_GCC_Wa_cma_nocompress_debug_sections) -ffreestanding
|
---|
285 | TOOL_Bs3Gcc64Elf64_CFLAGS.debug = -g
|
---|
286 | TOOL_Bs3Gcc64Elf64_CFLAGS.profile = -O2 #-g -pg
|
---|
287 | TOOL_Bs3Gcc64Elf64_CFLAGS.release = -O2
|
---|
288 | TOOL_Bs3Gcc64Elf64_CINCS =
|
---|
289 | TOOL_Bs3Gcc64Elf64_CDEFS =
|
---|
290 | TOOL_Bs3Gcc64Elf64_COMPILE_C_DEPEND = $(VBoxBs3ObjConverter_1_TARGET)
|
---|
291 | TOOL_Bs3Gcc64Elf64_COMPILE_C_DEPORD =
|
---|
292 | TOOL_Bs3Gcc64Elf64_COMPILE_C_OUTPUT =
|
---|
293 | TOOL_Bs3Gcc64Elf64_COMPILE_C_OUTPUT_MAYBE = $(obj).original
|
---|
294 | define TOOL_Bs3Gcc64Elf64_COMPILE_C_CMDS
|
---|
295 | $(QUIET)$(TOOL_Bs3Gcc64Elf64_CC) -c\
|
---|
296 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
297 | -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
|
---|
298 | -o $(obj)\
|
---|
299 | $(abspath $(source))
|
---|
300 | $(QUIET)$(VBOX_BS3KIT_KSUBMIT_OBJ_CONV) $(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
|
---|
301 | $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
|
---|
302 | endef
|
---|
303 |
|
---|
304 | TOOL_Bs3Gcc64Elf64_C64OBJSUFF = $(TOOL_Bs3Gcc64Elf64_COBJSUFF)
|
---|
305 | TOOL_Bs3Gcc64Elf64_C64FLAGS = $(TOOL_Bs3Gcc64Elf64_CFLAGS)
|
---|
306 | TOOL_Bs3Gcc64Elf64_C64FLAGS.debug = $(TOOL_Bs3Gcc64Elf64_CFLAGS.debug)
|
---|
307 | TOOL_Bs3Gcc64Elf64_C64FLAGS.profile = $(TOOL_Bs3Gcc64Elf64_CFLAGS.profile)
|
---|
308 | TOOL_Bs3Gcc64Elf64_C64FLAGS.release = $(TOOL_Bs3Gcc64Elf64_CFLAGS.release)
|
---|
309 | TOOL_Bs3Gcc64Elf64_C64INCS = $(TOOL_Bs3Gcc64Elf64_CINCS)
|
---|
310 | TOOL_Bs3Gcc64Elf64_C64DEFS = $(TOOL_Bs3Gcc64Elf64_CDEFS)
|
---|
311 | TOOL_Bs3Gcc64Elf64_COMPILE_C64_DEPEND = $(TOOL_Bs3Gcc64Elf64_COMPILE_C_DEPEND)
|
---|
312 | TOOL_Bs3Gcc64Elf64_COMPILE_C64_DEPORD = $(TOOL_Bs3Gcc64Elf64_COMPILE_C_DEPORD)
|
---|
313 | TOOL_Bs3Gcc64Elf64_COMPILE_C64_OUTPUT = $(TOOL_Bs3Gcc64Elf64_COMPILE_C_OUTPUT)
|
---|
314 | TOOL_Bs3Gcc64Elf64_COMPILE_C64_OUTPUT_MAYBE = $(TOOL_Bs3Gcc64Elf64_COMPILE_C_OUTPUT_MAYBE)
|
---|
315 | define TOOL_Bs3Gcc64Elf64_COMPILE_C64_CMDS
|
---|
316 | $(TOOL_Bs3Gcc64Elf64_COMPILE_C_CMDS)
|
---|
317 | endef
|
---|
318 |
|
---|
319 | TOOL_Bs3Gcc64Elf64_CXXOBJSUFF ?= .o
|
---|
320 | TOOL_Bs3Gcc64Elf64_CXXFLAGS ?= -fno-pie $(VBOX_GCC_Wa_cma_nocompress_debug_sections) -ffreestanding
|
---|
321 | TOOL_Bs3Gcc64Elf64_CXXFLAGS.debug ?= -g0 # no debug info, thank you
|
---|
322 | TOOL_Bs3Gcc64Elf64_CXXFLAGS.profile ?= -O2 #-g -pg
|
---|
323 | TOOL_Bs3Gcc64Elf64_CXXFLAGS.release ?= -O2
|
---|
324 | TOOL_Bs3Gcc64Elf64_CXXINCS ?=
|
---|
325 | TOOL_Bs3Gcc64Elf64_CXXDEFS ?=
|
---|
326 | TOOL_Bs3Gcc64Elf64_COMPILE_CXX_DEPEND = $(VBoxBs3ObjConverter_1_TARGET)
|
---|
327 | TOOL_Bs3Gcc64Elf64_COMPILE_CXX_DEPORD =
|
---|
328 | TOOL_Bs3Gcc64Elf64_COMPILE_CXX_OUTPUT =
|
---|
329 | TOOL_Bs3Gcc64Elf64_COMPILE_CXX_OUTPUT_MAYBE = $(obj).original
|
---|
330 | define TOOL_Bs3Gcc64Elf64_COMPILE_CXX_CMDS
|
---|
331 | $(QUIET)$(TOOL_Bs3Gcc64Elf64_CXX) -c\
|
---|
332 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
333 | -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
|
---|
334 | -o $(obj)\
|
---|
335 | $(abspath $(source))
|
---|
336 | $(QUIET)$(VBOX_BS3KIT_KSUBMIT_OBJ_CONV) $(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
|
---|
337 | $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
|
---|
338 | endef
|
---|
339 |
|
---|
340 | #
|
---|
341 | # Visual C++ tool variant that runs the object converter afterwards.
|
---|
342 | #
|
---|
343 | TOOL_Bs3Vcc64 := Visual C++ 64-bit
|
---|
344 | TOOL_Bs3Vcc64_CC = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CC)
|
---|
345 | TOOL_Bs3Vcc64_CXX = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CXX)
|
---|
346 | TOOL_Bs3Vcc64_COBJSUFF = .o64
|
---|
347 | TOOL_Bs3Vcc64_CFLAGS = $(filter-out -TC,$(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CFLAGS)) -TC
|
---|
348 | TOOL_Bs3Vcc64_CFLAGS.debug =
|
---|
349 | TOOL_Bs3Vcc64_CFLAGS.dbgopt = -O1
|
---|
350 | TOOL_Bs3Vcc64_CFLAGS.profile = -O1
|
---|
351 | TOOL_Bs3Vcc64_CFLAGS.release = -O1
|
---|
352 | TOOL_Bs3Vcc64_CINCS = $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_INC)
|
---|
353 | TOOL_Bs3Vcc64_CDEFS =
|
---|
354 | TOOL_Bs3Vcc64_COMPILE_C_DEPEND = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
|
---|
355 | TOOL_Bs3Vcc64_COMPILE_C_DEPORD = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_DEPORD)
|
---|
356 | TOOL_Bs3Vcc64_COMPILE_C_OUTPUT = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_OUTPUT)
|
---|
357 | TOOL_Bs3Vcc64_COMPILE_C_OUTPUT_MAYBE = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_OUTPUT_MAYBE) $(obj).original
|
---|
358 | define TOOL_Bs3Vcc64_COMPILE_C_CMDS
|
---|
359 | $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_CMDS)
|
---|
360 | $(QUIET)$(VBOX_BS3KIT_KSUBMIT_OBJ_CONV) $(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
|
---|
361 | endef
|
---|
362 |
|
---|
363 | TOOL_Bs3Vcc64_C64OBJSUFF = $(TOOL_Bs3Vcc64_COBJSUFF)
|
---|
364 | TOOL_Bs3Vcc64_C64FLAGS = $(TOOL_Bs3Vcc64_CFLAGS)
|
---|
365 | TOOL_Bs3Vcc64_C64FLAGS.debug = $(TOOL_Bs3Vcc64_CFLAGS.debug)
|
---|
366 | TOOL_Bs3Vcc64_C64FLAGS.dbgopt = $(TOOL_Bs3Vcc64_CFLAGS.dbgopt)
|
---|
367 | TOOL_Bs3Vcc64_C64FLAGS.profile = $(TOOL_Bs3Vcc64_CFLAGS.profile)
|
---|
368 | TOOL_Bs3Vcc64_C64FLAGS.release = $(TOOL_Bs3Vcc64_CFLAGS.release)
|
---|
369 | TOOL_Bs3Vcc64_C64INCS = $(TOOL_Bs3Vcc64_CINCS)
|
---|
370 | TOOL_Bs3Vcc64_C64DEFS = $(TOOL_Bs3Vcc64_CDEFS)
|
---|
371 | TOOL_Bs3Vcc64_COMPILE_C64_DEPEND = $(TOOL_Bs3Vcc64_COMPILE_C_DEPEND)
|
---|
372 | TOOL_Bs3Vcc64_COMPILE_C64_DEPORD = $(TOOL_Bs3Vcc64_COMPILE_C_DEPORD)
|
---|
373 | TOOL_Bs3Vcc64_COMPILE_C64_OUTPUT = $(TOOL_Bs3Vcc64_COMPILE_C_OUTPUT)
|
---|
374 | TOOL_Bs3Vcc64_COMPILE_C64_OUTPUT_MAYBE = $(TOOL_Bs3Vcc64_COMPILE_C_OUTPUT_MAYBE)
|
---|
375 | define TOOL_Bs3Vcc64_COMPILE_C64_CMDS
|
---|
376 | $(TOOL_Bs3Vcc64_COMPILE_C_CMDS)
|
---|
377 | endef
|
---|
378 |
|
---|
379 | TOOL_Bs3Vcc64_CXXOBJSUFF = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CXXOBJSUFF)
|
---|
380 | TOOL_Bs3Vcc64_CXXFLAGS = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CXXFLAGS) -TP
|
---|
381 | TOOL_Bs3Vcc64_CXXFLAGS.debug =
|
---|
382 | TOOL_Bs3Vcc64_CXXFLAGS.dbgopt = -O1
|
---|
383 | TOOL_Bs3Vcc64_CXXFLAGS.profile = -O1
|
---|
384 | TOOL_Bs3Vcc64_CXXFLAGS.release = -O1
|
---|
385 | TOOL_Bs3Vcc64_CXXINCS = $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_INC)
|
---|
386 | TOOL_Bs3Vcc64_CXXDEFS =
|
---|
387 | TOOL_Bs3Vcc64_COMPILE_CXX_DEPEND = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
|
---|
388 | TOOL_Bs3Vcc64_COMPILE_CXX_DEPORD = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_DEPORD)
|
---|
389 | TOOL_Bs3Vcc64_COMPILE_CXX_OUTPUT = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_OUTPUT)
|
---|
390 | TOOL_Bs3Vcc64_COMPILE_CXX_OUTPUT_MAYBE = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_OUTPUT_MAYBE) $(obj).original
|
---|
391 | define TOOL_Bs3Vcc64_COMPILE_CXX_CMDS
|
---|
392 | $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_CMDS)
|
---|
393 | $(QUIET)$(VBOX_BS3KIT_KSUBMIT_OBJ_CONV) $(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
|
---|
394 | endef
|
---|
395 |
|
---|
396 | #
|
---|
397 | # 32-bit OpenWatcom C/C++ tool variant that runs the object converter afterwards
|
---|
398 | # to rename intrinsic functions so they don't clash with the 16-bit compiler.
|
---|
399 | #
|
---|
400 | TOOL_Bs3Ow32 := OpenWatcom C/C++ 32-bit with object convertsion
|
---|
401 | TOOL_Bs3Ow32_CC = $(TOOL_OPENWATCOM_CC)
|
---|
402 | TOOL_Bs3Ow32_CXX = $(TOOL_OPENWATCOM_CXX)
|
---|
403 | TOOL_Bs3Ow32_COBJSUFF = .o32
|
---|
404 | TOOL_Bs3Ow32_CFLAGS = $(TOOL_OPENWATCOM_CFLAGS)
|
---|
405 | # -adfs \ - This is too complicated and it doesn't support stubbing files (svn rename fun.h pain.h). Use kDepObj instead.
|
---|
406 | # -ad=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(dep)) \
|
---|
407 | # -adt=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
---|
408 | # -add=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source))) \
|
---|
409 | # -adhp=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(dir $(abspath $(source))))
|
---|
410 | TOOL_Bs3Ow32_CFLAGS.debug = $(TOOL_OPENWATCOM_CFLAGS.debug)
|
---|
411 | TOOL_Bs3Ow32_CFLAGS.dbgopt = $(TOOL_OPENWATCOM_CFLAGS.dbgopt)
|
---|
412 | TOOL_Bs3Ow32_CFLAGS.profile = $(TOOL_OPENWATCOM_CFLAGS.profile)
|
---|
413 | TOOL_Bs3Ow32_CFLAGS.release = $(TOOL_OPENWATCOM_CFLAGS.release)
|
---|
414 | TOOL_Bs3Ow32_CINCS = $(TOOL_OPENWATCOM_CINCS)
|
---|
415 | TOOL_Bs3Ow32_CDEFS =
|
---|
416 | TOOL_Bs3Ow32_COMPILE_C_DEPEND = $(TOOL_OPENWATCOM_COMPILE_C_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
|
---|
417 | TOOL_Bs3Ow32_COMPILE_C_DEPORD = $(TOOL_OPENWATCOM_COMPILE_C_DEPORD)
|
---|
418 | TOOL_Bs3Ow32_COMPILE_C_OUTPUT = $(TOOL_OPENWATCOM_COMPILE_C_OUTPUT)
|
---|
419 | TOOL_Bs3Ow32_COMPILE_C_OUTPUT_MAYBE = $(TOOL_OPENWATCOM_COMPILE_C_OUTPUT_MAYBE) $(obj).original
|
---|
420 | define TOOL_Bs3Ow32_COMPILE_C_CMDS
|
---|
421 | $(TOOL_OPENWATCOM_COMPILE_C_CMDS)
|
---|
422 | $(QUIET)$(VBOX_BS3KIT_KSUBMIT_OBJ_CONV) $(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
|
---|
423 | endef
|
---|
424 |
|
---|
425 | TOOL_Bs3Ow32_C32OBJSUFF = $(TOOL_Bs3Ow32_COBJSUFF)
|
---|
426 | TOOL_Bs3Ow32_C32FLAGS = $(TOOL_Bs3Ow32_CFLAGS)
|
---|
427 | TOOL_Bs3Ow32_C32FLAGS.debug = $(TOOL_Bs3Ow32_CFLAGS.debug)
|
---|
428 | TOOL_Bs3Ow32_C32FLAGS.dbgopt = $(TOOL_Bs3Ow32_CFLAGS.dbgopt)
|
---|
429 | TOOL_Bs3Ow32_C32FLAGS.profile = $(TOOL_Bs3Ow32_CFLAGS.profile)
|
---|
430 | TOOL_Bs3Ow32_C32FLAGS.release = $(TOOL_Bs3Ow32_CFLAGS.release)
|
---|
431 | TOOL_Bs3Ow32_C32INCS = $(TOOL_Bs3Ow32_CINCS)
|
---|
432 | TOOL_Bs3Ow32_C32DEFS =
|
---|
433 | TOOL_Bs3Ow32_COMPILE_C32_DEPEND = $(TOOL_Bs3Ow32_COMPILE_C_DEPEND)
|
---|
434 | TOOL_Bs3Ow32_COMPILE_C32_DEPORD = $(TOOL_Bs3Ow32_COMPILE_C_DEPORD)
|
---|
435 | TOOL_Bs3Ow32_COMPILE_C32_OUTPUT = $(TOOL_Bs3Ow32_COMPILE_C_OUTPUT)
|
---|
436 | TOOL_Bs3Ow32_COMPILE_C32_OUTPUT_MAYBE = $(TOOL_Bs3Ow32_COMPILE_C_OUTPUT_MAYBE)
|
---|
437 | define TOOL_Bs3Ow32_COMPILE_C32_CMDS
|
---|
438 | $(TOOL_Bs3Ow32_COMPILE_C_CMDS)
|
---|
439 | endef
|
---|
440 |
|
---|
441 | TOOL_Bs3Ow32_CXXOBJSUFF = $(TOOL_OPENWATCOM_CXXOBJSUFF)
|
---|
442 | TOOL_Bs3Ow32_CXXFLAGS = $(TOOL_OPENWATCOM_CXXFLAGS) -ad=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(dep)) -adfs
|
---|
443 | TOOL_Bs3Ow32_CXXFLAGS.debug = $(TOOL_OPENWATCOM_CXXFLAGS.debug)
|
---|
444 | TOOL_Bs3Ow32_CXXFLAGS.dbgopt = $(TOOL_OPENWATCOM_CXXFLAGS.dbgopt)
|
---|
445 | TOOL_Bs3Ow32_CXXFLAGS.profile = $(TOOL_OPENWATCOM_CXXFLAGS.profile)
|
---|
446 | TOOL_Bs3Ow32_CXXFLAGS.release = $(TOOL_OPENWATCOM_CXXFLAGS.release)
|
---|
447 | TOOL_Bs3Ow32_CXXINCS = $(TOOL_OPENWATCOM_CXXINCS)
|
---|
448 | TOOL_Bs3Ow32_CXXDEFS =
|
---|
449 | TOOL_Bs3Ow32_COMPILE_CXX_DEPEND = $(TOOL_OPENWATCOM_COMPILE_CXX_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
|
---|
450 | TOOL_Bs3Ow32_COMPILE_CXX_DEPORD = $(TOOL_OPENWATCOM_COMPILE_CXX_DEPORD)
|
---|
451 | TOOL_Bs3Ow32_COMPILE_CXX_OUTPUT = $(TOOL_OPENWATCOM_COMPILE_CXX_OUTPUT)
|
---|
452 | TOOL_Bs3Ow32_COMPILE_CXX_OUTPUT_MAYBE = $(TOOL_OPENWATCOM_COMPILE_CXX_OUTPUT_MAYBE) $(obj).original
|
---|
453 | define TOOL_Bs3Ow32_COMPILE_CXX_CMDS
|
---|
454 | $(TOOL_OPENWATCOM_COMPILE_CXX_CMDS)
|
---|
455 | $(QUIET)$(VBOX_BS3KIT_KSUBMIT_OBJ_CONV) $(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
|
---|
456 | endef
|
---|
457 |
|
---|
458 |
|
---|
459 | #
|
---|
460 | # 16-bit OpenWatcom C/C++ tool variant that runs the object converter afterwards
|
---|
461 | # to rename intrinsic functions so they don't clash with the 16-bit compiler.
|
---|
462 | #
|
---|
463 | TOOL_Bs3Ow16 := OpenWatcom C/C++ 16-bit with object convertsion
|
---|
464 | TOOL_Bs3Ow16_CC = $(TOOL_OPENWATCOM-16_CC)
|
---|
465 | TOOL_Bs3Ow16_CXX = $(TOOL_OPENWATCOM-16_CXX)
|
---|
466 | TOOL_Bs3Ow16_COBJSUFF = .o16
|
---|
467 | TOOL_Bs3Ow16_CFLAGS = $(TOOL_OPENWATCOM-16_CFLAGS)
|
---|
468 | TOOL_Bs3Ow16_CFLAGS.debug = $(TOOL_OPENWATCOM-16_CFLAGS.debug)
|
---|
469 | TOOL_Bs3Ow16_CFLAGS.dbgopt = $(TOOL_OPENWATCOM-16_CFLAGS.dbgopt)
|
---|
470 | TOOL_Bs3Ow16_CFLAGS.profile = $(TOOL_OPENWATCOM-16_CFLAGS.profile)
|
---|
471 | TOOL_Bs3Ow16_CFLAGS.release = $(TOOL_OPENWATCOM-16_CFLAGS.release)
|
---|
472 | TOOL_Bs3Ow16_CINCS = $(TOOL_OPENWATCOM-16_CINCS)
|
---|
473 | TOOL_Bs3Ow16_CDEFS =
|
---|
474 | TOOL_Bs3Ow16_COMPILE_C_DEPEND = $(TOOL_OPENWATCOM-16_COMPILE_C_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
|
---|
475 | TOOL_Bs3Ow16_COMPILE_C_DEPORD = $(TOOL_OPENWATCOM-16_COMPILE_C_DEPORD)
|
---|
476 | TOOL_Bs3Ow16_COMPILE_C_OUTPUT = $(TOOL_OPENWATCOM-16_COMPILE_C_OUTPUT)
|
---|
477 | TOOL_Bs3Ow16_COMPILE_C_OUTPUT_MAYBE = $(TOOL_OPENWATCOM-16_COMPILE_C_OUTPUT_MAYBE) $(obj).original
|
---|
478 | define TOOL_Bs3Ow16_COMPILE_C_CMDS
|
---|
479 | $(TOOL_OPENWATCOM-16_COMPILE_C_CMDS)
|
---|
480 | $(QUIET)$(VBOX_BS3KIT_KSUBMIT_OBJ_CONV) $(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
|
---|
481 | endef
|
---|
482 |
|
---|
483 | TOOL_Bs3Ow16_C16OBJSUFF = $(TOOL_Bs3Ow16_C16OBJSUFF)
|
---|
484 | TOOL_Bs3Ow16_C16FLAGS = $(TOOL_Bs3Ow16_C16FLAGS)
|
---|
485 | TOOL_Bs3Ow16_C16FLAGS.debug = $(TOOL_Bs3Ow16_C16FLAGS.debug)
|
---|
486 | TOOL_Bs3Ow16_C16FLAGS.dbgopt = $(TOOL_Bs3Ow16_C16FLAGS.dbgopt)
|
---|
487 | TOOL_Bs3Ow16_C16FLAGS.profile = $(TOOL_Bs3Ow16_C16FLAGS.profile)
|
---|
488 | TOOL_Bs3Ow16_C16FLAGS.release = $(TOOL_Bs3Ow16_C16FLAGS.release)
|
---|
489 | TOOL_Bs3Ow16_C16INCS = $(TOOL_Bs3Ow16_C16INCS)
|
---|
490 | TOOL_Bs3Ow16_C16DEFS = $(TOOL_Bs3Ow16_C16DEFS)
|
---|
491 | TOOL_Bs3Ow16_COMPILE_C16_DEPEND = $(TOOL_Bs3Ow16_COMPILE_C16_DEPEND)
|
---|
492 | TOOL_Bs3Ow16_COMPILE_C16_DEPORD = $(TOOL_Bs3Ow16_COMPILE_C16_DEPORD)
|
---|
493 | TOOL_Bs3Ow16_COMPILE_C16_OUTPUT = $(TOOL_Bs3Ow16_COMPILE_C16_OUTPUT)
|
---|
494 | TOOL_Bs3Ow16_COMPILE_C16_OUTPUT_MAYBE = $(TOOL_Bs3Ow16_COMPILE_C16_OUTPUT_MAYBE)
|
---|
495 | define TOOL_Bs3Ow16_COMPILE_C16_CMDS
|
---|
496 | $(TOOL_Bs3Ow16_COMPILE_C_CMDS)
|
---|
497 | endef
|
---|
498 |
|
---|
499 | TOOL_Bs3Ow16_CXXOBJSUFF = $(TOOL_OPENWATCOM-16_CXXOBJSUFF)
|
---|
500 | TOOL_Bs3Ow16_CXXFLAGS = $(TOOL_OPENWATCOM-16_CXXFLAGS)
|
---|
501 | TOOL_Bs3Ow16_CXXFLAGS.debug = $(TOOL_OPENWATCOM-16_CXXFLAGS.debug)
|
---|
502 | TOOL_Bs3Ow16_CXXFLAGS.dbgopt = $(TOOL_OPENWATCOM-16_CXXFLAGS.dbgopt)
|
---|
503 | TOOL_Bs3Ow16_CXXFLAGS.profile = $(TOOL_OPENWATCOM-16_CXXFLAGS.profile)
|
---|
504 | TOOL_Bs3Ow16_CXXFLAGS.release = $(TOOL_OPENWATCOM-16_CXXFLAGS.release)
|
---|
505 | TOOL_Bs3Ow16_CXXINCS = $(TOOL_OPENWATCOM-16_CXXINCS)
|
---|
506 | TOOL_Bs3Ow16_CXXDEFS =
|
---|
507 | TOOL_Bs3Ow16_COMPILE_CXX_DEPEND = $(TOOL_OPENWATCOM-16_COMPILE_CXX_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
|
---|
508 | TOOL_Bs3Ow16_COMPILE_CXX_DEPORD = $(TOOL_OPENWATCOM-16_COMPILE_CXX_DEPORD)
|
---|
509 | TOOL_Bs3Ow16_COMPILE_CXX_OUTPUT = $(TOOL_OPENWATCOM-16_COMPILE_CXX_OUTPUT)
|
---|
510 | TOOL_Bs3Ow16_COMPILE_CXX_OUTPUT_MAYBE = $(TOOL_OPENWATCOM-16_COMPILE_CXX_OUTPUT_MAYBE) $(obj).original
|
---|
511 | define TOOL_Bs3Ow16_COMPILE_CXX_CMDS
|
---|
512 | $(TOOL_OPENWATCOM-16_COMPILE_CXX_CMDS)
|
---|
513 | $(QUIET)$(VBOX_BS3KIT_KSUBMIT_OBJ_CONV) $(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
|
---|
514 | endef
|
---|
515 |
|
---|
516 | # Debug info format depends on what we use for 64-bit.
|
---|
517 | if 1 #1of ($(KBUILD_HOST), win) - wlink dwarf .sym files are useless for binary blobs
|
---|
518 | BS3_OW_DBG_OPT = -hc -d1+
|
---|
519 | #BS3_OW_DBG_OPT = -hd -d1+
|
---|
520 | BS3_OW_DBG_LDOPT = codeview
|
---|
521 | else
|
---|
522 | BS3_OW_DBG_OPT = -hd -d1+
|
---|
523 | BS3_OW_DBG_LDOPT = dwarf
|
---|
524 | endif
|
---|
525 |
|
---|
526 | #
|
---|
527 | # Source handlers for .c16, .c32 and .c64
|
---|
528 | #
|
---|
529 | define VBoxBs3KitImgSrcHandler_16bit_c
|
---|
530 | local type := C
|
---|
531 | $(kb-src-one 2)
|
---|
532 | endef
|
---|
533 |
|
---|
534 | C32TOOL = Bs3Ow32
|
---|
535 | define VBoxBs3KitImgSrcHandler_32bit_c
|
---|
536 | local type := C32
|
---|
537 | $(kb-src-one 2)
|
---|
538 | endef
|
---|
539 |
|
---|
540 | define VBoxBs3KitImgSrcHandler_64bit_c
|
---|
541 | local type := C64
|
---|
542 | $(kb-src-one 2)
|
---|
543 | endef
|
---|
544 |
|
---|
545 |
|
---|
546 | #
|
---|
547 | # BS3Kit template for assembly and 16-bit code.
|
---|
548 | #
|
---|
549 | # Note! Using -d1 as -d1+ and -d2 causes suboptimal code to be generated (strlen
|
---|
550 | # reloading string pointer argument all the time).
|
---|
551 | # Update! -d1+ is required for line number information in code living in include
|
---|
552 | # files and any DWARF stuff at all. So, we'll ignore poor code quality.
|
---|
553 | # Note! Optimization options should come after debug stuff as -d2 for instance
|
---|
554 | # disables all optimziations.
|
---|
555 | # Note! We use BS3CLASS16CODE because of wdis code detection heuristics requires the class
|
---|
556 | # of a code segment to be exactly 'CODE', or ending with 'CODE' or 'TEXT' (more
|
---|
557 | # recent wdis have a -c=<clsnm> option, but not the one we currently use ).
|
---|
558 | #
|
---|
559 | #
|
---|
560 | # Compiler options explained:
|
---|
561 | # -nt=xxxx Sets the text segment name.
|
---|
562 | # -nc=xxxx Sets the text segment class name.
|
---|
563 | # -nd=xxxx Sets the data segment name.
|
---|
564 | # -ecc Sets the default calling convension to __cdecl
|
---|
565 | # Update: We don't use this in 16-bit code as it causes unfavorable reloading of DS before calling
|
---|
566 | # inlined functions (e.g. iprt/asm.h). Instead we use -ecw and __cdecl where needed.
|
---|
567 | # Update: With -zdp the DS reloading is gone. Code is slightly larger, but seems to cure stability
|
---|
568 | # issues in bs3CpuBasic2_RaiseXcpt1 (workers ending up with default calling convention).
|
---|
569 | # -ecw Sets the default calling convension to __watcall ()
|
---|
570 | # -q Quiet, no logos or stuff.
|
---|
571 | # -0 Use 8086 instruction set (16-bit only).
|
---|
572 | # -3 Use 386 instruction set (16-bit only).
|
---|
573 | # -e<num> Stop after <num> errors.
|
---|
574 | # -wx Maxium warning level.
|
---|
575 | # -zl Don't emit default library information.
|
---|
576 | # -zdp DS pegged to BS3DATA16_GROUP/DGROUP.
|
---|
577 | # -zu Assume SS != DS.
|
---|
578 | # -mc Compact memory model, far data, small code.
|
---|
579 | # -ml Large memory model, far data, far code.
|
---|
580 | # -mf Flat memory model (32-bit).
|
---|
581 | # -d+ Enabled better /dVAR=XXX parsing, using space as delimiter instead of alpha-numerical/whatever.
|
---|
582 | # -d1 Debug info: Globals and line numbers.
|
---|
583 | # -s No stack overflow checks.
|
---|
584 | # -oa Relaxed aliasing constraints.
|
---|
585 | # -ob Branch prediction.
|
---|
586 | # -of Generate stack frames when needed.
|
---|
587 | # -oi Inline instrinsics functions.
|
---|
588 | # -ol Loop optimizations.
|
---|
589 | # -oh Expensive optimizations. (saves a byte or two)
|
---|
590 | # -or Reorder for best pipeline.
|
---|
591 | # -os Favor size over speed.
|
---|
592 | #
|
---|
593 | TEMPLATE_VBoxBS3KitImg = Template for building BS3Kit test images.
|
---|
594 | TEMPLATE_VBoxBS3KitImg_BLD_TRG = os-agnostic
|
---|
595 | TEMPLATE_VBoxBS3KitImg_BLD_TRG_ARCH = noarch
|
---|
596 | TEMPLATE_VBoxBS3KitImg_INST = $(INST_VALIDATIONKIT)bootsectors/
|
---|
597 | TEMPLATE_VBoxBS3KitImg_BINSUFF = .img
|
---|
598 | TEMPLATE_VBoxBS3KitImg_MODE = 0644
|
---|
599 | TEMPLATE_VBoxBS3KitImg_SRC_HANDLERS = \
|
---|
600 | .c16:VBoxBs3KitImgSrcHandler_16bit_c \
|
---|
601 | .c32:VBoxBs3KitImgSrcHandler_32bit_c \
|
---|
602 | .c64:VBoxBs3KitImgSrcHandler_64bit_c
|
---|
603 | TEMPLATE_VBoxBS3KitImg_ASOBJSUFF = .o16
|
---|
604 | TEMPLATE_VBoxBS3KitImg_ASTOOL = VBoxNasm
|
---|
605 | TEMPLATE_VBoxBS3KitImg_ASFLAGS = -f obj -g $(BS3KIT_NASM_allow_64_bit) -w+orphan-labels
|
---|
606 | TEMPLATE_VBoxBS3KitImg_ASDEFS = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__ ARCH_BITS=16 RT_ARCH_X86 ASM_MODEL_FAR_CODE \
|
---|
607 | BS3CLASS16CODE=$(BS3KIT_CLASS_CODE16) BS3KIT_CLASS_DATA16=$(BS3KIT_CLASS_DATA16) \
|
---|
608 | BS3KIT_GRPNM_DATA16=$(BS3KIT_GRPNM_DATA16) BS3KIT_CLASS_BSS16=$(BS3KIT_CLASS_BSS16)
|
---|
609 | TEMPLATE_VBoxBS3KitImg_DEFS = IN_BS3KIT
|
---|
610 | TEMPLATE_VBoxBS3KitImg_DEFS.debug = BS3_STRICT
|
---|
611 |
|
---|
612 | TEMPLATE_VBoxBS3KitImg_ARTOOL = OPENWATCOM-16
|
---|
613 |
|
---|
614 | TEMPLATE_VBoxBS3KitImg_CTOOL = Bs3Ow16
|
---|
615 | TEMPLATE_VBoxBS3KitImg_CXXTOOL = Bs3Ow16
|
---|
616 | TEMPLATE_VBoxBS3KitImg_CFLAGS = $(if $(BS3KIT_SEGNM_DATA16),-nd=$(BS3KIT_SEGNM_DATA16),) \
|
---|
617 | -nt=BS3TEXT16 -nc=$(BS3KIT_CLASS_CODE16) -ecc -q -0 -e125 -wx -zl -zdp -zu -ml $(BS3_OW_DBG_OPT) -s -oa -ob -of -oi -ol -or -os -oh -d+
|
---|
618 | TEMPLATE_VBoxBS3KitImg_CXXFLAGS = $(if $(BS3KIT_SEGNM_DATA16),-nd=$(BS3KIT_SEGNM_DATA16),) \
|
---|
619 | -nt=BS3TEXT16 -nc=$(BS3KIT_CLASS_CODE16) -ecc -q -0 -e125 -wx -zl -zdp -zu -ml $(BS3_OW_DBG_OPT) -s -oa -ob -of -oi -ol -or -os -oh -d+
|
---|
620 | TEMPLATE_VBoxBS3KitImg_CDEFS = ARCH_BITS=16 RT_ARCH_X86
|
---|
621 |
|
---|
622 | TEMPLATE_VBoxBS3KitImg_TOOL = $(NO_SUCH_VARIABLE)
|
---|
623 | TEMPLATE_VBoxBS3KitImg_C16TOOL = $(TEMPLATE_VBoxBS3KitImg_CTOOL)
|
---|
624 | TEMPLATE_VBoxBS3KitImg_C16FLAGS = $(TEMPLATE_VBoxBS3KitImg_CFLAGS)
|
---|
625 | TEMPLATE_VBoxBS3KitImg_C16DEFS = $(TEMPLATE_VBoxBS3KitImg_CDEFS)
|
---|
626 | TEMPLATE_VBoxBS3KitImg_C32TOOL := Bs3Ow32
|
---|
627 | TEMPLATE_VBoxBS3KitImg_C32FLAGS = $(TEMPLATE_VBoxBS3KitImg32_CFLAGS)
|
---|
628 | TEMPLATE_VBoxBS3KitImg_C32DEFS = ARCH_BITS=32 RT_ARCH_X86
|
---|
629 | TEMPLATE_VBoxBS3KitImg_C64TOOL = $(TEMPLATE_VBoxBS3KitImg64_CTOOL)
|
---|
630 | TEMPLATE_VBoxBS3KitImg_C64FLAGS = $(TEMPLATE_VBoxBS3KitImg64_CFLAGS)
|
---|
631 | TEMPLATE_VBoxBS3KitImg_C64DEFS = ARCH_BITS=64 RT_ARCH_AMD64
|
---|
632 |
|
---|
633 | TEMPLATE_VBoxBS3KitImg_INCS = $(VBOX_PATH_BS3KIT_SRC) .
|
---|
634 | TEMPLATE_VBoxBS3KitImg_LDTOOL = OPENWATCOM-WL
|
---|
635 |
|
---|
636 | # linker options:
|
---|
637 | # system dos: Link a 16-bit DOS binary.
|
---|
638 | # output raw ...: Produce a raw DOS binary for loading at flat address 10000h.
|
---|
639 | # The following is for ordering segments.
|
---|
640 | # option start=_start: The start symbol in bs3-first-xxx.asm.
|
---|
641 | # debug codeview/dwarf all: Full debug information either in codeview or dwarf.
|
---|
642 | # option symfile: Produce a separate symbol file with the debug info.
|
---|
643 | # option map: Produce a map file.
|
---|
644 | # option farcalls: Change intrasegment far calls into 'push cs; seg ds; call symbol' where possible.
|
---|
645 | # option statics: ?
|
---|
646 | # option verbose: Verbose map file?
|
---|
647 | # option disable 1014: Disable warning about 'stack segment not found'.
|
---|
648 | # option disable 1080: Disable warning about '%1 is a 32-bit object file'.
|
---|
649 | #
|
---|
650 | # Note! We're pushing DATA16 to 0x20000 because it's impossible to force wlink
|
---|
651 | # to give us a real-mode + GDT compatible alignment (0ffffff80h), i.e.
|
---|
652 | # real-mode address on the form 0fff8:0000.
|
---|
653 | TEMPLATE_VBoxBS3KitImg_LDFLAGS = system dos \
|
---|
654 | debug $(BS3_OW_DBG_LDOPT) all \
|
---|
655 | option quiet, map, statics, verbose, symfile, start=_start, farcalls \
|
---|
656 | disable 1014, 1080 \
|
---|
657 | \
|
---|
658 | output raw offset=0x10000 \
|
---|
659 | order \
|
---|
660 | clname BS3FLAT segaddr=0x0000 \
|
---|
661 | segment BS3FLAT segaddr=0x0000 \
|
---|
662 | clname $(BS3KIT_CLASS_CODE16) segaddr=0x1000 \
|
---|
663 | segment BS3TEXT16 \
|
---|
664 | segment BS3TEXT16_NEARSTUBS \
|
---|
665 | segment BS3TEXT16_FARSTUBS \
|
---|
666 | segment BS3TEXT16_END \
|
---|
667 | clname BS3SYSTEM16 segaddr=0x2000 \
|
---|
668 | segment BS3SYSTEM16 \
|
---|
669 | $(if-expr "$(BS3KIT_SEGNM_DATA16)" == "", \
|
---|
670 | clname DATA \
|
---|
671 | segment BS3DATA16 segaddr=0x2900 \
|
---|
672 | segment BS3DATA16_DATA \
|
---|
673 | segment DATA \
|
---|
674 | segment _DATA \
|
---|
675 | segment BS3DATA16CONST \
|
---|
676 | segment CONST \
|
---|
677 | segment BS3DATA16CONST2 \
|
---|
678 | segment CONST2 \
|
---|
679 | segment STRINGS \
|
---|
680 | segment BS3DATA16_END \
|
---|
681 | clname BSS \
|
---|
682 | segment BSS \
|
---|
683 | segment _BSS \
|
---|
684 | segment BS3DATA16_END \
|
---|
685 | clname FAR_DATA \
|
---|
686 | segment FAR_DATA \
|
---|
687 | , \
|
---|
688 | clname FAR_DATA \
|
---|
689 | segment BS3DATA16 segaddr=0x2900 \
|
---|
690 | segment FAR_DATA \
|
---|
691 | segment BS3DATA16CONST \
|
---|
692 | segment BS3DATA16CONST2 \
|
---|
693 | segment BS3DATA16_DATA \
|
---|
694 | segment BS3DATA16_END \
|
---|
695 | ) \
|
---|
696 | segment BS3DATA32 \
|
---|
697 | segment BS3DATA32CONST \
|
---|
698 | segment BS3DATA32CONST2 \
|
---|
699 | segment BS3DATA32_DATA \
|
---|
700 | segment BS3DATA32_BSS \
|
---|
701 | segment BS3DATA32_END \
|
---|
702 | \
|
---|
703 | segment BS3DATA64 \
|
---|
704 | segment BS3DATA64CONST \
|
---|
705 | segment BS3DATA64_BSS \
|
---|
706 | segment BS3DATA64_END \
|
---|
707 | clname BS3CLASS16RMCODE \
|
---|
708 | segment BS3RMCODE16_START \
|
---|
709 | segment BS3RMCODE16 \
|
---|
710 | segment BS3RMCODE16_END \
|
---|
711 | clname BS3CLASS16X0CODE \
|
---|
712 | segment BS3X0CODE16_START \
|
---|
713 | segment BS3X0CODE16 \
|
---|
714 | segment BS3X0CODE16_END \
|
---|
715 | clname BS3CLASS16X1CODE \
|
---|
716 | segment BS3X1CODE16_START \
|
---|
717 | segment BS3X1CODE16 \
|
---|
718 | segment BS3X1CODE16_END \
|
---|
719 | clname BS3CLASS32CODE \
|
---|
720 | segment BS3TEXT32_START \
|
---|
721 | segment BS3TEXT32 \
|
---|
722 | segment BS3TEXT32_END \
|
---|
723 | clname BS3CLASSSEPARATE32AND64BITCODE \
|
---|
724 | segment BS3SEPARATE32AND64BITCODE \
|
---|
725 | segment BS3SEPARATE32AND64BITCODE_END \
|
---|
726 | clname BS3CLASS64CODE \
|
---|
727 | segment BS3TEXT64_START \
|
---|
728 | segment BS3TEXT64 \
|
---|
729 | segment BS3TEXT64_END
|
---|
730 |
|
---|
731 | TEMPLATE_VBoxBS3KitImg_LNK_DEPS = \
|
---|
732 | $(bs3-bootsector_1_TARGET) \
|
---|
733 | $(VBoxBs3Linker_1_TARGET)
|
---|
734 | TEMPLATE_VBoxBS3KitImg_POST_CMDS = $(if $(eq $(tool_do),LINK_LIBRARY)\
|
---|
735 | ,,$(QUIET)$(MV_EXT) -f -- "$(out)" "$(out).tmp" \
|
---|
736 | $$(NLTAB)$(QUIET)$(VBoxBs3Linker_1_TARGET) -o $(out) $(bs3-bootsector_1_TARGET) $(out).tmp \
|
---|
737 | $$(NLTAB)$(QUIET)$(RM_EXT) -f -- "$(out).tmp") \
|
---|
738 | $(eval .PRECIOUS: $(outbase).map) # ugly hack!
|
---|
739 |
|
---|
740 |
|
---|
741 | TEMPLATE_VBoxBS3KitImg_LIBS = \
|
---|
742 | $(PATH_OBJ)/bs3kit-common-16/bs3kit-common-16.lib \
|
---|
743 | $(PATH_OBJ)/bs3kit-common-32/bs3kit-common-32.lib \
|
---|
744 | $(PATH_OBJ)/bs3kit-common-64/bs3kit-common-64.lib \
|
---|
745 | \
|
---|
746 | $(PATH_OBJ)/bs3kit-rm/bs3kit-rm.lib \
|
---|
747 | $(PATH_OBJ)/bs3kit-pe16/bs3kit-pe16.lib \
|
---|
748 | $(PATH_OBJ)/bs3kit-pe16_32/bs3kit-pe16_32.lib \
|
---|
749 | $(PATH_OBJ)/bs3kit-pe16_v86/bs3kit-pe16_v86.lib \
|
---|
750 | $(PATH_OBJ)/bs3kit-pe32/bs3kit-pe32.lib \
|
---|
751 | $(PATH_OBJ)/bs3kit-pe32_16/bs3kit-pe32_16.lib \
|
---|
752 | $(PATH_OBJ)/bs3kit-pev86/bs3kit-pev86.lib \
|
---|
753 | $(PATH_OBJ)/bs3kit-pp16/bs3kit-pp16.lib \
|
---|
754 | $(PATH_OBJ)/bs3kit-pp16_32/bs3kit-pp16_32.lib \
|
---|
755 | $(PATH_OBJ)/bs3kit-pp16_v86/bs3kit-pp16_v86.lib \
|
---|
756 | $(PATH_OBJ)/bs3kit-pp32/bs3kit-pp32.lib \
|
---|
757 | $(PATH_OBJ)/bs3kit-pp32_16/bs3kit-pp32_16.lib \
|
---|
758 | $(PATH_OBJ)/bs3kit-ppv86/bs3kit-ppv86.lib \
|
---|
759 | $(PATH_OBJ)/bs3kit-pae16/bs3kit-pae16.lib \
|
---|
760 | $(PATH_OBJ)/bs3kit-pae16_32/bs3kit-pae16_32.lib \
|
---|
761 | $(PATH_OBJ)/bs3kit-pae16_v86/bs3kit-pae16_v86.lib \
|
---|
762 | $(PATH_OBJ)/bs3kit-pae32/bs3kit-pae32.lib \
|
---|
763 | $(PATH_OBJ)/bs3kit-pae32_16/bs3kit-pae32_16.lib \
|
---|
764 | $(PATH_OBJ)/bs3kit-paev86/bs3kit-paev86.lib \
|
---|
765 | $(PATH_OBJ)/bs3kit-lm16/bs3kit-lm16.lib \
|
---|
766 | $(PATH_OBJ)/bs3kit-lm32/bs3kit-lm32.lib \
|
---|
767 | $(PATH_OBJ)/bs3kit-lm64/bs3kit-lm64.lib
|
---|
768 |
|
---|
769 | # BS3Kit template for 32-bit code.
|
---|
770 | TEMPLATE_VBoxBS3KitImg32 = Template for building BS3Kit test images.
|
---|
771 | TEMPLATE_VBoxBS3KitImg32_BLD_TRG = os-agnostic
|
---|
772 | TEMPLATE_VBoxBS3KitImg32_BLD_TRG_ARCH = x86
|
---|
773 | TEMPLATE_VBoxBS3KitImg32_INSTTYPE = none
|
---|
774 | TEMPLATE_VBoxBS3KitImg32_ASTOOL = VBoxNasm
|
---|
775 | TEMPLATE_VBoxBS3KitImg32_ASOBJSUFF = .o32
|
---|
776 | TEMPLATE_VBoxBS3KitImg32_ASFLAGS = -f obj -g $(BS3KIT_NASM_allow_64_bit) -w+orphan-labels
|
---|
777 | TEMPLATE_VBoxBS3KitImg32_ASDEFS = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__ \
|
---|
778 | BS3CLASS16CODE=$(BS3KIT_CLASS_CODE16) BS3KIT_CLASS_DATA16=$(BS3KIT_CLASS_DATA16) \
|
---|
779 | BS3KIT_GRPNM_DATA16=$(BS3KIT_GRPNM_DATA16) BS3KIT_CLASS_BSS16=$(BS3KIT_CLASS_BSS16)
|
---|
780 | TEMPLATE_VBoxBS3KitImg32_DEFS = ARCH_BITS=32 IN_BS3KIT
|
---|
781 | TEMPLATE_VBoxBS3KitImg32_DEFS.debug = BS3_STRICT
|
---|
782 | TEMPLATE_VBoxBS3KitImg32_ARTOOL = OPENWATCOM
|
---|
783 | TEMPLATE_VBoxBS3KitImg32_CTOOL = Bs3Ow32
|
---|
784 | TEMPLATE_VBoxBS3KitImg32_CXXTOOL = Bs3Ow32
|
---|
785 | TEMPLATE_VBoxBS3KitImg32_CFLAGS = \
|
---|
786 | -nt=BS3TEXT32 -nd=BS3DATA32 -nc=BS3CLASS32CODE -ecc -q -e125 -wx -zl -mf $(BS3_OW_DBG_OPT) -s -oa -ob -of -oi -ol -or -os -d+
|
---|
787 | TEMPLATE_VBoxBS3KitImg32_CXXFLAGS = \
|
---|
788 | -nt=BS3TEXT32 -nd=BS3DATA32 -nc=BS3CLASS32CODE -ecc -q -e125 -wx -zl -mf $(BS3_OW_DBG_OPT) -s -oa -ob -of -oi -ol -or -os -d+
|
---|
789 | TEMPLATE_VBoxBS3KitImg32_INCS = $(VBOX_PATH_BS3KIT_SRC) .
|
---|
790 | TEMPLATE_VBoxBS3KitImg32_LDTOOL = VBoxBsUnusedLd
|
---|
791 |
|
---|
792 | # BS3Kit template for 64-bit code.
|
---|
793 | TEMPLATE_VBoxBS3KitImg64 = Template for building BS3Kit test images.
|
---|
794 | TEMPLATE_VBoxBS3KitImg64_BLD_TRG = os-agnostic
|
---|
795 | TEMPLATE_VBoxBS3KitImg64_BLD_TRG_ARCH = amd64
|
---|
796 | TEMPLATE_VBoxBS3KitImg64_INSTTYPE = none
|
---|
797 | TEMPLATE_VBoxBS3KitImg64_ASTOOL = VBoxNasm
|
---|
798 | TEMPLATE_VBoxBS3KitImg64_ASOBJSUFF = .o64
|
---|
799 | TEMPLATE_VBoxBS3KitImg64_ASFLAGS = -f obj -g $(BS3KIT_NASM_allow_64_bit) -w+orphan-labels
|
---|
800 | TEMPLATE_VBoxBS3KitImg64_ASDEFS = ASM_FORMAT_OMF ASM_CALL64_MSC RT_NOINC_SEGMENTS __NASM__ \
|
---|
801 | BS3CLASS16CODE=$(BS3KIT_CLASS_CODE16) BS3KIT_CLASS_DATA16=$(BS3KIT_CLASS_DATA16) \
|
---|
802 | BS3KIT_GRPNM_DATA16=$(BS3KIT_GRPNM_DATA16) BS3KIT_CLASS_BSS16=$(BS3KIT_CLASS_BSS16)
|
---|
803 | TEMPLATE_VBoxBS3KitImg64_DEFS = IN_BS3KIT ARCH_BITS=64
|
---|
804 | TEMPLATE_VBoxBS3KitImg64_DEFS.debug = BS3_STRICT
|
---|
805 | TEMPLATE_VBoxBS3KitImg64_ARTOOL = OPENWATCOM
|
---|
806 | TEMPLATE_VBoxBS3KitImg64_INCS = $(VBOX_PATH_BS3KIT_SRC) .
|
---|
807 | if1of ($(KBUILD_HOST), win)
|
---|
808 | ifndef TOOL_VCC100AMD64 # For win.x86 builds.
|
---|
809 | include $(KBUILD_PATH)/tools/$(VBOX_VCC_TOOL_STEM)AMD64.kmk
|
---|
810 | endif
|
---|
811 | TEMPLATE_VBoxBS3KitImg64_CTOOL := Bs3Vcc64
|
---|
812 | TEMPLATE_VBoxBS3KitImg64_CXXTOOL := Bs3Vcc64
|
---|
813 | TEMPLATE_VBoxBS3KitImg64_CFLAGS = -Z7 -O1 -Oi -GF -GS- -Gy- -Gs65536
|
---|
814 | TEMPLATE_VBoxBS3KitImg64_CXXFLAGS = -Z7 -O1 -Oi -GF -GS- -Gy- -Gs65536
|
---|
815 | else
|
---|
816 | TEMPLATE_VBoxBS3KitImg64_CTOOL := Bs3Gcc64Elf64
|
---|
817 | TEMPLATE_VBoxBS3KitImg64_CXXTOOL := Bs3Gcc64Elf64
|
---|
818 | # Note! -mx32 would be exactly what we needed here, however it causes internal compiler errors with 4.8.4 on gentoo.
|
---|
819 | TEMPLATE_VBoxBS3KitImg64_CFLAGS = -m64 -maccumulate-outgoing-args -g -Os -fno-omit-frame-pointer $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_WARN_PEDANTIC_C) \
|
---|
820 | -msoft-float -fno-exceptions -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector)
|
---|
821 | TEMPLATE_VBoxBS3KitImg64_CXXFLAGS = -m64 -maccumulate-outgoing-args -g -Os -fno-omit-frame-pointer $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_WARN_PEDANTIC_CXX) \
|
---|
822 | -msoft-float -fno-exceptions -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector)
|
---|
823 | endif
|
---|
824 | TEMPLATE_VBoxBS3KitImg64_LDTOOL = VBoxBsUnusedLd
|
---|
825 |
|
---|
826 | # BS3Kit template for the bootsector.
|
---|
827 | TEMPLATE_VBoxBS3KitBS = Template for building BS3Kit test images.
|
---|
828 | TEMPLATE_VBoxBS3KitBS_BLD_TRG = os-agnostic
|
---|
829 | TEMPLATE_VBoxBS3KitBS_BLD_TRG_ARCH = x86
|
---|
830 | TEMPLATE_VBoxBS3KitBS_INST = $(INST_VALIDATIONKIT)bootsectors/
|
---|
831 | TEMPLATE_VBoxBS3KitBS_INSTTYPE = none
|
---|
832 | TEMPLATE_VBoxBS3KitBS_BINSUFF = .img
|
---|
833 | TEMPLATE_VBoxBS3KitBS_MODE = 0644
|
---|
834 | TEMPLATE_VBoxBS3KitBS_ASTOOL = YASM
|
---|
835 | TEMPLATE_VBoxBS3KitBS_ASFLAGS = -f bin --mapfile
|
---|
836 | TEMPLATE_VBoxBS3KitBS_ASDEFS = ASM_FORMAT_BIN RT_NOINC_SEGMENTS ARCH_BITS=16 __YASM__ \
|
---|
837 | BS3CLASS16CODE=$(BS3KIT_CLASS_CODE16) BS3KIT_CLASS_DATA16=$(BS3KIT_CLASS_DATA16) \
|
---|
838 | BS3KIT_GRPNM_DATA16=$(BS3KIT_GRPNM_DATA16) BS3KIT_CLASS_BSS16=$(BS3KIT_CLASS_BSS16)
|
---|
839 | TEMPLATE_VBoxBS3KitBS_INCS = $(VBOX_PATH_BS3KIT_SRC) .
|
---|
840 | TEMPLATE_VBoxBS3KitBS_LDTOOL = VBoxBsCpLd
|
---|
841 |
|
---|
842 |
|
---|
843 |
|
---|
844 | #
|
---|
845 | # Extends VBoxBS3KitImg
|
---|
846 | # User must starts SOURCES with: $(VBOX_PATH_BS3KIT_SRC)/bs3-first-dosexe.asm
|
---|
847 | ## disable 1014, 1080, 1150
|
---|
848 | #
|
---|
849 | TEMPLATE_VBoxBS3KitUtil = Utility using bs3kit code.
|
---|
850 | TEMPLATE_VBoxBS3KitUtil_EXTENDS = VBoxBS3KitImg
|
---|
851 | TEMPLATE_VBoxBS3KitUtil_BINSUFF = .exe
|
---|
852 | TEMPLATE_VBoxBS3KitUtil_DEFS = $(TEMPLATE_VBoxBS3KitImg_DEFS) BS3_IS_DOS_EXE
|
---|
853 | TEMPLATE_VBoxBS3KitUtil_CFLAGS = $(filter-out -zl,$(TEMPLATE_VBoxBS3KitImg_CFLAGS))
|
---|
854 | TEMPLATE_VBoxBS3KitUtil_CXXFLAGS = $(filter-out -zl,$(TEMPLATE_VBoxBS3KitImg_CXXFLAGS))
|
---|
855 | TEMPLATE_VBoxBS3KitUtil_LDFLAGS = system dos \
|
---|
856 | debug $(BS3_OW_DBG_LDOPT) all \
|
---|
857 | option quiet, map, statics, verbose, symfile \
|
---|
858 | disable 1080 \
|
---|
859 | order \
|
---|
860 | clname $(BS3KIT_CLASS_CODE16) \
|
---|
861 | segment BEGTEXT \
|
---|
862 | segment BS3TEXT16 \
|
---|
863 | segment _TEXT \
|
---|
864 | segment BS3TEXT16_NEARSTUBS \
|
---|
865 | segment BS3TEXT16_FARSTUBS \
|
---|
866 | segment BS3TEXT16_END \
|
---|
867 | clname BS3SYSTEM16 \
|
---|
868 | segment BS3SYSTEM16 \
|
---|
869 | \
|
---|
870 | clname BEGDATA \
|
---|
871 | segment _NULL \
|
---|
872 | segment _AFTERNULL \
|
---|
873 | clname DATA \
|
---|
874 | $(if-expr "$(BS3KIT_SEGNM_DATA16)" == "", \
|
---|
875 | segment BS3DATA16 \
|
---|
876 | segment BS3DATA16CONST \
|
---|
877 | segment CONST \
|
---|
878 | segment BS3DATA16CONST2 \
|
---|
879 | segment CONST2 \
|
---|
880 | ,\
|
---|
881 | segment CONST \
|
---|
882 | segment CONST2 \
|
---|
883 | ) \
|
---|
884 | segment _DATA \
|
---|
885 | segment XIB \
|
---|
886 | segment XI \
|
---|
887 | segment XIE \
|
---|
888 | segment YIB \
|
---|
889 | segment YI \
|
---|
890 | segment YIE \
|
---|
891 | segment STRINGS \
|
---|
892 | $(if-expr "$(BS3KIT_SEGNM_DATA16)" == "", \
|
---|
893 | segment BS3DATA16_DATA \
|
---|
894 | ,) \
|
---|
895 | segment DATA \
|
---|
896 | clname BSS \
|
---|
897 | segment _BSS \
|
---|
898 | segment BSS \
|
---|
899 | segment BS3DATA16_END \
|
---|
900 | clname STACK \
|
---|
901 | segment STACK \
|
---|
902 | \
|
---|
903 | clname FAR_DATA \
|
---|
904 | $(if-expr "$(BS3KIT_SEGNM_DATA16)" != "", \
|
---|
905 | segment BS3DATA16 \
|
---|
906 | segment BS3DATA16_DATA \
|
---|
907 | segment BS3DATA16CONST \
|
---|
908 | segment BS3DATA16CONST2 \
|
---|
909 | segment FAR_DATA \
|
---|
910 | segment BS3DATA16_END \
|
---|
911 | ,\
|
---|
912 | segment FAR_DATA \
|
---|
913 | )\
|
---|
914 | segment BS3DATA32 \
|
---|
915 | segment BS3DATA32CONST \
|
---|
916 | segment BS3DATA32CONST2 \
|
---|
917 | segment BS3DATA32_DATA \
|
---|
918 | segment BS3DATA32_BSS \
|
---|
919 | segment BS3DATA32_END \
|
---|
920 | \
|
---|
921 | segment BS3DATA64 \
|
---|
922 | segment BS3DATA64CONST \
|
---|
923 | segment BS3DATA64_BSS \
|
---|
924 | segment BS3DATA64_END \
|
---|
925 | clname BS3CLASS16RMCODE \
|
---|
926 | segment BS3RMCODE16_START \
|
---|
927 | segment BS3RMCODE16 \
|
---|
928 | segment BS3RMCODE16_END \
|
---|
929 | clname BS3CLASS16X0CODE \
|
---|
930 | segment BS3X0CODE16_START \
|
---|
931 | segment BS3X0CODE16 \
|
---|
932 | segment BS3X0CODE16_END \
|
---|
933 | clname BS3CLASS16X1CODE \
|
---|
934 | segment BS3X1CODE16_START \
|
---|
935 | segment BS3X1CODE16 \
|
---|
936 | segment BS3X1CODE16_END \
|
---|
937 | clname BS3CLASS32CODE \
|
---|
938 | segment BS3TEXT32 \
|
---|
939 | segment BS3TEXT32_END \
|
---|
940 | clname BS3CLASSSEPARATE32AND64BITCODE \
|
---|
941 | segment BS3SEPARATE32AND64BITCODE \
|
---|
942 | segment BS3SEPARATE32AND64BITCODE_END \
|
---|
943 | clname BS3CLASS64CODE \
|
---|
944 | segment BS3TEXT64 \
|
---|
945 | segment BS3TEXT64_END
|
---|
946 | # clname BS3FLAT segaddr=0x0000 \
|
---|
947 | # segment BS3FLAT segaddr=0x0000
|
---|
948 |
|
---|
949 | TEMPLATE_VBoxBS3KitUtil_LNK_DEPS = $(NO_SUCH_VARIABLE)
|
---|
950 | TEMPLATE_VBoxBS3KitUtil_POST_CMDS = $(NO_SUCH_VARIABLE)
|
---|
951 |
|
---|