1 | # $Id: Makefile.kmk 2482 2007-05-04 02:02:17Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the VMM.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006 InnoTek Systemberatung GmbH
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | # available from http://www.virtualbox.org. This file is free software;
|
---|
11 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | # General Public License as published by the Free Software Foundation,
|
---|
13 | # in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
14 | # distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
15 | # be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 | # If you received this file as part of a commercial VirtualBox
|
---|
18 | # distribution, then only the terms of your commercial VirtualBox
|
---|
19 | # license agreement apply instead of the previous paragraph.
|
---|
20 | #
|
---|
21 |
|
---|
22 | DEPTH = ../../..
|
---|
23 | include $(PATH_KBUILD)/header.kmk
|
---|
24 |
|
---|
25 | LIBRARIES = VMMR3
|
---|
26 | ifneq ($(BUILD_TARGET),darwin)
|
---|
27 | LIBRARIES += VMMGCBuiltin VMMGCImp VMMR0Imp
|
---|
28 | endif
|
---|
29 | SYSMODS = VMMGC VMMR0
|
---|
30 | DLLS = VBoxVMM
|
---|
31 |
|
---|
32 | # Walk
|
---|
33 | SUBDIRS_AFTER_BINARIES = testcase
|
---|
34 | SUBDIRS_AFTER_OTHERS = testcase
|
---|
35 | SUBDIRS_AFTER_CLEAN = testcase
|
---|
36 | SUBDIRS_AFTER_NOTHING = testcase
|
---|
37 |
|
---|
38 | # Enable the PDM lock.
|
---|
39 | #DEFS += VBOX_WITH_PDM_LOCK
|
---|
40 | ifdef VBOX_WITH_INTERNAL_NETWORKING
|
---|
41 | DEFS += VBOX_WITH_INTERNAL_NETWORKING
|
---|
42 | endif
|
---|
43 |
|
---|
44 |
|
---|
45 | #
|
---|
46 | # VMMR3.dll
|
---|
47 | #
|
---|
48 | VMMR3_TEMPLATE = VBOXR3
|
---|
49 | 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 \
|
---|
50 | 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
|
---|
51 | ifdef VBOX_OSE
|
---|
52 | ifeq ($(BUILD_TARGET),darwin)
|
---|
53 | VMMR3_DEFS += PDMLDR_FAKE_MODE
|
---|
54 | endif
|
---|
55 | endif
|
---|
56 | VMMR3_INCS := \
|
---|
57 | PATM \
|
---|
58 | $(PATH_SUB_CURRENT)
|
---|
59 |
|
---|
60 | VMMR3_SOURCES = \
|
---|
61 | CFGM.cpp \
|
---|
62 | CPUM.cpp \
|
---|
63 | CPUMStack.cpp \
|
---|
64 | DBGF.cpp \
|
---|
65 | DBGFAddr.cpp \
|
---|
66 | DBGFBp.cpp \
|
---|
67 | DBGFDisas.cpp \
|
---|
68 | DBGFInfo.cpp \
|
---|
69 | DBGFLog.cpp \
|
---|
70 | DBGFStack.cpp \
|
---|
71 | DBGFSym.cpp \
|
---|
72 | EM.cpp \
|
---|
73 | IOM.cpp \
|
---|
74 | MM.cpp \
|
---|
75 | MMHeap.cpp \
|
---|
76 | MMHyper.cpp \
|
---|
77 | MMPagePool.cpp \
|
---|
78 | MMPhys.cpp \
|
---|
79 | PDM.cpp \
|
---|
80 | PDMDevice.cpp \
|
---|
81 | PDMDriver.cpp \
|
---|
82 | PDMLdr.cpp \
|
---|
83 | PDMCritSect.cpp \
|
---|
84 | PDMQueue.cpp \
|
---|
85 | PGM.cpp \
|
---|
86 | PGMHandler.cpp \
|
---|
87 | PGMMap.cpp \
|
---|
88 | PGMPhys.cpp \
|
---|
89 | PGMPool.cpp \
|
---|
90 | SELM.cpp \
|
---|
91 | SSM.cpp \
|
---|
92 | STAM.cpp \
|
---|
93 | TM.cpp \
|
---|
94 | TRPM.cpp \
|
---|
95 | VM.cpp \
|
---|
96 | VMEmt.cpp \
|
---|
97 | VMReq.cpp \
|
---|
98 | VMM.cpp \
|
---|
99 | VMMTests.cpp \
|
---|
100 | HWACCM.cpp \
|
---|
101 | VMMAll/CPUMAllRegs.cpp \
|
---|
102 | VMMAll/CPUMAllA.asm \
|
---|
103 | VMMAll/DBGFAll.cpp \
|
---|
104 | VMMAll/IOMAll.cpp \
|
---|
105 | VMMAll/IOMAllMMIO.cpp \
|
---|
106 | VMMAll/MMAll.cpp \
|
---|
107 | VMMAll/MMAllHyper.cpp \
|
---|
108 | VMMAll/MMAllPagePool.cpp \
|
---|
109 | VMMAll/MMAllPhys.cpp \
|
---|
110 | VMMAll/PDMAll.cpp \
|
---|
111 | VMMAll/PDMAllCritSect.cpp \
|
---|
112 | VMMAll/PDMAllQueue.cpp \
|
---|
113 | VMMAll/PGMAll.cpp \
|
---|
114 | VMMAll/PGMAllHandler.cpp \
|
---|
115 | VMMAll/PGMAllMap.cpp \
|
---|
116 | VMMAll/PGMAllPhys.cpp \
|
---|
117 | VMMAll/PGMAllPool.cpp \
|
---|
118 | VMMAll/SELMAll.cpp \
|
---|
119 | VMMAll/EMAll.cpp \
|
---|
120 | VMMAll/EMAllA.asm \
|
---|
121 | VMMAll/TMAll.cpp \
|
---|
122 | VMMAll/TMAllCpu.cpp \
|
---|
123 | VMMAll/TMAllReal.cpp \
|
---|
124 | VMMAll/TMAllVirtual.cpp \
|
---|
125 | VMMAll/TRPMAll.cpp \
|
---|
126 | VMMAll/VMAll.cpp \
|
---|
127 | VMMAll/VMMAll.cpp \
|
---|
128 | PATM/CSAM.cpp \
|
---|
129 | PATM/VMMAll/CSAMAll.cpp \
|
---|
130 | PATM/PATM.cpp \
|
---|
131 | PATM/PATMPatch.cpp \
|
---|
132 | PATM/PATMGuest.cpp \
|
---|
133 | PATM/PATMA.asm \
|
---|
134 | PATM/PATMSSM.cpp \
|
---|
135 | PATM/VMMAll/PATMAll.cpp
|
---|
136 | VMMR3_SOURCES.x86 += \
|
---|
137 | VMMSwitcher/32BitTo32Bit.asm \
|
---|
138 | VMMSwitcher/32BitToPAE.asm \
|
---|
139 | VMMSwitcher/PAETo32Bit.asm \
|
---|
140 | VMMSwitcher/PAEToPAE.asm
|
---|
141 | VMMR3_SOURCES.amd64 = \
|
---|
142 | VMMSwitcher/AMD64ToPAE.asm
|
---|
143 | VMMR3_SOURCES.darwin.x86 += \
|
---|
144 | VMMSwitcher/AMD64ToPAE.asm
|
---|
145 |
|
---|
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]*/ /' $< > [email protected]
|
---|
158 | $(MV) -f [email protected] $@
|
---|
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]*/ /' $< > [email protected]
|
---|
172 | $(APPEND) "[email protected]" ""
|
---|
173 | $(APPEND) "[email protected]" " ___ehInit"
|
---|
174 | $(MV) -f [email protected] $@
|
---|
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]*/ /' $< > [email protected]
|
---|
188 | $(APPEND) "[email protected]" ""
|
---|
189 | $(APPEND) "[email protected]" " ___ehInit"
|
---|
190 | $(MV) -f [email protected] $@
|
---|
191 | endif
|
---|
192 |
|
---|
193 | #
|
---|
194 | # VMMGC.gc
|
---|
195 | #
|
---|
196 | VMMGC_TEMPLATE = VBOXGC
|
---|
197 | VMMGC_INCS := \
|
---|
198 | $(PATH_SUB_CURRENT) \
|
---|
199 | VMMGC \
|
---|
200 | PATM
|
---|
201 | 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
|
---|
202 | VMMGC_SYSSUFF = .gc
|
---|
203 | VMMGC_LIBS = \
|
---|
204 | $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
|
---|
205 | $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
|
---|
206 | ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
|
---|
207 | VMMGC_LIBS += \
|
---|
208 | $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
|
---|
209 | endif
|
---|
210 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
211 | VMMGC_LDFLAGS = -Entry:VMMGCEntry
|
---|
212 | endif
|
---|
213 | VMMGC_SOURCES = \
|
---|
214 | VMMGC/VMMGC0.asm \
|
---|
215 | VMMGC/VMMGCDeps.cpp \
|
---|
216 | VMMGC/CPUMGC.cpp \
|
---|
217 | VMMGC/CPUMGCA.asm \
|
---|
218 | VMMGC/EMGCA.asm \
|
---|
219 | VMMGC/DBGFGC.cpp \
|
---|
220 | VMMGC/IOMGC.cpp \
|
---|
221 | VMMGC/MMRamGC.cpp \
|
---|
222 | VMMGC/MMRamGCA.asm \
|
---|
223 | VMMGC/PDMGCDevice.cpp \
|
---|
224 | VMMGC/PGMGC.cpp \
|
---|
225 | VMMGC/SELMGC.cpp \
|
---|
226 | VMMGC/TRPMGC.cpp \
|
---|
227 | VMMGC/TRPMGCHandlers.cpp \
|
---|
228 | VMMGC/TRPMGCHandlersA.asm \
|
---|
229 | VMMGC/VMMGC.cpp \
|
---|
230 | VMMGC/VMMGCA.asm \
|
---|
231 | VMMAll/CPUMAllRegs.cpp \
|
---|
232 | VMMAll/CPUMAllA.asm \
|
---|
233 | VMMAll/DBGFAll.cpp \
|
---|
234 | VMMAll/IOMAll.cpp \
|
---|
235 | VMMAll/IOMAllMMIO.cpp \
|
---|
236 | VMMAll/EMAll.cpp \
|
---|
237 | VMMAll/EMAllA.asm \
|
---|
238 | VMMAll/MMAll.cpp \
|
---|
239 | VMMAll/MMAllHyper.cpp \
|
---|
240 | VMMAll/PDMAll.cpp \
|
---|
241 | VMMAll/PDMAllCritSect.cpp \
|
---|
242 | VMMAll/PDMAllQueue.cpp \
|
---|
243 | VMMAll/PGMAll.cpp \
|
---|
244 | VMMAll/PGMAllHandler.cpp \
|
---|
245 | VMMAll/PGMAllMap.cpp \
|
---|
246 | VMMAll/PGMAllPhys.cpp \
|
---|
247 | VMMAll/PGMAllPool.cpp \
|
---|
248 | VMMAll/REMAll.cpp \
|
---|
249 | VMMAll/SELMAll.cpp \
|
---|
250 | VMMAll/TMAll.cpp \
|
---|
251 | VMMAll/TMAllCpu.cpp \
|
---|
252 | VMMAll/TMAllReal.cpp \
|
---|
253 | VMMAll/TMAllVirtual.cpp \
|
---|
254 | VMMAll/TRPMAll.cpp \
|
---|
255 | VMMAll/VMAll.cpp \
|
---|
256 | VMMAll/VMMAll.cpp \
|
---|
257 | PATM/VMMGC/CSAMGC.cpp \
|
---|
258 | PATM/VMMAll/CSAMAll.cpp \
|
---|
259 | PATM/VMMGC/PATMGC.cpp \
|
---|
260 | PATM/VMMAll/PATMAll.cpp
|
---|
261 |
|
---|
262 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
263 | VMMGC_SOURCES += VMMGC/VMMGC.def
|
---|
264 | endif
|
---|
265 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
266 | VMMGC_SOURCES += $(PATH_TARGET)/VMMGC.def
|
---|
267 | endif
|
---|
268 |
|
---|
269 | # the very last one.
|
---|
270 | VMMGC_SOURCES += VMMGC/VMMGC99.asm
|
---|
271 |
|
---|
272 | VMMGC/VMMGCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMGCDeps.cpp to .c
|
---|
273 |
|
---|
274 |
|
---|
275 | #
|
---|
276 | # VMMR0.r0
|
---|
277 | #
|
---|
278 | VMMR0_TEMPLATE = VBOXR0
|
---|
279 | VMMR0_INCS := \
|
---|
280 | $(PATH_SUB_CURRENT) \
|
---|
281 | PATM
|
---|
282 | 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
|
---|
283 | ifeq ($(VBOX_LDR_FMT),pe)
|
---|
284 | VMMR0_LDFLAGS = -Entry:VMMR0Entry
|
---|
285 | endif
|
---|
286 | ifeq ($(VBOX_LDR_FMT),elf)
|
---|
287 | VMMR0_LDFLAGS = -entry=VMMR0Entry
|
---|
288 | endif
|
---|
289 | VMMR0_SYSSUFF = .r0
|
---|
290 | VMMR0_SOURCES = \
|
---|
291 | VMMR0/VMMR0.cpp \
|
---|
292 | VMMR0/DBGFR0.cpp \
|
---|
293 | VMMAll/DBGFAll.cpp \
|
---|
294 | VMMAll/TRPMAll.cpp \
|
---|
295 | VMMAll/CPUMAllRegs.cpp \
|
---|
296 | VMMAll/CPUMAllA.asm \
|
---|
297 | VMMAll/MMAll.cpp \
|
---|
298 | VMMAll/MMAllHyper.cpp \
|
---|
299 | VMMAll/MMAllPagePool.cpp \
|
---|
300 | VMMAll/MMAllPhys.cpp \
|
---|
301 | VMMR0/VMMR0A.asm \
|
---|
302 | VMMR0/HWACCMR0.cpp \
|
---|
303 | VMMR0/HWACCMR0A.asm \
|
---|
304 | VMMR0/HWVMXR0.cpp \
|
---|
305 | VMMR0/HWSVMR0.cpp \
|
---|
306 | VMMR0/CPUMR0.cpp \
|
---|
307 | VMMR0/TRPMR0.cpp \
|
---|
308 | VMMR0/TRPMR0A.asm \
|
---|
309 | VMMR0/PDMR0Device.cpp \
|
---|
310 | VMMAll/EMAll.cpp \
|
---|
311 | VMMAll/EMAllA.asm \
|
---|
312 | VMMAll/PDMAll.cpp \
|
---|
313 | VMMAll/PDMAllCritSect.cpp \
|
---|
314 | VMMAll/PDMAllQueue.cpp \
|
---|
315 | VMMAll/PGMAll.cpp \
|
---|
316 | VMMAll/PGMAllHandler.cpp \
|
---|
317 | VMMAll/PGMAllMap.cpp \
|
---|
318 | VMMAll/PGMAllPhys.cpp \
|
---|
319 | VMMAll/PGMAllPool.cpp \
|
---|
320 | VMMAll/REMAll.cpp \
|
---|
321 | VMMAll/IOMAll.cpp \
|
---|
322 | VMMAll/IOMAllMMIO.cpp \
|
---|
323 | VMMAll/SELMAll.cpp \
|
---|
324 | VMMAll/TMAll.cpp \
|
---|
325 | VMMAll/TMAllCpu.cpp \
|
---|
326 | VMMAll/TMAllReal.cpp \
|
---|
327 | VMMAll/TMAllVirtual.cpp \
|
---|
328 | VMMAll/VMAll.cpp \
|
---|
329 | PATM/VMMAll/PATMAll.cpp
|
---|
330 |
|
---|
331 | ifeq ($(VBOX_LDR_FMT),pe)
|
---|
332 | VMMR0_SOURCES += VMMR0/VMMR0.def
|
---|
333 | endif
|
---|
334 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
335 | VMMR0_SOURCES += $(PATH_TARGET)/VMMR0.def
|
---|
336 | endif
|
---|
337 |
|
---|
338 | VMMR0_LIBS = \
|
---|
339 | $(PATH_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
|
---|
340 | $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
|
---|
341 | $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB)
|
---|
342 | ifneq ($(BUILD_TARGET),darwin)
|
---|
343 | VMMR0_LIBS += \
|
---|
344 | $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
|
---|
345 | endif
|
---|
346 | ifeq ($(VBOX_LDR_FMT),elf)
|
---|
347 | VMMR0_LIBS += \
|
---|
348 | $(VBOX_GCC_LIBGCC)
|
---|
349 | endif
|
---|
350 |
|
---|
351 |
|
---|
352 | #
|
---|
353 | # The VMM DLL.
|
---|
354 | #
|
---|
355 | VBoxVMM_TEMPLATE = VBOXR3
|
---|
356 | VBoxVMM_DEFS = $(VMMR3_DEFS)
|
---|
357 | VBoxVMM_SOURCES = VBoxVMMDeps.cpp
|
---|
358 | VBoxVMM_SONAME.linux = VBoxVMM.so
|
---|
359 |
|
---|
360 | VBoxVMM_LIBS = \
|
---|
361 | $(PATH_LIB)/VMMR3$(VBOX_SUFF_LIB) \
|
---|
362 | $(PATH_LIB)/Debugger$(VBOX_SUFF_LIB) \
|
---|
363 | $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB) \
|
---|
364 | $(LIB_REM) \
|
---|
365 | $(LIB_RUNTIME)
|
---|
366 |
|
---|
367 | VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
|
---|
368 | VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
|
---|
369 | VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
|
---|
370 | VBoxVMM_LDFLAGS.darwin = -install_name @executable_path/VBoxVMM.dylib
|
---|
371 |
|
---|
372 | include $(PATH_KBUILD)/footer.kmk
|
---|
373 |
|
---|
374 |
|
---|
375 | # Alias the PGM templates to the object in which they are defined.
|
---|
376 | PGMBth.o PGMGst.o PGMShw.o \
|
---|
377 | PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
|
---|
378 | PGMAllBth.o PGMAllGst.o PGMAllShw.o \
|
---|
379 | PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
|
---|
380 | PGMGCBth.o PGMGCGst.o PGMGCShw.o \
|
---|
381 | PGMGCBth.obj PGMGCGst.obj PGMGCShw.obj: PGMGC.o
|
---|
382 |
|
---|