VirtualBox

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

Last change on this file since 2505 was 2482, checked in by vboxsync, 18 years ago

Drop PATH_CURRENT from the global DEFS as it plays merry poppins with sub-makefiles (command deps changes depending on which directory you invoke it from).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 9.1 KB
Line 
1# $Id: Makefile.kmk 2482 2007-05-04 02:02:17Z vboxsync $
2## @file
3# Makefile for the VMM.
4#
5
6#
7# Copyright (C) 2006 InnoTek Systemberatung 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#
17# If you received this file as part of a commercial VirtualBox
18# distribution, then only the terms of your commercial VirtualBox
19# license agreement apply instead of the previous paragraph.
20#
21
22DEPTH = ../../..
23include $(PATH_KBUILD)/header.kmk
24
25LIBRARIES = VMMR3
26ifneq ($(BUILD_TARGET),darwin)
27LIBRARIES += VMMGCBuiltin VMMGCImp VMMR0Imp
28endif
29SYSMODS = VMMGC VMMR0
30DLLS = VBoxVMM
31
32# Walk
33SUBDIRS_AFTER_BINARIES = testcase
34SUBDIRS_AFTER_OTHERS = testcase
35SUBDIRS_AFTER_CLEAN = testcase
36SUBDIRS_AFTER_NOTHING = testcase
37
38# Enable the PDM lock.
39#DEFS += VBOX_WITH_PDM_LOCK
40ifdef VBOX_WITH_INTERNAL_NETWORKING
41DEFS += VBOX_WITH_INTERNAL_NETWORKING
42endif
43
44
45#
46# VMMR3.dll
47#
48VMMR3_TEMPLATE = VBOXR3
49VMMR3_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 \
50 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
51ifdef VBOX_OSE
52 ifeq ($(BUILD_TARGET),darwin)
53 VMMR3_DEFS += PDMLDR_FAKE_MODE
54 endif
55endif
56VMMR3_INCS := \
57 PATM \
58 $(PATH_SUB_CURRENT)
59
60VMMR3_SOURCES = \
61 CFGM.cpp \
62 CPUM.cpp \
63 CPUMStack.cpp \
64 DBGF.cpp \
65 DBGFAddr.cpp \
66 DBGFBp.cpp \
67 DBGFDisas.cpp \
68 DBGFInfo.cpp \
69 DBGFLog.cpp \
70 DBGFStack.cpp \
71 DBGFSym.cpp \
72 EM.cpp \
73 IOM.cpp \
74 MM.cpp \
75 MMHeap.cpp \
76 MMHyper.cpp \
77 MMPagePool.cpp \
78 MMPhys.cpp \
79 PDM.cpp \
80 PDMDevice.cpp \
81 PDMDriver.cpp \
82 PDMLdr.cpp \
83 PDMCritSect.cpp \
84 PDMQueue.cpp \
85 PGM.cpp \
86 PGMHandler.cpp \
87 PGMMap.cpp \
88 PGMPhys.cpp \
89 PGMPool.cpp \
90 SELM.cpp \
91 SSM.cpp \
92 STAM.cpp \
93 TM.cpp \
94 TRPM.cpp \
95 VM.cpp \
96 VMEmt.cpp \
97 VMReq.cpp \
98 VMM.cpp \
99 VMMTests.cpp \
100 HWACCM.cpp \
101 VMMAll/CPUMAllRegs.cpp \
102 VMMAll/CPUMAllA.asm \
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
146
147#
148# VMMGCBuiltin.lib
149#
150VMMGCBuiltin_TEMPLATE = VBOXGC
151ifeq ($(VBOX_LDR_FMT32),pe)
152VMMGCBuiltin_SOURCES = VMMGC/VMMGCBuiltin.def
153endif
154ifeq ($(VBOX_LDR_FMT32),lx)
155VMMGCBuiltin_SOURCES = $(PATH_TARGET)/VMMGCBuiltin.def
156$(PATH_TARGET)/VMMGCBuiltin.def: VMMGC/VMMGCBuiltin.def | $(call DIRDEP,$(PATH_TARGET))
157 $(SED) -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > [email protected]
158 $(MV) -f [email protected] $@
159endif
160
161#
162# VMMGCImp.lib
163#
164VMMGCImp_TEMPLATE = VBOXGC
165ifeq ($(VBOX_LDR_FMT32),pe)
166VMMGCImp_SOURCES = VMMGC/VMMGC.def
167endif
168ifeq ($(VBOX_LDR_FMT32),lx)
169VMMGCImp_SOURCES = $(PATH_TARGET)/VMMGC.def
170$(PATH_TARGET)/VMMGC.def: VMMGC/VMMGC.def | $(call DIRDEP,$(PATH_TARGET))
171 $(SED) -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > [email protected]
172 $(APPEND) "[email protected]" ""
173 $(APPEND) "[email protected]" " ___ehInit"
174 $(MV) -f [email protected] $@
175endif
176
177#
178# VMMR0Imp.lib
179#
180VMMR0Imp_TEMPLATE = VBOXR0
181ifeq ($(VBOX_LDR_FMT),pe)
182VMMR0Imp_SOURCES = VMMR0/VMMR0.def
183endif
184ifeq ($(VBOX_LDR_FMT),lx)
185VMMR0Imp_SOURCES = $(PATH_TARGET)/VMMR0.def
186$(PATH_TARGET)/VMMR0.def: VMMR0/VMMR0.def | $(call DIRDEP,$(PATH_TARGET))
187 $(SED) -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > [email protected]
188 $(APPEND) "[email protected]" ""
189 $(APPEND) "[email protected]" " ___ehInit"
190 $(MV) -f [email protected] $@
191endif
192
193#
194# VMMGC.gc
195#
196VMMGC_TEMPLATE = VBOXGC
197VMMGC_INCS := \
198 $(PATH_SUB_CURRENT) \
199 VMMGC \
200 PATM
201VMMGC_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
202VMMGC_SYSSUFF = .gc
203VMMGC_LIBS = \
204 $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
205 $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
206ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
207VMMGC_LIBS += \
208 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
209endif
210ifeq ($(VBOX_LDR_FMT32),pe)
211VMMGC_LDFLAGS = -Entry:VMMGCEntry
212endif
213VMMGC_SOURCES = \
214 VMMGC/VMMGC0.asm \
215 VMMGC/VMMGCDeps.cpp \
216 VMMGC/CPUMGC.cpp \
217 VMMGC/CPUMGCA.asm \
218 VMMGC/EMGCA.asm \
219 VMMGC/DBGFGC.cpp \
220 VMMGC/IOMGC.cpp \
221 VMMGC/MMRamGC.cpp \
222 VMMGC/MMRamGCA.asm \
223 VMMGC/PDMGCDevice.cpp \
224 VMMGC/PGMGC.cpp \
225 VMMGC/SELMGC.cpp \
226 VMMGC/TRPMGC.cpp \
227 VMMGC/TRPMGCHandlers.cpp \
228 VMMGC/TRPMGCHandlersA.asm \
229 VMMGC/VMMGC.cpp \
230 VMMGC/VMMGCA.asm \
231 VMMAll/CPUMAllRegs.cpp \
232 VMMAll/CPUMAllA.asm \
233 VMMAll/DBGFAll.cpp \
234 VMMAll/IOMAll.cpp \
235 VMMAll/IOMAllMMIO.cpp \
236 VMMAll/EMAll.cpp \
237 VMMAll/EMAllA.asm \
238 VMMAll/MMAll.cpp \
239 VMMAll/MMAllHyper.cpp \
240 VMMAll/PDMAll.cpp \
241 VMMAll/PDMAllCritSect.cpp \
242 VMMAll/PDMAllQueue.cpp \
243 VMMAll/PGMAll.cpp \
244 VMMAll/PGMAllHandler.cpp \
245 VMMAll/PGMAllMap.cpp \
246 VMMAll/PGMAllPhys.cpp \
247 VMMAll/PGMAllPool.cpp \
248 VMMAll/REMAll.cpp \
249 VMMAll/SELMAll.cpp \
250 VMMAll/TMAll.cpp \
251 VMMAll/TMAllCpu.cpp \
252 VMMAll/TMAllReal.cpp \
253 VMMAll/TMAllVirtual.cpp \
254 VMMAll/TRPMAll.cpp \
255 VMMAll/VMAll.cpp \
256 VMMAll/VMMAll.cpp \
257 PATM/VMMGC/CSAMGC.cpp \
258 PATM/VMMAll/CSAMAll.cpp \
259 PATM/VMMGC/PATMGC.cpp \
260 PATM/VMMAll/PATMAll.cpp
261
262ifeq ($(VBOX_LDR_FMT32),pe)
263VMMGC_SOURCES += VMMGC/VMMGC.def
264endif
265ifeq ($(VBOX_LDR_FMT32),lx)
266VMMGC_SOURCES += $(PATH_TARGET)/VMMGC.def
267endif
268
269# the very last one.
270VMMGC_SOURCES += VMMGC/VMMGC99.asm
271
272VMMGC/VMMGCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMGCDeps.cpp to .c
273
274
275#
276# VMMR0.r0
277#
278VMMR0_TEMPLATE = VBOXR0
279VMMR0_INCS := \
280 $(PATH_SUB_CURRENT) \
281 PATM
282VMMR0_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 DIS_CORE_ONLY
283ifeq ($(VBOX_LDR_FMT),pe)
284VMMR0_LDFLAGS = -Entry:VMMR0Entry
285endif
286ifeq ($(VBOX_LDR_FMT),elf)
287VMMR0_LDFLAGS = -entry=VMMR0Entry
288endif
289VMMR0_SYSSUFF = .r0
290VMMR0_SOURCES = \
291 VMMR0/VMMR0.cpp \
292 VMMR0/DBGFR0.cpp \
293 VMMAll/DBGFAll.cpp \
294 VMMAll/TRPMAll.cpp \
295 VMMAll/CPUMAllRegs.cpp \
296 VMMAll/CPUMAllA.asm \
297 VMMAll/MMAll.cpp \
298 VMMAll/MMAllHyper.cpp \
299 VMMAll/MMAllPagePool.cpp \
300 VMMAll/MMAllPhys.cpp \
301 VMMR0/VMMR0A.asm \
302 VMMR0/HWACCMR0.cpp \
303 VMMR0/HWACCMR0A.asm \
304 VMMR0/HWVMXR0.cpp \
305 VMMR0/HWSVMR0.cpp \
306 VMMR0/CPUMR0.cpp \
307 VMMR0/TRPMR0.cpp \
308 VMMR0/TRPMR0A.asm \
309 VMMR0/PDMR0Device.cpp \
310 VMMAll/EMAll.cpp \
311 VMMAll/EMAllA.asm \
312 VMMAll/PDMAll.cpp \
313 VMMAll/PDMAllCritSect.cpp \
314 VMMAll/PDMAllQueue.cpp \
315 VMMAll/PGMAll.cpp \
316 VMMAll/PGMAllHandler.cpp \
317 VMMAll/PGMAllMap.cpp \
318 VMMAll/PGMAllPhys.cpp \
319 VMMAll/PGMAllPool.cpp \
320 VMMAll/REMAll.cpp \
321 VMMAll/IOMAll.cpp \
322 VMMAll/IOMAllMMIO.cpp \
323 VMMAll/SELMAll.cpp \
324 VMMAll/TMAll.cpp \
325 VMMAll/TMAllCpu.cpp \
326 VMMAll/TMAllReal.cpp \
327 VMMAll/TMAllVirtual.cpp \
328 VMMAll/VMAll.cpp \
329 PATM/VMMAll/PATMAll.cpp
330
331ifeq ($(VBOX_LDR_FMT),pe)
332VMMR0_SOURCES += VMMR0/VMMR0.def
333endif
334ifeq ($(VBOX_LDR_FMT),lx)
335VMMR0_SOURCES += $(PATH_TARGET)/VMMR0.def
336endif
337
338VMMR0_LIBS = \
339 $(PATH_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
340 $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
341 $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB)
342ifneq ($(BUILD_TARGET),darwin)
343VMMR0_LIBS += \
344 $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
345endif
346ifeq ($(VBOX_LDR_FMT),elf)
347VMMR0_LIBS += \
348 $(VBOX_GCC_LIBGCC)
349endif
350
351
352#
353# The VMM DLL.
354#
355VBoxVMM_TEMPLATE = VBOXR3
356VBoxVMM_DEFS = $(VMMR3_DEFS)
357VBoxVMM_SOURCES = VBoxVMMDeps.cpp
358VBoxVMM_SONAME.linux = VBoxVMM.so
359
360VBoxVMM_LIBS = \
361 $(PATH_LIB)/VMMR3$(VBOX_SUFF_LIB) \
362 $(PATH_LIB)/Debugger$(VBOX_SUFF_LIB) \
363 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB) \
364 $(LIB_REM) \
365 $(LIB_RUNTIME)
366
367VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
368VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
369VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
370VBoxVMM_LDFLAGS.darwin = -install_name @executable_path/VBoxVMM.dylib
371
372include $(PATH_KBUILD)/footer.kmk
373
374
375# Alias the PGM templates to the object in which they are defined.
376PGMBth.o PGMGst.o PGMShw.o \
377PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
378PGMAllBth.o PGMAllGst.o PGMAllShw.o \
379PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
380PGMGCBth.o PGMGCGst.o PGMGCShw.o \
381PGMGCBth.obj PGMGCGst.obj PGMGCShw.obj: PGMGC.o
382
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