VirtualBox

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

Last change on this file since 7802 was 6996, checked in by vboxsync, 17 years ago

Check for VBOX_WITH_PDM_LOCK.

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