VirtualBox

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

Last change on this file since 42138 was 42062, checked in by vboxsync, 12 years ago

NetShaper: R0 support (#5582)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 17.5 KB
Line 
1# $Id: Makefile.kmk 42062 2012-07-09 15:10:00Z 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_RAW_MODE
36 VMM_COMMON_DEFS += VBOX_WITH_RAW_MODE
37endif
38ifdef VBOX_WITH_IEM
39 VMM_COMMON_DEFS += VBOX_WITH_IEM
40endif
41ifdef VBOX_WITH_REM
42 VMM_COMMON_DEFS += VBOX_WITH_REM
43endif
44ifdef VBOX_WITH_MULTI_CORE
45 VMM_COMMON_DEFS += VBOX_WITH_MULTI_CORE
46endif
47ifdef VBOX_WITH_R0_LOGGING
48 VMM_COMMON_DEFS += VBOX_WITH_R0_LOGGING
49endif
50ifdef VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI
51 VMM_COMMON_DEFS += VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI
52endif
53ifdef VBOX_WITH_PCI_PASSTHROUGH
54 VMM_COMMON_DEFS += VBOX_WITH_PCI_PASSTHROUGH
55endif
56ifdef VBOX_WITH_DTRACE_RC
57 VMM_COMMON_DEFS += VBOX_WITH_DTRACE_RC
58endif
59# VMM_COMMON_DEFS += VBOX_WITH_NS_ACCOUNTING_STATS
60
61# Special IEM debug mode which compares the result with REM.
62ifdef IEM_VERIFICATION_MODE
63 VMM_COMMON_DEFS += IEM_VERIFICATION_MODE
64endif
65
66
67#
68# The VMM DLL.
69#
70ifndef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
71 DLLS += VBoxVMM
72endif
73VBoxVMM_TEMPLATE = VBoxR3DllNoPic
74VBoxVMM_SONAME.linux = VBoxVMM.so
75
76VBoxVMM_DEFS = IN_VMM_R3 IN_DIS IN_GMM_R3 IN_DBG $(VMM_COMMON_DEFS)
77## @todo eliminate IN_GMM_R3
78ifdef VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
79 VBoxVMM_DEFS += VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
80endif
81ifdef VBOX_WITH_VUSB
82 VBoxVMM_DEFS += VBOX_WITH_USB
83endif
84ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
85 VBoxVMM_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
86endif
87ifdef VBOX_WITH_NETSHAPER
88 VBoxVMM_DEFS += VBOX_WITH_NETSHAPER
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 $(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 VMMR0_DEFS.darwin = VMM_R0_SWITCH_STACK
469 VMMR0_DEFS.darwin.x86 = \
470 VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 \
471 VBOX_WITH_HYBRID_32BIT_KERNEL VBOX_WITH_HYBRID_32BIT_KERNEL_IN_R0
472 VMMR0_DEFS.win.amd64 = VBOX_WITH_KERNEL_USING_XMM
473
474 ifeq ($(VBOX_LDR_FMT),elf)
475 VMMR0_LDFLAGS = -e VMMR0EntryEx
476 endif
477 VMMR0_INCS = \
478 include \
479 PATM
480
481 VMMR0_SOURCES = \
482 VBoxVMM.d \
483 VMMR0/CPUMR0.cpp \
484 VMMR0/CPUMR0A.asm \
485 VMMR0/GMMR0.cpp \
486 VMMR0/GVMMR0.cpp \
487 VMMR0/HWACCMR0.cpp \
488 VMMR0/HWACCMR0A.asm \
489 VMMR0/HWSVMR0.cpp \
490 VMMR0/HWVMXR0.cpp \
491 VMMR0/PDMR0Device.cpp \
492 VMMR0/PDMR0Driver.cpp \
493 VMMR0/PGMR0.cpp \
494 VMMR0/PGMR0SharedPage.cpp \
495 VMMR0/TRPMR0.cpp \
496 VMMR0/TRPMR0A.asm \
497 VMMR0/VMMR0.cpp \
498 VMMRZ/DBGFRZ.cpp \
499 VMMRZ/VMMRZ.cpp \
500 VMMAll/CPUMAllA.asm \
501 VMMAll/CPUMAllRegs.cpp \
502 VMMAll/CPUMStack.cpp \
503 VMMAll/DBGFAll.cpp \
504 VMMAll/EMAll.cpp \
505 VMMAll/EMAllA.asm \
506 VMMAll/FTMAll.cpp \
507 VMMAll/HWACCMAll.cpp \
508 VMMAll/IOMAll.cpp \
509 VMMAll/IOMAllMMIO.cpp \
510 VMMAll/MMAll.cpp \
511 VMMAll/MMAllHyper.cpp \
512 VMMAll/MMAllPagePool.cpp \
513 VMMAll/PDMAll.cpp \
514 VMMAll/PDMAllCritSect.cpp \
515 VMMAll/PDMAllQueue.cpp \
516 VMMAll/PGMAll.cpp \
517 VMMAll/PGMAllHandler.cpp \
518 VMMAll/PGMAllMap.cpp \
519 VMMAll/PGMAllPhys.cpp \
520 VMMAll/PGMAllPool.cpp \
521 VMMAll/REMAll.cpp \
522 VMMAll/SELMAll.cpp \
523 VMMAll/TMAll.cpp \
524 VMMAll/TMAllCpu.cpp \
525 VMMAll/TMAllReal.cpp \
526 VMMAll/TMAllVirtual.cpp \
527 VMMAll/TRPMAll.cpp \
528 VMMAll/VMAll.cpp \
529 VMMAll/VMMAll.cpp \
530 VMMAll/VMMAllA.asm
531 if1of ($(VBOX_LDR_FMT), pe lx)
532 VMMR0_SOURCES += $(VMMR0Imp_0_OUTDIR)/VMMR0.def
533 endif
534 ifdef VBOX_WITH_TRIPLE_FAULT_HACK
535 VMMR0_SOURCES += \
536 VMMR0/VMMR0TripleFaultHack.cpp \
537 VMMR0/VMMR0TripleFaultHackA.asm
538 endif
539 ifdef VBOX_WITH_IEM
540 VMMR0_SOURCES += \
541 VMMAll/IEMAll.cpp \
542 VMMAll/IEMAllAImpl.asm \
543 VMMAll/IEMAllAImplC.cpp
544 endif
545 ifdef VBOX_WITH_NETSHAPER
546 VMMR0_SOURCES += \
547 VMMR0/PDMNetShaperR0.cpp
548 endif
549 VMMR0_SOURCES.amd64 = \
550 VMMR0/VMMR0JmpA-amd64.asm
551 VMMR0_SOURCES.x86 = \
552 VMMR0/VMMR0JmpA-x86.asm
553 VMMR0_SOURCES.darwin.x86 = \
554 VMMRZ/PGMRZDynMap.cpp
555
556 VMMR0_LIBS = \
557 $(PATH_STAGE_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
558 $(PATH_STAGE_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
559 $(PATH_STAGE_LIB)/DisasmR0$(VBOX_SUFF_LIB)
560 ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
561 VMMR0_LIBS += \
562 $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
563 endif
564endif # !VBOX_ONLY_EXTPACKS
565
566
567ifndef VBOX_ONLY_EXTPACKS
568 #
569 # SSMStandalone.lib/a for linking with VBoxSVC and other executables.
570 #
571 LIBRARIES += SSMStandalone
572 SSMStandalone_TEMPLATE = VBOXR3EXE
573 SSMStandalone_DEFS = IN_VMM_R3 IN_VMM_STATIC SSM_STANDALONE
574 SSMStandalone_INCS = include
575 SSMStandalone_SOURCES = VMMR3/SSM.cpp
576endif # !VBOX_ONLY_EXTPACKS
577
578
579if !defined(VBOX_ONLY_EXTPACKS) \
580 && ( defined(VBOX_WITH_DTRACE_R3) \
581 || defined(VBOX_WITH_DTRACE_R0) \
582 || defined(VBOX_WITH_DTRACE_RC))
583 #
584 # Install the dtrace library files.
585 #
586 INSTALLS += VMMLibDTrace
587 VMMLibDTrace_INST = $(VBOX_INST_DTRACE_LIB)$(KBUILD_TARGET_ARCH)/
588 VMMLibDTrace_SOURCES = \
589 dtrace/lib/vbox-types.d \
590 dtrace/lib/$(KBUILD_TARGET_ARCH)/vbox-arch-types.d \
591 $(VMMLibDTrace_0_OUTDIR)/vm.d \
592 $(VMMLibDTrace_0_OUTDIR)/cpumctx.d \
593 $(VMMLibDTrace_0_OUTDIR)/CPUMInternal.d \
594 $(VMMLibDTrace_0_OUTDIR)/x86.d \
595
596
597 ##
598 # Turn the header $2 into the DTrace library script $1.
599 #
600 define def_vmm_lib_dtrace_preprocess
601 $$$$(VMMLibDTrace_0_OUTDIR)/$1: $2 $$(VBOX_VBOXCPP) | $$$$(dir $$$$@)
602 $$(QUIET)$$(call MSG_GENERATE,VMMLibDTrace,$$@,$$<)
603 $$(QUIET)$(VBOX_VBOXCPP) -d \
604 -D VBOX_FOR_DTRACE_LIB \
605 -D VBOX_FOR_DTRACE_LIB_$(toupper $(KBUILD_TARGET_ARCH)) \
606 -D IN_RING0 \
607 -D RT_C_DECLS_BEGIN= \
608 -D RT_C_DECLS_END= \
609 -D 'RCPTRTYPE(a_Type)=RTRCPTR' \
610 -D 'R3PTRTYPE(a_Type)=RTR3PTR' \
611 -D 'R0PTRTYPE(a_Type)=a_Type' \
612 -D 'AssertCompile(a_Expr)=' \
613 -D 'AssertCompileSize(a_Stuct, a_Size)=' \
614 -D 'bool=uint8_t' \
615 $$(foreach def,\
616 $$(DEFS) \
617 $$(DEFS.$$(KBUILD_TARGET)) \
618 $$(DEFS.$(KBUILD_TARGET_ARCH)) \
619 $$(VMM_COMMON_DEFS) \
620 $$(ARCH_BITS_DEFS)\
621 ,-D '$$(def)') \
622 $$< \
623 $$@
624 $$(QUIET)$$(CHMOD) 644 $$@
625 endef
626 $(evalcall2 def_vmm_lib_dtrace_preprocess,vm.d,$(PATH_ROOT)/include/VBox/vmm/vm.h)
627 $(evalcall2 def_vmm_lib_dtrace_preprocess,cpumctx.d,$(PATH_ROOT)/include/VBox/vmm/cpumctx.h)
628 $(evalcall2 def_vmm_lib_dtrace_preprocess,CPUMInternal.d,$(PATH_SUB_CURRENT)/include/CPUMInternal.h)
629 $(evalcall2 def_vmm_lib_dtrace_preprocess,x86.d,$(PATH_ROOT)/include/iprt/x86.h)
630
631endif
632
633
634
635#
636# For vmmGetSvnRev.
637#
638VMMAll/VMMAll.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
639
640#
641# Disable annoying warnings about array subscript above array bounds in aPages[]
642#
643ifneq ($(KBUILD_TARGET),win)
644 VMMR3/PGMPool.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
645 VMMAll/PGMAllPool.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
646 VMMAll/PGMAll.cpp_CXXFLAGS = -Wno-unused-function
647 VMMAll/IEMAll.cpp_CXXFLAGS = -Wno-unused-parameter
648endif
649
650#
651# Always optimize the interpreter.
652#
653if1of ($(KBUILD_TARGET), win)
654#VMMAll/IEMAll.cpp_CXXFLAGS += TODO
655#else if1of ($(KBUILD_TARGET_ARCH), amd64)
656# VMMAll/IEMAll.cpp_CXXFLAGS += -O2 -fomit-frame-pointer
657else
658 VMMAll/IEMAll.cpp_CXXFLAGS += -O2
659 #VMMAll/IEMAll.cpp_CXXFLAGS += -fno-align-functions -fno-align-jumps -fno-align-loops # Saves a few of percents, not worth it.
660 #VMMAll/IEMAll.cpp_CXXFLAGS += -fno-reorder-blocks # Saves one or two percent ... never mind.
661 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?)
662endif
663
664
665include $(FILE_KBUILD_SUB_FOOTER)
666
667
668# Alias the PGM templates to the object in which they are defined.
669PGMInternal.o \
670PGMBth.o PGMGst.o PGMShw.o \
671PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
672
673PGMAllBth.o PGMAllGst.o PGMAllShw.o \
674PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
675
676PGMRCBth.o PGMRCGst.o PGMRCShw.o \
677PGMRCBth.obj PGMRCGst.obj PGMRCShw.obj: PGMRC.o
678
679PGMPhysRWTmpl.o PGMPhysRWTmpl.obj: PGMPhys.o
680
681PGMInline.o PGMInline.obj: PGMDbg.o
682
683# Alias the IEM templates to the object in which they are instantiated.
684IEMInternal.o \
685IEMAllInstructions.cpp.o IEMAllInstructions.cpp.obj \
686IEMAllCImpl.cpp.o IEMAllCImpl.cpp.obj \
687IEMAllCImplStrInstr.cpp.o IEMAllCImplStrInstr.cpp.obj: IEMAll.o
688
689# Alias the switcher templates.
690PAEand32Bit.o PAEand32Bit.obj: PAETo32Bit.o PAEToPAE.o 32BitTo32Bit.o PAETo32Bit.o
691LegacyandAMD64.o LegacyandAMD64.obj: 32BitToAMD64.o PAEToAMD64.o
692AMD64andLegacy.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