VirtualBox

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

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

build fix attempt.

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