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