1 | # $Id: Makefile.kmk 55046 2015-03-31 17:19:58Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Top-level makefile for the VMM.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2015 Oracle Corporation
|
---|
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 (GPL) as published by the Free Software
|
---|
13 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 |
|
---|
18 | SUB_DEPTH = ../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 | # Include sub-makefiles.
|
---|
22 | ifndef VBOX_ONLY_EXTPACKS
|
---|
23 | include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
|
---|
24 | endif
|
---|
25 | include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
|
---|
26 |
|
---|
27 |
|
---|
28 | #
|
---|
29 | # Globals
|
---|
30 | #
|
---|
31 |
|
---|
32 | ## DEFS variable that is picked up by all three VMM targets.
|
---|
33 | # Can be prepended to by setting it in LocalConfig.kmk
|
---|
34 | VMM_COMMON_DEFS ?= VBOX_IN_VMM
|
---|
35 | ifdef VBOX_WITH_FIRST_IEM_STEP
|
---|
36 | VMM_COMMON_DEFS += VBOX_WITH_FIRST_IEM_STEP
|
---|
37 | endif
|
---|
38 | #ifdef VBOX_WITH_IEM
|
---|
39 | # VMM_COMMON_DEFS += VBOX_WITH_IEM
|
---|
40 | #endif
|
---|
41 | ifdef VBOX_WITH_REM
|
---|
42 | VMM_COMMON_DEFS += VBOX_WITH_REM
|
---|
43 | endif
|
---|
44 | ifdef VBOX_WITH_MULTI_CORE
|
---|
45 | VMM_COMMON_DEFS += VBOX_WITH_MULTI_CORE
|
---|
46 | endif
|
---|
47 | ifdef VBOX_WITH_R0_LOGGING
|
---|
48 | VMM_COMMON_DEFS += VBOX_WITH_R0_LOGGING
|
---|
49 | endif
|
---|
50 | ifdef VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI
|
---|
51 | VMM_COMMON_DEFS += VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI
|
---|
52 | endif
|
---|
53 | ifdef VBOX_WITH_PCI_PASSTHROUGH
|
---|
54 | VMM_COMMON_DEFS += VBOX_WITH_PCI_PASSTHROUGH
|
---|
55 | endif
|
---|
56 | ifdef VBOX_WITH_DTRACE_RC
|
---|
57 | VMM_COMMON_DEFS += VBOX_WITH_DTRACE_RC
|
---|
58 | endif
|
---|
59 | ifdef VBOX_WITH_SAFE_STR
|
---|
60 | VMM_COMMON_DEFS += VBOX_WITH_SAFE_STR
|
---|
61 | endif
|
---|
62 | ifdef VBOX_WITH_RAW_RING1
|
---|
63 | VMM_COMMON_DEFS += VBOX_WITH_RAW_RING1
|
---|
64 | endif
|
---|
65 | ifdef VBOX_WITH_64ON32_IDT
|
---|
66 | VMM_COMMON_DEFS += VBOX_WITH_64ON32_IDT
|
---|
67 | endif
|
---|
68 | ifdef VBOX_WITH_64ON32_CMOS_DEBUG
|
---|
69 | VMM_COMMON_DEFS += VBOX_WITH_64ON32_CMOS_DEBUG
|
---|
70 | endif
|
---|
71 | ifeq ($(KBUILD_TARGET),amd64)
|
---|
72 | VMM_COMMON_DEFS += VBOX_WITH_MORE_RING0_MEM_MAPPINGS
|
---|
73 | endif
|
---|
74 |
|
---|
75 | # VMM_COMMON_DEFS += VBOX_WITH_NS_ACCOUNTING_STATS
|
---|
76 |
|
---|
77 | # Special IEM debug mode which compares the result with HM/REM
|
---|
78 | ifdef IEM_VERIFICATION_MODE
|
---|
79 | VMM_COMMON_DEFS += IEM_VERIFICATION_MODE IEM_VERIFICATION_MODE_FULL IEM_VERIFICATION_MODE_FULL_HM
|
---|
80 | endif
|
---|
81 |
|
---|
82 |
|
---|
83 | #
|
---|
84 | # The VMM DLL.
|
---|
85 | #
|
---|
86 | ifndef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
|
---|
87 | DLLS += VBoxVMM
|
---|
88 | endif
|
---|
89 | VBoxVMM_TEMPLATE = VBoxR3DllNoPic
|
---|
90 | VBoxVMM_SONAME.linux = VBoxVMM.so
|
---|
91 |
|
---|
92 | VBoxVMM_DEFS = IN_VMM_R3 IN_DIS IN_GMM_R3 IN_DBG $(VMM_COMMON_DEFS)
|
---|
93 | ## @todo eliminate IN_GMM_R3
|
---|
94 | ifdef VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
|
---|
95 | VBoxVMM_DEFS += VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
|
---|
96 | endif
|
---|
97 | ifdef VBOX_WITH_VUSB
|
---|
98 | VBoxVMM_DEFS += VBOX_WITH_USB
|
---|
99 | endif
|
---|
100 | ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
101 | VBoxVMM_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
102 | endif
|
---|
103 | ifdef VBOX_WITH_NETSHAPER
|
---|
104 | VBoxVMM_DEFS += VBOX_WITH_NETSHAPER
|
---|
105 | endif
|
---|
106 | ifdef VBOX_WITH_RAW_MODE
|
---|
107 | VBoxVMM_DEFS += VBOX_WITH_RAW_MODE VBOX_WITH_RAW_MODE_NOT_R0
|
---|
108 | endif
|
---|
109 | ifdef VBOX_WITH_PDM_AUDIO_DRIVER
|
---|
110 | VBoxVMM_DEFS += VBOX_WITH_PDM_AUDIO_DRIVER
|
---|
111 | endif
|
---|
112 | ifdef VBOX_WITH_VMM_R0_SWITCH_STACK
|
---|
113 | VBoxVMM_DEFS += VMM_R0_SWITCH_STACK
|
---|
114 | endif
|
---|
115 | if "$(KBUILD_TYPE)" == "debug" && "$(USERNAME)" == "bird"
|
---|
116 | VBoxVMM_DEFS += RTMEM_WRAP_TO_EF_APIS
|
---|
117 | endif
|
---|
118 | VBoxVMM_DEFS.darwin = VMM_R0_SWITCH_STACK
|
---|
119 | VBoxVMM_DEFS.darwin.x86 = \
|
---|
120 | VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R3 \
|
---|
121 | VBOX_WITH_HYBRID_32BIT_KERNEL VBOX_WITH_HYBRID_32BIT_KERNEL_IN_R3
|
---|
122 |
|
---|
123 | VBoxVMM_INCS = \
|
---|
124 | include \
|
---|
125 | $(if-expr defined(VBOX_WITH_RAW_MODE),PATM,)
|
---|
126 | VBoxVMM_ASINCS = .
|
---|
127 |
|
---|
128 | VBoxVMM_SOURCES = \
|
---|
129 | VBoxVMM.d \
|
---|
130 | VMMR3/CFGM.cpp \
|
---|
131 | VMMR3/CPUM.cpp \
|
---|
132 | VMMR3/CPUMR3CpuId.cpp \
|
---|
133 | VMMR3/CPUMR3Db.cpp \
|
---|
134 | VMMR3/CPUMDbg.cpp \
|
---|
135 | VMMR3/DBGF.cpp \
|
---|
136 | VMMR3/DBGFAddr.cpp \
|
---|
137 | VMMR3/DBGFAddrSpace.cpp \
|
---|
138 | VMMR3/DBGFBp.cpp \
|
---|
139 | VMMR3/DBGFCoreWrite.cpp \
|
---|
140 | VMMR3/DBGFCpu.cpp \
|
---|
141 | VMMR3/DBGFDisas.cpp \
|
---|
142 | VMMR3/DBGFInfo.cpp \
|
---|
143 | VMMR3/DBGFLog.cpp \
|
---|
144 | VMMR3/DBGFMem.cpp \
|
---|
145 | VMMR3/DBGFOS.cpp \
|
---|
146 | VMMR3/DBGFReg.cpp \
|
---|
147 | VMMR3/DBGFStack.cpp \
|
---|
148 | VMMR3/DBGFR3Trace.cpp \
|
---|
149 | VMMR3/EM.cpp \
|
---|
150 | VMMR3/EMR3Dbg.cpp \
|
---|
151 | $(if $(VBOX_WITH_RAW_MODE),VMMR3/EMRaw.cpp) \
|
---|
152 | VMMR3/EMHM.cpp \
|
---|
153 | VMMR3/FTM.cpp \
|
---|
154 | VMMR3/GIM.cpp \
|
---|
155 | VMMR3/GIMHv.cpp \
|
---|
156 | VMMR3/GIMKvm.cpp \
|
---|
157 | VMMR3/GIMMinimal.cpp \
|
---|
158 | VMMR3/IEMR3.cpp \
|
---|
159 | VMMR3/IOM.cpp \
|
---|
160 | VMMR3/GMM.cpp \
|
---|
161 | VMMR3/MM.cpp \
|
---|
162 | VMMR3/MMHeap.cpp \
|
---|
163 | VMMR3/MMHyper.cpp \
|
---|
164 | VMMR3/MMPagePool.cpp \
|
---|
165 | VMMR3/MMUkHeap.cpp \
|
---|
166 | VMMR3/PDM.cpp \
|
---|
167 | VMMR3/PDMBlkCache.cpp \
|
---|
168 | VMMR3/PDMDevice.cpp \
|
---|
169 | VMMR3/PDMDevHlp.cpp \
|
---|
170 | VMMR3/PDMDevMiscHlp.cpp \
|
---|
171 | VMMR3/PDMDriver.cpp \
|
---|
172 | VMMR3/PDMLdr.cpp \
|
---|
173 | VMMR3/PDMCritSect.cpp \
|
---|
174 | VMMR3/PDMQueue.cpp \
|
---|
175 | VMMR3/PDMThread.cpp \
|
---|
176 | VMMR3/PGM.cpp \
|
---|
177 | VMMR3/PGMDbg.cpp \
|
---|
178 | VMMR3/PGMHandler.cpp \
|
---|
179 | VMMR3/PGMMap.cpp \
|
---|
180 | VMMR3/PGMPhys.cpp \
|
---|
181 | VMMR3/PGMPool.cpp \
|
---|
182 | VMMR3/PGMSavedState.cpp \
|
---|
183 | VMMR3/PGMSharedPage.cpp \
|
---|
184 | VMMR3/SELM.cpp \
|
---|
185 | VMMR3/SSM.cpp \
|
---|
186 | VMMR3/STAM.cpp \
|
---|
187 | VMMR3/TM.cpp \
|
---|
188 | VMMR3/TRPM.cpp \
|
---|
189 | VMMR3/VM.cpp \
|
---|
190 | VMMR3/VMEmt.cpp \
|
---|
191 | VMMR3/VMReq.cpp \
|
---|
192 | VMMR3/VMM.cpp \
|
---|
193 | VMMR3/VMMGuruMeditation.cpp \
|
---|
194 | VMMR3/VMMSwitcher.cpp \
|
---|
195 | VMMR3/VMMTests.cpp \
|
---|
196 | VMMR3/HM.cpp \
|
---|
197 | $(if-expr defined(VBOX_WITH_RAW_MODE), \
|
---|
198 | VMMR3/CSAM.cpp \
|
---|
199 | VMMR3/PATM.cpp \
|
---|
200 | VMMR3/PATMPatch.cpp \
|
---|
201 | VMMR3/PATMGuest.cpp \
|
---|
202 | VMMR3/PATMA.asm \
|
---|
203 | VMMR3/PATMSSM.cpp \
|
---|
204 | VMMR3/PATMR3Dbg.cpp \
|
---|
205 | ,) \
|
---|
206 | VMMAll/CPUMAllRegs.cpp \
|
---|
207 | VMMAll/CPUMAllMsrs.cpp \
|
---|
208 | VMMAll/CPUMStack.cpp \
|
---|
209 | VMMAll/DBGFAll.cpp \
|
---|
210 | VMMAll/HMAll.cpp \
|
---|
211 | VMMAll/IEMAll.cpp \
|
---|
212 | VMMAll/IEMAllAImpl.asm \
|
---|
213 | VMMAll/IEMAllAImplC.cpp \
|
---|
214 | VMMAll/IOMAll.cpp \
|
---|
215 | VMMAll/IOMAllMMIO.cpp \
|
---|
216 | VMMAll/MMAll.cpp \
|
---|
217 | VMMAll/MMAllHyper.cpp \
|
---|
218 | VMMAll/MMAllPagePool.cpp \
|
---|
219 | VMMAll/PDMAll.cpp \
|
---|
220 | VMMAll/PDMAllCritSect.cpp \
|
---|
221 | VMMAll/PDMAllCritSectRw.cpp \
|
---|
222 | VMMAll/PDMAllCritSectBoth.cpp \
|
---|
223 | VMMAll/PDMAllQueue.cpp \
|
---|
224 | VMMAll/PGMAll.cpp \
|
---|
225 | VMMAll/PGMAllHandler.cpp \
|
---|
226 | VMMAll/PGMAllMap.cpp \
|
---|
227 | VMMAll/PGMAllPhys.cpp \
|
---|
228 | VMMAll/PGMAllPool.cpp \
|
---|
229 | VMMAll/REMAll.cpp \
|
---|
230 | VMMAll/SELMAll.cpp \
|
---|
231 | VMMAll/EMAll.cpp \
|
---|
232 | VMMAll/EMAllA.asm \
|
---|
233 | VMMAll/FTMAll.cpp \
|
---|
234 | VMMAll/GIMAll.cpp \
|
---|
235 | VMMAll/GIMAllHv.cpp \
|
---|
236 | VMMAll/GIMAllKvm.cpp \
|
---|
237 | VMMAll/TMAll.cpp \
|
---|
238 | VMMAll/TMAllCpu.cpp \
|
---|
239 | VMMAll/TMAllReal.cpp \
|
---|
240 | VMMAll/TMAllVirtual.cpp \
|
---|
241 | VMMAll/TRPMAll.cpp \
|
---|
242 | VMMAll/VMAll.cpp \
|
---|
243 | VMMAll/VMMAll.cpp \
|
---|
244 | VMMAll/VMMAllA.asm \
|
---|
245 | $(if-expr defined(VBOX_WITH_RAW_MODE), \
|
---|
246 | VMMAll/CSAMAll.cpp \
|
---|
247 | VMMAll/PATMAll.cpp \
|
---|
248 | ,)
|
---|
249 | ifdef VBOX_WITH_VUSB
|
---|
250 | VBoxVMM_SOURCES += VMMR3/PDMUsb.cpp
|
---|
251 | endif
|
---|
252 | ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
253 | VBoxVMM_SOURCES += \
|
---|
254 | VMMR3/PDMAsyncCompletion.cpp \
|
---|
255 | VMMR3/PDMAsyncCompletionFile.cpp \
|
---|
256 | VMMR3/PDMAsyncCompletionFileFailsafe.cpp \
|
---|
257 | VMMR3/PDMAsyncCompletionFileNormal.cpp
|
---|
258 | endif
|
---|
259 | ifdef VBOX_WITH_NETSHAPER
|
---|
260 | VBoxVMM_SOURCES += \
|
---|
261 | VMMR3/PDMNetShaper.cpp \
|
---|
262 | VMMAll/PDMAllNetShaper.cpp
|
---|
263 | endif
|
---|
264 |
|
---|
265 | ifdef VBOX_WITH_RAW_MODE
|
---|
266 | VBoxVMM_SOURCES.x86 += \
|
---|
267 | VMMSwitcher/32BitTo32Bit.asm \
|
---|
268 | VMMSwitcher/32BitToPAE.asm \
|
---|
269 | VMMSwitcher/PAETo32Bit.asm \
|
---|
270 | VMMSwitcher/PAEToPAE.asm
|
---|
271 | VBoxVMM_SOURCES.amd64 = \
|
---|
272 | VMMSwitcher/AMD64To32Bit.asm \
|
---|
273 | VMMSwitcher/AMD64ToPAE.asm
|
---|
274 | VBoxVMM_SOURCES.darwin.x86 += \
|
---|
275 | VMMSwitcher/AMD64ToPAE.asm
|
---|
276 | endif
|
---|
277 | VBoxVMM_SOURCES.x86 += \
|
---|
278 | VMMSwitcher/32BitToAMD64.asm \
|
---|
279 | VMMSwitcher/PAEToAMD64.asm \
|
---|
280 | VMMSwitcher/X86Stub.asm
|
---|
281 | VBoxVMM_SOURCES.amd64 += \
|
---|
282 | VMMSwitcher/AMD64Stub.asm
|
---|
283 | VBoxVMM_SOURCES.win += \
|
---|
284 | VMMR3/VMMR3.rc
|
---|
285 |
|
---|
286 | VBoxVMM_LIBS = \
|
---|
287 | $(PATH_STAGE_LIB)/DisasmR3$(VBOX_SUFF_LIB)
|
---|
288 | ifdef VBOX_WITH_DEBUGGER
|
---|
289 | VBoxVMM_LIBS += \
|
---|
290 | $(PATH_STAGE_LIB)/Debugger$(VBOX_SUFF_LIB)
|
---|
291 | endif
|
---|
292 | VBoxVMM_LIBS += \
|
---|
293 | $(LIB_REM) \
|
---|
294 | $(LIB_RUNTIME)
|
---|
295 |
|
---|
296 | VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
|
---|
297 | VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
|
---|
298 | VBoxVMM_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxVMM.dylib
|
---|
299 | VBoxVMM_LDFLAGS.solaris = -mimpure-text
|
---|
300 |
|
---|
301 | # SSM wish to know the build type, host os and arch.
|
---|
302 | VMMR3/SSM.cpp_DEFS += \
|
---|
303 | KBUILD_TYPE=\"$(KBUILD_TYPE)\" \
|
---|
304 | KBUILD_TARGET=\"$(KBUILD_TARGET)\" \
|
---|
305 | KBUILD_TARGET_ARCH=\"$(KBUILD_TARGET_ARCH)\"
|
---|
306 |
|
---|
307 |
|
---|
308 | #ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
309 | # ifeq ($(KBUILD_HOST), linux)
|
---|
310 | #VBoxVMM_LIBS += aio
|
---|
311 | # endif
|
---|
312 | #endif
|
---|
313 |
|
---|
314 |
|
---|
315 | if defined(VBOX_WITH_RAW_MODE) && $(intersects $(VBOX_LDR_FMT32), pe lx)
|
---|
316 |
|
---|
317 | #
|
---|
318 | # VMMRCBuiltin.lib
|
---|
319 | #
|
---|
320 | LIBRARIES += VMMRCBuiltin
|
---|
321 | VMMRCBuiltin_TEMPLATE = VBoxRc
|
---|
322 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
323 | VMMRCBuiltin_SOURCES = VMMRC/VMMRCBuiltin.def
|
---|
324 | endif
|
---|
325 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
326 | VMMRCBuiltin_SOURCES = $(VMMRCBuiltin_0_OUTDIR)/VMMRCBuiltin.def
|
---|
327 | $$(VMMRCBuiltin_0_OUTDIR)/VMMRCBuiltin.def: $(PATH_SUB_CURRENT)/VMMRC/VMMRCBuiltin.def | $$(dir $$@)
|
---|
328 | $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' --output $@ $<
|
---|
329 | endif
|
---|
330 |
|
---|
331 |
|
---|
332 | #
|
---|
333 | # VMMRCImp.lib
|
---|
334 | #
|
---|
335 | LIBRARIES += VMMRCImp
|
---|
336 | VMMRCImp_TEMPLATE = VBoxRc
|
---|
337 | VMMRCImp_SOURCES = $(VMMRCImp_0_OUTDIR)/VMMRC.def
|
---|
338 | VMMRCImp_CLEAN = $(VMMRCImp_0_OUTDIR)/VMMRC.def
|
---|
339 |
|
---|
340 | $$(VMMRCImp_0_OUTDIR)/VMMRC.def: $(PATH_SUB_CURRENT)/VMMRC/VMMRC.def | $$(dir $$@)
|
---|
341 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
342 | $(SED) \
|
---|
343 | -e '/not-os2/d' \
|
---|
344 | -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' \
|
---|
345 | -e 's/[ \t]DATA[ \t]*/ /' \
|
---|
346 | --output $@ \
|
---|
347 | $<
|
---|
348 | $(APPEND) "$@" ""
|
---|
349 | $(APPEND) "$@" " ___ehInit"
|
---|
350 | else
|
---|
351 | $(SED) \
|
---|
352 | -e '/not-win/d' \
|
---|
353 | -e '/not-$(KBUILD_TARGET_ARCH)/d' \
|
---|
354 | --output $@ $<
|
---|
355 | endif
|
---|
356 |
|
---|
357 | endif # RC && (pe || lx)
|
---|
358 |
|
---|
359 |
|
---|
360 | if1of ($(VBOX_LDR_FMT), pe lx)
|
---|
361 | #
|
---|
362 | # VMMR0Imp.lib
|
---|
363 | #
|
---|
364 | LIBRARIES += VMMR0Imp
|
---|
365 | VMMR0Imp_TEMPLATE = VBoxR0
|
---|
366 | VMMR0Imp_SOURCES = $(VMMR0Imp_0_OUTDIR)/VMMR0.def
|
---|
367 | VMMR0Imp_CLEAN = $(VMMR0Imp_0_OUTDIR)/VMMR0.def
|
---|
368 |
|
---|
369 | $$(VMMR0Imp_0_OUTDIR)/VMMR0.def: $(PATH_SUB_CURRENT)/VMMR0/VMMR0.def | $$(dir $$@)
|
---|
370 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
371 | $(SED) \
|
---|
372 | -e '/not-os2/d' \
|
---|
373 | -e '/not-amd64/d' \
|
---|
374 | -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' \
|
---|
375 | -e 's/[ \t]DATA[ \t]*/ /' \
|
---|
376 | --output $@ $<
|
---|
377 | $(APPEND) "$@" ""
|
---|
378 | $(APPEND) "$@" " ___ehInit"
|
---|
379 | else
|
---|
380 | $(SED) \
|
---|
381 | -e '/not-win/d' \
|
---|
382 | -e '/not-$(KBUILD_TARGET_ARCH)/d' \
|
---|
383 | --output $@ $<
|
---|
384 | endif
|
---|
385 | endif # R0: pe + lx
|
---|
386 |
|
---|
387 |
|
---|
388 | #
|
---|
389 | # VMMR3Imp.lib
|
---|
390 | #
|
---|
391 | IMPORT_LIBS += VMMR3Imp
|
---|
392 | $(call VBOX_GENERATE_IMPORT_TARGET_FN,VMMR3Imp,VBoxVMM,VMMR3/VMMR3.def)
|
---|
393 |
|
---|
394 | ifneq ($(VBOX_LIB_VMM_LAZY),$(LIB_VMM))
|
---|
395 | #
|
---|
396 | # VMMR3LazyImp.lib (experimental)
|
---|
397 | #
|
---|
398 | LIBRARIES += VMMR3LazyImp
|
---|
399 | VMMR3LazyImp_TEMPLATE = VBoxR3Dll
|
---|
400 | VMMR3LazyImp_INST = $(INST_LIB)
|
---|
401 | VMMR3LazyImp_SOURCES = $(VMMR3LazyImp_0_OUTDIR)/VMMR3LazyLoad.asm
|
---|
402 | VMMR3LazyImp_CLEAN = $(VMMR3LazyImp_0_OUTDIR)/VMMR3LazyLoad.asm
|
---|
403 | $$(VMMR3LazyImp_0_OUTDIR)/VMMR3LazyLoad.asm: $(PATH_SUB_CURRENT)/VMMR3/VMMR3.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@)
|
---|
404 | $(VBOX_DEF_2_LAZY_LOAD) --output $@ --library VBoxVMM $<
|
---|
405 | endif
|
---|
406 |
|
---|
407 |
|
---|
408 | if defined(VBOX_WITH_RAW_MODE) && !defined(VBOX_ONLY_EXTPACKS)
|
---|
409 | #
|
---|
410 | # VMMRC.gc
|
---|
411 | #
|
---|
412 | SYSMODS += VMMRC
|
---|
413 | VMMRC_TEMPLATE = VBoxRc
|
---|
414 | VMMRC_NAME = VMMGC
|
---|
415 | VMMRC_SYSSUFF = .gc
|
---|
416 |
|
---|
417 | VMMRC_DEFS = IN_VMM_RC IN_RT_RC IN_DIS DIS_CORE_ONLY VBOX_WITH_RAW_MODE VBOX_WITH_RAW_MODE_NOT_R0 IN_SUP_RC \
|
---|
418 | $(VMM_COMMON_DEFS)
|
---|
419 | ifdef VBOX_WITH_VMM_R0_SWITCH_STACK
|
---|
420 | VMMRC_DEFS += VMM_R0_SWITCH_STACK
|
---|
421 | endif
|
---|
422 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
423 | VMMRC_DEFS.darwin = VMM_R0_SWITCH_STACK
|
---|
424 | VMMRC_DEFS.darwin = \
|
---|
425 | VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_RC \
|
---|
426 | VBOX_WITH_HYBRID_32BIT_KERNEL VBOX_WITH_HYBRID_32BIT_KERNEL_IN_RC
|
---|
427 | endif
|
---|
428 |
|
---|
429 | VMMRC_INCS := \
|
---|
430 | include \
|
---|
431 | VMMRC \
|
---|
432 | $(if-expr defined(VBOX_WITH_RAW_MODE),PATM,)
|
---|
433 |
|
---|
434 | VMMRC_LIBS = \
|
---|
435 | $(PATH_STAGE_LIB)/DisasmRC$(VBOX_SUFF_LIB) \
|
---|
436 | $(PATH_STAGE_LIB)/RuntimeRC$(VBOX_SUFF_LIB) \
|
---|
437 | $(PATH_STAGE_LIB)/SUPRC$(VBOX_SUFF_LIB)
|
---|
438 | ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
|
---|
439 | VMMRC_LIBS += \
|
---|
440 | $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB)
|
---|
441 | endif
|
---|
442 |
|
---|
443 | VMMRC_SOURCES = \
|
---|
444 | VBoxVMM.d \
|
---|
445 | VMMRC/VMMRC0.asm \
|
---|
446 | VMMRC/VMMRCDeps.cpp \
|
---|
447 | VMMRC/CPUMRC.cpp \
|
---|
448 | VMMRC/CPUMRCA.asm \
|
---|
449 | VMMRC/CPUMRCPatchHlp.asm \
|
---|
450 | VMMRC/EMRCA.asm \
|
---|
451 | VMMRC/IOMRC.cpp \
|
---|
452 | VMMRC/MMRamRC.cpp \
|
---|
453 | VMMRC/MMRamRCA.asm \
|
---|
454 | VMMRC/PDMRCDevice.cpp \
|
---|
455 | VMMRC/PGMRC.cpp \
|
---|
456 | VMMRC/SELMRC.cpp \
|
---|
457 | VMMRC/TRPMRC.cpp \
|
---|
458 | VMMRC/TRPMRCHandlers.cpp \
|
---|
459 | VMMRC/TRPMRCHandlersA.asm \
|
---|
460 | VMMRC/VMMRC.cpp \
|
---|
461 | VMMRC/VMMRCA.asm \
|
---|
462 | $(if-expr defined(VBOX_WITH_RAW_MODE), \
|
---|
463 | VMMRC/CSAMRC.cpp \
|
---|
464 | VMMRC/PATMRC.cpp \
|
---|
465 | ,) \
|
---|
466 | VMMRZ/DBGFRZ.cpp \
|
---|
467 | VMMRZ/PGMRZDynMap.cpp \
|
---|
468 | VMMRZ/VMMRZ.cpp \
|
---|
469 | VMMAll/CPUMAllRegs.cpp \
|
---|
470 | VMMAll/CPUMAllMsrs.cpp \
|
---|
471 | VMMAll/DBGFAll.cpp \
|
---|
472 | VMMAll/IEMAll.cpp \
|
---|
473 | VMMAll/IEMAllAImpl.asm \
|
---|
474 | VMMAll/IEMAllAImplC.cpp \
|
---|
475 | VMMAll/IOMAll.cpp \
|
---|
476 | VMMAll/IOMAllMMIO.cpp \
|
---|
477 | VMMAll/EMAll.cpp \
|
---|
478 | VMMAll/EMAllA.asm \
|
---|
479 | VMMAll/FTMAll.cpp \
|
---|
480 | VMMAll/GIMAll.cpp \
|
---|
481 | VMMAll/GIMAllHv.cpp \
|
---|
482 | VMMAll/GIMAllKvm.cpp \
|
---|
483 | VMMAll/MMAll.cpp \
|
---|
484 | VMMAll/MMAllHyper.cpp \
|
---|
485 | VMMAll/PDMAll.cpp \
|
---|
486 | VMMAll/PDMAllCritSect.cpp \
|
---|
487 | VMMAll/PDMAllCritSectRw.cpp \
|
---|
488 | VMMAll/PDMAllCritSectBoth.cpp \
|
---|
489 | VMMAll/PDMAllQueue.cpp \
|
---|
490 | VMMAll/PGMAll.cpp \
|
---|
491 | VMMAll/PGMAllHandler.cpp \
|
---|
492 | VMMAll/PGMAllMap.cpp \
|
---|
493 | VMMAll/PGMAllPhys.cpp \
|
---|
494 | VMMAll/PGMAllPool.cpp \
|
---|
495 | VMMAll/REMAll.cpp \
|
---|
496 | VMMAll/SELMAll.cpp \
|
---|
497 | VMMAll/TMAll.cpp \
|
---|
498 | VMMAll/TMAllCpu.cpp \
|
---|
499 | VMMAll/TMAllReal.cpp \
|
---|
500 | VMMAll/TMAllVirtual.cpp \
|
---|
501 | VMMAll/TRPMAll.cpp \
|
---|
502 | VMMAll/VMAll.cpp \
|
---|
503 | VMMAll/VMMAll.cpp \
|
---|
504 | VMMAll/VMMAllA.asm \
|
---|
505 | $(if-expr defined(VBOX_WITH_RAW_MODE), \
|
---|
506 | VMMAll/CSAMAll.cpp \
|
---|
507 | VMMAll/PATMAll.cpp \
|
---|
508 | ,)
|
---|
509 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
510 | VMMRC_SOURCES += VMMRC/VMMRC.def
|
---|
511 | endif
|
---|
512 | ifeq ($(VBOX_LDR_FMT32),lx)
|
---|
513 | VMMRC_SOURCES += $(VMMRCImp_0_OUTDIR)/VMMRC.def
|
---|
514 | endif
|
---|
515 |
|
---|
516 | # the very last one.
|
---|
517 | VMMRC_SOURCES += VMMRC/VMMRC99.asm
|
---|
518 |
|
---|
519 | VMMRC/VMMRCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMRCDeps.cpp to .c
|
---|
520 | endif # VBOX_WITH_RAW_MODE && !VBOX_ONLY_EXTPACKS
|
---|
521 |
|
---|
522 |
|
---|
523 | ifndef VBOX_ONLY_EXTPACKS
|
---|
524 | #
|
---|
525 | # VMMR0.r0
|
---|
526 | #
|
---|
527 | SYSMODS += VMMR0
|
---|
528 | VMMR0_TEMPLATE = VBoxR0
|
---|
529 | VMMR0_SYSSUFF = .r0
|
---|
530 |
|
---|
531 | VMMR0_DEFS = IN_VMM_R0 IN_RT_R0 IN_DIS DIS_CORE_ONLY IN_GVMM_R0 IN_GMM_R0 IN_INTNET_R0 \
|
---|
532 | $(VMM_COMMON_DEFS) RTASSERT_HAVE_SHOULD_PANIC
|
---|
533 | ## @todo eliminate IN_GVMM_R0 IN_GMM_R0
|
---|
534 | ifdef VBOX_WITH_PCI_PASSTHROUGH
|
---|
535 | VMMR0_DEFS += IN_PCIRAW_R0
|
---|
536 | endif
|
---|
537 | ifdef VBOX_WITH_TRIPLE_FAULT_HACK
|
---|
538 | VMMR0_DEFS += VBOX_WITH_TRIPLE_FAULT_HACK
|
---|
539 | endif
|
---|
540 | ifdef VBOX_WITH_RAW_MODE
|
---|
541 | VMMR0_DEFS += VBOX_WITH_RAW_MODE
|
---|
542 | endif
|
---|
543 | ifdef VBOX_WITH_VMM_R0_SWITCH_STACK
|
---|
544 | VMMR0_DEFS += VMM_R0_SWITCH_STACK
|
---|
545 | endif
|
---|
546 | VMMR0_DEFS.darwin = VMM_R0_SWITCH_STACK
|
---|
547 | VMMR0_DEFS.darwin.x86 = \
|
---|
548 | VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 \
|
---|
549 | VBOX_WITH_HYBRID_32BIT_KERNEL VBOX_WITH_HYBRID_32BIT_KERNEL_IN_R0
|
---|
550 | VMMR0_DEFS.win.amd64 = VBOX_WITH_KERNEL_USING_XMM
|
---|
551 |
|
---|
552 | VMMR0_INCS = \
|
---|
553 | include \
|
---|
554 | $(if-expr defined(VBOX_WITH_RAW_MODE),PATM,)
|
---|
555 |
|
---|
556 | VMMR0_SOURCES = \
|
---|
557 | VBoxVMM.d \
|
---|
558 | VMMR0/CPUMR0.cpp \
|
---|
559 | VMMR0/CPUMR0A.asm \
|
---|
560 | VMMR0/GIMR0.cpp \
|
---|
561 | VMMR0/GIMR0Hv.cpp \
|
---|
562 | VMMR0/GMMR0.cpp \
|
---|
563 | VMMR0/GVMMR0.cpp \
|
---|
564 | VMMR0/HMR0.cpp \
|
---|
565 | VMMR0/HMR0A.asm \
|
---|
566 | VMMR0/HMVMXR0.cpp \
|
---|
567 | VMMR0/HMSVMR0.cpp \
|
---|
568 | VMMR0/PDMR0Device.cpp \
|
---|
569 | VMMR0/PDMR0Driver.cpp \
|
---|
570 | VMMR0/PGMR0.cpp \
|
---|
571 | VMMR0/PGMR0SharedPage.cpp \
|
---|
572 | VMMR0/TRPMR0.cpp \
|
---|
573 | VMMR0/TRPMR0A.asm \
|
---|
574 | VMMR0/VMMR0.cpp \
|
---|
575 | VMMRZ/DBGFRZ.cpp \
|
---|
576 | VMMRZ/VMMRZ.cpp \
|
---|
577 | VMMAll/CPUMAllRegs.cpp \
|
---|
578 | VMMAll/CPUMAllMsrs.cpp \
|
---|
579 | VMMAll/CPUMStack.cpp \
|
---|
580 | VMMAll/DBGFAll.cpp \
|
---|
581 | VMMAll/EMAll.cpp \
|
---|
582 | VMMAll/EMAllA.asm \
|
---|
583 | VMMAll/FTMAll.cpp \
|
---|
584 | VMMAll/GIMAll.cpp \
|
---|
585 | VMMAll/GIMAllHv.cpp \
|
---|
586 | VMMAll/GIMAllKvm.cpp \
|
---|
587 | VMMAll/HMAll.cpp \
|
---|
588 | VMMAll/IEMAll.cpp \
|
---|
589 | VMMAll/IEMAllAImpl.asm \
|
---|
590 | VMMAll/IEMAllAImplC.cpp \
|
---|
591 | VMMAll/IOMAll.cpp \
|
---|
592 | VMMAll/IOMAllMMIO.cpp \
|
---|
593 | VMMAll/MMAll.cpp \
|
---|
594 | VMMAll/MMAllHyper.cpp \
|
---|
595 | VMMAll/MMAllPagePool.cpp \
|
---|
596 | VMMAll/PDMAll.cpp \
|
---|
597 | VMMAll/PDMAllCritSect.cpp \
|
---|
598 | VMMAll/PDMAllCritSectRw.cpp \
|
---|
599 | VMMAll/PDMAllCritSectBoth.cpp \
|
---|
600 | VMMAll/PDMAllQueue.cpp \
|
---|
601 | VMMAll/PGMAll.cpp \
|
---|
602 | VMMAll/PGMAllHandler.cpp \
|
---|
603 | VMMAll/PGMAllMap.cpp \
|
---|
604 | VMMAll/PGMAllPhys.cpp \
|
---|
605 | VMMAll/PGMAllPool.cpp \
|
---|
606 | VMMAll/REMAll.cpp \
|
---|
607 | VMMAll/SELMAll.cpp \
|
---|
608 | VMMAll/TMAll.cpp \
|
---|
609 | VMMAll/TMAllCpu.cpp \
|
---|
610 | VMMAll/TMAllReal.cpp \
|
---|
611 | VMMAll/TMAllVirtual.cpp \
|
---|
612 | VMMAll/TRPMAll.cpp \
|
---|
613 | VMMAll/VMAll.cpp \
|
---|
614 | VMMAll/VMMAll.cpp \
|
---|
615 | VMMAll/VMMAllA.asm
|
---|
616 | if1of ($(VBOX_LDR_FMT), pe lx)
|
---|
617 | VMMR0_SOURCES += $(VMMR0Imp_0_OUTDIR)/VMMR0.def
|
---|
618 | endif
|
---|
619 | ifdef VBOX_WITH_TRIPLE_FAULT_HACK
|
---|
620 | VMMR0_SOURCES += \
|
---|
621 | VMMR0/VMMR0TripleFaultHack.cpp \
|
---|
622 | VMMR0/VMMR0TripleFaultHackA.asm
|
---|
623 | endif
|
---|
624 | ifdef VBOX_WITH_NETSHAPER
|
---|
625 | VMMR0_SOURCES += \
|
---|
626 | VMMAll/PDMAllNetShaper.cpp
|
---|
627 | endif
|
---|
628 | VMMR0_SOURCES.amd64 = \
|
---|
629 | VMMR0/VMMR0JmpA-amd64.asm
|
---|
630 | VMMR0_SOURCES.x86 = \
|
---|
631 | VMMR0/VMMR0JmpA-x86.asm
|
---|
632 | VMMR0_SOURCES.darwin.x86 = \
|
---|
633 | VMMRZ/PGMRZDynMap.cpp
|
---|
634 |
|
---|
635 | VMMR0_LIBS = \
|
---|
636 | $(PATH_STAGE_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
|
---|
637 | $(PATH_STAGE_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
|
---|
638 | $(PATH_STAGE_LIB)/DisasmR0$(VBOX_SUFF_LIB)
|
---|
639 | ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
|
---|
640 | VMMR0_LIBS += \
|
---|
641 | $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
|
---|
642 | endif
|
---|
643 | endif # !VBOX_ONLY_EXTPACKS
|
---|
644 |
|
---|
645 |
|
---|
646 | ifndef VBOX_ONLY_EXTPACKS
|
---|
647 | #
|
---|
648 | # SSMStandalone.lib/a for linking with VBoxSVC and other executables.
|
---|
649 | #
|
---|
650 | LIBRARIES += SSMStandalone
|
---|
651 | SSMStandalone_TEMPLATE = VBOXR3EXE
|
---|
652 | SSMStandalone_DEFS = IN_VMM_R3 IN_VMM_STATIC SSM_STANDALONE CPUM_DB_STANDALONE
|
---|
653 | SSMStandalone_INCS = include
|
---|
654 | SSMStandalone_SOURCES = \
|
---|
655 | VMMR3/SSM.cpp \
|
---|
656 | VMMR3/CPUMR3Db.cpp
|
---|
657 | endif # !VBOX_ONLY_EXTPACKS
|
---|
658 |
|
---|
659 |
|
---|
660 | if !defined(VBOX_ONLY_EXTPACKS) \
|
---|
661 | && ( defined(VBOX_WITH_DTRACE_R3) \
|
---|
662 | || defined(VBOX_WITH_DTRACE_R0) \
|
---|
663 | || defined(VBOX_WITH_DTRACE_RC))
|
---|
664 | #
|
---|
665 | # Install the dtrace library files.
|
---|
666 | #
|
---|
667 | INSTALLS += VMMLibDTrace
|
---|
668 | VMMLibDTrace_INST = $(VBOX_INST_DTRACE_LIB)$(KBUILD_TARGET_ARCH)/
|
---|
669 | VMMLibDTrace_SOURCES = \
|
---|
670 | dtrace/lib/vbox-types.d \
|
---|
671 | dtrace/lib/$(KBUILD_TARGET_ARCH)/vbox-arch-types.d \
|
---|
672 | $(VMMLibDTrace_0_OUTDIR)/vm.d \
|
---|
673 | $(VMMLibDTrace_0_OUTDIR)/cpumctx.d \
|
---|
674 | $(VMMLibDTrace_0_OUTDIR)/CPUMInternal.d \
|
---|
675 | $(VMMLibDTrace_0_OUTDIR)/x86.d \
|
---|
676 |
|
---|
677 |
|
---|
678 | ##
|
---|
679 | # Turn the header $2 into the DTrace library script $1.
|
---|
680 | #
|
---|
681 | define def_vmm_lib_dtrace_preprocess
|
---|
682 | $$$$(VMMLibDTrace_0_OUTDIR)/$1: $2 $$(VBOX_VBOXCPP) | $$$$(dir $$$$@)
|
---|
683 | $$(QUIET)$$(call MSG_GENERATE,VMMLibDTrace,$$@,$$<)
|
---|
684 | $$(QUIET)$(VBOX_VBOXCPP) -d \
|
---|
685 | -D VBOX_FOR_DTRACE_LIB \
|
---|
686 | -D VBOX_FOR_DTRACE_LIB_$(toupper $(KBUILD_TARGET_ARCH)) \
|
---|
687 | -D IN_RING0 \
|
---|
688 | -D RT_C_DECLS_BEGIN= \
|
---|
689 | -D RT_C_DECLS_END= \
|
---|
690 | -D 'RCPTRTYPE(a_Type)=RTRCPTR' \
|
---|
691 | -D 'R3PTRTYPE(a_Type)=RTR3PTR' \
|
---|
692 | -D 'R0PTRTYPE(a_Type)=a_Type' \
|
---|
693 | -D 'AssertCompile(a_Expr)=' \
|
---|
694 | -D 'AssertCompileSize(a_Stuct, a_Size)=' \
|
---|
695 | -D 'bool=uint8_t' \
|
---|
696 | $$(foreach def,\
|
---|
697 | $$(DEFS) \
|
---|
698 | $$(DEFS.$$(KBUILD_TARGET)) \
|
---|
699 | $$(DEFS.$(KBUILD_TARGET_ARCH)) \
|
---|
700 | $$(VMM_COMMON_DEFS) \
|
---|
701 | $$(ARCH_BITS_DEFS)\
|
---|
702 | ,-D '$$(def)') \
|
---|
703 | $$< \
|
---|
704 | $$@
|
---|
705 | $$(QUIET)$$(CHMOD) 644 $$@
|
---|
706 | endef
|
---|
707 | $(evalcall2 def_vmm_lib_dtrace_preprocess,vm.d,$(PATH_ROOT)/include/VBox/vmm/vm.h)
|
---|
708 | $(evalcall2 def_vmm_lib_dtrace_preprocess,cpumctx.d,$(PATH_ROOT)/include/VBox/vmm/cpumctx.h)
|
---|
709 | $(evalcall2 def_vmm_lib_dtrace_preprocess,CPUMInternal.d,$(PATH_SUB_CURRENT)/include/CPUMInternal.h)
|
---|
710 | $(evalcall2 def_vmm_lib_dtrace_preprocess,x86.d,$(PATH_ROOT)/include/iprt/x86.h)
|
---|
711 |
|
---|
712 | endif
|
---|
713 |
|
---|
714 |
|
---|
715 |
|
---|
716 | #
|
---|
717 | # For vmmGetSvnRev.
|
---|
718 | #
|
---|
719 | VMMAll/VMMAll.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
720 |
|
---|
721 | #
|
---|
722 | # Disable annoying warnings about array subscript above array bounds in aPages[]
|
---|
723 | #
|
---|
724 | ifneq ($(KBUILD_TARGET),win)
|
---|
725 | VMMR3/PGMPool.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
|
---|
726 | VMMAll/PGMAllPool.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
|
---|
727 | VMMAll/PGMAll.cpp_CXXFLAGS = -Wno-unused-function
|
---|
728 | VMMAll/IEMAll.cpp_CXXFLAGS = -Wno-unused-parameter
|
---|
729 | endif
|
---|
730 |
|
---|
731 | #
|
---|
732 | # Always optimize the interpreter.
|
---|
733 | #
|
---|
734 | ifn1of ($(USERNAME),bird)
|
---|
735 | if1of ($(KBUILD_TARGET), win)
|
---|
736 | # -noover is recognized despite the statement saying otherwise. It silences these warnings:
|
---|
737 | # cl : Command line warning D9025 : overriding '/Od' with '/O2'
|
---|
738 | # cl : Command line warning D9025 : overriding '/Oy-' with '/Oy'
|
---|
739 | VMMAll/IEMAll.cpp_CXXFLAGS += -noover -O2xy
|
---|
740 | else
|
---|
741 | VMMAll/IEMAll.cpp_CXXFLAGS += -O2
|
---|
742 | #VMMAll/IEMAll.cpp_CXXFLAGS += -fno-align-functions -fno-align-jumps -fno-align-loops # Saves a few of percents, not worth it.
|
---|
743 | #VMMAll/IEMAll.cpp_CXXFLAGS += -fno-reorder-blocks # Saves one or two percent ... never mind.
|
---|
744 | VMMAll/IEMAll.cpp_CXXFLAGS += -fomit-frame-pointer # Omitting the frame pointer results in larger code, but it might be worth it. (esp addressing vs ebp?)
|
---|
745 | endif
|
---|
746 | endif # bird wants good stacks
|
---|
747 |
|
---|
748 |
|
---|
749 | # Alias the CPU database entries.
|
---|
750 | $(foreach base,$(notdir $(basename $(wildcard $(PATH_SUB_CURRENT)/VMMR3/cpus/*.h))), $(eval $(base).o $(base).obj: CPUMR3Db.o))
|
---|
751 |
|
---|
752 |
|
---|
753 | #
|
---|
754 | # Test for undefined symbols.
|
---|
755 | #
|
---|
756 | if1of ($(SYSMODS),VMMRC)
|
---|
757 | test-undef-rc:: $(PATH_TARGET)/undef-rc.run
|
---|
758 | OTHERS += $(PATH_TARGET)/undef-rc.run
|
---|
759 | CLEANS += $(PATH_TARGET)/undef-rc.run
|
---|
760 | $(PATH_TARGET)/undef-rc.run: \
|
---|
761 | $$(VMMRC_1_TARGET)
|
---|
762 | ifn1of ($(KBUILD_TARGET), linux solaris)
|
---|
763 | else
|
---|
764 | $(call MSG_L1,VMM: Testing for undefined symbols in VMMRC using nm...)
|
---|
765 | $(QUIET)$(VBOX_NM) $^ 2> /dev/null \
|
---|
766 | | $(SED) -n \
|
---|
767 | -e '/^[0-9a-f][0-9a-f]* [^U] .*/d' \
|
---|
768 | -e 's/^[0-9a-f][0-9a-f]* //' \
|
---|
769 | -e 's/ *U //' \
|
---|
770 | \
|
---|
771 | -e '/^g_VM\>/d'\
|
---|
772 | -e '/^g_CPUM\>/d'\
|
---|
773 | -e '/^g_Logger\>/d'\
|
---|
774 | -e '/^g_RelLogger\>/d'\
|
---|
775 | -e '/^g_TRPM\>/d'\
|
---|
776 | -e '/^g_TRPMCPU\>/d'\
|
---|
777 | -e '/^g_pSUPGlobalInfoPage\>/d'\
|
---|
778 | -e '/^g_trpmHyperCtxCore\>/d' \
|
---|
779 | -e '/^g_trpmGuestCtxCore\>/d' \
|
---|
780 | \
|
---|
781 | -e 's/\(.*\)$(DOLLAR)/ Undefined symbol: \1/' \
|
---|
782 | -e 'p' \
|
---|
783 | -e 'q 1'
|
---|
784 | endif
|
---|
785 | $(QUIET)$(APPEND) -t $@
|
---|
786 | endif
|
---|
787 |
|
---|
788 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
789 |
|
---|
790 |
|
---|
791 | # Alias the PGM templates to the object in which they are defined.
|
---|
792 | PGMInternal.o \
|
---|
793 | PGMBth.o PGMGst.o PGMShw.o \
|
---|
794 | PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
|
---|
795 |
|
---|
796 | PGMAllBth.o PGMAllGst.o PGMAllShw.o \
|
---|
797 | PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
|
---|
798 |
|
---|
799 | PGMRCBth.o PGMRCGst.o PGMRCShw.o \
|
---|
800 | PGMRCBth.obj PGMRCGst.obj PGMRCShw.obj: PGMRC.o
|
---|
801 |
|
---|
802 | PGMPhysRWTmpl.o PGMPhysRWTmpl.obj: PGMPhys.o
|
---|
803 |
|
---|
804 | PGMInline.o PGMInline.obj: PGMDbg.o
|
---|
805 |
|
---|
806 | # Alias the IEM templates to the object in which they are instantiated.
|
---|
807 | IEMInternal.o \
|
---|
808 | IEMAllInstructions.cpp.o IEMAllInstructions.cpp.obj \
|
---|
809 | IEMAllCImpl.cpp.o IEMAllCImpl.cpp.obj \
|
---|
810 | IEMAllCImplStrInstr.cpp.o IEMAllCImplStrInstr.cpp.obj: IEMAll.o
|
---|
811 |
|
---|
812 | # Alias the switcher templates.
|
---|
813 | PAEand32Bit.o PAEand32Bit.obj: PAETo32Bit.o PAEToPAE.o 32BitTo32Bit.o PAETo32Bit.o
|
---|
814 | LegacyandAMD64.o LegacyandAMD64.obj: 32BitToAMD64.o PAEToAMD64.o
|
---|
815 | AMD64andLegacy.o AMD64andLegacy.obj: AMD64To32Bit.o AMD64ToPAE.o
|
---|
816 |
|
---|