VirtualBox

source: vbox/trunk/src/VBox/VMM/Makefile.kmk@ 14683

Last change on this file since 14683 was 14515, checked in by vboxsync, 16 years ago

SUPDrv,SUPLib,VMM: Kicked out the dead VBOX_WITH_IDT_PATCHING code.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 10.9 KB
Line 
1# $Id: Makefile.kmk 14515 2008-11-24 12:33:00Z vboxsync $
2## @file
3# Top-level makefile for the VMM.
4#
5
6#
7# Copyright (C) 2006-2007 Sun Microsystems, Inc.
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# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22SUB_DEPTH = ../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25# Include sub-makefiles.
26include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
27
28
29#
30# VMMR3.dll
31#
32LIBRARIES += VMMR3
33
34VMMR3_TEMPLATE = VBOXR3
35VMMR3_DEFS = IN_VMM_R3 IN_DIS IN_GMM_R3 IN_DBG
36## @todo eliminate IN_GMM_R3
37ifdef VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
38VMMR3_DEFS += VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
39endif
40ifdef VBOX_WITH_R0_LOGGING
41VMMR3_DEFS += VBOX_WITH_R0_LOGGING
42endif
43VMMR3_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R3
44VMMR3_INCS := \
45 $(PATH_SUB_CURRENT) \
46 PATM
47
48VMMR3_SOURCES = \
49 CFGM.cpp \
50 CPUM.cpp \
51 CPUMStack.cpp \
52 DBGF.cpp \
53 DBGFAddr.cpp \
54 DBGFBp.cpp \
55 DBGFDisas.cpp \
56 DBGFInfo.cpp \
57 DBGFLog.cpp \
58 DBGFMem.cpp \
59 DBGFOS.cpp \
60 DBGFStack.cpp \
61 DBGFSym.cpp \
62 EM.cpp \
63 IOM.cpp \
64 GMM.cpp \
65 MM.cpp \
66 MMHeap.cpp \
67 MMHyper.cpp \
68 MMPagePool.cpp \
69 MMPhys.cpp \
70 PDM.cpp \
71 PDMDevice.cpp \
72 PDMDevHlp.cpp \
73 PDMDevMiscHlp.cpp \
74 PDMDriver.cpp \
75 PDMLdr.cpp \
76 PDMCritSect.cpp \
77 PDMQueue.cpp \
78 PDMThread.cpp \
79 PGM.cpp \
80 PGMDbg.cpp \
81 PGMHandler.cpp \
82 PGMMap.cpp \
83 PGMPhys.cpp \
84 PGMPool.cpp \
85 SELM.cpp \
86 SSM.cpp \
87 STAM.cpp \
88 TM.cpp \
89 TRPM.cpp \
90 VM.cpp \
91 VMEmt.cpp \
92 VMReq.cpp \
93 VMM.cpp \
94 VMMGuruMeditation.cpp \
95 VMMSwitcher.cpp \
96 VMMTests.cpp \
97 HWACCM.cpp \
98 VMMAll/CPUMAllRegs.cpp \
99 VMMAll/DBGFAll.cpp \
100 VMMAll/HWACCMAll.cpp \
101 VMMAll/IOMAll.cpp \
102 VMMAll/IOMAllMMIO.cpp \
103 VMMAll/MMAll.cpp \
104 VMMAll/MMAllHyper.cpp \
105 VMMAll/MMAllPagePool.cpp \
106 VMMAll/PDMAll.cpp \
107 VMMAll/PDMAllCritSect.cpp \
108 VMMAll/PDMAllQueue.cpp \
109 VMMAll/PGMAll.cpp \
110 VMMAll/PGMAllHandler.cpp \
111 VMMAll/PGMAllMap.cpp \
112 VMMAll/PGMAllPhys.cpp \
113 VMMAll/PGMAllPool.cpp \
114 VMMAll/REMAll.cpp \
115 VMMAll/SELMAll.cpp \
116 VMMAll/EMAll.cpp \
117 VMMAll/EMAllA.asm \
118 VMMAll/TMAll.cpp \
119 VMMAll/TMAllCpu.cpp \
120 VMMAll/TMAllReal.cpp \
121 VMMAll/TMAllVirtual.cpp \
122 VMMAll/TRPMAll.cpp \
123 VMMAll/VMAll.cpp \
124 VMMAll/VMMAll.cpp \
125 PATM/CSAM.cpp \
126 PATM/VMMAll/CSAMAll.cpp \
127 PATM/PATM.cpp \
128 PATM/PATMPatch.cpp \
129 PATM/PATMGuest.cpp \
130 PATM/PATMA.asm \
131 PATM/PATMSSM.cpp \
132 PATM/VMMAll/PATMAll.cpp
133VMMR3_SOURCES.x86 += \
134 VMMSwitcher/32BitTo32Bit.asm \
135 VMMSwitcher/32BitToPAE.asm \
136 VMMSwitcher/32BitToAMD64.asm \
137 VMMSwitcher/PAETo32Bit.asm \
138 VMMSwitcher/PAEToPAE.asm
139VMMR3_SOURCES.amd64 = \
140 VMMSwitcher/AMD64To32Bit.asm \
141 VMMSwitcher/AMD64ToPAE.asm
142VMMR3_SOURCES.darwin.x86 += \
143 VMMSwitcher/AMD64ToPAE.asm
144
145ifdef VBOX_WITH_VMI
146VMMR3_DEFS += \
147 VBOX_WITH_VMI
148VMMR3_INCS += \
149 PARAV
150VMMR3_SOURCES += \
151 PARAV/PARAV.cpp \
152 PARAV/PARAVAll.cpp
153endif
154
155ifdef VBOX_WITH_USB
156VMMR3_DEFS += VBOX_WITH_USB
157VMMR3_SOURCES += PDMUsb.cpp
158endif
159
160ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
161VMMR3_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
162VMMR3_DEFS.linux += __USE_FILE_OFFSET64 __USE_LARGEFILE64
163VMMR3_SOURCES += PDMAsyncCompletion.cpp
164VMMR3_SOURCES.linux += \
165 PDMAsyncCompletionSocketPosix.cpp \
166 PDMAsyncCompletionHostPosix.cpp
167
168VMMR3_SOURCES.win += \
169 PDMAsyncCompletionSocketWin.cpp \
170 PDMAsyncCompletionHostWin.cpp
171
172VMMR3_SOURCES.solaris += \
173 PDMAsyncCompletionSocketPosix.cpp \
174 PDMAsyncCompletionHostSolaris.cpp
175
176VMMR3_SOURCES.darwin += \
177 PDMAsyncCompletionSocketPosix.cpp \
178 PDMAsyncCompletionHostPosix.cpp
179
180VMMR3_SOURCES.freebsd += \
181 PDMAsyncCompletionSocketPosix.cpp \
182 PDMAsyncCompletionHostFreeBSD.cpp
183
184endif
185
186#
187# The VMM DLL.
188#
189DLLS += VBoxVMM
190
191VBoxVMM_TEMPLATE = VBOXR3
192VBoxVMM_DEFS = $(VMMR3_DEFS)
193VBoxVMM_DEFS.$(KBUILD_TARGET) = $(VMMR3_DEFS.$(KBUILD_TARGET))
194VBoxVMM_SOURCES = VBoxVMMDeps.cpp
195VBoxVMM_SONAME.linux = VBoxVMM.so
196
197VBoxVMM_LIBS = \
198 $(PATH_LIB)/VMMR3$(VBOX_SUFF_LIB) \
199 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
200ifdef VBOX_WITH_DEBUGGER
201VBoxVMM_LIBS += \
202 $(PATH_LIB)/Debugger$(VBOX_SUFF_LIB)
203endif
204VBoxVMM_LIBS += \
205 $(LIB_REM) \
206 $(LIB_RUNTIME)
207
208VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
209VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
210VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
211VBoxVMM_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxVMM.dylib
212VBoxVMM_LDFLAGS.solaris = -mimpure-text
213#ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
214# ifeq ($(KBUILD_HOST), linux)
215#VBoxVMM_LIBS += aio
216# endif
217#endif
218
219if1of ($(VBOX_LDR_FMT32), pe lx)
220
221#
222# VMMGCBuiltin.lib
223#
224LIBRARIES += VMMGCBuiltin
225VMMGCBuiltin_TEMPLATE = VBOXGC
226 ifeq ($(VBOX_LDR_FMT32),pe)
227VMMGCBuiltin_SOURCES = VMMGC/VMMGCBuiltin.def
228 endif
229 ifeq ($(VBOX_LDR_FMT32),lx)
230VMMGCBuiltin_SOURCES = $(PATH_VMMGCBuiltin)/VMMGCBuiltin.def
231$$(PATH_VMMGCBuiltin)/VMMGCBuiltin.def: $(PATH_SUB_CURRENT)/VMMGC/VMMGCBuiltin.def | $$(dir $$@)
232 $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' --output $@ $<
233 endif
234
235
236#
237# VMMGCImp.lib
238#
239LIBRARIES += VMMGCImp
240VMMGCImp_TEMPLATE = VBOXGC
241VMMGCImp_SOURCES = $(PATH_VMMGCImp)/VMMGC.def
242VMMGCImp_CLEAN = $(PATH_VMMGCImp)/VMMGC.def
243
244$$(PATH_VMMGCImp)/VMMGC.def: $(PATH_SUB_CURRENT)/VMMGC/VMMGC.def | $$(dir $$@)
245 ifeq ($(VBOX_LDR_FMT32),lx)
246 $(SED) \
247 -e '/not-os2/d' \
248 -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' \
249 -e 's/[ \t]DATA[ \t]*/ /' \
250 --output $@ \
251 $<
252 $(APPEND) "$@" ""
253 $(APPEND) "$@" " ___ehInit"
254 else
255 $(SED) \
256 -e '/not-win/d' \
257 -e '/not-$(KBUILD_TARGET_ARCH)/d' \
258 --output $@ $<
259 endif
260
261endif # RC: pe + lx
262
263ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
264#
265# VMMR0Imp.lib
266#
267LIBRARIES += VMMR0Imp
268VMMR0Imp_TEMPLATE = VBOXR0
269VMMR0Imp_SOURCES = $(PATH_VMMR0Imp)/VMMR0.def
270VMMR0Imp_CLEAN = $(PATH_VMMR0Imp)/VMMR0.def
271
272$$(PATH_VMMR0Imp)/VMMR0.def: $(PATH_SUB_CURRENT)/VMMR0/VMMR0.def | $$(dir $$@)
273 ifeq ($(VBOX_LDR_FMT),lx)
274 $(SED) \
275 -e '/not-os2/d' \
276 -e '/not-amd64/d' \
277 -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' \
278 -e 's/[ \t]DATA[ \t]*/ /' \
279 --output $@ $<
280 $(APPEND) "$@" ""
281 $(APPEND) "$@" " ___ehInit"
282 else
283 $(SED) \
284 -e '/not-win/d' \
285 -e '/not-$(KBUILD_TARGET_ARCH)/d' \
286 --output $@ $<
287 endif
288endif # R0: pe + lx
289
290
291#
292# VMMGC.gc
293#
294SYSMODS += VMMGC
295VMMGC_TEMPLATE = VBOXGC
296VMMGC_INCS := \
297 $(PATH_SUB_CURRENT) \
298 VMMGC \
299 PATM
300VMMGC_DEFS = IN_VMM_RC IN_RT_GC IN_RT_RC IN_DIS DIS_CORE_ONLY
301ifdef VBOX_WITH_R0_LOGGING
302VMMGC_DEFS += VBOX_WITH_R0_LOGGING
303endif
304VMMGC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_RC
305VMMGC_SYSSUFF = .gc
306VMMGC_LIBS = \
307 $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
308 $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
309ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
310VMMGC_LIBS += \
311 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
312endif
313ifeq ($(VBOX_LDR_FMT32),pe)
314VMMGC_LDFLAGS = -Entry:VMMGCEntry
315endif
316VMMGC_SOURCES = \
317 VMMGC/VMMGC0.asm \
318 VMMGC/VMMGCDeps.cpp \
319 VMMGC/CPUMGC.cpp \
320 VMMGC/CPUMGCA.asm \
321 VMMGC/EMGCA.asm \
322 VMMGC/DBGFGC.cpp \
323 VMMGC/IOMGC.cpp \
324 VMMGC/MMRamGC.cpp \
325 VMMGC/MMRamGCA.asm \
326 VMMGC/PDMGCDevice.cpp \
327 VMMGC/PGMGC.cpp \
328 VMMGC/SELMGC.cpp \
329 VMMGC/TRPMGC.cpp \
330 VMMGC/TRPMGCHandlers.cpp \
331 VMMGC/TRPMGCHandlersA.asm \
332 VMMGC/VMMGC.cpp \
333 VMMGC/VMMGCA.asm \
334 VMMAll/CPUMAllRegs.cpp \
335 VMMAll/CPUMAllA.asm \
336 VMMAll/DBGFAll.cpp \
337 VMMAll/IOMAll.cpp \
338 VMMAll/IOMAllMMIO.cpp \
339 VMMAll/EMAll.cpp \
340 VMMAll/EMAllA.asm \
341 VMMAll/MMAll.cpp \
342 VMMAll/MMAllHyper.cpp \
343 VMMAll/PDMAll.cpp \
344 VMMAll/PDMAllCritSect.cpp \
345 VMMAll/PDMAllQueue.cpp \
346 VMMAll/PGMAll.cpp \
347 VMMAll/PGMAllHandler.cpp \
348 VMMAll/PGMAllMap.cpp \
349 VMMAll/PGMAllPhys.cpp \
350 VMMAll/PGMAllPool.cpp \
351 VMMAll/REMAll.cpp \
352 VMMAll/SELMAll.cpp \
353 VMMAll/TMAll.cpp \
354 VMMAll/TMAllCpu.cpp \
355 VMMAll/TMAllReal.cpp \
356 VMMAll/TMAllVirtual.cpp \
357 VMMAll/TRPMAll.cpp \
358 VMMAll/VMAll.cpp \
359 VMMAll/VMMAll.cpp \
360 PATM/VMMGC/CSAMGC.cpp \
361 PATM/VMMAll/CSAMAll.cpp \
362 PATM/VMMGC/PATMGC.cpp \
363 PATM/VMMAll/PATMAll.cpp
364
365ifeq ($(VBOX_LDR_FMT32),pe)
366VMMGC_SOURCES += VMMGC/VMMGC.def
367endif
368ifeq ($(VBOX_LDR_FMT32),lx)
369VMMGC_SOURCES += $(PATH_VMMGCImp)/VMMGC.def
370endif
371
372ifdef VBOX_WITH_VMI
373VMMGC_DEFS += \
374 VBOX_WITH_VMI
375VMMGC_SOURCES += \
376 PARAV/PARAV.cpp \
377 PARAV/PARAVAll.cpp
378endif
379
380# the very last one.
381VMMGC_SOURCES += VMMGC/VMMGC99.asm
382
383VMMGC/VMMGCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMGCDeps.cpp to .c
384
385
386#
387# VMMR0.r0
388#
389SYSMODS += VMMR0
390VMMR0_TEMPLATE = VBOXR0
391VMMR0_INCS := \
392 $(PATH_SUB_CURRENT) \
393 PATM
394VMMR0_DEFS = IN_VMM_R0 IN_RT_R0 IN_DIS DIS_CORE_ONLY IN_GVMM_R0 IN_GMM_R0 IN_INTNET_R0 RTASSERT_HAVE_SHOULD_PANIC
395## @todo eliminate IN_GVMM_R0 IN_GMM_R0
396ifdef VBOX_WITH_R0_LOGGING
397VMMR0_DEFS += VBOX_WITH_R0_LOGGING
398endif
399VMMR0_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0
400ifeq ($(VBOX_LDR_FMT),pe)
401VMMR0_LDFLAGS = -Entry:VMMR0EntryEx
402endif
403ifeq ($(VBOX_LDR_FMT),elf)
404 VMMR0_LDFLAGS = -e VMMR0EntryEx
405endif
406VMMR0_SYSSUFF = .r0
407VMMR0_SOURCES = \
408 VMMR0/CPUMR0.cpp \
409 VMMR0/DBGFR0.cpp \
410 VMMR0/GMMR0.cpp \
411 VMMR0/GVMMR0.cpp \
412 VMMR0/HWACCMR0.cpp \
413 VMMR0/HWACCMR0A.asm \
414 VMMR0/HWSVMR0.cpp \
415 VMMR0/HWVMXR0.cpp \
416 VMMR0/PDMR0Device.cpp \
417 VMMR0/PGMR0.cpp \
418 VMMR0/TRPMR0.cpp \
419 VMMR0/TRPMR0A.asm \
420 VMMR0/VMMR0.cpp \
421 VMMR0/VMMR0A.asm \
422 VMMAll/CPUMAllA.asm \
423 VMMAll/CPUMAllRegs.cpp \
424 VMMAll/DBGFAll.cpp \
425 VMMAll/EMAll.cpp \
426 VMMAll/EMAllA.asm \
427 VMMAll/HWACCMAll.cpp \
428 VMMAll/IOMAll.cpp \
429 VMMAll/IOMAllMMIO.cpp \
430 VMMAll/MMAll.cpp \
431 VMMAll/MMAllHyper.cpp \
432 VMMAll/MMAllPagePool.cpp \
433 VMMAll/PDMAll.cpp \
434 VMMAll/PDMAllCritSect.cpp \
435 VMMAll/PDMAllQueue.cpp \
436 VMMAll/PGMAll.cpp \
437 VMMAll/PGMAllHandler.cpp \
438 VMMAll/PGMAllMap.cpp \
439 VMMAll/PGMAllPhys.cpp \
440 VMMAll/PGMAllPool.cpp \
441 VMMAll/REMAll.cpp \
442 VMMAll/SELMAll.cpp \
443 VMMAll/TMAll.cpp \
444 VMMAll/TMAllCpu.cpp \
445 VMMAll/TMAllReal.cpp \
446 VMMAll/TMAllVirtual.cpp \
447 VMMAll/TRPMAll.cpp \
448 VMMAll/VMAll.cpp \
449 VMMAll/VMMAll.cpp
450VMMR0_SOURCES.darwin = \
451 VMMR0/PGMR0DynMap.cpp
452
453
454ifeq ($(VBOX_LDR_FMT),pe)
455VMMR0_SOURCES += VMMR0/VMMR0.def
456endif
457ifeq ($(VBOX_LDR_FMT),lx)
458VMMR0_SOURCES += $(PATH_VMMR0Imp)/VMMR0.def
459endif
460
461VMMR0_LIBS = \
462 $(PATH_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
463 $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
464 $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB)
465ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
466VMMR0_LIBS += \
467 $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
468endif
469
470#
471# For vmmGetSvnRev.
472#
473VMMAll/VMMAll.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
474
475include $(KBUILD_PATH)/subfooter.kmk
476
477
478# Alias the PGM templates to the object in which they are defined.
479PGMBth.o PGMGst.o PGMShw.o \
480PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
481PGMAllBth.o PGMAllGst.o PGMAllShw.o \
482PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
483PGMGCBth.o PGMGCGst.o PGMGCShw.o \
484PGMGCBth.obj PGMGCGst.obj PGMGCShw.obj: PGMGC.o
485PGMPhysRWTmpl.o PGMPhysRWTmpl.obj: PGMPhys.o
486
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette