VirtualBox

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

Last change on this file since 10690 was 10450, checked in by vboxsync, 16 years ago

Added VMMGetSvnRev() (exported) and changed VMMR0Init and VMMGCInit check the the revision is the same. (We've got private interface between ring-3 and ring-0 and GC, not to mention shared structures, so this check is really long overdue.)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 10.6 KB
Line 
1# $Id: Makefile.kmk 10450 2008-07-09 21:55:45Z 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
22ifdef VBOX_KBUILD_HACKING
23SUB_DEPTH = ../../..
24else
25DEPTH = ../../..
26endif
27include $(KBUILD_PATH)/subheader.kmk
28
29# Include sub-makefiles.
30include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
31
32
33#
34# VMMR3.dll
35#
36LIBRARIES += VMMR3
37
38VMMR3_TEMPLATE = VBOXR3
39VMMR3_DEFS = IN_VMM_R3 IN_PDM_R3 IN_CFGM_R3 IN_IOM_R3 IN_VM_R3 IN_CPUM_R3 IN_SELM_R3 IN_PGM_R3 IN_TRPM_R3 IN_MM_R3 IN_DBG_R3 \
40 IN_DBGF_R3 IN_PATM_R3 IN_DIS_R3 IN_STAM_R3 IN_CSAM_R3 IN_EM_R3 IN_TM_R3 IN_SSM_R3 IN_HWACCM_R3 IN_GMM_R3
41ifdef VBOX_WITH_IDT_PATCHING
42VMMR3_DEFS += VBOX_WITH_IDT_PATCHING
43endif
44ifdef VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
45VMMR3_DEFS += VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
46endif
47VMMR3_INCS := \
48 $(PATH_SUB_CURRENT) \
49 PATM
50
51VMMR3_SOURCES = \
52 CFGM.cpp \
53 CPUM.cpp \
54 CPUMStack.cpp \
55 DBGF.cpp \
56 DBGFAddr.cpp \
57 DBGFBp.cpp \
58 DBGFDisas.cpp \
59 DBGFInfo.cpp \
60 DBGFLog.cpp \
61 DBGFMem.cpp \
62 DBGFOS.cpp \
63 DBGFStack.cpp \
64 DBGFSym.cpp \
65 EM.cpp \
66 IOM.cpp \
67 GMM.cpp \
68 MM.cpp \
69 MMHeap.cpp \
70 MMHyper.cpp \
71 MMPagePool.cpp \
72 MMPhys.cpp \
73 PDM.cpp \
74 PDMDevice.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 VMMTests.cpp \
96 HWACCM.cpp \
97 VMMAll/CPUMAllRegs.cpp \
98 VMMAll/DBGFAll.cpp \
99 VMMAll/HWACCMAll.cpp \
100 VMMAll/IOMAll.cpp \
101 VMMAll/IOMAllMMIO.cpp \
102 VMMAll/MMAll.cpp \
103 VMMAll/MMAllHyper.cpp \
104 VMMAll/MMAllPagePool.cpp \
105 VMMAll/MMAllPhys.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/SELMAll.cpp \
115 VMMAll/EMAll.cpp \
116 VMMAll/EMAllA.asm \
117 VMMAll/TMAll.cpp \
118 VMMAll/TMAllCpu.cpp \
119 VMMAll/TMAllReal.cpp \
120 VMMAll/TMAllVirtual.cpp \
121 VMMAll/TRPMAll.cpp \
122 VMMAll/VMAll.cpp \
123 VMMAll/VMMAll.cpp \
124 PATM/CSAM.cpp \
125 PATM/VMMAll/CSAMAll.cpp \
126 PATM/PATM.cpp \
127 PATM/PATMPatch.cpp \
128 PATM/PATMGuest.cpp \
129 PATM/PATMA.asm \
130 PATM/PATMSSM.cpp \
131 PATM/VMMAll/PATMAll.cpp
132VMMR3_SOURCES.x86 += \
133 VMMSwitcher/32BitTo32Bit.asm \
134 VMMSwitcher/32BitToPAE.asm \
135 VMMSwitcher/PAETo32Bit.asm \
136 VMMSwitcher/PAEToPAE.asm
137VMMR3_SOURCES.amd64 = \
138 VMMSwitcher/AMD64ToPAE.asm
139VMMR3_SOURCES.darwin.x86 += \
140 VMMSwitcher/AMD64ToPAE.asm
141
142ifdef VBOX_WITH_USB
143VMMR3_DEFS += VBOX_WITH_USB
144VMMR3_SOURCES += PDMUsb.cpp
145endif
146
147ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
148VMMR3_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
149VMMR3_DEFS.linux += __USE_FILE_OFFSET64 __USE_LARGEFILE64
150VMMR3_SOURCES += PDMAsyncCompletion.cpp
151VMMR3_SOURCES.linux += \
152 PDMAsyncCompletionSocketPosix.cpp \
153 PDMAsyncCompletionHostPosix.cpp
154
155VMMR3_SOURCES.win += \
156 PDMAsyncCompletionSocketWin.cpp \
157 PDMAsyncCompletionHostWin.cpp
158
159VMMR3_SOURCES.solaris += \
160 PDMAsyncCompletionSocketPosix.cpp \
161 PDMAsyncCompletionHostSolaris.cpp
162
163VMMR3_SOURCES.darwin += \
164 PDMAsyncCompletionSocketPosix.cpp \
165 PDMAsyncCompletionHostPosix.cpp
166
167VMMR3_SOURCES.freebsd += \
168 PDMAsyncCompletionSocketPosix.cpp \
169 PDMAsyncCompletionHostFreeBSD.cpp
170
171endif
172
173#
174# The VMM DLL.
175#
176DLLS += VBoxVMM
177VBoxVMM_TEMPLATE = VBOXR3
178VBoxVMM_DEFS = $(VMMR3_DEFS)
179VBoxVMM_SOURCES = VBoxVMMDeps.cpp
180VBoxVMM_SONAME.linux = VBoxVMM.so
181
182VBoxVMM_LIBS = \
183 $(PATH_LIB)/VMMR3$(VBOX_SUFF_LIB) \
184 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
185ifdef VBOX_WITH_DEBUGGER
186VBoxVMM_LIBS += \
187 $(PATH_LIB)/Debugger$(VBOX_SUFF_LIB)
188endif
189VBoxVMM_LIBS += \
190 $(LIB_REM) \
191 $(LIB_RUNTIME)
192
193VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
194VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
195VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
196VBoxVMM_LDFLAGS.darwin = -install_name @executable_path/VBoxVMM.dylib
197VBoxVMM_LDFLAGS.solaris = -mimpure-text
198#ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
199# ifeq ($(KBUILD_HOST), linux)
200#VBoxVMM_LIBS += aio
201# endif
202#endif
203
204ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
205
206#
207# VMMGCBuiltin.lib
208#
209LIBRARIES += VMMGCBuiltin
210VMMGCBuiltin_TEMPLATE = VBOXGC
211ifeq ($(VBOX_LDR_FMT32),pe)
212VMMGCBuiltin_SOURCES = VMMGC/VMMGCBuiltin.def
213endif
214ifeq ($(VBOX_LDR_FMT32),lx)
215VMMGCBuiltin_SOURCES = $(PATH_TARGET)/VMMGCBuiltin.def
216$(PATH_TARGET)/VMMGCBuiltin.def: $(PATH_SUB_CURRENT)/VMMGC/VMMGCBuiltin.def | $(call DIRDEP,$(PATH_TARGET))
217 $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > [email protected]
218 $(MV) -f [email protected] $@
219endif
220
221
222#
223# VMMGCImp.lib
224#
225LIBRARIES += VMMGCImp
226VMMGCImp_TEMPLATE = VBOXGC
227ifeq ($(VBOX_LDR_FMT32),pe)
228VMMGCImp_SOURCES = VMMGC/VMMGC.def
229endif
230ifeq ($(VBOX_LDR_FMT32),lx)
231VMMGCImp_SOURCES = $(PATH_TARGET)/VMMGC.def
232$(PATH_TARGET)/VMMGC.def: $(PATH_SUB_CURRENT)/VMMGC/VMMGC.def | $(call DIRDEP,$(PATH_TARGET))
233 $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > [email protected]
234 $(APPEND) "[email protected]" ""
235 $(APPEND) "[email protected]" " ___ehInit"
236 $(MV) -f [email protected] $@
237endif
238
239endif # GC: pe + lx
240
241
242ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
243#
244# VMMR0Imp.lib
245#
246LIBRARIES += VMMR0Imp
247VMMR0Imp_TEMPLATE = VBOXR0
248 ifeq ($(VBOX_LDR_FMT),pe)
249VMMR0Imp_SOURCES = VMMR0/VMMR0.def
250 endif
251 ifeq ($(VBOX_LDR_FMT),lx)
252VMMR0Imp_SOURCES = $(PATH_TARGET)/VMMR0.def
253$(PATH_TARGET)/VMMR0.def: $(PATH_SUB_CURRENT)/VMMR0/VMMR0.def | $(call DIRDEP,$(PATH_TARGET))
254 $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > [email protected]
255 $(APPEND) "[email protected]" ""
256 $(APPEND) "[email protected]" " ___ehInit"
257 $(MV) -f [email protected] $@
258 endif
259endif # R0: pe + lx
260
261
262#
263# VMMGC.gc
264#
265SYSMODS += VMMGC
266VMMGC_TEMPLATE = VBOXGC
267VMMGC_INCS := \
268 $(PATH_SUB_CURRENT) \
269 VMMGC \
270 PATM
271VMMGC_DEFS = IN_VMM_GC IN_PDM_GC IN_CFGM_GC IN_IOM_GC IN_MM_GC IN_RT_GC IN_TRPM_GC IN_SELM_GC IN_VM_GC IN_IOM_GC IN_DIS_GC DIS_CORE_ONLY IN_PGM_GC IN_CPUM_GC IN_EM_GC IN_TM_GC IN_PATM_GC IN_CSAM_GC IN_REM_GC IN_DBGF_GC
272ifdef VBOX_WITH_IDT_PATCHING
273VMMGC_DEFS += VBOX_WITH_IDT_PATCHING
274endif
275VMMGC_SYSSUFF = .gc
276VMMGC_LIBS = \
277 $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
278 $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
279ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
280VMMGC_LIBS += \
281 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
282endif
283ifeq ($(VBOX_LDR_FMT32),pe)
284VMMGC_LDFLAGS = -Entry:VMMGCEntry
285endif
286VMMGC_SOURCES = \
287 VMMGC/VMMGC0.asm \
288 VMMGC/VMMGCDeps.cpp \
289 VMMGC/CPUMGC.cpp \
290 VMMGC/CPUMGCA.asm \
291 VMMGC/EMGCA.asm \
292 VMMGC/DBGFGC.cpp \
293 VMMGC/IOMGC.cpp \
294 VMMGC/MMRamGC.cpp \
295 VMMGC/MMRamGCA.asm \
296 VMMGC/PDMGCDevice.cpp \
297 VMMGC/PGMGC.cpp \
298 VMMGC/SELMGC.cpp \
299 VMMGC/TRPMGC.cpp \
300 VMMGC/TRPMGCHandlers.cpp \
301 VMMGC/TRPMGCHandlersA.asm \
302 VMMGC/VMMGC.cpp \
303 VMMGC/VMMGCA.asm \
304 VMMAll/CPUMAllRegs.cpp \
305 VMMAll/CPUMAllA.asm \
306 VMMAll/DBGFAll.cpp \
307 VMMAll/IOMAll.cpp \
308 VMMAll/IOMAllMMIO.cpp \
309 VMMAll/EMAll.cpp \
310 VMMAll/EMAllA.asm \
311 VMMAll/MMAll.cpp \
312 VMMAll/MMAllHyper.cpp \
313 VMMAll/PDMAll.cpp \
314 VMMAll/PDMAllCritSect.cpp \
315 VMMAll/PDMAllQueue.cpp \
316 VMMAll/PGMAll.cpp \
317 VMMAll/PGMAllHandler.cpp \
318 VMMAll/PGMAllMap.cpp \
319 VMMAll/PGMAllPhys.cpp \
320 VMMAll/PGMAllPool.cpp \
321 VMMAll/REMAll.cpp \
322 VMMAll/SELMAll.cpp \
323 VMMAll/TMAll.cpp \
324 VMMAll/TMAllCpu.cpp \
325 VMMAll/TMAllReal.cpp \
326 VMMAll/TMAllVirtual.cpp \
327 VMMAll/TRPMAll.cpp \
328 VMMAll/VMAll.cpp \
329 VMMAll/VMMAll.cpp \
330 PATM/VMMGC/CSAMGC.cpp \
331 PATM/VMMAll/CSAMAll.cpp \
332 PATM/VMMGC/PATMGC.cpp \
333 PATM/VMMAll/PATMAll.cpp
334
335ifeq ($(VBOX_LDR_FMT32),pe)
336VMMGC_SOURCES += VMMGC/VMMGC.def
337endif
338ifeq ($(VBOX_LDR_FMT32),lx)
339VMMGC_SOURCES += $(PATH_TARGET)/VMMGC.def
340endif
341
342# the very last one.
343VMMGC_SOURCES += VMMGC/VMMGC99.asm
344
345VMMGC/VMMGCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMGCDeps.cpp to .c
346
347
348#
349# VMMR0.r0
350#
351SYSMODS += VMMR0
352VMMR0_TEMPLATE = VBOXR0
353VMMR0_INCS := \
354 $(PATH_SUB_CURRENT) \
355 PATM
356VMMR0_DEFS = IN_VMM_R0 IN_RT_R0 IN_TRPM_R0 IN_CPUM_R0 IN_VM_R0 IN_TM_R0 IN_INTNET_R0 IN_HWACCM_R0 IN_EM_R0 IN_PDM_R0 IN_PGM_R0 IN_DIS_R0 IN_MM_R0 IN_SELM_R0 IN_CSAM_R0 IN_PATM_R0 IN_DBGF_R0 IN_REM_R0 IN_IOM_R0 IN_GVMM_R0 IN_GMM_R0 DIS_CORE_ONLY
357ifdef VBOX_WITH_IDT_PATCHING
358VMMR0_DEFS += VBOX_WITH_IDT_PATCHING
359endif
360ifeq ($(VBOX_LDR_FMT),pe)
361VMMR0_LDFLAGS = -Entry:VMMR0EntryEx
362endif
363ifeq ($(VBOX_LDR_FMT),elf)
364 VMMR0_LDFLAGS = -e VMMR0EntryEx
365endif
366VMMR0_SYSSUFF = .r0
367VMMR0_SOURCES = \
368 VMMR0/CPUMR0.cpp \
369 VMMR0/DBGFR0.cpp \
370 VMMR0/GMMR0.cpp \
371 VMMR0/GVMMR0.cpp \
372 VMMR0/HWACCMR0.cpp \
373 VMMR0/HWACCMR0A.asm \
374 VMMR0/HWSVMR0.cpp \
375 VMMR0/HWVMXR0.cpp \
376 VMMR0/PDMR0Device.cpp \
377 VMMR0/PGMR0.cpp \
378 VMMR0/TRPMR0.cpp \
379 VMMR0/TRPMR0A.asm \
380 VMMR0/VMMR0.cpp \
381 VMMR0/VMMR0A.asm \
382 VMMAll/CPUMAllA.asm \
383 VMMAll/CPUMAllRegs.cpp \
384 VMMAll/DBGFAll.cpp \
385 VMMAll/EMAll.cpp \
386 VMMAll/EMAllA.asm \
387 VMMAll/HWACCMAll.cpp \
388 VMMAll/IOMAll.cpp \
389 VMMAll/IOMAllMMIO.cpp \
390 VMMAll/MMAll.cpp \
391 VMMAll/MMAllHyper.cpp \
392 VMMAll/MMAllPagePool.cpp \
393 VMMAll/MMAllPhys.cpp \
394 VMMAll/PDMAll.cpp \
395 VMMAll/PDMAllCritSect.cpp \
396 VMMAll/PDMAllQueue.cpp \
397 VMMAll/PGMAll.cpp \
398 VMMAll/PGMAllHandler.cpp \
399 VMMAll/PGMAllMap.cpp \
400 VMMAll/PGMAllPhys.cpp \
401 VMMAll/PGMAllPool.cpp \
402 VMMAll/REMAll.cpp \
403 VMMAll/SELMAll.cpp \
404 VMMAll/TMAll.cpp \
405 VMMAll/TMAllCpu.cpp \
406 VMMAll/TMAllReal.cpp \
407 VMMAll/TMAllVirtual.cpp \
408 VMMAll/TRPMAll.cpp \
409 VMMAll/VMAll.cpp \
410 VMMAll/VMMAll.cpp \
411
412
413ifeq ($(VBOX_LDR_FMT),pe)
414VMMR0_SOURCES += VMMR0/VMMR0.def
415endif
416ifeq ($(VBOX_LDR_FMT),lx)
417VMMR0_SOURCES += $(PATH_TARGET)/VMMR0.def
418endif
419
420VMMR0_LIBS = \
421 $(PATH_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
422 $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
423 $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB)
424ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
425VMMR0_LIBS += \
426 $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
427endif
428
429#
430# For vmmGetSvnRev.
431#
432VMMAll/VMMAll.cpp_DEFS = VBOX_SVN_REV
433
434
435include $(KBUILD_PATH)/subfooter.kmk
436
437
438# Alias the PGM templates to the object in which they are defined.
439PGMBth.o PGMGst.o PGMShw.o \
440PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
441PGMAllBth.o PGMAllGst.o PGMAllShw.o \
442PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
443PGMGCBth.o PGMGCGst.o PGMGCShw.o \
444PGMGCBth.obj PGMGCGst.obj PGMGCShw.obj: PGMGC.o
445PGMPhysRWTmpl.o PGMPhysRWTmpl.obj: PGMPhys.o
446
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