VirtualBox

source: vbox/trunk/src/VBox/VMM/Makefile.kmk@ 43363

Last change on this file since 43363 was 42777, checked in by vboxsync, 12 years ago

IEM and EM: debugging/hacking.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 17.8 KB
Line 
1# $Id: Makefile.kmk 42777 2012-08-11 20:23:48Z vboxsync $
2## @file
3# Top-level makefile for the VMM.
4#
5
6#
7# Copyright (C) 2006-2012 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
18SUB_DEPTH = ../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21# Include sub-makefiles.
22ifndef VBOX_ONLY_EXTPACKS
23 include $(PATH_SUB_CURRENT)/Preload/Makefile.kmk
24endif
25include $(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
34VMM_COMMON_DEFS ?= VBOX_IN_VMM
35ifdef VBOX_WITH_IEM
36 VMM_COMMON_DEFS += VBOX_WITH_IEM
37endif
38ifdef VBOX_WITH_REM
39 VMM_COMMON_DEFS += VBOX_WITH_REM
40endif
41ifdef VBOX_WITH_MULTI_CORE
42 VMM_COMMON_DEFS += VBOX_WITH_MULTI_CORE
43endif
44ifdef VBOX_WITH_R0_LOGGING
45 VMM_COMMON_DEFS += VBOX_WITH_R0_LOGGING
46endif
47ifdef VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI
48 VMM_COMMON_DEFS += VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI
49endif
50ifdef VBOX_WITH_PCI_PASSTHROUGH
51 VMM_COMMON_DEFS += VBOX_WITH_PCI_PASSTHROUGH
52endif
53ifdef VBOX_WITH_DTRACE_RC
54 VMM_COMMON_DEFS += VBOX_WITH_DTRACE_RC
55endif
56# VMM_COMMON_DEFS += VBOX_WITH_NS_ACCOUNTING_STATS
57
58# Special IEM debug mode which compares the result with REM.
59ifdef IEM_VERIFICATION_MODE
60 VMM_COMMON_DEFS += IEM_VERIFICATION_MODE IEM_VERIFICATION_MODE_FULL
61endif
62
63
64#
65# The VMM DLL.
66#
67ifndef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
68 DLLS += VBoxVMM
69endif
70VBoxVMM_TEMPLATE = VBoxR3DllNoPic
71VBoxVMM_SONAME.linux = VBoxVMM.so
72
73VBoxVMM_DEFS = IN_VMM_R3 IN_DIS IN_GMM_R3 IN_DBG $(VMM_COMMON_DEFS)
74## @todo eliminate IN_GMM_R3
75ifdef VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
76 VBoxVMM_DEFS += VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
77endif
78ifdef VBOX_WITH_VUSB
79 VBoxVMM_DEFS += VBOX_WITH_USB
80endif
81ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
82 VBoxVMM_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
83endif
84ifdef VBOX_WITH_NETSHAPER
85 VBoxVMM_DEFS += VBOX_WITH_NETSHAPER
86endif
87ifdef VBOX_WITH_RAW_MODE
88 VBoxVMM_DEFS += VBOX_WITH_RAW_MODE VBOX_WITH_RAW_MODE_NOT_R0
89endif
90VBoxVMM_DEFS.darwin = VMM_R0_SWITCH_STACK
91VBoxVMM_DEFS.darwin.x86 = \
92 VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R3 \
93 VBOX_WITH_HYBRID_32BIT_KERNEL VBOX_WITH_HYBRID_32BIT_KERNEL_IN_R3
94
95VBoxVMM_INCS = \
96 include \
97 PATM
98VBoxVMM_ASINCS = .
99
100VBoxVMM_SOURCES = \
101 VBoxVMM.d \
102 VMMR3/CFGM.cpp \
103 VMMR3/CPUM.cpp \
104 VMMR3/CPUMDbg.cpp \
105 VMMR3/DBGF.cpp \
106 VMMR3/DBGFAddr.cpp \
107 VMMR3/DBGFAddrSpace.cpp \
108 VMMR3/DBGFBp.cpp \
109 VMMR3/DBGFCoreWrite.cpp \
110 VMMR3/DBGFCpu.cpp \
111 VMMR3/DBGFDisas.cpp \
112 VMMR3/DBGFInfo.cpp \
113 VMMR3/DBGFLog.cpp \
114 VMMR3/DBGFMem.cpp \
115 VMMR3/DBGFOS.cpp \
116 VMMR3/DBGFReg.cpp \
117 VMMR3/DBGFStack.cpp \
118 VMMR3/DBGFSym.cpp \
119 VMMR3/DBGFR3Trace.cpp \
120 VMMR3/EM.cpp \
121 VMMR3/EMRaw.cpp \
122 VMMR3/EMHwaccm.cpp \
123 VMMR3/FTM.cpp \
124 VMMR3/IEMR3.cpp \
125 VMMR3/IOM.cpp \
126 VMMR3/GMM.cpp \
127 VMMR3/MM.cpp \
128 VMMR3/MMHeap.cpp \
129 VMMR3/MMHyper.cpp \
130 VMMR3/MMPagePool.cpp \
131 VMMR3/MMUkHeap.cpp \
132 VMMR3/PDM.cpp \
133 VMMR3/PDMBlkCache.cpp \
134 VMMR3/PDMDevice.cpp \
135 VMMR3/PDMDevHlp.cpp \
136 VMMR3/PDMDevMiscHlp.cpp \
137 VMMR3/PDMDriver.cpp \
138 VMMR3/PDMLdr.cpp \
139 VMMR3/PDMCritSect.cpp \
140 VMMR3/PDMQueue.cpp \
141 VMMR3/PDMThread.cpp \
142 VMMR3/PGM.cpp \
143 VMMR3/PGMDbg.cpp \
144 VMMR3/PGMHandler.cpp \
145 VMMR3/PGMMap.cpp \
146 VMMR3/PGMPhys.cpp \
147 VMMR3/PGMPool.cpp \
148 VMMR3/PGMSavedState.cpp \
149 VMMR3/PGMSharedPage.cpp \
150 VMMR3/SELM.cpp \
151 VMMR3/SSM.cpp \
152 VMMR3/STAM.cpp \
153 VMMR3/TM.cpp \
154 VMMR3/TRPM.cpp \
155 VMMR3/VM.cpp \
156 VMMR3/VMEmt.cpp \
157 VMMR3/VMReq.cpp \
158 VMMR3/VMM.cpp \
159 VMMR3/VMMGuruMeditation.cpp \
160 VMMR3/VMMSwitcher.cpp \
161 VMMR3/VMMTests.cpp \
162 VMMR3/HWACCM.cpp \
163 VMMR3/CSAM.cpp \
164 VMMR3/PATM.cpp \
165 VMMR3/PATMPatch.cpp \
166 VMMR3/PATMGuest.cpp \
167 VMMR3/PATMA.asm \
168 VMMR3/PATMSSM.cpp \
169 VMMAll/CPUMAllRegs.cpp \
170 VMMAll/CPUMStack.cpp \
171 VMMAll/DBGFAll.cpp \
172 VMMAll/HWACCMAll.cpp \
173 VMMAll/IOMAll.cpp \
174 VMMAll/IOMAllMMIO.cpp \
175 VMMAll/MMAll.cpp \
176 VMMAll/MMAllHyper.cpp \
177 VMMAll/MMAllPagePool.cpp \
178 VMMAll/PDMAll.cpp \
179 VMMAll/PDMAllCritSect.cpp \
180 VMMAll/PDMAllQueue.cpp \
181 VMMAll/PGMAll.cpp \
182 VMMAll/PGMAllHandler.cpp \
183 VMMAll/PGMAllMap.cpp \
184 VMMAll/PGMAllPhys.cpp \
185 VMMAll/PGMAllPool.cpp \
186 VMMAll/REMAll.cpp \
187 VMMAll/SELMAll.cpp \
188 VMMAll/EMAll.cpp \
189 VMMAll/EMAllA.asm \
190 VMMAll/FTMAll.cpp \
191 VMMAll/IEMAll.cpp \
192 VMMAll/IEMAllAImpl.asm \
193 VMMAll/IEMAllAImplC.cpp \
194 VMMAll/TMAll.cpp \
195 VMMAll/TMAllCpu.cpp \
196 VMMAll/TMAllReal.cpp \
197 VMMAll/TMAllVirtual.cpp \
198 VMMAll/TRPMAll.cpp \
199 VMMAll/VMAll.cpp \
200 VMMAll/VMMAll.cpp \
201 VMMAll/VMMAllA.asm \
202 VMMAll/CSAMAll.cpp \
203 VMMAll/PATMAll.cpp
204ifdef VBOX_WITH_VUSB
205 VBoxVMM_SOURCES += VMMR3/PDMUsb.cpp
206endif
207ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
208 VBoxVMM_SOURCES += \
209 VMMR3/PDMAsyncCompletion.cpp \
210 VMMR3/PDMAsyncCompletionFile.cpp \
211 VMMR3/PDMAsyncCompletionFileFailsafe.cpp \
212 VMMR3/PDMAsyncCompletionFileNormal.cpp
213endif
214ifdef VBOX_WITH_NETSHAPER
215 VBoxVMM_SOURCES += \
216 VMMR3/PDMNetShaper.cpp
217endif
218
219ifdef VBOX_WITH_RAW_MODE
220 VBoxVMM_SOURCES.x86 += \
221 VMMSwitcher/32BitTo32Bit.asm \
222 VMMSwitcher/32BitToPAE.asm \
223 VMMSwitcher/32BitToAMD64.asm \
224 VMMSwitcher/PAETo32Bit.asm \
225 VMMSwitcher/PAEToAMD64.asm \
226 VMMSwitcher/PAEToPAE.asm
227 VBoxVMM_SOURCES.amd64 = \
228 VMMSwitcher/AMD64To32Bit.asm \
229 VMMSwitcher/AMD64ToPAE.asm
230 VBoxVMM_SOURCES.darwin.x86 += \
231 VMMSwitcher/AMD64ToPAE.asm
232endif
233
234VBoxVMM_LIBS = \
235 $(PATH_STAGE_LIB)/DisasmR3$(VBOX_SUFF_LIB)
236ifdef VBOX_WITH_DEBUGGER
237 VBoxVMM_LIBS += \
238 $(PATH_STAGE_LIB)/Debugger$(VBOX_SUFF_LIB)
239endif
240VBoxVMM_LIBS += \
241 $(LIB_REM) \
242 $(LIB_RUNTIME)
243
244VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
245VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
246VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
247VBoxVMM_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxVMM.dylib
248VBoxVMM_LDFLAGS.solaris = -mimpure-text
249
250# SSM wish to know the build type, host os and arch.
251VMMR3/SSM.cpp_DEFS += \
252 KBUILD_TYPE=\"$(KBUILD_TYPE)\" \
253 KBUILD_TARGET=\"$(KBUILD_TARGET)\" \
254 KBUILD_TARGET_ARCH=\"$(KBUILD_TARGET_ARCH)\"
255
256
257#ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
258# ifeq ($(KBUILD_HOST), linux)
259#VBoxVMM_LIBS += aio
260# endif
261#endif
262
263
264if defined(VBOX_WITH_RAW_MODE) && $(intersects $(VBOX_LDR_FMT32), pe lx)
265
266 #
267 # VMMRCBuiltin.lib
268 #
269 LIBRARIES += VMMRCBuiltin
270 VMMRCBuiltin_TEMPLATE = VBoxRc
271 ifeq ($(VBOX_LDR_FMT32),pe)
272 VMMRCBuiltin_SOURCES = VMMRC/VMMRCBuiltin.def
273 endif
274 ifeq ($(VBOX_LDR_FMT32),lx)
275 VMMRCBuiltin_SOURCES = $(VMMRCBuiltin_0_OUTDIR)/VMMRCBuiltin.def
276 $$(VMMRCBuiltin_0_OUTDIR)/VMMRCBuiltin.def: $(PATH_SUB_CURRENT)/VMMRC/VMMRCBuiltin.def | $$(dir $$@)
277 $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' --output $@ $<
278 endif
279
280
281 #
282 # VMMRCImp.lib
283 #
284 LIBRARIES += VMMRCImp
285 VMMRCImp_TEMPLATE = VBoxRc
286 VMMRCImp_SOURCES = $(VMMRCImp_0_OUTDIR)/VMMRC.def
287 VMMRCImp_CLEAN = $(VMMRCImp_0_OUTDIR)/VMMRC.def
288
289 $$(VMMRCImp_0_OUTDIR)/VMMRC.def: $(PATH_SUB_CURRENT)/VMMRC/VMMRC.def | $$(dir $$@)
290 ifeq ($(VBOX_LDR_FMT32),lx)
291 $(SED) \
292 -e '/not-os2/d' \
293 -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' \
294 -e 's/[ \t]DATA[ \t]*/ /' \
295 --output $@ \
296 $<
297 $(APPEND) "$@" ""
298 $(APPEND) "$@" " ___ehInit"
299 else
300 $(SED) \
301 -e '/not-win/d' \
302 -e '/not-$(KBUILD_TARGET_ARCH)/d' \
303 --output $@ $<
304 endif
305
306endif # RC && (pe || lx)
307
308
309if1of ($(VBOX_LDR_FMT), pe lx)
310 #
311 # VMMR0Imp.lib
312 #
313 LIBRARIES += VMMR0Imp
314 VMMR0Imp_TEMPLATE = VBoxR0
315 VMMR0Imp_SOURCES = $(VMMR0Imp_0_OUTDIR)/VMMR0.def
316 VMMR0Imp_CLEAN = $(VMMR0Imp_0_OUTDIR)/VMMR0.def
317
318 $$(VMMR0Imp_0_OUTDIR)/VMMR0.def: $(PATH_SUB_CURRENT)/VMMR0/VMMR0.def | $$(dir $$@)
319 ifeq ($(VBOX_LDR_FMT),lx)
320 $(SED) \
321 -e '/not-os2/d' \
322 -e '/not-amd64/d' \
323 -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' \
324 -e 's/[ \t]DATA[ \t]*/ /' \
325 --output $@ $<
326 $(APPEND) "$@" ""
327 $(APPEND) "$@" " ___ehInit"
328 else
329 $(SED) \
330 -e '/not-win/d' \
331 -e '/not-$(KBUILD_TARGET_ARCH)/d' \
332 --output $@ $<
333 endif
334endif # R0: pe + lx
335
336
337#
338# VMMR3Imp.lib
339#
340IMPORT_LIBS += VMMR3Imp
341$(call VBOX_GENERATE_IMPORT_TARGET_FN,VMMR3Imp,VBoxVMM,VMMR3/VMMR3.def)
342
343
344if defined(VBOX_WITH_RAW_MODE) && !defined(VBOX_ONLY_EXTPACKS)
345 #
346 # VMMRC.gc
347 #
348 SYSMODS += VMMRC
349 VMMRC_TEMPLATE = VBoxRc
350 VMMRC_NAME = VMMGC
351 VMMRC_SYSSUFF = .gc
352
353 VMMRC_DEFS = IN_VMM_RC IN_RT_RC IN_DIS DIS_CORE_ONLY VBOX_WITH_RAW_MODE VBOX_WITH_RAW_MODE_NOT_R0 $(VMM_COMMON_DEFS)
354 ifeq ($(KBUILD_TARGET_ARCH),x86)
355 VMMRC_DEFS.darwin = VMM_R0_SWITCH_STACK
356 VMMRC_DEFS.darwin = \
357 VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_RC \
358 VBOX_WITH_HYBRID_32BIT_KERNEL VBOX_WITH_HYBRID_32BIT_KERNEL_IN_RC
359 endif
360
361 VMMRC_INCS := \
362 include \
363 VMMRC \
364 PATM
365
366 VMMRC_LIBS = \
367 $(PATH_STAGE_LIB)/DisasmRC$(VBOX_SUFF_LIB) \
368 $(PATH_STAGE_LIB)/RuntimeRC$(VBOX_SUFF_LIB)
369 ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
370 VMMRC_LIBS += \
371 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB)
372 endif
373
374 VMMRC_SOURCES = \
375 VBoxVMM.d \
376 VMMRC/VMMRC0.asm \
377 VMMRC/VMMRCDeps.cpp \
378 VMMRC/CPUMRC.cpp \
379 VMMRC/CPUMRCA.asm \
380 VMMRC/EMRCA.asm \
381 VMMRC/IOMRC.cpp \
382 VMMRC/MMRamRC.cpp \
383 VMMRC/MMRamRCA.asm \
384 VMMRC/PDMRCDevice.cpp \
385 VMMRC/PGMRC.cpp \
386 VMMRC/SELMRC.cpp \
387 VMMRC/TRPMRC.cpp \
388 VMMRC/TRPMRCHandlers.cpp \
389 VMMRC/TRPMRCHandlersA.asm \
390 VMMRC/VMMRC.cpp \
391 VMMRC/VMMRCA.asm \
392 VMMRC/HWACCMRCA.asm \
393 VMMRC/CSAMRC.cpp \
394 VMMRC/PATMRC.cpp \
395 VMMRZ/DBGFRZ.cpp \
396 VMMRZ/PGMRZDynMap.cpp \
397 VMMRZ/VMMRZ.cpp \
398 VMMAll/CPUMAllRegs.cpp \
399 VMMAll/CPUMAllA.asm \
400 VMMAll/DBGFAll.cpp \
401 VMMAll/IOMAll.cpp \
402 VMMAll/IOMAllMMIO.cpp \
403 VMMAll/EMAll.cpp \
404 VMMAll/EMAllA.asm \
405 VMMAll/FTMAll.cpp \
406 VMMAll/MMAll.cpp \
407 VMMAll/MMAllHyper.cpp \
408 VMMAll/PDMAll.cpp \
409 VMMAll/PDMAllCritSect.cpp \
410 VMMAll/PDMAllQueue.cpp \
411 VMMAll/PGMAll.cpp \
412 VMMAll/PGMAllHandler.cpp \
413 VMMAll/PGMAllMap.cpp \
414 VMMAll/PGMAllPhys.cpp \
415 VMMAll/PGMAllPool.cpp \
416 VMMAll/REMAll.cpp \
417 VMMAll/SELMAll.cpp \
418 VMMAll/TMAll.cpp \
419 VMMAll/TMAllCpu.cpp \
420 VMMAll/TMAllReal.cpp \
421 VMMAll/TMAllVirtual.cpp \
422 VMMAll/TRPMAll.cpp \
423 VMMAll/VMAll.cpp \
424 VMMAll/VMMAll.cpp \
425 VMMAll/VMMAllA.asm \
426 VMMAll/CSAMAll.cpp \
427 VMMAll/PATMAll.cpp
428 ifeq ($(VBOX_LDR_FMT32),pe)
429 VMMRC_SOURCES += VMMRC/VMMRC.def
430 endif
431 ifeq ($(VBOX_LDR_FMT32),lx)
432 VMMRC_SOURCES += $(VMMRCImp_0_OUTDIR)/VMMRC.def
433 endif
434 ifdef VBOX_WITH_IEM
435 VMMRC_SOURCES += \
436 VMMAll/IEMAll.cpp \
437 VMMAll/IEMAllAImpl.asm \
438 VMMAll/IEMAllAImplC.cpp
439 endif
440
441 # the very last one.
442 VMMRC_SOURCES += VMMRC/VMMRC99.asm
443
444 VMMRC/VMMRCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMRCDeps.cpp to .c
445endif # VBOX_WITH_RAW_MODE && !VBOX_ONLY_EXTPACKS
446
447
448ifndef VBOX_ONLY_EXTPACKS
449 #
450 # VMMR0.r0
451 #
452 SYSMODS += VMMR0
453 VMMR0_TEMPLATE = VBoxR0
454 VMMR0_SYSSUFF = .r0
455
456 VMMR0_DEFS = IN_VMM_R0 IN_RT_R0 IN_DIS DIS_CORE_ONLY IN_GVMM_R0 IN_GMM_R0 IN_INTNET_R0 \
457 $(VMM_COMMON_DEFS) RTASSERT_HAVE_SHOULD_PANIC
458 ## @todo eliminate IN_GVMM_R0 IN_GMM_R0
459 ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
460 VMMR0_DEFS += VBOX_WITH_VMMR0_DISABLE_PREEMPTION
461 endif
462 ifdef VBOX_WITH_PCI_PASSTHROUGH
463 VMMR0_DEFS += IN_PCIRAW_R0
464 endif
465 ifdef VBOX_WITH_TRIPLE_FAULT_HACK
466 VMMR0_DEFS += VBOX_WITH_TRIPLE_FAULT_HACK
467 endif
468 ifdef VBOX_WITH_RAW_MODE
469 VMMR0_DEFS += VBOX_WITH_RAW_MODE
470 endif
471 VMMR0_DEFS.darwin = VMM_R0_SWITCH_STACK
472 VMMR0_DEFS.darwin.x86 = \
473 VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 \
474 VBOX_WITH_HYBRID_32BIT_KERNEL VBOX_WITH_HYBRID_32BIT_KERNEL_IN_R0
475 VMMR0_DEFS.win.amd64 = VBOX_WITH_KERNEL_USING_XMM
476
477 ifeq ($(VBOX_LDR_FMT),elf)
478 VMMR0_LDFLAGS = -e VMMR0EntryEx
479 endif
480 VMMR0_INCS = \
481 include \
482 PATM
483
484 VMMR0_SOURCES = \
485 VBoxVMM.d \
486 VMMR0/CPUMR0.cpp \
487 VMMR0/CPUMR0A.asm \
488 VMMR0/GMMR0.cpp \
489 VMMR0/GVMMR0.cpp \
490 VMMR0/HWACCMR0.cpp \
491 VMMR0/HWACCMR0A.asm \
492 VMMR0/HWSVMR0.cpp \
493 VMMR0/HWVMXR0.cpp \
494 VMMR0/PDMR0Device.cpp \
495 VMMR0/PDMR0Driver.cpp \
496 VMMR0/PGMR0.cpp \
497 VMMR0/PGMR0SharedPage.cpp \
498 VMMR0/TRPMR0.cpp \
499 VMMR0/TRPMR0A.asm \
500 VMMR0/VMMR0.cpp \
501 VMMRZ/DBGFRZ.cpp \
502 VMMRZ/VMMRZ.cpp \
503 VMMAll/CPUMAllA.asm \
504 VMMAll/CPUMAllRegs.cpp \
505 VMMAll/CPUMStack.cpp \
506 VMMAll/DBGFAll.cpp \
507 VMMAll/EMAll.cpp \
508 VMMAll/EMAllA.asm \
509 VMMAll/FTMAll.cpp \
510 VMMAll/HWACCMAll.cpp \
511 VMMAll/IOMAll.cpp \
512 VMMAll/IOMAllMMIO.cpp \
513 VMMAll/MMAll.cpp \
514 VMMAll/MMAllHyper.cpp \
515 VMMAll/MMAllPagePool.cpp \
516 VMMAll/PDMAll.cpp \
517 VMMAll/PDMAllCritSect.cpp \
518 VMMAll/PDMAllQueue.cpp \
519 VMMAll/PGMAll.cpp \
520 VMMAll/PGMAllHandler.cpp \
521 VMMAll/PGMAllMap.cpp \
522 VMMAll/PGMAllPhys.cpp \
523 VMMAll/PGMAllPool.cpp \
524 VMMAll/REMAll.cpp \
525 VMMAll/SELMAll.cpp \
526 VMMAll/TMAll.cpp \
527 VMMAll/TMAllCpu.cpp \
528 VMMAll/TMAllReal.cpp \
529 VMMAll/TMAllVirtual.cpp \
530 VMMAll/TRPMAll.cpp \
531 VMMAll/VMAll.cpp \
532 VMMAll/VMMAll.cpp \
533 VMMAll/VMMAllA.asm
534 if1of ($(VBOX_LDR_FMT), pe lx)
535 VMMR0_SOURCES += $(VMMR0Imp_0_OUTDIR)/VMMR0.def
536 endif
537 ifdef VBOX_WITH_TRIPLE_FAULT_HACK
538 VMMR0_SOURCES += \
539 VMMR0/VMMR0TripleFaultHack.cpp \
540 VMMR0/VMMR0TripleFaultHackA.asm
541 endif
542 ifdef VBOX_WITH_IEM
543 VMMR0_SOURCES += \
544 VMMAll/IEMAll.cpp \
545 VMMAll/IEMAllAImpl.asm \
546 VMMAll/IEMAllAImplC.cpp
547 endif
548 ifdef VBOX_WITH_NETSHAPER
549 VMMR0_SOURCES += \
550 VMMR0/PDMNetShaperR0.cpp
551 endif
552 VMMR0_SOURCES.amd64 = \
553 VMMR0/VMMR0JmpA-amd64.asm
554 VMMR0_SOURCES.x86 = \
555 VMMR0/VMMR0JmpA-x86.asm
556 VMMR0_SOURCES.darwin.x86 = \
557 VMMRZ/PGMRZDynMap.cpp
558
559 VMMR0_LIBS = \
560 $(PATH_STAGE_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
561 $(PATH_STAGE_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
562 $(PATH_STAGE_LIB)/DisasmR0$(VBOX_SUFF_LIB)
563 ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
564 VMMR0_LIBS += \
565 $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
566 endif
567endif # !VBOX_ONLY_EXTPACKS
568
569
570ifndef VBOX_ONLY_EXTPACKS
571 #
572 # SSMStandalone.lib/a for linking with VBoxSVC and other executables.
573 #
574 LIBRARIES += SSMStandalone
575 SSMStandalone_TEMPLATE = VBOXR3EXE
576 SSMStandalone_DEFS = IN_VMM_R3 IN_VMM_STATIC SSM_STANDALONE
577 SSMStandalone_INCS = include
578 SSMStandalone_SOURCES = VMMR3/SSM.cpp
579endif # !VBOX_ONLY_EXTPACKS
580
581
582if !defined(VBOX_ONLY_EXTPACKS) \
583 && ( defined(VBOX_WITH_DTRACE_R3) \
584 || defined(VBOX_WITH_DTRACE_R0) \
585 || defined(VBOX_WITH_DTRACE_RC))
586 #
587 # Install the dtrace library files.
588 #
589 INSTALLS += VMMLibDTrace
590 VMMLibDTrace_INST = $(VBOX_INST_DTRACE_LIB)$(KBUILD_TARGET_ARCH)/
591 VMMLibDTrace_SOURCES = \
592 dtrace/lib/vbox-types.d \
593 dtrace/lib/$(KBUILD_TARGET_ARCH)/vbox-arch-types.d \
594 $(VMMLibDTrace_0_OUTDIR)/vm.d \
595 $(VMMLibDTrace_0_OUTDIR)/cpumctx.d \
596 $(VMMLibDTrace_0_OUTDIR)/CPUMInternal.d \
597 $(VMMLibDTrace_0_OUTDIR)/x86.d \
598
599
600 ##
601 # Turn the header $2 into the DTrace library script $1.
602 #
603 define def_vmm_lib_dtrace_preprocess
604 $$$$(VMMLibDTrace_0_OUTDIR)/$1: $2 $$(VBOX_VBOXCPP) | $$$$(dir $$$$@)
605 $$(QUIET)$$(call MSG_GENERATE,VMMLibDTrace,$$@,$$<)
606 $$(QUIET)$(VBOX_VBOXCPP) -d \
607 -D VBOX_FOR_DTRACE_LIB \
608 -D VBOX_FOR_DTRACE_LIB_$(toupper $(KBUILD_TARGET_ARCH)) \
609 -D IN_RING0 \
610 -D RT_C_DECLS_BEGIN= \
611 -D RT_C_DECLS_END= \
612 -D 'RCPTRTYPE(a_Type)=RTRCPTR' \
613 -D 'R3PTRTYPE(a_Type)=RTR3PTR' \
614 -D 'R0PTRTYPE(a_Type)=a_Type' \
615 -D 'AssertCompile(a_Expr)=' \
616 -D 'AssertCompileSize(a_Stuct, a_Size)=' \
617 -D 'bool=uint8_t' \
618 $$(foreach def,\
619 $$(DEFS) \
620 $$(DEFS.$$(KBUILD_TARGET)) \
621 $$(DEFS.$(KBUILD_TARGET_ARCH)) \
622 $$(VMM_COMMON_DEFS) \
623 $$(ARCH_BITS_DEFS)\
624 ,-D '$$(def)') \
625 $$< \
626 $$@
627 $$(QUIET)$$(CHMOD) 644 $$@
628 endef
629 $(evalcall2 def_vmm_lib_dtrace_preprocess,vm.d,$(PATH_ROOT)/include/VBox/vmm/vm.h)
630 $(evalcall2 def_vmm_lib_dtrace_preprocess,cpumctx.d,$(PATH_ROOT)/include/VBox/vmm/cpumctx.h)
631 $(evalcall2 def_vmm_lib_dtrace_preprocess,CPUMInternal.d,$(PATH_SUB_CURRENT)/include/CPUMInternal.h)
632 $(evalcall2 def_vmm_lib_dtrace_preprocess,x86.d,$(PATH_ROOT)/include/iprt/x86.h)
633
634endif
635
636
637
638#
639# For vmmGetSvnRev.
640#
641VMMAll/VMMAll.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
642
643#
644# Disable annoying warnings about array subscript above array bounds in aPages[]
645#
646ifneq ($(KBUILD_TARGET),win)
647 VMMR3/PGMPool.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
648 VMMAll/PGMAllPool.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
649 VMMAll/PGMAll.cpp_CXXFLAGS = -Wno-unused-function
650 VMMAll/IEMAll.cpp_CXXFLAGS = -Wno-unused-parameter
651endif
652
653#
654# Always optimize the interpreter.
655#
656if1of ($(KBUILD_TARGET), win)
657 # -noover is recognized despite the statement saying otherwise. It silences these warnings:
658 # cl : Command line warning D9025 : overriding '/Od' with '/O2'
659 # cl : Command line warning D9025 : overriding '/Oy-' with '/Oy'
660 VMMAll/IEMAll.cpp_CXXFLAGS += -noover -O2xy
661else
662 VMMAll/IEMAll.cpp_CXXFLAGS += -O2
663 #VMMAll/IEMAll.cpp_CXXFLAGS += -fno-align-functions -fno-align-jumps -fno-align-loops # Saves a few of percents, not worth it.
664 #VMMAll/IEMAll.cpp_CXXFLAGS += -fno-reorder-blocks # Saves one or two percent ... never mind.
665 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?)
666endif
667
668
669include $(FILE_KBUILD_SUB_FOOTER)
670
671
672# Alias the PGM templates to the object in which they are defined.
673PGMInternal.o \
674PGMBth.o PGMGst.o PGMShw.o \
675PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
676
677PGMAllBth.o PGMAllGst.o PGMAllShw.o \
678PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
679
680PGMRCBth.o PGMRCGst.o PGMRCShw.o \
681PGMRCBth.obj PGMRCGst.obj PGMRCShw.obj: PGMRC.o
682
683PGMPhysRWTmpl.o PGMPhysRWTmpl.obj: PGMPhys.o
684
685PGMInline.o PGMInline.obj: PGMDbg.o
686
687# Alias the IEM templates to the object in which they are instantiated.
688IEMInternal.o \
689IEMAllInstructions.cpp.o IEMAllInstructions.cpp.obj \
690IEMAllCImpl.cpp.o IEMAllCImpl.cpp.obj \
691IEMAllCImplStrInstr.cpp.o IEMAllCImplStrInstr.cpp.obj: IEMAll.o
692
693# Alias the switcher templates.
694PAEand32Bit.o PAEand32Bit.obj: PAETo32Bit.o PAEToPAE.o 32BitTo32Bit.o PAETo32Bit.o
695LegacyandAMD64.o LegacyandAMD64.obj: 32BitToAMD64.o PAEToAMD64.o
696AMD64andLegacy.o AMD64andLegacy.obj: AMD64To32Bit.o AMD64ToPAE.o
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette