VirtualBox

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

Last change on this file since 19420 was 19297, checked in by vboxsync, 16 years ago

Renamed src/recompiler_new to src/recompiler.

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