VirtualBox

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

Last change on this file since 6738 was 6581, checked in by vboxsync, 17 years ago

Added some ring-3 wrapper functions for the (ring-0) GMM APIs.

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