VirtualBox

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

Last change on this file since 18768 was 18665, checked in by vboxsync, 16 years ago

VMM: Clean out the VBOX_WITH_NEW_PHYS_CODE #ifdefs. (part 1)

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