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 | VMMR3_INCS = PATM
|
---|
51 |
|
---|
52 | VMMR3_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
|
---|
127 | VMMR3_SOURCES.x86 += \
|
---|
128 | VMMSwitcher/32BitTo32Bit.asm \
|
---|
129 | VMMSwitcher/32BitToPAE.asm \
|
---|
130 | VMMSwitcher/PAETo32Bit.asm \
|
---|
131 | VMMSwitcher/PAEToPAE.asm
|
---|
132 | VMMR3_SOURCES.amd64 = \
|
---|
133 | VMMSwitcher/AMD64ToPAE.asm
|
---|
134 | # VMMSwitcher/AMD64ToAMD64.asm
|
---|
135 |
|
---|
136 | ifeq ($(BUILD_TARGET),darwin)
|
---|
137 | # this is just a temporary hack until we switch to yasm on Mac OS X too.
|
---|
138 | LIBRARIES += VMMR364
|
---|
139 | VMMR364_TOOL = $(VBOX_GCC_TOOL)
|
---|
140 | VMMR364_ASTOOL = YASM
|
---|
141 | VMMR364_ASFLAGS = -f macho -w+orphan-labels
|
---|
142 | VMMR364_ASDEFS = ASM_FORMAT_MACHO $(ARCH_BITS_DEFS) __YASM__
|
---|
143 | VMMR364_SOURCES.darwin.x86 += \
|
---|
144 | VMMSwitcher/AMD64ToPAE.asm
|
---|
145 | endif
|
---|
146 |
|
---|
147 | #
|
---|
148 | # VMMGCBuiltin.lib
|
---|
149 | #
|
---|
150 | VMMGCBuiltin_TEMPLATE = VBOXGC
|
---|
151 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
152 | VMMGCBuiltin_SOURCES = VMMGC/VMMGCBuiltin.def
|
---|
153 | endif
|
---|
154 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
155 | VMMGCBuiltin_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 $@
|
---|
159 | endif
|
---|
160 |
|
---|
161 | #
|
---|
162 | # VMMGCImp.lib
|
---|
163 | #
|
---|
164 | VMMGCImp_TEMPLATE = VBOXGC
|
---|
165 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
166 | VMMGCImp_SOURCES = VMMGC/VMMGC.def
|
---|
167 | endif
|
---|
168 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
169 | VMMGCImp_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 $@
|
---|
175 | endif
|
---|
176 |
|
---|
177 | #
|
---|
178 | # VMMR0Imp.lib
|
---|
179 | #
|
---|
180 | VMMR0Imp_TEMPLATE = VBOXR0
|
---|
181 | ifeq ($(VBOX_LDR_FMT),pe)
|
---|
182 | VMMR0Imp_SOURCES = VMMR0/VMMR0.def
|
---|
183 | endif
|
---|
184 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
185 | VMMR0Imp_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 $@
|
---|
191 | endif
|
---|
192 |
|
---|
193 | #
|
---|
194 | # VMMGC.gc
|
---|
195 | #
|
---|
196 | VMMGC_TEMPLATE = VBOXGC
|
---|
197 | VMMGC_INCS = . VMMGC
|
---|
198 | VMMGC_INCS += PATM
|
---|
199 | 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
|
---|
200 | VMMGC_SYSSUFF = .gc
|
---|
201 | VMMGC_LIBS = \
|
---|
202 | $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
|
---|
203 | $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
|
---|
204 | ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
|
---|
205 | VMMGC_LIBS += \
|
---|
206 | $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
|
---|
207 | endif
|
---|
208 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
209 | VMMGC_LDFLAGS = -Entry:VMMGCEntry
|
---|
210 | endif
|
---|
211 | VMMGC_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 |
|
---|
259 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
260 | VMMGC_SOURCES += VMMGC/VMMGC.def
|
---|
261 | endif
|
---|
262 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
263 | VMMGC_SOURCES += $(PATH_TARGET)/VMMGC.def
|
---|
264 | endif
|
---|
265 |
|
---|
266 | # the very last one.
|
---|
267 | VMMGC_SOURCES += VMMGC/VMMGC99.asm
|
---|
268 |
|
---|
269 | VMMGC/VMMGCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMGCDeps.cpp to .c
|
---|
270 |
|
---|
271 |
|
---|
272 | #
|
---|
273 | # VMMR0.r0
|
---|
274 | #
|
---|
275 | VMMR0_TEMPLATE = VBOXR0
|
---|
276 | VMMR0_INCS = . PATM
|
---|
277 | 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
|
---|
278 | ifeq ($(VBOX_LDR_FMT),pe)
|
---|
279 | VMMR0_LDFLAGS = -Entry:VMMR0Entry
|
---|
280 | endif
|
---|
281 | ifeq ($(VBOX_LDR_FMT),elf)
|
---|
282 | VMMR0_LDFLAGS = -entry=VMMR0Entry
|
---|
283 | endif
|
---|
284 | VMMR0_SYSSUFF = .r0
|
---|
285 | VMMR0_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 |
|
---|
325 | ifeq ($(VBOX_LDR_FMT),pe)
|
---|
326 | VMMR0_SOURCES += VMMR0/VMMR0.def
|
---|
327 | endif
|
---|
328 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
329 | VMMR0_SOURCES += $(PATH_TARGET)/VMMR0.def
|
---|
330 | endif
|
---|
331 |
|
---|
332 | VMMR0_LIBS = \
|
---|
333 | $(PATH_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
|
---|
334 | $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
|
---|
335 | $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB)
|
---|
336 | ifneq ($(BUILD_TARGET),darwin)
|
---|
337 | VMMR0_LIBS += \
|
---|
338 | $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
|
---|
339 | endif
|
---|
340 | ifeq ($(VBOX_LDR_FMT),elf)
|
---|
341 | VMMR0_LIBS += \
|
---|
342 | $(VBOX_GCC_LIBGCC)
|
---|
343 | endif
|
---|
344 |
|
---|
345 |
|
---|
346 | #
|
---|
347 | # The VMM DLL.
|
---|
348 | #
|
---|
349 | VBoxVMM_TEMPLATE = VBOXR3
|
---|
350 | VBoxVMM_DEFS = $(VMMR3_DEFS)
|
---|
351 | VBoxVMM_SOURCES = VBoxVMMDeps.cpp
|
---|
352 | VBoxVMM_SONAME.linux = VBoxVMM.so
|
---|
353 |
|
---|
354 | VBoxVMM_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 |
|
---|
361 | ifeq ($(BUILD_TARGET),darwin)
|
---|
362 | VBoxVMM_LIBS += $(TARGET_VMMR364) # temp hack
|
---|
363 | endif
|
---|
364 | VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
|
---|
365 | VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
|
---|
366 | VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
|
---|
367 | VBoxVMM_LDFLAGS.darwin = -install_name @executable_path/VBoxVMM.dylib
|
---|
368 |
|
---|
369 | include $(PATH_KBUILD)/footer.kmk
|
---|
370 |
|
---|
371 |
|
---|
372 | # Alias the PGM templates to the object in which they are defined.
|
---|
373 | PGMBth.o PGMGst.o PGMShw.o \
|
---|
374 | PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
|
---|
375 | PGMAllBth.o PGMAllGst.o PGMAllShw.o \
|
---|
376 | PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
|
---|
377 | PGMGCBth.o PGMGCGst.o PGMGCShw.o \
|
---|
378 | PGMGCBth.obj PGMGCGst.obj PGMGCShw.obj: PGMGC.o
|
---|
379 |
|
---|