VirtualBox

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

Last change on this file since 8943 was 8797, checked in by vboxsync, 17 years ago

New DBGF interface for digging into the guts of the guest OS kernel.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 10.5 KB
Line 
1# $Id: Makefile.kmk 8797 2008-05-13 23:16:03Z 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/IOMAll.cpp \
105 VMMAll/IOMAllMMIO.cpp \
106 VMMAll/MMAll.cpp \
107 VMMAll/MMAllHyper.cpp \
108 VMMAll/MMAllPagePool.cpp \
109 VMMAll/MMAllPhys.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/SELMAll.cpp \
119 VMMAll/EMAll.cpp \
120 VMMAll/EMAllA.asm \
121 VMMAll/TMAll.cpp \
122 VMMAll/TMAllCpu.cpp \
123 VMMAll/TMAllReal.cpp \
124 VMMAll/TMAllVirtual.cpp \
125 VMMAll/TRPMAll.cpp \
126 VMMAll/VMAll.cpp \
127 VMMAll/VMMAll.cpp \
128 PATM/CSAM.cpp \
129 PATM/VMMAll/CSAMAll.cpp \
130 PATM/PATM.cpp \
131 PATM/PATMPatch.cpp \
132 PATM/PATMGuest.cpp \
133 PATM/PATMA.asm \
134 PATM/PATMSSM.cpp \
135 PATM/VMMAll/PATMAll.cpp
136VMMR3_SOURCES.x86 += \
137 VMMSwitcher/32BitTo32Bit.asm \
138 VMMSwitcher/32BitToPAE.asm \
139 VMMSwitcher/PAETo32Bit.asm \
140 VMMSwitcher/PAEToPAE.asm
141VMMR3_SOURCES.amd64 = \
142 VMMSwitcher/AMD64ToPAE.asm
143VMMR3_SOURCES.darwin.x86 += \
144 VMMSwitcher/AMD64ToPAE.asm
145
146ifdef VBOX_WITH_USB
147VMMR3_DEFS += VBOX_WITH_USB
148VMMR3_SOURCES += PDMUsb.cpp
149endif
150
151ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
152VMMR3_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
153VMMR3_DEFS.linux += __USE_FILE_OFFSET64 __USE_LARGEFILE64
154VMMR3_SOURCES += PDMAsyncCompletion.cpp
155VMMR3_SOURCES.linux += \
156 PDMAsyncCompletionSocketPosix.cpp \
157 PDMAsyncCompletionHostLinux.cpp \
158 PDMAsyncCompletionHostPosix.cpp
159
160VMMR3_SOURCES.win += \
161 PDMAsyncCompletionSocketWin.cpp \
162 PDMAsyncCompletionHostWin.cpp
163
164VMMR3_SOURCES.solaris += \
165 PDMAsyncCompletionSocketPosix.cpp \
166 PDMAsyncCompletionHostSolaris.cpp
167
168VMMR3_SOURCES.darwin += \
169 PDMAsyncCompletionSocketPosix.cpp \
170 PDMAsyncCompletionHostDarwin.cpp
171
172VMMR3_SOURCES.freebsd += \
173 PDMAsyncCompletionSocketPosix.cpp \
174 PDMAsyncCompletionHostDarwin.cpp
175
176endif
177
178#
179# The VMM DLL.
180#
181DLLS += VBoxVMM
182VBoxVMM_TEMPLATE = VBOXR3
183VBoxVMM_DEFS = $(VMMR3_DEFS)
184VBoxVMM_SOURCES = VBoxVMMDeps.cpp
185VBoxVMM_SONAME.linux = VBoxVMM.so
186
187VBoxVMM_LIBS = \
188 $(PATH_LIB)/VMMR3$(VBOX_SUFF_LIB) \
189 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
190ifdef VBOX_WITH_DEBUGGER
191VBoxVMM_LIBS += \
192 $(PATH_LIB)/Debugger$(VBOX_SUFF_LIB)
193endif
194VBoxVMM_LIBS += \
195 $(LIB_REM) \
196 $(LIB_RUNTIME)
197
198VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
199VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
200VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
201VBoxVMM_LDFLAGS.darwin = -install_name @executable_path/VBoxVMM.dylib
202VBoxVMM_LDFLAGS.solaris = -mimpure-text
203ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
204 ifeq ($(KBUILD_HOST), linux)
205VBoxVMM_LIBS += aio
206 endif
207endif
208
209ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
210
211#
212# VMMGCBuiltin.lib
213#
214LIBRARIES += VMMGCBuiltin
215VMMGCBuiltin_TEMPLATE = VBOXGC
216ifeq ($(VBOX_LDR_FMT32),pe)
217VMMGCBuiltin_SOURCES = VMMGC/VMMGCBuiltin.def
218endif
219ifeq ($(VBOX_LDR_FMT32),lx)
220VMMGCBuiltin_SOURCES = $(PATH_TARGET)/VMMGCBuiltin.def
221$(PATH_TARGET)/VMMGCBuiltin.def: VMMGC/VMMGCBuiltin.def | $(call DIRDEP,$(PATH_TARGET))
222 $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > [email protected]
223 $(MV) -f [email protected] $@
224endif
225
226
227#
228# VMMGCImp.lib
229#
230LIBRARIES += VMMGCImp
231VMMGCImp_TEMPLATE = VBOXGC
232ifeq ($(VBOX_LDR_FMT32),pe)
233VMMGCImp_SOURCES = VMMGC/VMMGC.def
234endif
235ifeq ($(VBOX_LDR_FMT32),lx)
236VMMGCImp_SOURCES = $(PATH_TARGET)/VMMGC.def
237$(PATH_TARGET)/VMMGC.def: VMMGC/VMMGC.def | $(call DIRDEP,$(PATH_TARGET))
238 $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > [email protected]
239 $(APPEND) "[email protected]" ""
240 $(APPEND) "[email protected]" " ___ehInit"
241 $(MV) -f [email protected] $@
242endif
243
244endif # GC: pe + lx
245
246
247ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
248#
249# VMMR0Imp.lib
250#
251LIBRARIES += VMMR0Imp
252VMMR0Imp_TEMPLATE = VBOXR0
253 ifeq ($(VBOX_LDR_FMT),pe)
254VMMR0Imp_SOURCES = VMMR0/VMMR0.def
255 endif
256 ifeq ($(VBOX_LDR_FMT),lx)
257VMMR0Imp_SOURCES = $(PATH_TARGET)/VMMR0.def
258$(PATH_TARGET)/VMMR0.def: VMMR0/VMMR0.def | $(call DIRDEP,$(PATH_TARGET))
259 $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > [email protected]
260 $(APPEND) "[email protected]" ""
261 $(APPEND) "[email protected]" " ___ehInit"
262 $(MV) -f [email protected] $@
263 endif
264endif # R0: pe + lx
265
266
267#
268# VMMGC.gc
269#
270SYSMODS += VMMGC
271VMMGC_TEMPLATE = VBOXGC
272VMMGC_INCS := \
273 $(PATH_SUB_CURRENT) \
274 VMMGC \
275 PATM
276VMMGC_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
277ifdef VBOX_WITH_IDT_PATCHING
278VMMGC_DEFS += VBOX_WITH_IDT_PATCHING
279endif
280VMMGC_SYSSUFF = .gc
281VMMGC_LIBS = \
282 $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
283 $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
284ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
285VMMGC_LIBS += \
286 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
287endif
288ifeq ($(VBOX_LDR_FMT32),pe)
289VMMGC_LDFLAGS = -Entry:VMMGCEntry
290endif
291VMMGC_SOURCES = \
292 VMMGC/VMMGC0.asm \
293 VMMGC/VMMGCDeps.cpp \
294 VMMGC/CPUMGC.cpp \
295 VMMGC/CPUMGCA.asm \
296 VMMGC/EMGCA.asm \
297 VMMGC/DBGFGC.cpp \
298 VMMGC/IOMGC.cpp \
299 VMMGC/MMRamGC.cpp \
300 VMMGC/MMRamGCA.asm \
301 VMMGC/PDMGCDevice.cpp \
302 VMMGC/PGMGC.cpp \
303 VMMGC/SELMGC.cpp \
304 VMMGC/TRPMGC.cpp \
305 VMMGC/TRPMGCHandlers.cpp \
306 VMMGC/TRPMGCHandlersA.asm \
307 VMMGC/VMMGC.cpp \
308 VMMGC/VMMGCA.asm \
309 VMMAll/CPUMAllRegs.cpp \
310 VMMAll/CPUMAllA.asm \
311 VMMAll/DBGFAll.cpp \
312 VMMAll/IOMAll.cpp \
313 VMMAll/IOMAllMMIO.cpp \
314 VMMAll/EMAll.cpp \
315 VMMAll/EMAllA.asm \
316 VMMAll/MMAll.cpp \
317 VMMAll/MMAllHyper.cpp \
318 VMMAll/PDMAll.cpp \
319 VMMAll/PDMAllCritSect.cpp \
320 VMMAll/PDMAllQueue.cpp \
321 VMMAll/PGMAll.cpp \
322 VMMAll/PGMAllHandler.cpp \
323 VMMAll/PGMAllMap.cpp \
324 VMMAll/PGMAllPhys.cpp \
325 VMMAll/PGMAllPool.cpp \
326 VMMAll/REMAll.cpp \
327 VMMAll/SELMAll.cpp \
328 VMMAll/TMAll.cpp \
329 VMMAll/TMAllCpu.cpp \
330 VMMAll/TMAllReal.cpp \
331 VMMAll/TMAllVirtual.cpp \
332 VMMAll/TRPMAll.cpp \
333 VMMAll/VMAll.cpp \
334 VMMAll/VMMAll.cpp \
335 PATM/VMMGC/CSAMGC.cpp \
336 PATM/VMMAll/CSAMAll.cpp \
337 PATM/VMMGC/PATMGC.cpp \
338 PATM/VMMAll/PATMAll.cpp
339
340ifeq ($(VBOX_LDR_FMT32),pe)
341VMMGC_SOURCES += VMMGC/VMMGC.def
342endif
343ifeq ($(VBOX_LDR_FMT32),lx)
344VMMGC_SOURCES += $(PATH_TARGET)/VMMGC.def
345endif
346
347# the very last one.
348VMMGC_SOURCES += VMMGC/VMMGC99.asm
349
350VMMGC/VMMGCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMGCDeps.cpp to .c
351
352
353#
354# VMMR0.r0
355#
356SYSMODS += VMMR0
357VMMR0_TEMPLATE = VBOXR0
358VMMR0_INCS := \
359 $(PATH_SUB_CURRENT) \
360 PATM
361VMMR0_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
362ifdef VBOX_WITH_IDT_PATCHING
363VMMR0_DEFS += VBOX_WITH_IDT_PATCHING
364endif
365ifeq ($(VBOX_LDR_FMT),pe)
366VMMR0_LDFLAGS = -Entry:VMMR0EntryEx
367endif
368ifeq ($(VBOX_LDR_FMT),elf)
369 VMMR0_LDFLAGS = -e VMMR0EntryEx
370endif
371VMMR0_SYSSUFF = .r0
372VMMR0_SOURCES = \
373 VMMR0/CPUMR0.cpp \
374 VMMR0/DBGFR0.cpp \
375 VMMR0/GMMR0.cpp \
376 VMMR0/GVMMR0.cpp \
377 VMMR0/HWACCMR0.cpp \
378 VMMR0/HWACCMR0A.asm \
379 VMMR0/HWSVMR0.cpp \
380 VMMR0/HWVMXR0.cpp \
381 VMMR0/PDMR0Device.cpp \
382 VMMR0/PGMR0.cpp \
383 VMMR0/TRPMR0.cpp \
384 VMMR0/TRPMR0A.asm \
385 VMMR0/VMMR0.cpp \
386 VMMR0/VMMR0A.asm \
387 VMMAll/CPUMAllA.asm \
388 VMMAll/CPUMAllRegs.cpp \
389 VMMAll/DBGFAll.cpp \
390 VMMAll/EMAll.cpp \
391 VMMAll/EMAllA.asm \
392 VMMAll/IOMAll.cpp \
393 VMMAll/IOMAllMMIO.cpp \
394 VMMAll/MMAll.cpp \
395 VMMAll/MMAllHyper.cpp \
396 VMMAll/MMAllPagePool.cpp \
397 VMMAll/MMAllPhys.cpp \
398 VMMAll/PDMAll.cpp \
399 VMMAll/PDMAllCritSect.cpp \
400 VMMAll/PDMAllQueue.cpp \
401 VMMAll/PGMAll.cpp \
402 VMMAll/PGMAllHandler.cpp \
403 VMMAll/PGMAllMap.cpp \
404 VMMAll/PGMAllPhys.cpp \
405 VMMAll/PGMAllPool.cpp \
406 VMMAll/REMAll.cpp \
407 VMMAll/SELMAll.cpp \
408 VMMAll/TMAll.cpp \
409 VMMAll/TMAllCpu.cpp \
410 VMMAll/TMAllReal.cpp \
411 VMMAll/TMAllVirtual.cpp \
412 VMMAll/TRPMAll.cpp \
413 VMMAll/VMAll.cpp \
414
415
416ifeq ($(VBOX_LDR_FMT),pe)
417VMMR0_SOURCES += VMMR0/VMMR0.def
418endif
419ifeq ($(VBOX_LDR_FMT),lx)
420VMMR0_SOURCES += $(PATH_TARGET)/VMMR0.def
421endif
422
423VMMR0_LIBS = \
424 $(PATH_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
425 $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
426 $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB)
427ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
428VMMR0_LIBS += \
429 $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
430endif
431
432
433include $(KBUILD_PATH)/subfooter.kmk
434
435
436# Alias the PGM templates to the object in which they are defined.
437PGMBth.o PGMGst.o PGMShw.o \
438PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
439PGMAllBth.o PGMAllGst.o PGMAllShw.o \
440PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
441PGMGCBth.o PGMGCGst.o PGMGCShw.o \
442PGMGCBth.obj PGMGCGst.obj PGMGCShw.obj: PGMGC.o
443PGMPhysRWTmpl.o PGMPhysRWTmpl.obj: PGMPhys.o
444
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