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