VirtualBox

source: vbox/trunk/src/VBox/VMM/Makefile@ 1349

Last change on this file since 1349 was 1345, checked in by vboxsync, 18 years ago

VBOX_WITH_INTERNAL_NETWORKING. disabled for L4 and Darwin.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.3 KB
Line 
1#
2# Makefile for the VMM.
3#
4
5#
6# Copyright (C) 2006 InnoTek Systemberatung GmbH
7#
8# This file is part of VirtualBox Open Source Edition (OSE), as
9# available from http://www.virtualbox.org. This file is free software;
10# you can redistribute it and/or modify it under the terms of the GNU
11# General Public License as published by the Free Software Foundation,
12# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
13# distribution. VirtualBox OSE is distributed in the hope that it will
14# be useful, but WITHOUT ANY WARRANTY of any kind.
15#
16# If you received this file as part of a commercial VirtualBox
17# distribution, then only the terms of your commercial VirtualBox
18# license agreement apply instead of the previous paragraph.
19#
20
21DEPTH = ../../..
22include $(PATH_KBUILD)/header.kmk
23
24LIBRARIES = VMMR3
25ifneq ($(BUILD_TARGET),darwin)
26LIBRARIES += VMMGCBuiltin VMMGCImp VMMR0Imp
27endif
28SYSMODS = VMMGC VMMR0
29DLLS = VBoxVMM
30
31# Walk
32SUBDIRS_AFTER_BINARIES = testcase
33SUBDIRS_AFTER_OTHERS = testcase
34SUBDIRS_AFTER_CLEAN = testcase
35SUBDIRS_AFTER_NOTHING = testcase
36
37# Enable the PDM lock.
38#DEFS += VBOX_WITH_PDM_LOCK
39ifdef VBOX_WITH_INTERNAL_NETWORKING
40DEFS += VBOX_WITH_INTERNAL_NETWORKING
41endif
42
43
44#
45# VMMR3.dll
46#
47VMMR3_TEMPLATE = VBOXR3
48VMMR3_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 \
49 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
50VMMR3_INCS = PATM
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 DBGFStack.cpp \
63 DBGFSym.cpp \
64 EM.cpp \
65 IOM.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 PGM.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/MMAll.cpp \
98 VMMAll/MMAllHyper.cpp \
99 VMMAll/MMAllPagePool.cpp \
100 VMMAll/MMAllPhys.cpp \
101 VMMAll/PDMAll.cpp \
102 VMMAll/PDMAllCritSect.cpp \
103 VMMAll/PDMAllQueue.cpp \
104 VMMAll/PGMAll.cpp \
105 VMMAll/PGMAllHandler.cpp \
106 VMMAll/PGMAllMap.cpp \
107 VMMAll/PGMAllPhys.cpp \
108 VMMAll/PGMAllPool.cpp \
109 VMMAll/SELMAll.cpp \
110 VMMAll/EMAll.cpp \
111 VMMAll/EMAllA.asm \
112 VMMAll/TMAll.cpp \
113 VMMAll/TMAllCpu.cpp \
114 VMMAll/TMAllReal.cpp \
115 VMMAll/TMAllVirtual.cpp \
116 VMMAll/TRPMAll.cpp \
117 VMMAll/VMAll.cpp \
118 VMMAll/VMMAll.cpp \
119 PATM/CSAM.cpp \
120 PATM/VMMAll/CSAMAll.cpp \
121 PATM/PATM.cpp \
122 PATM/PATMPatch.cpp \
123 PATM/PATMGuest.cpp \
124 PATM/PATMA.asm \
125 PATM/PATMSSM.cpp \
126 PATM/VMMAll/PATMAll.cpp
127VMMR3_SOURCES.x86 += \
128 VMMSwitcher/32BitTo32Bit.asm \
129 VMMSwitcher/32BitToPAE.asm \
130 VMMSwitcher/PAETo32Bit.asm \
131 VMMSwitcher/PAEToPAE.asm
132VMMR3_SOURCES.amd64 = \
133 VMMSwitcher/AMD64ToPAE.asm
134# VMMSwitcher/AMD64ToAMD64.asm
135
136ifeq ($(BUILD_TARGET),darwin)
137# this is just a temporary hack until we switch to yasm on Mac OS X too.
138LIBRARIES += VMMR364
139VMMR364_TOOL = $(VBOX_GCC_TOOL)
140VMMR364_ASTOOL = YASM
141VMMR364_ASFLAGS = -f macho -w+orphan-labels
142VMMR364_ASDEFS = ASM_FORMAT_MACHO $(ARCH_BITS_DEFS) __YASM__
143VMMR364_SOURCES.darwin.x86 += \
144 VMMSwitcher/AMD64ToPAE.asm
145endif
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]*/ /' $< > $@.tmp
158 $(MV) -f $@.tmp $@
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]*/ /' $< > $@.tmp
172 $(APPEND) "[email protected]" ""
173 $(APPEND) "[email protected]" " ___ehInit"
174 $(MV) -f $@.tmp $@
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]*/ /' $< > $@.tmp
188 $(APPEND) "[email protected]" ""
189 $(APPEND) "[email protected]" " ___ehInit"
190 $(MV) -f $@.tmp $@
191endif
192
193#
194# VMMGC.gc
195#
196VMMGC_TEMPLATE = VBOXGC
197VMMGC_INCS = . VMMGC
198VMMGC_INCS += PATM
199VMMGC_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
200VMMGC_SYSSUFF = .gc
201VMMGC_LIBS = \
202 $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
203 $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
204ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
205VMMGC_LIBS += \
206 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
207endif
208ifeq ($(VBOX_LDR_FMT32),pe)
209VMMGC_LDFLAGS = -Entry:VMMGCEntry
210endif
211VMMGC_SOURCES = \
212 VMMGC/VMMGC0.asm \
213 VMMGC/VMMGCDeps.cpp \
214 VMMGC/CPUMGC.cpp \
215 VMMGC/CPUMGCA.asm \
216 VMMGC/DBGFGC.cpp \
217 VMMGC/IOMGC.cpp \
218 VMMGC/MMRamGC.cpp \
219 VMMGC/MMRamGCA.asm \
220 VMMGC/PDMGCDevice.cpp \
221 VMMGC/PGMGC.cpp \
222 VMMGC/SELMGC.cpp \
223 VMMGC/TRPMGC.cpp \
224 VMMGC/TRPMGCHandlers.cpp \
225 VMMGC/TRPMGCHandlersA.asm \
226 VMMGC/VMMGC.cpp \
227 VMMGC/VMMGCA.asm \
228 VMMAll/CPUMAllRegs.cpp \
229 VMMAll/CPUMAllA.asm \
230 VMMAll/DBGFAll.cpp \
231 VMMAll/IOMAll.cpp \
232 VMMAll/IOMAllMMIO.cpp \
233 VMMAll/EMAll.cpp \
234 VMMAll/EMAllA.asm \
235 VMMAll/MMAll.cpp \
236 VMMAll/MMAllHyper.cpp \
237 VMMAll/PDMAll.cpp \
238 VMMAll/PDMAllCritSect.cpp \
239 VMMAll/PDMAllQueue.cpp \
240 VMMAll/PGMAll.cpp \
241 VMMAll/PGMAllHandler.cpp \
242 VMMAll/PGMAllMap.cpp \
243 VMMAll/PGMAllPhys.cpp \
244 VMMAll/PGMAllPool.cpp \
245 VMMAll/REMAll.cpp \
246 VMMAll/SELMAll.cpp \
247 VMMAll/TMAll.cpp \
248 VMMAll/TMAllCpu.cpp \
249 VMMAll/TMAllReal.cpp \
250 VMMAll/TMAllVirtual.cpp \
251 VMMAll/TRPMAll.cpp \
252 VMMAll/VMAll.cpp \
253 VMMAll/VMMAll.cpp \
254 PATM/VMMGC/CSAMGC.cpp \
255 PATM/VMMAll/CSAMAll.cpp \
256 PATM/VMMGC/PATMGC.cpp \
257 PATM/VMMAll/PATMAll.cpp
258
259ifeq ($(VBOX_LDR_FMT32),pe)
260VMMGC_SOURCES += VMMGC/VMMGC.def
261endif
262ifeq ($(VBOX_LDR_FMT32),lx)
263VMMGC_SOURCES += $(PATH_TARGET)/VMMGC.def
264endif
265
266# the very last one.
267VMMGC_SOURCES += VMMGC/VMMGC99.asm
268
269VMMGC/VMMGCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMGCDeps.cpp to .c
270
271
272#
273# VMMR0.r0
274#
275VMMR0_TEMPLATE = VBOXR0
276VMMR0_INCS = . PATM
277VMMR0_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
278ifeq ($(VBOX_LDR_FMT),pe)
279VMMR0_LDFLAGS = -Entry:VMMR0Entry
280endif
281ifeq ($(VBOX_LDR_FMT),elf)
282VMMR0_LDFLAGS = -entry=VMMR0Entry
283endif
284VMMR0_SYSSUFF = .r0
285VMMR0_SOURCES = \
286 VMMR0/VMMR0.cpp \
287 VMMAll/DBGFAll.cpp \
288 VMMAll/TRPMAll.cpp \
289 VMMAll/CPUMAllRegs.cpp \
290 VMMAll/CPUMAllA.asm \
291 VMMAll/MMAll.cpp \
292 VMMAll/MMAllHyper.cpp \
293 VMMAll/MMAllPagePool.cpp \
294 VMMAll/MMAllPhys.cpp \
295 VMMR0/VMMR0A.asm \
296 VMMR0/HWACCMR0.cpp \
297 VMMR0/HWACCMR0A.asm \
298 VMMR0/HWVMXR0.cpp \
299 VMMR0/HWSVMR0.cpp \
300 VMMR0/CPUMR0.cpp \
301 VMMR0/TRPMR0.cpp \
302 VMMR0/TRPMR0A.asm \
303 VMMR0/PDMR0Device.cpp \
304 VMMAll/EMAll.cpp \
305 VMMAll/EMAllA.asm \
306 VMMAll/PDMAll.cpp \
307 VMMAll/PDMAllCritSect.cpp \
308 VMMAll/PDMAllQueue.cpp \
309 VMMAll/PGMAll.cpp \
310 VMMAll/PGMAllHandler.cpp \
311 VMMAll/PGMAllMap.cpp \
312 VMMAll/PGMAllPhys.cpp \
313 VMMAll/PGMAllPool.cpp \
314 VMMAll/REMAll.cpp \
315 VMMAll/IOMAll.cpp \
316 VMMAll/IOMAllMMIO.cpp \
317 VMMAll/SELMAll.cpp \
318 VMMAll/TMAll.cpp \
319 VMMAll/TMAllCpu.cpp \
320 VMMAll/TMAllReal.cpp \
321 VMMAll/TMAllVirtual.cpp \
322 VMMAll/VMAll.cpp \
323 PATM/VMMAll/PATMAll.cpp
324
325ifeq ($(VBOX_LDR_FMT),pe)
326VMMR0_SOURCES += VMMR0/VMMR0.def
327endif
328ifeq ($(VBOX_LDR_FMT),lx)
329VMMR0_SOURCES += $(PATH_TARGET)/VMMR0.def
330endif
331
332VMMR0_LIBS = \
333 $(PATH_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
334 $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
335 $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB)
336ifneq ($(BUILD_TARGET),darwin)
337VMMR0_LIBS += \
338 $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
339endif
340ifeq ($(VBOX_LDR_FMT),elf)
341VMMR0_LIBS += \
342 $(VBOX_GCC_LIBGCC)
343endif
344
345
346#
347# The VMM DLL.
348#
349VBoxVMM_TEMPLATE = VBOXR3
350VBoxVMM_DEFS = $(VMMR3_DEFS)
351VBoxVMM_SOURCES = VBoxVMMDeps.cpp
352VBoxVMM_SONAME.linux = VBoxVMM.so
353
354VBoxVMM_LIBS = \
355 $(PATH_LIB)/VMMR3$(VBOX_SUFF_LIB) \
356 $(PATH_LIB)/Debugger$(VBOX_SUFF_LIB) \
357 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB) \
358 $(LIB_REM) \
359 $(LIB_RUNTIME)
360
361ifeq ($(BUILD_TARGET),darwin)
362 VBoxVMM_LIBS += $(TARGET_VMMR364) # temp hack
363endif
364VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
365VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
366VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
367VBoxVMM_LDFLAGS.darwin = -install_name @executable_path/VBoxVMM.dylib
368
369include $(PATH_KBUILD)/footer.kmk
370
371
372# Alias the PGM templates to the object in which they are defined.
373PGMBth.o PGMGst.o PGMShw.o \
374PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
375PGMAllBth.o PGMAllGst.o PGMAllShw.o \
376PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
377PGMGCBth.o PGMGCGst.o PGMGCShw.o \
378PGMGCBth.obj PGMGCGst.obj PGMGCShw.obj: PGMGC.o
379
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