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