1 | # $Id: Makefile.kmk 56607 2015-06-23 16:33:36Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Top-level makefile for the VMM.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2015 Oracle Corporation
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | # available from http://www.virtualbox.org. This file is free software;
|
---|
11 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | # General Public License (GPL) as published by the Free Software
|
---|
13 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 |
|
---|
18 | SUB_DEPTH = ../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 | # Include sub-makefiles.
|
---|
22 | ifndef VBOX_ONLY_EXTPACKS
|
---|
23 | include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
|
---|
24 | endif
|
---|
25 | include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
|
---|
26 |
|
---|
27 |
|
---|
28 | #
|
---|
29 | # Globals
|
---|
30 | #
|
---|
31 |
|
---|
32 | ## DEFS variable that is picked up by all three VMM targets.
|
---|
33 | # Can be prepended to by setting it in LocalConfig.kmk
|
---|
34 | VMM_COMMON_DEFS ?= VBOX_IN_VMM
|
---|
35 | ifdef VBOX_WITH_2ND_IEM_STEP
|
---|
36 | VMM_COMMON_DEFS += VBOX_WITH_2ND_IEM_STEP
|
---|
37 | endif
|
---|
38 | ifdef VBOX_WITH_3RD_IEM_STEP
|
---|
39 | VMM_COMMON_DEFS += VBOX_WITH_3RD_IEM_STEP
|
---|
40 | endif
|
---|
41 | #ifdef VBOX_WITH_IEM
|
---|
42 | # VMM_COMMON_DEFS += VBOX_WITH_IEM
|
---|
43 | #endif
|
---|
44 | ifdef VBOX_WITH_REM
|
---|
45 | VMM_COMMON_DEFS += VBOX_WITH_REM
|
---|
46 | endif
|
---|
47 | ifdef VBOX_WITH_MULTI_CORE
|
---|
48 | VMM_COMMON_DEFS += VBOX_WITH_MULTI_CORE
|
---|
49 | endif
|
---|
50 | ifdef VBOX_WITH_R0_LOGGING
|
---|
51 | VMM_COMMON_DEFS += VBOX_WITH_R0_LOGGING
|
---|
52 | endif
|
---|
53 | ifdef VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI
|
---|
54 | VMM_COMMON_DEFS += VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI
|
---|
55 | endif
|
---|
56 | ifdef VBOX_WITH_PCI_PASSTHROUGH
|
---|
57 | VMM_COMMON_DEFS += VBOX_WITH_PCI_PASSTHROUGH
|
---|
58 | endif
|
---|
59 | ifdef VBOX_WITH_DTRACE_RC
|
---|
60 | VMM_COMMON_DEFS += VBOX_WITH_DTRACE_RC
|
---|
61 | endif
|
---|
62 | ifdef VBOX_WITH_SAFE_STR
|
---|
63 | VMM_COMMON_DEFS += VBOX_WITH_SAFE_STR
|
---|
64 | endif
|
---|
65 | ifdef VBOX_WITH_RAW_RING1
|
---|
66 | VMM_COMMON_DEFS += VBOX_WITH_RAW_RING1
|
---|
67 | endif
|
---|
68 | ifdef VBOX_WITH_64ON32_IDT
|
---|
69 | VMM_COMMON_DEFS += VBOX_WITH_64ON32_IDT
|
---|
70 | endif
|
---|
71 | ifdef VBOX_WITH_64ON32_CMOS_DEBUG
|
---|
72 | VMM_COMMON_DEFS += VBOX_WITH_64ON32_CMOS_DEBUG
|
---|
73 | endif
|
---|
74 | ifdef VBOXSTRICTRC_STRICT_ENABLED
|
---|
75 | VMM_COMMON_DEFS += VBOXSTRICTRC_STRICT_ENABLED
|
---|
76 | endif
|
---|
77 | ifeq ($(KBUILD_TARGET),amd64)
|
---|
78 | VMM_COMMON_DEFS += VBOX_WITH_MORE_RING0_MEM_MAPPINGS
|
---|
79 | endif
|
---|
80 |
|
---|
81 | # VMM_COMMON_DEFS += VBOX_WITH_NS_ACCOUNTING_STATS
|
---|
82 |
|
---|
83 | # Special IEM debug mode which compares the result with HM/REM
|
---|
84 | ifdef IEM_VERIFICATION_MODE
|
---|
85 | VMM_COMMON_DEFS += IEM_VERIFICATION_MODE IEM_VERIFICATION_MODE_FULL IEM_VERIFICATION_MODE_FULL_HM
|
---|
86 | endif
|
---|
87 |
|
---|
88 |
|
---|
89 | #
|
---|
90 | # The VMM DLL.
|
---|
91 | #
|
---|
92 | ifndef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
|
---|
93 | DLLS += VBoxVMM
|
---|
94 | endif
|
---|
95 | VBoxVMM_TEMPLATE = VBoxR3DllNoPic
|
---|
96 | VBoxVMM_SONAME.linux = VBoxVMM.so
|
---|
97 |
|
---|
98 | VBoxVMM_DEFS = IN_VMM_R3 IN_DIS IN_GMM_R3 IN_DBG $(VMM_COMMON_DEFS)
|
---|
99 | ## @todo eliminate IN_GMM_R3
|
---|
100 | ifdef VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
|
---|
101 | VBoxVMM_DEFS += VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
|
---|
102 | endif
|
---|
103 | ifdef VBOX_WITH_VUSB
|
---|
104 | VBoxVMM_DEFS += VBOX_WITH_USB
|
---|
105 | endif
|
---|
106 | ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
107 | VBoxVMM_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
108 | endif
|
---|
109 | ifdef VBOX_WITH_NETSHAPER
|
---|
110 | VBoxVMM_DEFS += VBOX_WITH_NETSHAPER
|
---|
111 | endif
|
---|
112 | ifdef VBOX_WITH_RAW_MODE
|
---|
113 | VBoxVMM_DEFS += VBOX_WITH_RAW_MODE VBOX_WITH_RAW_MODE_NOT_R0
|
---|
114 | endif
|
---|
115 | ifdef VBOX_WITH_VMM_R0_SWITCH_STACK
|
---|
116 | VBoxVMM_DEFS += VMM_R0_SWITCH_STACK
|
---|
117 | endif
|
---|
118 | if "$(KBUILD_TYPE)" == "debug" && "$(USERNAME)" == "bird"
|
---|
119 | VBoxVMM_DEFS += RTMEM_WRAP_TO_EF_APIS
|
---|
120 | endif
|
---|
121 | VBoxVMM_DEFS.darwin = VMM_R0_SWITCH_STACK
|
---|
122 | VBoxVMM_DEFS.darwin.x86 = \
|
---|
123 | VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R3 \
|
---|
124 | VBOX_WITH_HYBRID_32BIT_KERNEL VBOX_WITH_HYBRID_32BIT_KERNEL_IN_R3
|
---|
125 |
|
---|
126 | VBoxVMM_INCS = \
|
---|
127 | include \
|
---|
128 | $(if-expr defined(VBOX_WITH_RAW_MODE),PATM,)
|
---|
129 | VBoxVMM_ASINCS = .
|
---|
130 |
|
---|
131 | VBoxVMM_SOURCES = \
|
---|
132 | VBoxVMM.d \
|
---|
133 | VMMR3/CFGM.cpp \
|
---|
134 | VMMR3/CPUM.cpp \
|
---|
135 | VMMR3/CPUMR3CpuId.cpp \
|
---|
136 | VMMR3/CPUMR3Db.cpp \
|
---|
137 | VMMR3/CPUMDbg.cpp \
|
---|
138 | VMMR3/DBGF.cpp \
|
---|
139 | VMMR3/DBGFAddr.cpp \
|
---|
140 | VMMR3/DBGFAddrSpace.cpp \
|
---|
141 | VMMR3/DBGFBp.cpp \
|
---|
142 | VMMR3/DBGFCoreWrite.cpp \
|
---|
143 | VMMR3/DBGFCpu.cpp \
|
---|
144 | VMMR3/DBGFDisas.cpp \
|
---|
145 | VMMR3/DBGFInfo.cpp \
|
---|
146 | VMMR3/DBGFLog.cpp \
|
---|
147 | VMMR3/DBGFMem.cpp \
|
---|
148 | VMMR3/DBGFOS.cpp \
|
---|
149 | VMMR3/DBGFR3PlugIn.cpp \
|
---|
150 | VMMR3/DBGFReg.cpp \
|
---|
151 | VMMR3/DBGFStack.cpp \
|
---|
152 | VMMR3/DBGFR3Trace.cpp \
|
---|
153 | VMMR3/EM.cpp \
|
---|
154 | VMMR3/EMR3Dbg.cpp \
|
---|
155 | $(if $(VBOX_WITH_RAW_MODE),VMMR3/EMRaw.cpp) \
|
---|
156 | VMMR3/EMHM.cpp \
|
---|
157 | VMMR3/FTM.cpp \
|
---|
158 | VMMR3/GIM.cpp \
|
---|
159 | VMMR3/GIMHv.cpp \
|
---|
160 | VMMR3/GIMKvm.cpp \
|
---|
161 | VMMR3/GIMMinimal.cpp \
|
---|
162 | VMMR3/IEMR3.cpp \
|
---|
163 | VMMR3/IOM.cpp \
|
---|
164 | VMMR3/GMM.cpp \
|
---|
165 | VMMR3/MM.cpp \
|
---|
166 | VMMR3/MMHeap.cpp \
|
---|
167 | VMMR3/MMHyper.cpp \
|
---|
168 | VMMR3/MMPagePool.cpp \
|
---|
169 | VMMR3/MMUkHeap.cpp \
|
---|
170 | VMMR3/PDM.cpp \
|
---|
171 | VMMR3/PDMBlkCache.cpp \
|
---|
172 | VMMR3/PDMDevice.cpp \
|
---|
173 | VMMR3/PDMDevHlp.cpp \
|
---|
174 | VMMR3/PDMDevMiscHlp.cpp \
|
---|
175 | VMMR3/PDMDriver.cpp \
|
---|
176 | VMMR3/PDMLdr.cpp \
|
---|
177 | VMMR3/PDMCritSect.cpp \
|
---|
178 | VMMR3/PDMQueue.cpp \
|
---|
179 | VMMR3/PDMThread.cpp \
|
---|
180 | VMMR3/PGM.cpp \
|
---|
181 | VMMR3/PGMDbg.cpp \
|
---|
182 | VMMR3/PGMHandler.cpp \
|
---|
183 | VMMR3/PGMMap.cpp \
|
---|
184 | VMMR3/PGMPhys.cpp \
|
---|
185 | VMMR3/PGMPool.cpp \
|
---|
186 | VMMR3/PGMSavedState.cpp \
|
---|
187 | VMMR3/PGMSharedPage.cpp \
|
---|
188 | VMMR3/SELM.cpp \
|
---|
189 | VMMR3/SSM.cpp \
|
---|
190 | VMMR3/STAM.cpp \
|
---|
191 | VMMR3/TM.cpp \
|
---|
192 | VMMR3/TRPM.cpp \
|
---|
193 | VMMR3/VM.cpp \
|
---|
194 | VMMR3/VMEmt.cpp \
|
---|
195 | VMMR3/VMReq.cpp \
|
---|
196 | VMMR3/VMM.cpp \
|
---|
197 | VMMR3/VMMGuruMeditation.cpp \
|
---|
198 | VMMR3/VMMSwitcher.cpp \
|
---|
199 | VMMR3/VMMTests.cpp \
|
---|
200 | VMMR3/HM.cpp \
|
---|
201 | $(if-expr defined(VBOX_WITH_RAW_MODE), \
|
---|
202 | VMMR3/CSAM.cpp \
|
---|
203 | VMMR3/PATM.cpp \
|
---|
204 | VMMR3/PATMPatch.cpp \
|
---|
205 | VMMR3/PATMGuest.cpp \
|
---|
206 | VMMR3/PATMA.asm \
|
---|
207 | VMMR3/PATMSSM.cpp \
|
---|
208 | VMMR3/PATMR3Dbg.cpp \
|
---|
209 | ,) \
|
---|
210 | VMMAll/CPUMAllRegs.cpp \
|
---|
211 | VMMAll/CPUMAllMsrs.cpp \
|
---|
212 | VMMAll/CPUMStack.cpp \
|
---|
213 | VMMAll/DBGFAll.cpp \
|
---|
214 | VMMAll/HMAll.cpp \
|
---|
215 | VMMAll/IEMAll.cpp \
|
---|
216 | VMMAll/IEMAllAImpl.asm \
|
---|
217 | VMMAll/IEMAllAImplC.cpp \
|
---|
218 | VMMAll/IOMAll.cpp \
|
---|
219 | VMMAll/IOMAllMMIO.cpp \
|
---|
220 | VMMAll/MMAll.cpp \
|
---|
221 | VMMAll/MMAllHyper.cpp \
|
---|
222 | VMMAll/MMAllPagePool.cpp \
|
---|
223 | VMMAll/PDMAll.cpp \
|
---|
224 | VMMAll/PDMAllCritSect.cpp \
|
---|
225 | VMMAll/PDMAllCritSectRw.cpp \
|
---|
226 | VMMAll/PDMAllCritSectBoth.cpp \
|
---|
227 | VMMAll/PDMAllQueue.cpp \
|
---|
228 | VMMAll/PGMAll.cpp \
|
---|
229 | VMMAll/PGMAllHandler.cpp \
|
---|
230 | VMMAll/PGMAllMap.cpp \
|
---|
231 | VMMAll/PGMAllPhys.cpp \
|
---|
232 | VMMAll/PGMAllPool.cpp \
|
---|
233 | VMMAll/REMAll.cpp \
|
---|
234 | VMMAll/SELMAll.cpp \
|
---|
235 | VMMAll/EMAll.cpp \
|
---|
236 | VMMAll/EMAllA.asm \
|
---|
237 | VMMAll/FTMAll.cpp \
|
---|
238 | VMMAll/GIMAll.cpp \
|
---|
239 | VMMAll/GIMAllHv.cpp \
|
---|
240 | VMMAll/GIMAllKvm.cpp \
|
---|
241 | VMMAll/TMAll.cpp \
|
---|
242 | VMMAll/TMAllCpu.cpp \
|
---|
243 | VMMAll/TMAllReal.cpp \
|
---|
244 | VMMAll/TMAllVirtual.cpp \
|
---|
245 | VMMAll/TRPMAll.cpp \
|
---|
246 | VMMAll/VMAll.cpp \
|
---|
247 | VMMAll/VMMAll.cpp \
|
---|
248 | VMMAll/VMMAllA.asm \
|
---|
249 | $(if-expr defined(VBOX_WITH_RAW_MODE), \
|
---|
250 | VMMAll/CSAMAll.cpp \
|
---|
251 | VMMAll/PATMAll.cpp \
|
---|
252 | ,)
|
---|
253 | ifdef VBOX_WITH_VUSB
|
---|
254 | VBoxVMM_SOURCES += VMMR3/PDMUsb.cpp
|
---|
255 | endif
|
---|
256 | ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
257 | VBoxVMM_SOURCES += \
|
---|
258 | VMMR3/PDMAsyncCompletion.cpp \
|
---|
259 | VMMR3/PDMAsyncCompletionFile.cpp \
|
---|
260 | VMMR3/PDMAsyncCompletionFileFailsafe.cpp \
|
---|
261 | VMMR3/PDMAsyncCompletionFileNormal.cpp
|
---|
262 | endif
|
---|
263 | ifdef VBOX_WITH_NETSHAPER
|
---|
264 | VBoxVMM_SOURCES += \
|
---|
265 | VMMR3/PDMNetShaper.cpp \
|
---|
266 | VMMAll/PDMAllNetShaper.cpp
|
---|
267 | endif
|
---|
268 |
|
---|
269 | ifdef VBOX_WITH_RAW_MODE
|
---|
270 | VBoxVMM_SOURCES.x86 += \
|
---|
271 | VMMSwitcher/32BitTo32Bit.asm \
|
---|
272 | VMMSwitcher/32BitToPAE.asm \
|
---|
273 | VMMSwitcher/PAETo32Bit.asm \
|
---|
274 | VMMSwitcher/PAEToPAE.asm
|
---|
275 | VBoxVMM_SOURCES.amd64 = \
|
---|
276 | VMMSwitcher/AMD64To32Bit.asm \
|
---|
277 | VMMSwitcher/AMD64ToPAE.asm
|
---|
278 | VBoxVMM_SOURCES.darwin.x86 += \
|
---|
279 | VMMSwitcher/AMD64ToPAE.asm
|
---|
280 | endif
|
---|
281 | VBoxVMM_SOURCES.x86 += \
|
---|
282 | VMMSwitcher/32BitToAMD64.asm \
|
---|
283 | VMMSwitcher/PAEToAMD64.asm \
|
---|
284 | VMMSwitcher/X86Stub.asm
|
---|
285 | VBoxVMM_SOURCES.amd64 += \
|
---|
286 | VMMSwitcher/AMD64Stub.asm
|
---|
287 |
|
---|
288 | VBoxVMM_LIBS = \
|
---|
289 | $(PATH_STAGE_LIB)/DisasmR3$(VBOX_SUFF_LIB)
|
---|
290 | ifdef VBOX_WITH_DEBUGGER
|
---|
291 | VBoxVMM_LIBS += \
|
---|
292 | $(PATH_STAGE_LIB)/Debugger$(VBOX_SUFF_LIB)
|
---|
293 | endif
|
---|
294 | VBoxVMM_LIBS += \
|
---|
295 | $(LIB_REM) \
|
---|
296 | $(LIB_RUNTIME)
|
---|
297 |
|
---|
298 | VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
|
---|
299 | VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
|
---|
300 | VBoxVMM_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxVMM.dylib
|
---|
301 | VBoxVMM_LDFLAGS.solaris = -mimpure-text
|
---|
302 |
|
---|
303 | # SSM wish to know the build type, host os and arch.
|
---|
304 | VMMR3/SSM.cpp_DEFS += \
|
---|
305 | KBUILD_TYPE=\"$(KBUILD_TYPE)\" \
|
---|
306 | KBUILD_TARGET=\"$(KBUILD_TARGET)\" \
|
---|
307 | KBUILD_TARGET_ARCH=\"$(KBUILD_TARGET_ARCH)\"
|
---|
308 |
|
---|
309 |
|
---|
310 | #ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
311 | # ifeq ($(KBUILD_HOST), linux)
|
---|
312 | #VBoxVMM_LIBS += aio
|
---|
313 | # endif
|
---|
314 | #endif
|
---|
315 |
|
---|
316 | $(call VBOX_SET_VER_INFO_DLL,VBoxVMM,VirtualBox VMM) # Version info / description.
|
---|
317 |
|
---|
318 |
|
---|
319 | if defined(VBOX_WITH_RAW_MODE) && $(intersects $(VBOX_LDR_FMT32), pe lx)
|
---|
320 |
|
---|
321 | #
|
---|
322 | # VMMRCBuiltin.lib
|
---|
323 | #
|
---|
324 | LIBRARIES += VMMRCBuiltin
|
---|
325 | VMMRCBuiltin_TEMPLATE = VBoxRc
|
---|
326 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
327 | VMMRCBuiltin_SOURCES = VMMRC/VMMRCBuiltin.def
|
---|
328 | endif
|
---|
329 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
330 | VMMRCBuiltin_SOURCES = $(VMMRCBuiltin_0_OUTDIR)/VMMRCBuiltin.def
|
---|
331 | $$(VMMRCBuiltin_0_OUTDIR)/VMMRCBuiltin.def: $(PATH_SUB_CURRENT)/VMMRC/VMMRCBuiltin.def | $$(dir $$@)
|
---|
332 | $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' --output $@ $<
|
---|
333 | endif
|
---|
334 |
|
---|
335 |
|
---|
336 | #
|
---|
337 | # VMMRCImp.lib
|
---|
338 | #
|
---|
339 | LIBRARIES += VMMRCImp
|
---|
340 | VMMRCImp_TEMPLATE = VBoxRc
|
---|
341 | VMMRCImp_SOURCES = $(VMMRCImp_0_OUTDIR)/VMMRC.def
|
---|
342 | VMMRCImp_CLEAN = $(VMMRCImp_0_OUTDIR)/VMMRC.def
|
---|
343 |
|
---|
344 | $$(VMMRCImp_0_OUTDIR)/VMMRC.def: $(PATH_SUB_CURRENT)/VMMRC/VMMRC.def | $$(dir $$@)
|
---|
345 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
346 | $(SED) \
|
---|
347 | -e '/not-os2/d' \
|
---|
348 | -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' \
|
---|
349 | -e 's/[ \t]DATA[ \t]*/ /' \
|
---|
350 | --output $@ \
|
---|
351 | $<
|
---|
352 | $(APPEND) "$@" ""
|
---|
353 | $(APPEND) "$@" " ___ehInit"
|
---|
354 | else
|
---|
355 | $(SED) \
|
---|
356 | -e '/not-win/d' \
|
---|
357 | -e '/not-$(KBUILD_TARGET_ARCH)/d' \
|
---|
358 | --output $@ $<
|
---|
359 | endif
|
---|
360 |
|
---|
361 | endif # RC && (pe || lx)
|
---|
362 |
|
---|
363 |
|
---|
364 | if1of ($(VBOX_LDR_FMT), pe lx)
|
---|
365 | #
|
---|
366 | # VMMR0Imp.lib
|
---|
367 | #
|
---|
368 | LIBRARIES += VMMR0Imp
|
---|
369 | VMMR0Imp_TEMPLATE = VBoxR0
|
---|
370 | VMMR0Imp_SOURCES = $(VMMR0Imp_0_OUTDIR)/VMMR0.def
|
---|
371 | VMMR0Imp_CLEAN = $(VMMR0Imp_0_OUTDIR)/VMMR0.def
|
---|
372 |
|
---|
373 | $$(VMMR0Imp_0_OUTDIR)/VMMR0.def: $(PATH_SUB_CURRENT)/VMMR0/VMMR0.def | $$(dir $$@)
|
---|
374 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
375 | $(SED) \
|
---|
376 | -e '/not-os2/d' \
|
---|
377 | -e '/not-amd64/d' \
|
---|
378 | -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' \
|
---|
379 | -e 's/[ \t]DATA[ \t]*/ /' \
|
---|
380 | --output $@ $<
|
---|
381 | $(APPEND) "$@" ""
|
---|
382 | $(APPEND) "$@" " ___ehInit"
|
---|
383 | else
|
---|
384 | $(SED) \
|
---|
385 | -e '/not-win/d' \
|
---|
386 | -e '/not-$(KBUILD_TARGET_ARCH)/d' \
|
---|
387 | --output $@ $<
|
---|
388 | endif
|
---|
389 | endif # R0: pe + lx
|
---|
390 |
|
---|
391 |
|
---|
392 | #
|
---|
393 | # VMMR3Imp.lib
|
---|
394 | #
|
---|
395 | IMPORT_LIBS += VMMR3Imp
|
---|
396 | $(call VBOX_GENERATE_IMPORT_TARGET_FN,VMMR3Imp,VBoxVMM,VMMR3/VMMR3.def)
|
---|
397 |
|
---|
398 | ifneq ($(VBOX_LIB_VMM_LAZY),$(LIB_VMM))
|
---|
399 | #
|
---|
400 | # VMMR3LazyImp.lib (experimental)
|
---|
401 | #
|
---|
402 | LIBRARIES += VMMR3LazyImp
|
---|
403 | VMMR3LazyImp_TEMPLATE = VBoxR3Dll
|
---|
404 | VMMR3LazyImp_INST = $(INST_LIB)
|
---|
405 | VMMR3LazyImp_SOURCES = $(VMMR3LazyImp_0_OUTDIR)/VMMR3LazyLoad.asm
|
---|
406 | VMMR3LazyImp_CLEAN = $(VMMR3LazyImp_0_OUTDIR)/VMMR3LazyLoad.asm
|
---|
407 | $$(VMMR3LazyImp_0_OUTDIR)/VMMR3LazyLoad.asm: $(PATH_SUB_CURRENT)/VMMR3/VMMR3.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@)
|
---|
408 | $(VBOX_DEF_2_LAZY_LOAD) --output $@ --library VBoxVMM $<
|
---|
409 | endif
|
---|
410 |
|
---|
411 |
|
---|
412 | if defined(VBOX_WITH_RAW_MODE) && !defined(VBOX_ONLY_EXTPACKS)
|
---|
413 | #
|
---|
414 | # VMMRC.rc
|
---|
415 | #
|
---|
416 | SYSMODS += VMMRC
|
---|
417 | VMMRC_TEMPLATE = VBoxRc
|
---|
418 | VMMRC_NAME = VMMRC
|
---|
419 |
|
---|
420 | VMMRC_DEFS = IN_VMM_RC IN_RT_RC IN_DIS DIS_CORE_ONLY VBOX_WITH_RAW_MODE VBOX_WITH_RAW_MODE_NOT_R0 IN_SUP_RC \
|
---|
421 | $(VMM_COMMON_DEFS)
|
---|
422 | ifdef VBOX_WITH_VMM_R0_SWITCH_STACK
|
---|
423 | VMMRC_DEFS += VMM_R0_SWITCH_STACK
|
---|
424 | endif
|
---|
425 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
426 | VMMRC_DEFS.darwin = VMM_R0_SWITCH_STACK
|
---|
427 | VMMRC_DEFS.darwin = \
|
---|
428 | VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_RC \
|
---|
429 | VBOX_WITH_HYBRID_32BIT_KERNEL VBOX_WITH_HYBRID_32BIT_KERNEL_IN_RC
|
---|
430 | endif
|
---|
431 |
|
---|
432 | VMMRC_INCS := \
|
---|
433 | include \
|
---|
434 | VMMRC \
|
---|
435 | $(if-expr defined(VBOX_WITH_RAW_MODE),PATM,)
|
---|
436 |
|
---|
437 | VMMRC_LIBS = \
|
---|
438 | $(PATH_STAGE_LIB)/DisasmRC$(VBOX_SUFF_LIB) \
|
---|
439 | $(PATH_STAGE_LIB)/RuntimeRC$(VBOX_SUFF_LIB) \
|
---|
440 | $(PATH_STAGE_LIB)/SUPRC$(VBOX_SUFF_LIB)
|
---|
441 | ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
|
---|
442 | VMMRC_LIBS += \
|
---|
443 | $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB)
|
---|
444 | endif
|
---|
445 |
|
---|
446 | VMMRC_SOURCES = \
|
---|
447 | VBoxVMM.d \
|
---|
448 | VMMRC/VMMRC0.asm \
|
---|
449 | VMMRC/VMMRCDeps.cpp \
|
---|
450 | VMMRC/CPUMRC.cpp \
|
---|
451 | VMMRC/CPUMRCA.asm \
|
---|
452 | VMMRC/CPUMRCPatchHlp.asm \
|
---|
453 | VMMRC/EMRCA.asm \
|
---|
454 | VMMRC/IOMRC.cpp \
|
---|
455 | VMMRC/MMRamRC.cpp \
|
---|
456 | VMMRC/MMRamRCA.asm \
|
---|
457 | VMMRC/PDMRCDevice.cpp \
|
---|
458 | VMMRC/PGMRC.cpp \
|
---|
459 | VMMRC/SELMRC.cpp \
|
---|
460 | VMMRC/TRPMRC.cpp \
|
---|
461 | VMMRC/TRPMRCHandlers.cpp \
|
---|
462 | VMMRC/TRPMRCHandlersA.asm \
|
---|
463 | VMMRC/VMMRC.cpp \
|
---|
464 | VMMRC/VMMRCA.asm \
|
---|
465 | $(if-expr defined(VBOX_WITH_RAW_MODE), \
|
---|
466 | VMMRC/CSAMRC.cpp \
|
---|
467 | VMMRC/PATMRC.cpp \
|
---|
468 | ,) \
|
---|
469 | VMMRZ/DBGFRZ.cpp \
|
---|
470 | VMMRZ/PGMRZDynMap.cpp \
|
---|
471 | VMMRZ/VMMRZ.cpp \
|
---|
472 | VMMAll/CPUMAllRegs.cpp \
|
---|
473 | VMMAll/CPUMAllMsrs.cpp \
|
---|
474 | VMMAll/DBGFAll.cpp \
|
---|
475 | VMMAll/IEMAll.cpp \
|
---|
476 | VMMAll/IEMAllAImpl.asm \
|
---|
477 | VMMAll/IEMAllAImplC.cpp \
|
---|
478 | VMMAll/IOMAll.cpp \
|
---|
479 | VMMAll/IOMAllMMIO.cpp \
|
---|
480 | VMMAll/EMAll.cpp \
|
---|
481 | VMMAll/EMAllA.asm \
|
---|
482 | VMMAll/FTMAll.cpp \
|
---|
483 | VMMAll/GIMAll.cpp \
|
---|
484 | VMMAll/GIMAllHv.cpp \
|
---|
485 | VMMAll/GIMAllKvm.cpp \
|
---|
486 | VMMAll/MMAll.cpp \
|
---|
487 | VMMAll/MMAllHyper.cpp \
|
---|
488 | VMMAll/PDMAll.cpp \
|
---|
489 | VMMAll/PDMAllCritSect.cpp \
|
---|
490 | VMMAll/PDMAllCritSectRw.cpp \
|
---|
491 | VMMAll/PDMAllCritSectBoth.cpp \
|
---|
492 | VMMAll/PDMAllQueue.cpp \
|
---|
493 | VMMAll/PGMAll.cpp \
|
---|
494 | VMMAll/PGMAllHandler.cpp \
|
---|
495 | VMMAll/PGMAllMap.cpp \
|
---|
496 | VMMAll/PGMAllPhys.cpp \
|
---|
497 | VMMAll/PGMAllPool.cpp \
|
---|
498 | VMMAll/REMAll.cpp \
|
---|
499 | VMMAll/SELMAll.cpp \
|
---|
500 | VMMAll/TMAll.cpp \
|
---|
501 | VMMAll/TMAllCpu.cpp \
|
---|
502 | VMMAll/TMAllReal.cpp \
|
---|
503 | VMMAll/TMAllVirtual.cpp \
|
---|
504 | VMMAll/TRPMAll.cpp \
|
---|
505 | VMMAll/VMAll.cpp \
|
---|
506 | VMMAll/VMMAll.cpp \
|
---|
507 | VMMAll/VMMAllA.asm \
|
---|
508 | $(if-expr defined(VBOX_WITH_RAW_MODE), \
|
---|
509 | VMMAll/CSAMAll.cpp \
|
---|
510 | VMMAll/PATMAll.cpp \
|
---|
511 | ,)
|
---|
512 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
513 | VMMRC_SOURCES += VMMRC/VMMRC.def
|
---|
514 | endif
|
---|
515 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
516 | VMMRC_SOURCES += $(VMMRCImp_0_OUTDIR)/VMMRC.def
|
---|
517 | endif
|
---|
518 |
|
---|
519 | # the very last one.
|
---|
520 | VMMRC_SOURCES += VMMRC/VMMRC99.asm
|
---|
521 |
|
---|
522 | VMMRC/VMMRCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMRCDeps.cpp to .c
|
---|
523 |
|
---|
524 | $(call VBOX_SET_VER_INFO_RC,VMMRC,VirtualBox VMM - raw-mode context parts) # Version info / description.
|
---|
525 | endif # VBOX_WITH_RAW_MODE && !VBOX_ONLY_EXTPACKS
|
---|
526 |
|
---|
527 |
|
---|
528 | ifndef VBOX_ONLY_EXTPACKS
|
---|
529 | #
|
---|
530 | # VMMR0.r0
|
---|
531 | #
|
---|
532 | SYSMODS += VMMR0
|
---|
533 | VMMR0_TEMPLATE = VBoxR0
|
---|
534 | VMMR0_SYSSUFF = .r0
|
---|
535 |
|
---|
536 | VMMR0_DEFS = IN_VMM_R0 IN_RT_R0 IN_DIS DIS_CORE_ONLY IN_GVMM_R0 IN_GMM_R0 IN_INTNET_R0 \
|
---|
537 | $(VMM_COMMON_DEFS) RTASSERT_HAVE_SHOULD_PANIC
|
---|
538 | ## @todo eliminate IN_GVMM_R0 IN_GMM_R0
|
---|
539 | ifdef VBOX_WITH_PCI_PASSTHROUGH
|
---|
540 | VMMR0_DEFS += IN_PCIRAW_R0
|
---|
541 | endif
|
---|
542 | ifdef VBOX_WITH_TRIPLE_FAULT_HACK
|
---|
543 | VMMR0_DEFS += VBOX_WITH_TRIPLE_FAULT_HACK
|
---|
544 | endif
|
---|
545 | ifdef VBOX_WITH_RAW_MODE
|
---|
546 | VMMR0_DEFS += VBOX_WITH_RAW_MODE
|
---|
547 | endif
|
---|
548 | ifdef VBOX_WITH_VMM_R0_SWITCH_STACK
|
---|
549 | VMMR0_DEFS += VMM_R0_SWITCH_STACK
|
---|
550 | endif
|
---|
551 | VMMR0_DEFS.darwin = VMM_R0_SWITCH_STACK
|
---|
552 | VMMR0_DEFS.darwin.x86 = \
|
---|
553 | VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 \
|
---|
554 | VBOX_WITH_HYBRID_32BIT_KERNEL VBOX_WITH_HYBRID_32BIT_KERNEL_IN_R0
|
---|
555 | VMMR0_DEFS.win.amd64 = VBOX_WITH_KERNEL_USING_XMM
|
---|
556 |
|
---|
557 | VMMR0_INCS = \
|
---|
558 | include \
|
---|
559 | $(if-expr defined(VBOX_WITH_RAW_MODE),PATM,)
|
---|
560 |
|
---|
561 | VMMR0_SOURCES = \
|
---|
562 | VBoxVMM.d \
|
---|
563 | VMMR0/CPUMR0.cpp \
|
---|
564 | VMMR0/CPUMR0A.asm \
|
---|
565 | VMMR0/GIMR0.cpp \
|
---|
566 | VMMR0/GIMR0Hv.cpp \
|
---|
567 | VMMR0/GMMR0.cpp \
|
---|
568 | VMMR0/GVMMR0.cpp \
|
---|
569 | VMMR0/HMR0.cpp \
|
---|
570 | VMMR0/HMR0A.asm \
|
---|
571 | VMMR0/HMVMXR0.cpp \
|
---|
572 | VMMR0/HMSVMR0.cpp \
|
---|
573 | VMMR0/PDMR0Device.cpp \
|
---|
574 | VMMR0/PDMR0Driver.cpp \
|
---|
575 | VMMR0/PGMR0.cpp \
|
---|
576 | VMMR0/PGMR0SharedPage.cpp \
|
---|
577 | VMMR0/TRPMR0.cpp \
|
---|
578 | VMMR0/TRPMR0A.asm \
|
---|
579 | VMMR0/VMMR0.cpp \
|
---|
580 | VMMRZ/DBGFRZ.cpp \
|
---|
581 | VMMRZ/VMMRZ.cpp \
|
---|
582 | VMMAll/CPUMAllRegs.cpp \
|
---|
583 | VMMAll/CPUMAllMsrs.cpp \
|
---|
584 | VMMAll/CPUMStack.cpp \
|
---|
585 | VMMAll/DBGFAll.cpp \
|
---|
586 | VMMAll/EMAll.cpp \
|
---|
587 | VMMAll/EMAllA.asm \
|
---|
588 | VMMAll/FTMAll.cpp \
|
---|
589 | VMMAll/GIMAll.cpp \
|
---|
590 | VMMAll/GIMAllHv.cpp \
|
---|
591 | VMMAll/GIMAllKvm.cpp \
|
---|
592 | VMMAll/HMAll.cpp \
|
---|
593 | VMMAll/IEMAll.cpp \
|
---|
594 | VMMAll/IEMAllAImpl.asm \
|
---|
595 | VMMAll/IEMAllAImplC.cpp \
|
---|
596 | VMMAll/IOMAll.cpp \
|
---|
597 | VMMAll/IOMAllMMIO.cpp \
|
---|
598 | VMMAll/MMAll.cpp \
|
---|
599 | VMMAll/MMAllHyper.cpp \
|
---|
600 | VMMAll/MMAllPagePool.cpp \
|
---|
601 | VMMAll/PDMAll.cpp \
|
---|
602 | VMMAll/PDMAllCritSect.cpp \
|
---|
603 | VMMAll/PDMAllCritSectRw.cpp \
|
---|
604 | VMMAll/PDMAllCritSectBoth.cpp \
|
---|
605 | VMMAll/PDMAllQueue.cpp \
|
---|
606 | VMMAll/PGMAll.cpp \
|
---|
607 | VMMAll/PGMAllHandler.cpp \
|
---|
608 | VMMAll/PGMAllMap.cpp \
|
---|
609 | VMMAll/PGMAllPhys.cpp \
|
---|
610 | VMMAll/PGMAllPool.cpp \
|
---|
611 | VMMAll/REMAll.cpp \
|
---|
612 | VMMAll/SELMAll.cpp \
|
---|
613 | VMMAll/TMAll.cpp \
|
---|
614 | VMMAll/TMAllCpu.cpp \
|
---|
615 | VMMAll/TMAllReal.cpp \
|
---|
616 | VMMAll/TMAllVirtual.cpp \
|
---|
617 | VMMAll/TRPMAll.cpp \
|
---|
618 | VMMAll/VMAll.cpp \
|
---|
619 | VMMAll/VMMAll.cpp \
|
---|
620 | VMMAll/VMMAllA.asm
|
---|
621 | if1of ($(VBOX_LDR_FMT), pe lx)
|
---|
622 | VMMR0_SOURCES += $(VMMR0Imp_0_OUTDIR)/VMMR0.def
|
---|
623 | endif
|
---|
624 | ifdef VBOX_WITH_TRIPLE_FAULT_HACK
|
---|
625 | VMMR0_SOURCES += \
|
---|
626 | VMMR0/VMMR0TripleFaultHack.cpp \
|
---|
627 | VMMR0/VMMR0TripleFaultHackA.asm
|
---|
628 | endif
|
---|
629 | ifdef VBOX_WITH_NETSHAPER
|
---|
630 | VMMR0_SOURCES += \
|
---|
631 | VMMAll/PDMAllNetShaper.cpp
|
---|
632 | endif
|
---|
633 | VMMR0_SOURCES.amd64 = \
|
---|
634 | VMMR0/VMMR0JmpA-amd64.asm
|
---|
635 | VMMR0_SOURCES.x86 = \
|
---|
636 | VMMR0/VMMR0JmpA-x86.asm
|
---|
637 | VMMR0_SOURCES.darwin.x86 = \
|
---|
638 | VMMRZ/PGMRZDynMap.cpp
|
---|
639 |
|
---|
640 | VMMR0_LIBS = \
|
---|
641 | $(PATH_STAGE_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
|
---|
642 | $(PATH_STAGE_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
|
---|
643 | $(PATH_STAGE_LIB)/DisasmR0$(VBOX_SUFF_LIB)
|
---|
644 | ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
|
---|
645 | VMMR0_LIBS += \
|
---|
646 | $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
|
---|
647 | endif
|
---|
648 |
|
---|
649 | $(call VBOX_SET_VER_INFO_R0,VMMR0,VirtualBox VMM - ring-0 context parts) # Version info / description.
|
---|
650 | endif # !VBOX_ONLY_EXTPACKS
|
---|
651 |
|
---|
652 |
|
---|
653 | ifndef VBOX_ONLY_EXTPACKS
|
---|
654 | #
|
---|
655 | # SSMStandalone.lib/a for linking with VBoxSVC and other executables.
|
---|
656 | #
|
---|
657 | LIBRARIES += SSMStandalone
|
---|
658 | SSMStandalone_TEMPLATE = VBOXR3EXE
|
---|
659 | SSMStandalone_DEFS = IN_VMM_R3 IN_VMM_STATIC SSM_STANDALONE CPUM_DB_STANDALONE
|
---|
660 | SSMStandalone_INCS = include
|
---|
661 | SSMStandalone_SOURCES = \
|
---|
662 | VMMR3/SSM.cpp \
|
---|
663 | VMMR3/CPUMR3Db.cpp
|
---|
664 | endif # !VBOX_ONLY_EXTPACKS
|
---|
665 |
|
---|
666 |
|
---|
667 | if !defined(VBOX_ONLY_EXTPACKS) \
|
---|
668 | && ( defined(VBOX_WITH_DTRACE_R3) \
|
---|
669 | || defined(VBOX_WITH_DTRACE_R0) \
|
---|
670 | || defined(VBOX_WITH_DTRACE_RC))
|
---|
671 | #
|
---|
672 | # Install the dtrace library files.
|
---|
673 | #
|
---|
674 | INSTALLS += VMMLibDTrace
|
---|
675 | VMMLibDTrace_INST = $(VBOX_INST_DTRACE_LIB)$(KBUILD_TARGET_ARCH)/
|
---|
676 | VMMLibDTrace_SOURCES = \
|
---|
677 | dtrace/lib/vbox-types.d \
|
---|
678 | dtrace/lib/$(KBUILD_TARGET_ARCH)/vbox-arch-types.d \
|
---|
679 | $(VMMLibDTrace_0_OUTDIR)/vm.d \
|
---|
680 | $(VMMLibDTrace_0_OUTDIR)/cpumctx.d \
|
---|
681 | $(VMMLibDTrace_0_OUTDIR)/CPUMInternal.d \
|
---|
682 | $(VMMLibDTrace_0_OUTDIR)/x86.d \
|
---|
683 |
|
---|
684 |
|
---|
685 | ##
|
---|
686 | # Turn the header $2 into the DTrace library script $1.
|
---|
687 | #
|
---|
688 | define def_vmm_lib_dtrace_preprocess
|
---|
689 | $$$$(VMMLibDTrace_0_OUTDIR)/$1: $2 $$(VBOX_VBOXCPP) | $$$$(dir $$$$@)
|
---|
690 | $$(QUIET)$$(call MSG_GENERATE,VMMLibDTrace,$$@,$$<)
|
---|
691 | $$(QUIET)$(VBOX_VBOXCPP) -d \
|
---|
692 | -D VBOX_FOR_DTRACE_LIB \
|
---|
693 | -D VBOX_FOR_DTRACE_LIB_$(toupper $(KBUILD_TARGET_ARCH)) \
|
---|
694 | -D IN_RING0 \
|
---|
695 | -D RT_C_DECLS_BEGIN= \
|
---|
696 | -D RT_C_DECLS_END= \
|
---|
697 | -D 'RCPTRTYPE(a_Type)=RTRCPTR' \
|
---|
698 | -D 'R3PTRTYPE(a_Type)=RTR3PTR' \
|
---|
699 | -D 'R0PTRTYPE(a_Type)=a_Type' \
|
---|
700 | -D 'AssertCompile(a_Expr)=' \
|
---|
701 | -D 'AssertCompileSize(a_Stuct, a_Size)=' \
|
---|
702 | -D 'bool=uint8_t' \
|
---|
703 | $$(foreach def,\
|
---|
704 | $$(DEFS) \
|
---|
705 | $$(DEFS.$$(KBUILD_TARGET)) \
|
---|
706 | $$(DEFS.$(KBUILD_TARGET_ARCH)) \
|
---|
707 | $$(VMM_COMMON_DEFS) \
|
---|
708 | $$(ARCH_BITS_DEFS)\
|
---|
709 | ,-D '$$(def)') \
|
---|
710 | $$< \
|
---|
711 | $$@
|
---|
712 | $$(QUIET)$$(CHMOD) 644 $$@
|
---|
713 | endef
|
---|
714 | $(evalcall2 def_vmm_lib_dtrace_preprocess,vm.d,$(PATH_ROOT)/include/VBox/vmm/vm.h)
|
---|
715 | $(evalcall2 def_vmm_lib_dtrace_preprocess,cpumctx.d,$(PATH_ROOT)/include/VBox/vmm/cpumctx.h)
|
---|
716 | $(evalcall2 def_vmm_lib_dtrace_preprocess,CPUMInternal.d,$(PATH_SUB_CURRENT)/include/CPUMInternal.h)
|
---|
717 | $(evalcall2 def_vmm_lib_dtrace_preprocess,x86.d,$(PATH_ROOT)/include/iprt/x86.h)
|
---|
718 |
|
---|
719 | endif
|
---|
720 |
|
---|
721 |
|
---|
722 |
|
---|
723 | #
|
---|
724 | # For vmmGetSvnRev.
|
---|
725 | #
|
---|
726 | VMMAll/VMMAll.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
727 |
|
---|
728 | #
|
---|
729 | # Disable annoying warnings about array subscript above array bounds in aPages[]
|
---|
730 | #
|
---|
731 | ifneq ($(KBUILD_TARGET),win)
|
---|
732 | VMMR3/PGMPool.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
|
---|
733 | VMMAll/PGMAllPool.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
|
---|
734 | VMMAll/PGMAll.cpp_CXXFLAGS = -Wno-unused-function
|
---|
735 | VMMAll/IEMAll.cpp_CXXFLAGS = -Wno-unused-parameter
|
---|
736 | endif
|
---|
737 |
|
---|
738 | #
|
---|
739 | # Always optimize the interpreter.
|
---|
740 | #
|
---|
741 | ifn1of ($(USERNAME),bird)
|
---|
742 | if1of ($(KBUILD_TARGET), win)
|
---|
743 | # -noover is recognized despite the statement saying otherwise. It silences these warnings:
|
---|
744 | # cl : Command line warning D9025 : overriding '/Od' with '/O2'
|
---|
745 | # cl : Command line warning D9025 : overriding '/Oy-' with '/Oy'
|
---|
746 | VMMAll/IEMAll.cpp_CXXFLAGS += -noover -O2xy
|
---|
747 | else
|
---|
748 | VMMAll/IEMAll.cpp_CXXFLAGS += -O2
|
---|
749 | #VMMAll/IEMAll.cpp_CXXFLAGS += -fno-align-functions -fno-align-jumps -fno-align-loops # Saves a few of percents, not worth it.
|
---|
750 | #VMMAll/IEMAll.cpp_CXXFLAGS += -fno-reorder-blocks # Saves one or two percent ... never mind.
|
---|
751 | VMMAll/IEMAll.cpp_CXXFLAGS += -fomit-frame-pointer # Omitting the frame pointer results in larger code, but it might be worth it. (esp addressing vs ebp?)
|
---|
752 | endif
|
---|
753 | endif # bird wants good stacks
|
---|
754 |
|
---|
755 |
|
---|
756 | # Alias the CPU database entries.
|
---|
757 | $(foreach base,$(notdir $(basename $(wildcard $(PATH_SUB_CURRENT)/VMMR3/cpus/*.h))), $(eval $(base).o $(base).obj: CPUMR3Db.o))
|
---|
758 |
|
---|
759 |
|
---|
760 | #
|
---|
761 | # Test for undefined symbols.
|
---|
762 | #
|
---|
763 | if1of ($(SYSMODS),VMMRC)
|
---|
764 | test-undef-rc:: $(PATH_TARGET)/undef-rc.run
|
---|
765 | OTHERS += $(PATH_TARGET)/undef-rc.run
|
---|
766 | CLEANS += $(PATH_TARGET)/undef-rc.run
|
---|
767 | $(PATH_TARGET)/undef-rc.run: \
|
---|
768 | $$(VMMRC_1_TARGET)
|
---|
769 | ifn1of ($(KBUILD_TARGET), linux solaris)
|
---|
770 | else
|
---|
771 | $(call MSG_L1,VMM: Testing for undefined symbols in VMMRC using nm...)
|
---|
772 | $(QUIET)$(VBOX_NM) $^ 2> /dev/null \
|
---|
773 | | $(SED) -n \
|
---|
774 | -e '/^ *U .*/!d' \
|
---|
775 | -e 's/ *U //' \
|
---|
776 | \
|
---|
777 | -e '/^g_VM\>/d'\
|
---|
778 | -e '/^g_CPUM\>/d'\
|
---|
779 | -e '/^g_Logger\>/d'\
|
---|
780 | -e '/^g_RelLogger\>/d'\
|
---|
781 | -e '/^g_TRPM\>/d'\
|
---|
782 | -e '/^g_TRPMCPU\>/d'\
|
---|
783 | -e '/^g_pSUPGlobalInfoPage\>/d'\
|
---|
784 | -e '/^g_trpmHyperCtxCore\>/d' \
|
---|
785 | -e '/^g_trpmGuestCtxCore\>/d' \
|
---|
786 | \
|
---|
787 | -e 's/\(.*\)$(DOLLAR)/ Undefined symbol: \1/' \
|
---|
788 | -e 'p' \
|
---|
789 | -e 'q 1'
|
---|
790 | endif
|
---|
791 | $(QUIET)$(APPEND) -t $@
|
---|
792 | endif
|
---|
793 |
|
---|
794 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
795 |
|
---|
796 |
|
---|
797 | # Alias the PGM templates to the object in which they are defined.
|
---|
798 | PGMInternal.o \
|
---|
799 | PGMBth.o PGMGst.o PGMShw.o \
|
---|
800 | PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
|
---|
801 |
|
---|
802 | PGMAllBth.o PGMAllGst.o PGMAllShw.o \
|
---|
803 | PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
|
---|
804 |
|
---|
805 | PGMRCBth.o PGMRCGst.o PGMRCShw.o \
|
---|
806 | PGMRCBth.obj PGMRCGst.obj PGMRCShw.obj: PGMRC.o
|
---|
807 |
|
---|
808 | PGMPhysRWTmpl.o PGMPhysRWTmpl.obj: PGMPhys.o
|
---|
809 |
|
---|
810 | PGMInline.o PGMInline.obj: PGMDbg.o
|
---|
811 |
|
---|
812 | # Alias the IEM templates to the object in which they are instantiated.
|
---|
813 | IEMInternal.o \
|
---|
814 | IEMAllInstructions.cpp.o IEMAllInstructions.cpp.obj \
|
---|
815 | IEMAllCImpl.cpp.o IEMAllCImpl.cpp.obj \
|
---|
816 | IEMAllCImplStrInstr.cpp.o IEMAllCImplStrInstr.cpp.obj: IEMAll.o
|
---|
817 |
|
---|
818 | # Alias the switcher templates.
|
---|
819 | PAEand32Bit.o PAEand32Bit.obj: PAETo32Bit.o PAEToPAE.o 32BitTo32Bit.o PAETo32Bit.o
|
---|
820 | LegacyandAMD64.o LegacyandAMD64.obj: 32BitToAMD64.o PAEToAMD64.o
|
---|
821 | AMD64andLegacy.o AMD64andLegacy.obj: AMD64To32Bit.o AMD64ToPAE.o
|
---|
822 |
|
---|