VirtualBox

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

Last change on this file since 9412 was 9008, checked in by vboxsync, 17 years ago

Changes for proper flushing of the TLB for physical registration changes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 10.6 KB
Line 
1# $Id: Makefile.kmk 9008 2008-05-21 10:17:41Z 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
22DEPTH = ../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25## @todo get rid of these.
26# Enable the PDM lock.
27ifdef VBOX_WITH_PDM_LOCK
28DEFS += VBOX_WITH_PDM_LOCK
29endif
30ifdef VBOX_WITH_INTERNAL_NETWORKING
31DEFS += VBOX_WITH_INTERNAL_NETWORKING
32endif
33
34# Include sub-makefiles.
35include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
36
37
38#
39# VMMR3.dll
40#
41LIBRARIES += VMMR3
42
43VMMR3_TEMPLATE = VBOXR3
44VMMR3_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 \
45 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
46ifdef VBOX_WITH_IDT_PATCHING
47VMMR3_DEFS += VBOX_WITH_IDT_PATCHING
48endif
49ifdef VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
50VMMR3_DEFS += VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
51endif
52VMMR3_INCS := \
53 PATM \
54 $(PATH_SUB_CURRENT)
55
56VMMR3_SOURCES = \
57 CFGM.cpp \
58 CPUM.cpp \
59 CPUMStack.cpp \
60 DBGF.cpp \
61 DBGFAddr.cpp \
62 DBGFBp.cpp \
63 DBGFDisas.cpp \
64 DBGFInfo.cpp \
65 DBGFLog.cpp \
66 DBGFMem.cpp \
67 DBGFOS.cpp \
68 DBGFStack.cpp \
69 DBGFSym.cpp \
70 EM.cpp \
71 IOM.cpp \
72 GMM.cpp \
73 MM.cpp \
74 MMHeap.cpp \
75 MMHyper.cpp \
76 MMPagePool.cpp \
77 MMPhys.cpp \
78 PDM.cpp \
79 PDMDevice.cpp \
80 PDMDriver.cpp \
81 PDMLdr.cpp \
82 PDMCritSect.cpp \
83 PDMQueue.cpp \
84 PDMThread.cpp \
85 PGM.cpp \
86 PGMDbg.cpp \
87 PGMHandler.cpp \
88 PGMMap.cpp \
89 PGMPhys.cpp \
90 PGMPool.cpp \
91 SELM.cpp \
92 SSM.cpp \
93 STAM.cpp \
94 TM.cpp \
95 TRPM.cpp \
96 VM.cpp \
97 VMEmt.cpp \
98 VMReq.cpp \
99 VMM.cpp \
100 VMMTests.cpp \
101 HWACCM.cpp \
102 VMMAll/CPUMAllRegs.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/MMAllPhys.cpp \
111 VMMAll/PDMAll.cpp \
112 VMMAll/PDMAllCritSect.cpp \
113 VMMAll/PDMAllQueue.cpp \
114 VMMAll/PGMAll.cpp \
115 VMMAll/PGMAllHandler.cpp \
116 VMMAll/PGMAllMap.cpp \
117 VMMAll/PGMAllPhys.cpp \
118 VMMAll/PGMAllPool.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/PAETo32Bit.asm \
141 VMMSwitcher/PAEToPAE.asm
142VMMR3_SOURCES.amd64 = \
143 VMMSwitcher/AMD64ToPAE.asm
144VMMR3_SOURCES.darwin.x86 += \
145 VMMSwitcher/AMD64ToPAE.asm
146
147ifdef VBOX_WITH_USB
148VMMR3_DEFS += VBOX_WITH_USB
149VMMR3_SOURCES += PDMUsb.cpp
150endif
151
152ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
153VMMR3_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
154VMMR3_DEFS.linux += __USE_FILE_OFFSET64 __USE_LARGEFILE64
155VMMR3_SOURCES += PDMAsyncCompletion.cpp
156VMMR3_SOURCES.linux += \
157 PDMAsyncCompletionSocketPosix.cpp \
158 PDMAsyncCompletionHostLinux.cpp \
159 PDMAsyncCompletionHostPosix.cpp
160
161VMMR3_SOURCES.win += \
162 PDMAsyncCompletionSocketWin.cpp \
163 PDMAsyncCompletionHostWin.cpp
164
165VMMR3_SOURCES.solaris += \
166 PDMAsyncCompletionSocketPosix.cpp \
167 PDMAsyncCompletionHostSolaris.cpp
168
169VMMR3_SOURCES.darwin += \
170 PDMAsyncCompletionSocketPosix.cpp \
171 PDMAsyncCompletionHostDarwin.cpp
172
173VMMR3_SOURCES.freebsd += \
174 PDMAsyncCompletionSocketPosix.cpp \
175 PDMAsyncCompletionHostDarwin.cpp
176
177endif
178
179#
180# The VMM DLL.
181#
182DLLS += VBoxVMM
183VBoxVMM_TEMPLATE = VBOXR3
184VBoxVMM_DEFS = $(VMMR3_DEFS)
185VBoxVMM_SOURCES = VBoxVMMDeps.cpp
186VBoxVMM_SONAME.linux = VBoxVMM.so
187
188VBoxVMM_LIBS = \
189 $(PATH_LIB)/VMMR3$(VBOX_SUFF_LIB) \
190 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
191ifdef VBOX_WITH_DEBUGGER
192VBoxVMM_LIBS += \
193 $(PATH_LIB)/Debugger$(VBOX_SUFF_LIB)
194endif
195VBoxVMM_LIBS += \
196 $(LIB_REM) \
197 $(LIB_RUNTIME)
198
199VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
200VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
201VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
202VBoxVMM_LDFLAGS.darwin = -install_name @executable_path/VBoxVMM.dylib
203VBoxVMM_LDFLAGS.solaris = -mimpure-text
204ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
205 ifeq ($(KBUILD_HOST), linux)
206VBoxVMM_LIBS += aio
207 endif
208endif
209
210ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
211
212#
213# VMMGCBuiltin.lib
214#
215LIBRARIES += VMMGCBuiltin
216VMMGCBuiltin_TEMPLATE = VBOXGC
217ifeq ($(VBOX_LDR_FMT32),pe)
218VMMGCBuiltin_SOURCES = VMMGC/VMMGCBuiltin.def
219endif
220ifeq ($(VBOX_LDR_FMT32),lx)
221VMMGCBuiltin_SOURCES = $(PATH_TARGET)/VMMGCBuiltin.def
222$(PATH_TARGET)/VMMGCBuiltin.def: VMMGC/VMMGCBuiltin.def | $(call DIRDEP,$(PATH_TARGET))
223 $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > [email protected]
224 $(MV) -f [email protected] $@
225endif
226
227
228#
229# VMMGCImp.lib
230#
231LIBRARIES += VMMGCImp
232VMMGCImp_TEMPLATE = VBOXGC
233ifeq ($(VBOX_LDR_FMT32),pe)
234VMMGCImp_SOURCES = VMMGC/VMMGC.def
235endif
236ifeq ($(VBOX_LDR_FMT32),lx)
237VMMGCImp_SOURCES = $(PATH_TARGET)/VMMGC.def
238$(PATH_TARGET)/VMMGC.def: VMMGC/VMMGC.def | $(call DIRDEP,$(PATH_TARGET))
239 $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > [email protected]
240 $(APPEND) "[email protected]" ""
241 $(APPEND) "[email protected]" " ___ehInit"
242 $(MV) -f [email protected] $@
243endif
244
245endif # GC: pe + lx
246
247
248ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
249#
250# VMMR0Imp.lib
251#
252LIBRARIES += VMMR0Imp
253VMMR0Imp_TEMPLATE = VBOXR0
254 ifeq ($(VBOX_LDR_FMT),pe)
255VMMR0Imp_SOURCES = VMMR0/VMMR0.def
256 endif
257 ifeq ($(VBOX_LDR_FMT),lx)
258VMMR0Imp_SOURCES = $(PATH_TARGET)/VMMR0.def
259$(PATH_TARGET)/VMMR0.def: VMMR0/VMMR0.def | $(call DIRDEP,$(PATH_TARGET))
260 $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > [email protected]
261 $(APPEND) "[email protected]" ""
262 $(APPEND) "[email protected]" " ___ehInit"
263 $(MV) -f [email protected] $@
264 endif
265endif # R0: pe + lx
266
267
268#
269# VMMGC.gc
270#
271SYSMODS += VMMGC
272VMMGC_TEMPLATE = VBOXGC
273VMMGC_INCS := \
274 $(PATH_SUB_CURRENT) \
275 VMMGC \
276 PATM
277VMMGC_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
278ifdef VBOX_WITH_IDT_PATCHING
279VMMGC_DEFS += VBOX_WITH_IDT_PATCHING
280endif
281VMMGC_SYSSUFF = .gc
282VMMGC_LIBS = \
283 $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
284 $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
285ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
286VMMGC_LIBS += \
287 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
288endif
289ifeq ($(VBOX_LDR_FMT32),pe)
290VMMGC_LDFLAGS = -Entry:VMMGCEntry
291endif
292VMMGC_SOURCES = \
293 VMMGC/VMMGC0.asm \
294 VMMGC/VMMGCDeps.cpp \
295 VMMGC/CPUMGC.cpp \
296 VMMGC/CPUMGCA.asm \
297 VMMGC/EMGCA.asm \
298 VMMGC/DBGFGC.cpp \
299 VMMGC/IOMGC.cpp \
300 VMMGC/MMRamGC.cpp \
301 VMMGC/MMRamGCA.asm \
302 VMMGC/PDMGCDevice.cpp \
303 VMMGC/PGMGC.cpp \
304 VMMGC/SELMGC.cpp \
305 VMMGC/TRPMGC.cpp \
306 VMMGC/TRPMGCHandlers.cpp \
307 VMMGC/TRPMGCHandlersA.asm \
308 VMMGC/VMMGC.cpp \
309 VMMGC/VMMGCA.asm \
310 VMMAll/CPUMAllRegs.cpp \
311 VMMAll/CPUMAllA.asm \
312 VMMAll/DBGFAll.cpp \
313 VMMAll/IOMAll.cpp \
314 VMMAll/IOMAllMMIO.cpp \
315 VMMAll/EMAll.cpp \
316 VMMAll/EMAllA.asm \
317 VMMAll/MMAll.cpp \
318 VMMAll/MMAllHyper.cpp \
319 VMMAll/PDMAll.cpp \
320 VMMAll/PDMAllCritSect.cpp \
321 VMMAll/PDMAllQueue.cpp \
322 VMMAll/PGMAll.cpp \
323 VMMAll/PGMAllHandler.cpp \
324 VMMAll/PGMAllMap.cpp \
325 VMMAll/PGMAllPhys.cpp \
326 VMMAll/PGMAllPool.cpp \
327 VMMAll/REMAll.cpp \
328 VMMAll/SELMAll.cpp \
329 VMMAll/TMAll.cpp \
330 VMMAll/TMAllCpu.cpp \
331 VMMAll/TMAllReal.cpp \
332 VMMAll/TMAllVirtual.cpp \
333 VMMAll/TRPMAll.cpp \
334 VMMAll/VMAll.cpp \
335 VMMAll/VMMAll.cpp \
336 PATM/VMMGC/CSAMGC.cpp \
337 PATM/VMMAll/CSAMAll.cpp \
338 PATM/VMMGC/PATMGC.cpp \
339 PATM/VMMAll/PATMAll.cpp
340
341ifeq ($(VBOX_LDR_FMT32),pe)
342VMMGC_SOURCES += VMMGC/VMMGC.def
343endif
344ifeq ($(VBOX_LDR_FMT32),lx)
345VMMGC_SOURCES += $(PATH_TARGET)/VMMGC.def
346endif
347
348# the very last one.
349VMMGC_SOURCES += VMMGC/VMMGC99.asm
350
351VMMGC/VMMGCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMGCDeps.cpp to .c
352
353
354#
355# VMMR0.r0
356#
357SYSMODS += VMMR0
358VMMR0_TEMPLATE = VBOXR0
359VMMR0_INCS := \
360 $(PATH_SUB_CURRENT) \
361 PATM
362VMMR0_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
363ifdef VBOX_WITH_IDT_PATCHING
364VMMR0_DEFS += VBOX_WITH_IDT_PATCHING
365endif
366ifeq ($(VBOX_LDR_FMT),pe)
367VMMR0_LDFLAGS = -Entry:VMMR0EntryEx
368endif
369ifeq ($(VBOX_LDR_FMT),elf)
370 VMMR0_LDFLAGS = -e VMMR0EntryEx
371endif
372VMMR0_SYSSUFF = .r0
373VMMR0_SOURCES = \
374 VMMR0/CPUMR0.cpp \
375 VMMR0/DBGFR0.cpp \
376 VMMR0/GMMR0.cpp \
377 VMMR0/GVMMR0.cpp \
378 VMMR0/HWACCMR0.cpp \
379 VMMR0/HWACCMR0A.asm \
380 VMMR0/HWSVMR0.cpp \
381 VMMR0/HWVMXR0.cpp \
382 VMMR0/PDMR0Device.cpp \
383 VMMR0/PGMR0.cpp \
384 VMMR0/TRPMR0.cpp \
385 VMMR0/TRPMR0A.asm \
386 VMMR0/VMMR0.cpp \
387 VMMR0/VMMR0A.asm \
388 VMMAll/CPUMAllA.asm \
389 VMMAll/CPUMAllRegs.cpp \
390 VMMAll/DBGFAll.cpp \
391 VMMAll/EMAll.cpp \
392 VMMAll/EMAllA.asm \
393 VMMAll/HWACCMAll.cpp \
394 VMMAll/IOMAll.cpp \
395 VMMAll/IOMAllMMIO.cpp \
396 VMMAll/MMAll.cpp \
397 VMMAll/MMAllHyper.cpp \
398 VMMAll/MMAllPagePool.cpp \
399 VMMAll/MMAllPhys.cpp \
400 VMMAll/PDMAll.cpp \
401 VMMAll/PDMAllCritSect.cpp \
402 VMMAll/PDMAllQueue.cpp \
403 VMMAll/PGMAll.cpp \
404 VMMAll/PGMAllHandler.cpp \
405 VMMAll/PGMAllMap.cpp \
406 VMMAll/PGMAllPhys.cpp \
407 VMMAll/PGMAllPool.cpp \
408 VMMAll/REMAll.cpp \
409 VMMAll/SELMAll.cpp \
410 VMMAll/TMAll.cpp \
411 VMMAll/TMAllCpu.cpp \
412 VMMAll/TMAllReal.cpp \
413 VMMAll/TMAllVirtual.cpp \
414 VMMAll/TRPMAll.cpp \
415 VMMAll/VMAll.cpp \
416
417
418ifeq ($(VBOX_LDR_FMT),pe)
419VMMR0_SOURCES += VMMR0/VMMR0.def
420endif
421ifeq ($(VBOX_LDR_FMT),lx)
422VMMR0_SOURCES += $(PATH_TARGET)/VMMR0.def
423endif
424
425VMMR0_LIBS = \
426 $(PATH_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
427 $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
428 $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB)
429ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
430VMMR0_LIBS += \
431 $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
432endif
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