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 | VMMAll/VMMAll.cpp \
|
---|
240 | PATM/VMMGC/CSAMGC.cpp \
|
---|
241 | PATM/VMMAll/CSAMAll.cpp \
|
---|
242 | PATM/VMMGC/PATMGC.cpp \
|
---|
243 | PATM/VMMAll/PATMAll.cpp
|
---|
244 |
|
---|
245 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
246 | VMMGC_SOURCES += VMMGC/VMMGC.def
|
---|
247 | endif
|
---|
248 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
249 | VMMGC_SOURCES += $(PATH_TARGET)/VMMGC.def
|
---|
250 | endif
|
---|
251 |
|
---|
252 | # the very last one.
|
---|
253 | VMMGC_SOURCES += VMMGC/VMMGC99.asm
|
---|
254 |
|
---|
255 | VMMGC/VMMGCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMGCDeps.cpp to .c
|
---|
256 |
|
---|
257 |
|
---|
258 | #
|
---|
259 | # VMMR0.r0
|
---|
260 | #
|
---|
261 | VMMR0_TEMPLATE = VBOXR0
|
---|
262 | VMMR0_INCS = . PATM
|
---|
263 | 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
|
---|
264 | ifeq ($(VBOX_LDR_FMT),pe)
|
---|
265 | VMMR0_LDFLAGS = -Entry:VMMR0Entry
|
---|
266 | endif
|
---|
267 | ifeq ($(VBOX_LDR_FMT),elf)
|
---|
268 | VMMR0_LDFLAGS = -entry=VMMR0Entry
|
---|
269 | endif
|
---|
270 | VMMR0_SYSSUFF = .r0
|
---|
271 | VMMR0_SOURCES = \
|
---|
272 | VMMR0/VMMR0.cpp \
|
---|
273 | VMMAll/DBGFAll.cpp \
|
---|
274 | VMMAll/TRPMAll.cpp \
|
---|
275 | VMMAll/CPUMAllRegs.cpp \
|
---|
276 | VMMAll/CPUMAllA.asm \
|
---|
277 | VMMAll/MMAll.cpp \
|
---|
278 | VMMAll/MMAllHyper.cpp \
|
---|
279 | VMMAll/MMAllPagePool.cpp \
|
---|
280 | VMMAll/MMAllPhys.cpp \
|
---|
281 | VMMR0/VMMR0A.asm \
|
---|
282 | VMMR0/HWACCMR0.cpp \
|
---|
283 | VMMR0/HWACCMR0A.asm \
|
---|
284 | VMMR0/HWVMXR0.cpp \
|
---|
285 | VMMR0/HWSVMR0.cpp \
|
---|
286 | VMMR0/CPUMR0.cpp \
|
---|
287 | VMMR0/TRPMR0.cpp \
|
---|
288 | VMMR0/TRPMR0A.asm \
|
---|
289 | VMMR0/PDMR0Device.cpp \
|
---|
290 | VMMAll/EMAll.cpp \
|
---|
291 | VMMAll/EMAllA.asm \
|
---|
292 | VMMAll/PDMAll.cpp \
|
---|
293 | VMMAll/PDMAllCritSect.cpp \
|
---|
294 | VMMAll/PDMAllQueue.cpp \
|
---|
295 | VMMAll/PGMAll.cpp \
|
---|
296 | VMMAll/PGMAllHandler.cpp \
|
---|
297 | VMMAll/PGMAllMap.cpp \
|
---|
298 | VMMAll/PGMAllPhys.cpp \
|
---|
299 | VMMAll/PGMAllPool.cpp \
|
---|
300 | VMMAll/REMAll.cpp \
|
---|
301 | VMMAll/IOMAll.cpp \
|
---|
302 | VMMAll/IOMAllMMIO.cpp \
|
---|
303 | VMMAll/SELMAll.cpp \
|
---|
304 | VMMAll/TMAll.cpp \
|
---|
305 | VMMAll/TMAllCpu.cpp \
|
---|
306 | VMMAll/TMAllReal.cpp \
|
---|
307 | VMMAll/TMAllVirtual.cpp \
|
---|
308 | VMMAll/VMAll.cpp \
|
---|
309 | PATM/VMMAll/PATMAll.cpp
|
---|
310 |
|
---|
311 | ifeq ($(VBOX_LDR_FMT),pe)
|
---|
312 | VMMR0_SOURCES += VMMR0/VMMR0.def
|
---|
313 | endif
|
---|
314 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
315 | VMMR0_SOURCES += $(PATH_TARGET)/VMMR0.def
|
---|
316 | endif
|
---|
317 |
|
---|
318 | VMMR0_LIBS = \
|
---|
319 | $(PATH_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
|
---|
320 | $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
|
---|
321 | $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB)
|
---|
322 | ifneq ($(BUILD_TARGET),darwin)
|
---|
323 | VMMR0_LIBS += \
|
---|
324 | $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
|
---|
325 | endif
|
---|
326 | ifeq ($(VBOX_LDR_FMT),elf)
|
---|
327 | VMMR0_LIBS += \
|
---|
328 | $(VBOX_GCC_LIBGCC)
|
---|
329 | endif
|
---|
330 |
|
---|
331 |
|
---|
332 | #
|
---|
333 | # The VMM DLL.
|
---|
334 | #
|
---|
335 | VBoxVMM_TEMPLATE = VBOXR3
|
---|
336 | VBoxVMM_DEFS = $(VMMR3_DEFS)
|
---|
337 | VBoxVMM_SOURCES = VBoxVMMDeps.cpp
|
---|
338 | VBoxVMM_SONAME.linux = VBoxVMM.so
|
---|
339 |
|
---|
340 | VBoxVMM_LIBS = \
|
---|
341 | $(PATH_LIB)/VMMR3$(VBOX_SUFF_LIB) \
|
---|
342 | $(PATH_LIB)/Debugger$(VBOX_SUFF_LIB) \
|
---|
343 | $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB) \
|
---|
344 | $(LIB_REM) \
|
---|
345 | $(LIB_RUNTIME)
|
---|
346 |
|
---|
347 | VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
|
---|
348 | VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
|
---|
349 | VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
|
---|
350 | VBoxVMM_LDFLAGS.darwin = -install_name @executable_path/VBoxVMM.dylib
|
---|
351 |
|
---|
352 | include $(PATH_KBUILD)/footer.kmk
|
---|
353 |
|
---|
354 |
|
---|
355 | # Alias the PGM templates to the object in which they are defined.
|
---|
356 | PGMBth.o PGMGst.o PGMShw.o \
|
---|
357 | PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
|
---|
358 | PGMAllBth.o PGMAllGst.o PGMAllShw.o \
|
---|
359 | PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
|
---|
360 | PGMGCBth.o PGMGCGst.o PGMGCShw.o \
|
---|
361 | PGMGCBth.obj PGMGCGst.obj PGMGCShw.obj: PGMGC.o
|
---|
362 |
|
---|