VirtualBox

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

Last change on this file since 2267 was 2201, checked in by vboxsync, 18 years ago

Moved ins/outs handling to the VMMAll directory.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.1 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
50ifdef VBOX_OSE
51 ifeq ($(BUILD_TARGET),darwin)
52 VMMR3_DEFS += PDMLDR_FAKE_MODE
53 endif
54endif
55VMMR3_INCS = PATM
56
57VMMR3_SOURCES = \
58 CFGM.cpp \
59 CPUM.cpp \
60 CPUMStack.cpp \
61 DBGF.cpp \
62 DBGFAddr.cpp \
63 DBGFBp.cpp \
64 DBGFDisas.cpp \
65 DBGFInfo.cpp \
66 DBGFLog.cpp \
67 DBGFStack.cpp \
68 DBGFSym.cpp \
69 EM.cpp \
70 IOM.cpp \
71 MM.cpp \
72 MMHeap.cpp \
73 MMHyper.cpp \
74 MMPagePool.cpp \
75 MMPhys.cpp \
76 PDM.cpp \
77 PDMDevice.cpp \
78 PDMDriver.cpp \
79 PDMLdr.cpp \
80 PDMCritSect.cpp \
81 PDMQueue.cpp \
82 PGM.cpp \
83 PGMHandler.cpp \
84 PGMMap.cpp \
85 PGMPhys.cpp \
86 PGMPool.cpp \
87 SELM.cpp \
88 SSM.cpp \
89 STAM.cpp \
90 TM.cpp \
91 TRPM.cpp \
92 VM.cpp \
93 VMEmt.cpp \
94 VMReq.cpp \
95 VMM.cpp \
96 VMMTests.cpp \
97 HWACCM.cpp \
98 VMMAll/CPUMAllRegs.cpp \
99 VMMAll/CPUMAllA.asm \
100 VMMAll/DBGFAll.cpp \
101 VMMAll/IOMAll.cpp \
102 VMMAll/IOMAllMMIO.cpp \
103 VMMAll/MMAll.cpp \
104 VMMAll/MMAllHyper.cpp \
105 VMMAll/MMAllPagePool.cpp \
106 VMMAll/MMAllPhys.cpp \
107 VMMAll/PDMAll.cpp \
108 VMMAll/PDMAllCritSect.cpp \
109 VMMAll/PDMAllQueue.cpp \
110 VMMAll/PGMAll.cpp \
111 VMMAll/PGMAllHandler.cpp \
112 VMMAll/PGMAllMap.cpp \
113 VMMAll/PGMAllPhys.cpp \
114 VMMAll/PGMAllPool.cpp \
115 VMMAll/SELMAll.cpp \
116 VMMAll/EMAll.cpp \
117 VMMAll/EMAllA.asm \
118 VMMAll/TMAll.cpp \
119 VMMAll/TMAllCpu.cpp \
120 VMMAll/TMAllReal.cpp \
121 VMMAll/TMAllVirtual.cpp \
122 VMMAll/TRPMAll.cpp \
123 VMMAll/VMAll.cpp \
124 VMMAll/VMMAll.cpp \
125 PATM/CSAM.cpp \
126 PATM/VMMAll/CSAMAll.cpp \
127 PATM/PATM.cpp \
128 PATM/PATMPatch.cpp \
129 PATM/PATMGuest.cpp \
130 PATM/PATMA.asm \
131 PATM/PATMSSM.cpp \
132 PATM/VMMAll/PATMAll.cpp
133VMMR3_SOURCES.x86 += \
134 VMMSwitcher/32BitTo32Bit.asm \
135 VMMSwitcher/32BitToPAE.asm \
136 VMMSwitcher/PAETo32Bit.asm \
137 VMMSwitcher/PAEToPAE.asm
138VMMR3_SOURCES.amd64 = \
139 VMMSwitcher/AMD64ToPAE.asm
140VMMR3_SOURCES.darwin.x86 += \
141 VMMSwitcher/AMD64ToPAE.asm
142
143
144#
145# VMMGCBuiltin.lib
146#
147VMMGCBuiltin_TEMPLATE = VBOXGC
148ifeq ($(VBOX_LDR_FMT32),pe)
149VMMGCBuiltin_SOURCES = VMMGC/VMMGCBuiltin.def
150endif
151ifeq ($(VBOX_LDR_FMT32),lx)
152VMMGCBuiltin_SOURCES = $(PATH_TARGET)/VMMGCBuiltin.def
153$(PATH_TARGET)/VMMGCBuiltin.def: VMMGC/VMMGCBuiltin.def | $(call DIRDEP,$(PATH_TARGET))
154 $(SED) -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > $@.tmp
155 $(MV) -f $@.tmp $@
156endif
157
158#
159# VMMGCImp.lib
160#
161VMMGCImp_TEMPLATE = VBOXGC
162ifeq ($(VBOX_LDR_FMT32),pe)
163VMMGCImp_SOURCES = VMMGC/VMMGC.def
164endif
165ifeq ($(VBOX_LDR_FMT32),lx)
166VMMGCImp_SOURCES = $(PATH_TARGET)/VMMGC.def
167$(PATH_TARGET)/VMMGC.def: VMMGC/VMMGC.def | $(call DIRDEP,$(PATH_TARGET))
168 $(SED) -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > $@.tmp
169 $(APPEND) "[email protected]" ""
170 $(APPEND) "[email protected]" " ___ehInit"
171 $(MV) -f $@.tmp $@
172endif
173
174#
175# VMMR0Imp.lib
176#
177VMMR0Imp_TEMPLATE = VBOXR0
178ifeq ($(VBOX_LDR_FMT),pe)
179VMMR0Imp_SOURCES = VMMR0/VMMR0.def
180endif
181ifeq ($(VBOX_LDR_FMT),lx)
182VMMR0Imp_SOURCES = $(PATH_TARGET)/VMMR0.def
183$(PATH_TARGET)/VMMR0.def: VMMR0/VMMR0.def | $(call DIRDEP,$(PATH_TARGET))
184 $(SED) -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > $@.tmp
185 $(APPEND) "[email protected]" ""
186 $(APPEND) "[email protected]" " ___ehInit"
187 $(MV) -f $@.tmp $@
188endif
189
190#
191# VMMGC.gc
192#
193VMMGC_TEMPLATE = VBOXGC
194VMMGC_INCS = . VMMGC
195VMMGC_INCS += PATM
196VMMGC_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
197VMMGC_SYSSUFF = .gc
198VMMGC_LIBS = \
199 $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
200 $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
201ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
202VMMGC_LIBS += \
203 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
204endif
205ifeq ($(VBOX_LDR_FMT32),pe)
206VMMGC_LDFLAGS = -Entry:VMMGCEntry
207endif
208VMMGC_SOURCES = \
209 VMMGC/VMMGC0.asm \
210 VMMGC/VMMGCDeps.cpp \
211 VMMGC/CPUMGC.cpp \
212 VMMGC/CPUMGCA.asm \
213 VMMGC/EMGCA.asm \
214 VMMGC/DBGFGC.cpp \
215 VMMGC/IOMGC.cpp \
216 VMMGC/MMRamGC.cpp \
217 VMMGC/MMRamGCA.asm \
218 VMMGC/PDMGCDevice.cpp \
219 VMMGC/PGMGC.cpp \
220 VMMGC/SELMGC.cpp \
221 VMMGC/TRPMGC.cpp \
222 VMMGC/TRPMGCHandlers.cpp \
223 VMMGC/TRPMGCHandlersA.asm \
224 VMMGC/VMMGC.cpp \
225 VMMGC/VMMGCA.asm \
226 VMMAll/CPUMAllRegs.cpp \
227 VMMAll/CPUMAllA.asm \
228 VMMAll/DBGFAll.cpp \
229 VMMAll/IOMAll.cpp \
230 VMMAll/IOMAllMMIO.cpp \
231 VMMAll/EMAll.cpp \
232 VMMAll/EMAllA.asm \
233 VMMAll/MMAll.cpp \
234 VMMAll/MMAllHyper.cpp \
235 VMMAll/PDMAll.cpp \
236 VMMAll/PDMAllCritSect.cpp \
237 VMMAll/PDMAllQueue.cpp \
238 VMMAll/PGMAll.cpp \
239 VMMAll/PGMAllHandler.cpp \
240 VMMAll/PGMAllMap.cpp \
241 VMMAll/PGMAllPhys.cpp \
242 VMMAll/PGMAllPool.cpp \
243 VMMAll/REMAll.cpp \
244 VMMAll/SELMAll.cpp \
245 VMMAll/TMAll.cpp \
246 VMMAll/TMAllCpu.cpp \
247 VMMAll/TMAllReal.cpp \
248 VMMAll/TMAllVirtual.cpp \
249 VMMAll/TRPMAll.cpp \
250 VMMAll/VMAll.cpp \
251 VMMAll/VMMAll.cpp \
252 PATM/VMMGC/CSAMGC.cpp \
253 PATM/VMMAll/CSAMAll.cpp \
254 PATM/VMMGC/PATMGC.cpp \
255 PATM/VMMAll/PATMAll.cpp
256
257ifeq ($(VBOX_LDR_FMT32),pe)
258VMMGC_SOURCES += VMMGC/VMMGC.def
259endif
260ifeq ($(VBOX_LDR_FMT32),lx)
261VMMGC_SOURCES += $(PATH_TARGET)/VMMGC.def
262endif
263
264# the very last one.
265VMMGC_SOURCES += VMMGC/VMMGC99.asm
266
267VMMGC/VMMGCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMGCDeps.cpp to .c
268
269
270#
271# VMMR0.r0
272#
273VMMR0_TEMPLATE = VBOXR0
274VMMR0_INCS = . PATM
275VMMR0_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
276ifeq ($(VBOX_LDR_FMT),pe)
277VMMR0_LDFLAGS = -Entry:VMMR0Entry
278endif
279ifeq ($(VBOX_LDR_FMT),elf)
280VMMR0_LDFLAGS = -entry=VMMR0Entry
281endif
282VMMR0_SYSSUFF = .r0
283VMMR0_SOURCES = \
284 VMMR0/VMMR0.cpp \
285 VMMR0/DBGFR0.cpp \
286 VMMAll/DBGFAll.cpp \
287 VMMAll/TRPMAll.cpp \
288 VMMAll/CPUMAllRegs.cpp \
289 VMMAll/CPUMAllA.asm \
290 VMMAll/MMAll.cpp \
291 VMMAll/MMAllHyper.cpp \
292 VMMAll/MMAllPagePool.cpp \
293 VMMAll/MMAllPhys.cpp \
294 VMMR0/VMMR0A.asm \
295 VMMR0/HWACCMR0.cpp \
296 VMMR0/HWACCMR0A.asm \
297 VMMR0/HWVMXR0.cpp \
298 VMMR0/HWSVMR0.cpp \
299 VMMR0/CPUMR0.cpp \
300 VMMR0/TRPMR0.cpp \
301 VMMR0/TRPMR0A.asm \
302 VMMR0/PDMR0Device.cpp \
303 VMMAll/EMAll.cpp \
304 VMMAll/EMAllA.asm \
305 VMMAll/PDMAll.cpp \
306 VMMAll/PDMAllCritSect.cpp \
307 VMMAll/PDMAllQueue.cpp \
308 VMMAll/PGMAll.cpp \
309 VMMAll/PGMAllHandler.cpp \
310 VMMAll/PGMAllMap.cpp \
311 VMMAll/PGMAllPhys.cpp \
312 VMMAll/PGMAllPool.cpp \
313 VMMAll/REMAll.cpp \
314 VMMAll/IOMAll.cpp \
315 VMMAll/IOMAllMMIO.cpp \
316 VMMAll/SELMAll.cpp \
317 VMMAll/TMAll.cpp \
318 VMMAll/TMAllCpu.cpp \
319 VMMAll/TMAllReal.cpp \
320 VMMAll/TMAllVirtual.cpp \
321 VMMAll/VMAll.cpp \
322 PATM/VMMAll/PATMAll.cpp
323
324ifeq ($(VBOX_LDR_FMT),pe)
325VMMR0_SOURCES += VMMR0/VMMR0.def
326endif
327ifeq ($(VBOX_LDR_FMT),lx)
328VMMR0_SOURCES += $(PATH_TARGET)/VMMR0.def
329endif
330
331VMMR0_LIBS = \
332 $(PATH_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
333 $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
334 $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB)
335ifneq ($(BUILD_TARGET),darwin)
336VMMR0_LIBS += \
337 $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
338endif
339ifeq ($(VBOX_LDR_FMT),elf)
340VMMR0_LIBS += \
341 $(VBOX_GCC_LIBGCC)
342endif
343
344
345#
346# The VMM DLL.
347#
348VBoxVMM_TEMPLATE = VBOXR3
349VBoxVMM_DEFS = $(VMMR3_DEFS)
350VBoxVMM_SOURCES = VBoxVMMDeps.cpp
351VBoxVMM_SONAME.linux = VBoxVMM.so
352
353VBoxVMM_LIBS = \
354 $(PATH_LIB)/VMMR3$(VBOX_SUFF_LIB) \
355 $(PATH_LIB)/Debugger$(VBOX_SUFF_LIB) \
356 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB) \
357 $(LIB_REM) \
358 $(LIB_RUNTIME)
359
360VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
361VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
362VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
363VBoxVMM_LDFLAGS.darwin = -install_name @executable_path/VBoxVMM.dylib
364
365include $(PATH_KBUILD)/footer.kmk
366
367
368# Alias the PGM templates to the object in which they are defined.
369PGMBth.o PGMGst.o PGMShw.o \
370PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
371PGMAllBth.o PGMAllGst.o PGMAllShw.o \
372PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
373PGMGCBth.o PGMGCGst.o PGMGCShw.o \
374PGMGCBth.obj PGMGCGst.obj PGMGCShw.obj: PGMGC.o
375
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