VirtualBox

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

Last change on this file since 41074 was 41074, checked in by vboxsync, 13 years ago

VMM preloader.

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