VirtualBox

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

Last change on this file since 18004 was 17294, checked in by vboxsync, 16 years ago

PGM: started looking at direct access of PGMPAGE::HCPhys and the HCPtr/mapping nightmare.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 11.7 KB
Line 
1# $Id: Makefile.kmk 17294 2009-03-03 15:51:21Z vboxsync $
2## @file
3# Top-level makefile for the VMM.
4#
5
6#
7# Copyright (C) 2006-2007 Sun Microsystems, Inc.
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# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22SUB_DEPTH = ../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25# Include sub-makefiles.
26include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
27
28
29#
30# VMMR3.dll
31#
32LIBRARIES += VMMR3
33
34VMMR3_TEMPLATE = VBOXR3
35VMMR3_DEFS = IN_VMM_R3 IN_DIS IN_GMM_R3 IN_DBG
36## @todo eliminate IN_GMM_R3
37ifdef VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
38VMMR3_DEFS += VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
39endif
40ifdef VBOX_WITH_R0_LOGGING
41VMMR3_DEFS += VBOX_WITH_R0_LOGGING
42endif
43ifdef VBOX_WITH_NEW_RECOMPILER
44VMMR3_DEFS += VBOX_WITH_NEW_RECOMPILER
45endif
46VMMR3_DEFS.darwin.x86 = \
47 VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R3 \
48 VBOX_WITH_HYBRID_32BIT_KERNEL VBOX_WITH_HYBRID_32BIT_KERNEL_IN_R3
49VMMR3_INCS := \
50 $(PATH_SUB_CURRENT) \
51 PATM
52
53VMMR3_SOURCES = \
54 CFGM.cpp \
55 CPUM.cpp \
56 DBGF.cpp \
57 DBGFAddr.cpp \
58 DBGFBp.cpp \
59 DBGFDisas.cpp \
60 DBGFInfo.cpp \
61 DBGFLog.cpp \
62 DBGFMem.cpp \
63 DBGFOS.cpp \
64 DBGFStack.cpp \
65 DBGFSym.cpp \
66 EM.cpp \
67 IOM.cpp \
68 GMM.cpp \
69 MM.cpp \
70 MMHeap.cpp \
71 MMHyper.cpp \
72 MMPagePool.cpp \
73 MMPhys.cpp \
74 PDM.cpp \
75 PDMDevice.cpp \
76 PDMDevHlp.cpp \
77 PDMDevMiscHlp.cpp \
78 PDMDriver.cpp \
79 PDMLdr.cpp \
80 PDMCritSect.cpp \
81 PDMQueue.cpp \
82 PDMThread.cpp \
83 PGM.cpp \
84 PGMDbg.cpp \
85 PGMHandler.cpp \
86 PGMMap.cpp \
87 PGMPhys.cpp \
88 PGMPool.cpp \
89 SELM.cpp \
90 SSM.cpp \
91 STAM.cpp \
92 TM.cpp \
93 TRPM.cpp \
94 VM.cpp \
95 VMEmt.cpp \
96 VMReq.cpp \
97 VMM.cpp \
98 VMMGuruMeditation.cpp \
99 VMMSwitcher.cpp \
100 VMMTests.cpp \
101 HWACCM.cpp \
102 VMMAll/CPUMAllRegs.cpp \
103 VMMAll/CPUMStack.cpp \
104 VMMAll/DBGFAll.cpp \
105 VMMAll/HWACCMAll.cpp \
106 VMMAll/IOMAll.cpp \
107 VMMAll/IOMAllMMIO.cpp \
108 VMMAll/MMAll.cpp \
109 VMMAll/MMAllHyper.cpp \
110 VMMAll/MMAllPagePool.cpp \
111 VMMAll/PDMAll.cpp \
112 VMMAll/PDMAllCritSect.cpp \
113 VMMAll/PDMAllQueue.cpp \
114 VMMAll/PGMAll.cpp \
115 VMMAll/PGMAllHandler.cpp \
116 VMMAll/PGMAllMap.cpp \
117 VMMAll/PGMAllPhys.cpp \
118 VMMAll/PGMAllPool.cpp \
119 VMMAll/REMAll.cpp \
120 VMMAll/SELMAll.cpp \
121 VMMAll/EMAll.cpp \
122 VMMAll/EMAllA.asm \
123 VMMAll/TMAll.cpp \
124 VMMAll/TMAllCpu.cpp \
125 VMMAll/TMAllReal.cpp \
126 VMMAll/TMAllVirtual.cpp \
127 VMMAll/TRPMAll.cpp \
128 VMMAll/VMAll.cpp \
129 VMMAll/VMMAll.cpp \
130 PATM/CSAM.cpp \
131 PATM/VMMAll/CSAMAll.cpp \
132 PATM/PATM.cpp \
133 PATM/PATMPatch.cpp \
134 PATM/PATMGuest.cpp \
135 PATM/PATMA.asm \
136 PATM/PATMSSM.cpp \
137 PATM/VMMAll/PATMAll.cpp
138VMMR3_SOURCES.x86 += \
139 VMMSwitcher/32BitTo32Bit.asm \
140 VMMSwitcher/32BitToPAE.asm \
141 VMMSwitcher/32BitToAMD64.asm \
142 VMMSwitcher/PAETo32Bit.asm \
143 VMMSwitcher/PAEToAMD64.asm \
144 VMMSwitcher/PAEToPAE.asm
145VMMR3_SOURCES.amd64 = \
146 VMMSwitcher/AMD64To32Bit.asm \
147 VMMSwitcher/AMD64ToPAE.asm
148VMMR3_SOURCES.darwin.x86 += \
149 VMMSwitcher/AMD64ToPAE.asm
150
151ifdef VBOX_WITH_VMI
152VMMR3_DEFS += \
153 VBOX_WITH_VMI
154VMMR3_INCS += \
155 PARAV
156VMMR3_SOURCES += \
157 PARAV/PARAV.cpp \
158 PARAV/PARAVAll.cpp
159endif
160
161ifdef VBOX_WITH_USB
162VMMR3_DEFS += VBOX_WITH_USB
163VMMR3_SOURCES += PDMUsb.cpp
164endif
165
166ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
167VMMR3_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
168VMMR3_DEFS.linux += __USE_FILE_OFFSET64 __USE_LARGEFILE64
169VMMR3_SOURCES += PDMAsyncCompletion.cpp
170VMMR3_SOURCES.linux += \
171 PDMAsyncCompletionSocketPosix.cpp \
172 PDMAsyncCompletionHostPosix.cpp
173
174VMMR3_SOURCES.win += \
175 PDMAsyncCompletionSocketWin.cpp \
176 PDMAsyncCompletionHostWin.cpp
177
178VMMR3_SOURCES.solaris += \
179 PDMAsyncCompletionSocketPosix.cpp \
180 PDMAsyncCompletionHostSolaris.cpp
181
182VMMR3_SOURCES.darwin += \
183 PDMAsyncCompletionSocketPosix.cpp \
184 PDMAsyncCompletionHostPosix.cpp
185
186VMMR3_SOURCES.freebsd += \
187 PDMAsyncCompletionSocketPosix.cpp \
188 PDMAsyncCompletionHostFreeBSD.cpp
189
190endif
191
192#
193# The VMM DLL.
194#
195DLLS += VBoxVMM
196
197VBoxVMM_TEMPLATE = VBOXR3
198VBoxVMM_DEFS = $(VMMR3_DEFS)
199VBoxVMM_DEFS.$(KBUILD_TARGET) = $(VMMR3_DEFS.$(KBUILD_TARGET))
200VBoxVMM_SOURCES = VBoxVMMDeps.cpp
201VBoxVMM_SONAME.linux = VBoxVMM.so
202
203VBoxVMM_LIBS = \
204 $(PATH_LIB)/VMMR3$(VBOX_SUFF_LIB) \
205 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
206ifdef VBOX_WITH_DEBUGGER
207VBoxVMM_LIBS += \
208 $(PATH_LIB)/Debugger$(VBOX_SUFF_LIB)
209endif
210VBoxVMM_LIBS += \
211 $(LIB_REM) \
212 $(LIB_RUNTIME)
213
214VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
215VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
216VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
217VBoxVMM_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxVMM.dylib
218VBoxVMM_LDFLAGS.solaris = -mimpure-text
219#ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
220# ifeq ($(KBUILD_HOST), linux)
221#VBoxVMM_LIBS += aio
222# endif
223#endif
224
225if1of ($(VBOX_LDR_FMT32), pe lx)
226
227#
228# VMMGCBuiltin.lib
229#
230LIBRARIES += VMMGCBuiltin
231VMMGCBuiltin_TEMPLATE = VBOXGC
232 ifeq ($(VBOX_LDR_FMT32),pe)
233VMMGCBuiltin_SOURCES = VMMGC/VMMGCBuiltin.def
234 endif
235 ifeq ($(VBOX_LDR_FMT32),lx)
236VMMGCBuiltin_SOURCES = $(PATH_VMMGCBuiltin)/VMMGCBuiltin.def
237$$(PATH_VMMGCBuiltin)/VMMGCBuiltin.def: $(PATH_SUB_CURRENT)/VMMGC/VMMGCBuiltin.def | $$(dir $$@)
238 $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' --output $@ $<
239 endif
240
241
242#
243# VMMGCImp.lib
244#
245LIBRARIES += VMMGCImp
246VMMGCImp_TEMPLATE = VBOXGC
247VMMGCImp_SOURCES = $(PATH_VMMGCImp)/VMMGC.def
248VMMGCImp_CLEAN = $(PATH_VMMGCImp)/VMMGC.def
249
250$$(PATH_VMMGCImp)/VMMGC.def: $(PATH_SUB_CURRENT)/VMMGC/VMMGC.def | $$(dir $$@)
251 ifeq ($(VBOX_LDR_FMT32),lx)
252 $(SED) \
253 -e '/not-os2/d' \
254 -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' \
255 -e 's/[ \t]DATA[ \t]*/ /' \
256 --output $@ \
257 $<
258 $(APPEND) "$@" ""
259 $(APPEND) "$@" " ___ehInit"
260 else
261 $(SED) \
262 -e '/not-win/d' \
263 -e '/not-$(KBUILD_TARGET_ARCH)/d' \
264 --output $@ $<
265 endif
266
267endif # RC: pe + lx
268
269ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
270#
271# VMMR0Imp.lib
272#
273LIBRARIES += VMMR0Imp
274VMMR0Imp_TEMPLATE = VBOXR0
275VMMR0Imp_SOURCES = $(PATH_VMMR0Imp)/VMMR0.def
276VMMR0Imp_CLEAN = $(PATH_VMMR0Imp)/VMMR0.def
277
278$$(PATH_VMMR0Imp)/VMMR0.def: $(PATH_SUB_CURRENT)/VMMR0/VMMR0.def | $$(dir $$@)
279 ifeq ($(VBOX_LDR_FMT),lx)
280 $(SED) \
281 -e '/not-os2/d' \
282 -e '/not-amd64/d' \
283 -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' \
284 -e 's/[ \t]DATA[ \t]*/ /' \
285 --output $@ $<
286 $(APPEND) "$@" ""
287 $(APPEND) "$@" " ___ehInit"
288 else
289 $(SED) \
290 -e '/not-win/d' \
291 -e '/not-$(KBUILD_TARGET_ARCH)/d' \
292 --output $@ $<
293 endif
294endif # R0: pe + lx
295
296
297#
298# VMMGC.gc
299#
300SYSMODS += VMMGC
301VMMGC_TEMPLATE = VBOXGC
302VMMGC_INCS := \
303 $(PATH_SUB_CURRENT) \
304 VMMGC \
305 PATM
306VMMGC_DEFS = IN_VMM_RC IN_RT_GC IN_RT_RC IN_DIS DIS_CORE_ONLY
307ifdef VBOX_WITH_R0_LOGGING
308VMMGC_DEFS += VBOX_WITH_R0_LOGGING
309endif
310ifdef VBOX_WITH_NEW_RECOMPILER
311VMMGC_DEFS += VBOX_WITH_NEW_RECOMPILER
312endif
313ifeq ($(KBUILD_TARGET_ARCH),x86)
314VMMGC_DEFS.darwin = \
315 VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_RC \
316 VBOX_WITH_HYBRID_32BIT_KERNEL VBOX_WITH_HYBRID_32BIT_KERNEL_IN_RC
317endif
318VMMGC_SYSSUFF = .gc
319VMMGC_LIBS = \
320 $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
321 $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
322ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
323VMMGC_LIBS += \
324 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
325endif
326ifeq ($(VBOX_LDR_FMT32),pe)
327VMMGC_LDFLAGS = -Entry:VMMGCEntry
328endif
329VMMGC_SOURCES = \
330 VMMGC/VMMGC0.asm \
331 VMMGC/VMMGCDeps.cpp \
332 VMMGC/CPUMGC.cpp \
333 VMMGC/CPUMGCA.asm \
334 VMMGC/EMGCA.asm \
335 VMMGC/DBGFGC.cpp \
336 VMMGC/IOMGC.cpp \
337 VMMGC/MMRamGC.cpp \
338 VMMGC/MMRamGCA.asm \
339 VMMGC/PDMGCDevice.cpp \
340 VMMGC/PGMGC.cpp \
341 VMMGC/SELMGC.cpp \
342 VMMGC/TRPMGC.cpp \
343 VMMGC/TRPMGCHandlers.cpp \
344 VMMGC/TRPMGCHandlersA.asm \
345 VMMGC/VMMGC.cpp \
346 VMMGC/VMMGCA.asm \
347 VMMAll/CPUMAllRegs.cpp \
348 VMMAll/CPUMAllA.asm \
349 VMMAll/DBGFAll.cpp \
350 VMMGC/HWACCMGCA.asm \
351 VMMAll/IOMAll.cpp \
352 VMMAll/IOMAllMMIO.cpp \
353 VMMAll/EMAll.cpp \
354 VMMAll/EMAllA.asm \
355 VMMAll/MMAll.cpp \
356 VMMAll/MMAllHyper.cpp \
357 VMMAll/PDMAll.cpp \
358 VMMAll/PDMAllCritSect.cpp \
359 VMMAll/PDMAllQueue.cpp \
360 VMMAll/PGMAll.cpp \
361 VMMAll/PGMAllHandler.cpp \
362 VMMAll/PGMAllMap.cpp \
363 VMMAll/PGMAllPhys.cpp \
364 VMMAll/PGMAllPool.cpp \
365 VMMAll/REMAll.cpp \
366 VMMAll/SELMAll.cpp \
367 VMMAll/TMAll.cpp \
368 VMMAll/TMAllCpu.cpp \
369 VMMAll/TMAllReal.cpp \
370 VMMAll/TMAllVirtual.cpp \
371 VMMAll/TRPMAll.cpp \
372 VMMAll/VMAll.cpp \
373 VMMAll/VMMAll.cpp \
374 PATM/VMMGC/CSAMGC.cpp \
375 PATM/VMMAll/CSAMAll.cpp \
376 PATM/VMMGC/PATMGC.cpp \
377 PATM/VMMAll/PATMAll.cpp
378
379ifeq ($(VBOX_LDR_FMT32),pe)
380VMMGC_SOURCES += VMMGC/VMMGC.def
381endif
382ifeq ($(VBOX_LDR_FMT32),lx)
383VMMGC_SOURCES += $(PATH_VMMGCImp)/VMMGC.def
384endif
385
386ifdef VBOX_WITH_VMI
387VMMGC_DEFS += \
388 VBOX_WITH_VMI
389VMMGC_SOURCES += \
390 PARAV/PARAV.cpp \
391 PARAV/PARAVAll.cpp
392endif
393
394# the very last one.
395VMMGC_SOURCES += VMMGC/VMMGC99.asm
396
397VMMGC/VMMGCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMGCDeps.cpp to .c
398
399
400#
401# VMMR0.r0
402#
403SYSMODS += VMMR0
404VMMR0_TEMPLATE = VBOXR0
405VMMR0_INCS := \
406 $(PATH_SUB_CURRENT) \
407 PATM
408VMMR0_DEFS = IN_VMM_R0 IN_RT_R0 IN_DIS DIS_CORE_ONLY IN_GVMM_R0 IN_GMM_R0 IN_INTNET_R0 RTASSERT_HAVE_SHOULD_PANIC
409## @todo eliminate IN_GVMM_R0 IN_GMM_R0
410ifdef VBOX_WITH_R0_LOGGING
411VMMR0_DEFS += VBOX_WITH_R0_LOGGING
412endif
413ifdef VBOX_WITH_NEW_RECOMPILER
414VMMR0_DEFS += VBOX_WITH_NEW_RECOMPILER
415endif
416VMMR0_DEFS.darwin.x86 = \
417 VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 \
418 VBOX_WITH_HYBRID_32BIT_KERNEL VBOX_WITH_HYBRID_32BIT_KERNEL_IN_R0
419ifeq ($(VBOX_LDR_FMT),pe)
420VMMR0_LDFLAGS = -Entry:VMMR0EntryEx
421endif
422ifeq ($(VBOX_LDR_FMT),elf)
423 VMMR0_LDFLAGS = -e VMMR0EntryEx
424endif
425VMMR0_SYSSUFF = .r0
426VMMR0_SOURCES = \
427 VMMR0/CPUMR0.cpp \
428 VMMR0/CPUMR0A.asm \
429 VMMR0/DBGFR0.cpp \
430 VMMR0/GMMR0.cpp \
431 VMMR0/GVMMR0.cpp \
432 VMMR0/HWACCMR0.cpp \
433 VMMR0/HWACCMR0A.asm \
434 VMMR0/HWSVMR0.cpp \
435 VMMR0/HWVMXR0.cpp \
436 VMMR0/PDMR0Device.cpp \
437 VMMR0/PGMR0.cpp \
438 VMMR0/TRPMR0.cpp \
439 VMMR0/TRPMR0A.asm \
440 VMMR0/VMMR0.cpp \
441 VMMR0/VMMR0A.asm \
442 VMMAll/CPUMAllA.asm \
443 VMMAll/CPUMAllRegs.cpp \
444 VMMAll/CPUMStack.cpp \
445 VMMAll/DBGFAll.cpp \
446 VMMAll/EMAll.cpp \
447 VMMAll/EMAllA.asm \
448 VMMAll/HWACCMAll.cpp \
449 VMMAll/IOMAll.cpp \
450 VMMAll/IOMAllMMIO.cpp \
451 VMMAll/MMAll.cpp \
452 VMMAll/MMAllHyper.cpp \
453 VMMAll/MMAllPagePool.cpp \
454 VMMAll/PDMAll.cpp \
455 VMMAll/PDMAllCritSect.cpp \
456 VMMAll/PDMAllQueue.cpp \
457 VMMAll/PGMAll.cpp \
458 VMMAll/PGMAllHandler.cpp \
459 VMMAll/PGMAllMap.cpp \
460 VMMAll/PGMAllPhys.cpp \
461 VMMAll/PGMAllPool.cpp \
462 VMMAll/REMAll.cpp \
463 VMMAll/SELMAll.cpp \
464 VMMAll/TMAll.cpp \
465 VMMAll/TMAllCpu.cpp \
466 VMMAll/TMAllReal.cpp \
467 VMMAll/TMAllVirtual.cpp \
468 VMMAll/TRPMAll.cpp \
469 VMMAll/VMAll.cpp \
470 VMMAll/VMMAll.cpp
471VMMR0_SOURCES.darwin.x86 = \
472 VMMR0/PGMR0DynMap.cpp
473
474# disable annoying warnings about array subscript above array bounds in aPages[]
475VMMAll/PGMAllPool.cpp_CXXFLAGS = $(if-expr $(KBUILD_TARGET) == "win",,$(VBOX_GCC_Wno-array_bounds))
476
477ifeq ($(VBOX_LDR_FMT),pe)
478VMMR0_SOURCES += VMMR0/VMMR0.def
479endif
480ifeq ($(VBOX_LDR_FMT),lx)
481VMMR0_SOURCES += $(PATH_VMMR0Imp)/VMMR0.def
482endif
483
484VMMR0_LIBS = \
485 $(PATH_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
486 $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
487 $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB)
488ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
489VMMR0_LIBS += \
490 $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
491endif
492
493#
494# For vmmGetSvnRev.
495#
496VMMAll/VMMAll.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
497
498include $(KBUILD_PATH)/subfooter.kmk
499
500
501# Alias the PGM templates to the object in which they are defined.
502PGMInternal.o \
503PGMBth.o PGMGst.o PGMShw.o \
504PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
505PGMAllBth.o PGMAllGst.o PGMAllShw.o \
506PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
507PGMGCBth.o PGMGCGst.o PGMGCShw.o \
508PGMGCBth.obj PGMGCGst.obj PGMGCShw.obj: PGMGC.o
509PGMPhysRWTmpl.o PGMPhysRWTmpl.obj: PGMPhys.o
510
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