VirtualBox

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

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

Don't try use Debugger.lib/a unless it's built and needed.

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette