VirtualBox

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

Last change on this file since 14792 was 14785, checked in by vboxsync, 16 years ago

More switcher updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 11.0 KB
Line 
1# $Id: Makefile.kmk 14785 2008-11-28 15:11:20Z 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 = VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R3
44VMMR3_INCS := \
45 $(PATH_SUB_CURRENT) \
46 PATM
47
48VMMR3_SOURCES = \
49 CFGM.cpp \
50 CPUM.cpp \
51 CPUMStack.cpp \
52 DBGF.cpp \
53 DBGFAddr.cpp \
54 DBGFBp.cpp \
55 DBGFDisas.cpp \
56 DBGFInfo.cpp \
57 DBGFLog.cpp \
58 DBGFMem.cpp \
59 DBGFOS.cpp \
60 DBGFStack.cpp \
61 DBGFSym.cpp \
62 EM.cpp \
63 IOM.cpp \
64 GMM.cpp \
65 MM.cpp \
66 MMHeap.cpp \
67 MMHyper.cpp \
68 MMPagePool.cpp \
69 MMPhys.cpp \
70 PDM.cpp \
71 PDMDevice.cpp \
72 PDMDevHlp.cpp \
73 PDMDevMiscHlp.cpp \
74 PDMDriver.cpp \
75 PDMLdr.cpp \
76 PDMCritSect.cpp \
77 PDMQueue.cpp \
78 PDMThread.cpp \
79 PGM.cpp \
80 PGMDbg.cpp \
81 PGMHandler.cpp \
82 PGMMap.cpp \
83 PGMPhys.cpp \
84 PGMPool.cpp \
85 SELM.cpp \
86 SSM.cpp \
87 STAM.cpp \
88 TM.cpp \
89 TRPM.cpp \
90 VM.cpp \
91 VMEmt.cpp \
92 VMReq.cpp \
93 VMM.cpp \
94 VMMGuruMeditation.cpp \
95 VMMSwitcher.cpp \
96 VMMTests.cpp \
97 HWACCM.cpp \
98 VMMAll/CPUMAllRegs.cpp \
99 VMMAll/DBGFAll.cpp \
100 VMMAll/HWACCMAll.cpp \
101 VMMAll/IOMAll.cpp \
102 VMMAll/IOMAllMMIO.cpp \
103 VMMAll/MMAll.cpp \
104 VMMAll/MMAllHyper.cpp \
105 VMMAll/MMAllPagePool.cpp \
106 VMMAll/PDMAll.cpp \
107 VMMAll/PDMAllCritSect.cpp \
108 VMMAll/PDMAllQueue.cpp \
109 VMMAll/PGMAll.cpp \
110 VMMAll/PGMAllHandler.cpp \
111 VMMAll/PGMAllMap.cpp \
112 VMMAll/PGMAllPhys.cpp \
113 VMMAll/PGMAllPool.cpp \
114 VMMAll/REMAll.cpp \
115 VMMAll/SELMAll.cpp \
116 VMMAll/EMAll.cpp \
117 VMMAll/EMAllA.asm \
118 VMMAll/TMAll.cpp \
119 VMMAll/TMAllCpu.cpp \
120 VMMAll/TMAllReal.cpp \
121 VMMAll/TMAllVirtual.cpp \
122 VMMAll/TRPMAll.cpp \
123 VMMAll/VMAll.cpp \
124 VMMAll/VMMAll.cpp \
125 PATM/CSAM.cpp \
126 PATM/VMMAll/CSAMAll.cpp \
127 PATM/PATM.cpp \
128 PATM/PATMPatch.cpp \
129 PATM/PATMGuest.cpp \
130 PATM/PATMA.asm \
131 PATM/PATMSSM.cpp \
132 PATM/VMMAll/PATMAll.cpp
133VMMR3_SOURCES.x86 += \
134 VMMSwitcher/32BitTo32Bit.asm \
135 VMMSwitcher/32BitToPAE.asm \
136 VMMSwitcher/32BitToAMD64.asm \
137 VMMSwitcher/PAETo32Bit.asm \
138 VMMSwitcher/PAEToAMD64.asm \
139 VMMSwitcher/PAEToPAE.asm
140VMMR3_SOURCES.amd64 = \
141 VMMSwitcher/AMD64To32Bit.asm \
142 VMMSwitcher/AMD64ToPAE.asm
143VMMR3_SOURCES.darwin.x86 += \
144 VMMSwitcher/AMD64ToPAE.asm
145
146ifdef VBOX_WITH_VMI
147VMMR3_DEFS += \
148 VBOX_WITH_VMI
149VMMR3_INCS += \
150 PARAV
151VMMR3_SOURCES += \
152 PARAV/PARAV.cpp \
153 PARAV/PARAVAll.cpp
154endif
155
156ifdef VBOX_WITH_USB
157VMMR3_DEFS += VBOX_WITH_USB
158VMMR3_SOURCES += PDMUsb.cpp
159endif
160
161ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
162VMMR3_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
163VMMR3_DEFS.linux += __USE_FILE_OFFSET64 __USE_LARGEFILE64
164VMMR3_SOURCES += PDMAsyncCompletion.cpp
165VMMR3_SOURCES.linux += \
166 PDMAsyncCompletionSocketPosix.cpp \
167 PDMAsyncCompletionHostPosix.cpp
168
169VMMR3_SOURCES.win += \
170 PDMAsyncCompletionSocketWin.cpp \
171 PDMAsyncCompletionHostWin.cpp
172
173VMMR3_SOURCES.solaris += \
174 PDMAsyncCompletionSocketPosix.cpp \
175 PDMAsyncCompletionHostSolaris.cpp
176
177VMMR3_SOURCES.darwin += \
178 PDMAsyncCompletionSocketPosix.cpp \
179 PDMAsyncCompletionHostPosix.cpp
180
181VMMR3_SOURCES.freebsd += \
182 PDMAsyncCompletionSocketPosix.cpp \
183 PDMAsyncCompletionHostFreeBSD.cpp
184
185endif
186
187#
188# The VMM DLL.
189#
190DLLS += VBoxVMM
191
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
202VBoxVMM_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_INCS := \
298 $(PATH_SUB_CURRENT) \
299 VMMGC \
300 PATM
301VMMGC_DEFS = IN_VMM_RC IN_RT_GC IN_RT_RC IN_DIS DIS_CORE_ONLY
302ifdef VBOX_WITH_R0_LOGGING
303VMMGC_DEFS += VBOX_WITH_R0_LOGGING
304endif
305VMMGC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_RC
306VMMGC_SYSSUFF = .gc
307VMMGC_LIBS = \
308 $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
309 $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
310ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
311VMMGC_LIBS += \
312 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
313endif
314ifeq ($(VBOX_LDR_FMT32),pe)
315VMMGC_LDFLAGS = -Entry:VMMGCEntry
316endif
317VMMGC_SOURCES = \
318 VMMGC/VMMGC0.asm \
319 VMMGC/VMMGCDeps.cpp \
320 VMMGC/CPUMGC.cpp \
321 VMMGC/CPUMGCA.asm \
322 VMMGC/EMGCA.asm \
323 VMMGC/DBGFGC.cpp \
324 VMMGC/IOMGC.cpp \
325 VMMGC/MMRamGC.cpp \
326 VMMGC/MMRamGCA.asm \
327 VMMGC/PDMGCDevice.cpp \
328 VMMGC/PGMGC.cpp \
329 VMMGC/SELMGC.cpp \
330 VMMGC/TRPMGC.cpp \
331 VMMGC/TRPMGCHandlers.cpp \
332 VMMGC/TRPMGCHandlersA.asm \
333 VMMGC/VMMGC.cpp \
334 VMMGC/VMMGCA.asm \
335 VMMAll/CPUMAllRegs.cpp \
336 VMMAll/CPUMAllA.asm \
337 VMMAll/DBGFAll.cpp \
338 VMMGC/HWACCMGCA.asm \
339 VMMAll/IOMAll.cpp \
340 VMMAll/IOMAllMMIO.cpp \
341 VMMAll/EMAll.cpp \
342 VMMAll/EMAllA.asm \
343 VMMAll/MMAll.cpp \
344 VMMAll/MMAllHyper.cpp \
345 VMMAll/PDMAll.cpp \
346 VMMAll/PDMAllCritSect.cpp \
347 VMMAll/PDMAllQueue.cpp \
348 VMMAll/PGMAll.cpp \
349 VMMAll/PGMAllHandler.cpp \
350 VMMAll/PGMAllMap.cpp \
351 VMMAll/PGMAllPhys.cpp \
352 VMMAll/PGMAllPool.cpp \
353 VMMAll/REMAll.cpp \
354 VMMAll/SELMAll.cpp \
355 VMMAll/TMAll.cpp \
356 VMMAll/TMAllCpu.cpp \
357 VMMAll/TMAllReal.cpp \
358 VMMAll/TMAllVirtual.cpp \
359 VMMAll/TRPMAll.cpp \
360 VMMAll/VMAll.cpp \
361 VMMAll/VMMAll.cpp \
362 PATM/VMMGC/CSAMGC.cpp \
363 PATM/VMMAll/CSAMAll.cpp \
364 PATM/VMMGC/PATMGC.cpp \
365 PATM/VMMAll/PATMAll.cpp
366
367ifeq ($(VBOX_LDR_FMT32),pe)
368VMMGC_SOURCES += VMMGC/VMMGC.def
369endif
370ifeq ($(VBOX_LDR_FMT32),lx)
371VMMGC_SOURCES += $(PATH_VMMGCImp)/VMMGC.def
372endif
373
374ifdef VBOX_WITH_VMI
375VMMGC_DEFS += \
376 VBOX_WITH_VMI
377VMMGC_SOURCES += \
378 PARAV/PARAV.cpp \
379 PARAV/PARAVAll.cpp
380endif
381
382# the very last one.
383VMMGC_SOURCES += VMMGC/VMMGC99.asm
384
385VMMGC/VMMGCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMGCDeps.cpp to .c
386
387
388#
389# VMMR0.r0
390#
391SYSMODS += VMMR0
392VMMR0_TEMPLATE = VBOXR0
393VMMR0_INCS := \
394 $(PATH_SUB_CURRENT) \
395 PATM
396VMMR0_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
397## @todo eliminate IN_GVMM_R0 IN_GMM_R0
398ifdef VBOX_WITH_R0_LOGGING
399VMMR0_DEFS += VBOX_WITH_R0_LOGGING
400endif
401VMMR0_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0
402ifeq ($(VBOX_LDR_FMT),pe)
403VMMR0_LDFLAGS = -Entry:VMMR0EntryEx
404endif
405ifeq ($(VBOX_LDR_FMT),elf)
406 VMMR0_LDFLAGS = -e VMMR0EntryEx
407endif
408VMMR0_SYSSUFF = .r0
409VMMR0_SOURCES = \
410 VMMR0/CPUMR0.cpp \
411 VMMR0/DBGFR0.cpp \
412 VMMR0/GMMR0.cpp \
413 VMMR0/GVMMR0.cpp \
414 VMMR0/HWACCMR0.cpp \
415 VMMR0/HWACCMR0A.asm \
416 VMMR0/HWSVMR0.cpp \
417 VMMR0/HWVMXR0.cpp \
418 VMMR0/PDMR0Device.cpp \
419 VMMR0/PGMR0.cpp \
420 VMMR0/TRPMR0.cpp \
421 VMMR0/TRPMR0A.asm \
422 VMMR0/VMMR0.cpp \
423 VMMR0/VMMR0A.asm \
424 VMMAll/CPUMAllA.asm \
425 VMMAll/CPUMAllRegs.cpp \
426 VMMAll/DBGFAll.cpp \
427 VMMAll/EMAll.cpp \
428 VMMAll/EMAllA.asm \
429 VMMAll/HWACCMAll.cpp \
430 VMMAll/IOMAll.cpp \
431 VMMAll/IOMAllMMIO.cpp \
432 VMMAll/MMAll.cpp \
433 VMMAll/MMAllHyper.cpp \
434 VMMAll/MMAllPagePool.cpp \
435 VMMAll/PDMAll.cpp \
436 VMMAll/PDMAllCritSect.cpp \
437 VMMAll/PDMAllQueue.cpp \
438 VMMAll/PGMAll.cpp \
439 VMMAll/PGMAllHandler.cpp \
440 VMMAll/PGMAllMap.cpp \
441 VMMAll/PGMAllPhys.cpp \
442 VMMAll/PGMAllPool.cpp \
443 VMMAll/REMAll.cpp \
444 VMMAll/SELMAll.cpp \
445 VMMAll/TMAll.cpp \
446 VMMAll/TMAllCpu.cpp \
447 VMMAll/TMAllReal.cpp \
448 VMMAll/TMAllVirtual.cpp \
449 VMMAll/TRPMAll.cpp \
450 VMMAll/VMAll.cpp \
451 VMMAll/VMMAll.cpp
452VMMR0_SOURCES.darwin = \
453 VMMR0/PGMR0DynMap.cpp
454
455
456ifeq ($(VBOX_LDR_FMT),pe)
457VMMR0_SOURCES += VMMR0/VMMR0.def
458endif
459ifeq ($(VBOX_LDR_FMT),lx)
460VMMR0_SOURCES += $(PATH_VMMR0Imp)/VMMR0.def
461endif
462
463VMMR0_LIBS = \
464 $(PATH_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
465 $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
466 $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB)
467ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
468VMMR0_LIBS += \
469 $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
470endif
471
472#
473# For vmmGetSvnRev.
474#
475VMMAll/VMMAll.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
476
477include $(KBUILD_PATH)/subfooter.kmk
478
479
480# Alias the PGM templates to the object in which they are defined.
481PGMBth.o PGMGst.o PGMShw.o \
482PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
483PGMAllBth.o PGMAllGst.o PGMAllShw.o \
484PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
485PGMGCBth.o PGMGCGst.o PGMGCShw.o \
486PGMGCBth.obj PGMGCGst.obj PGMGCShw.obj: PGMGC.o
487PGMPhysRWTmpl.o PGMPhysRWTmpl.obj: PGMPhys.o
488
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