VirtualBox

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

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

dtrace ring-3 on solaris.

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