VirtualBox

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

Last change on this file since 21895 was 21856, checked in by vboxsync, 15 years ago

SSM: only compress big stuff that's a page or larger.

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