VirtualBox

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

Last change on this file since 13333 was 13306, checked in by vboxsync, 16 years ago

IPRT,++: some assert.h cleanup, making a suitable place to call panic() in ring-0.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 10.3 KB
Line 
1# $Id: Makefile.kmk 13306 2008-10-15 21:17:04Z 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_IDT_PATCHING
38VMMR3_DEFS += VBOX_WITH_IDT_PATCHING
39endif
40ifdef VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
41VMMR3_DEFS += VBOX_WITH_PREALLOC_RAM_BY_DEFAULT
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 VMMTests.cpp \
95 HWACCM.cpp \
96 VMMAll/CPUMAllRegs.cpp \
97 VMMAll/DBGFAll.cpp \
98 VMMAll/HWACCMAll.cpp \
99 VMMAll/IOMAll.cpp \
100 VMMAll/IOMAllMMIO.cpp \
101 VMMAll/MMAll.cpp \
102 VMMAll/MMAllHyper.cpp \
103 VMMAll/MMAllPagePool.cpp \
104 VMMAll/PDMAll.cpp \
105 VMMAll/PDMAllCritSect.cpp \
106 VMMAll/PDMAllQueue.cpp \
107 VMMAll/PGMAll.cpp \
108 VMMAll/PGMAllHandler.cpp \
109 VMMAll/PGMAllMap.cpp \
110 VMMAll/PGMAllPhys.cpp \
111 VMMAll/PGMAllPool.cpp \
112 VMMAll/SELMAll.cpp \
113 VMMAll/EMAll.cpp \
114 VMMAll/EMAllA.asm \
115 VMMAll/TMAll.cpp \
116 VMMAll/TMAllCpu.cpp \
117 VMMAll/TMAllReal.cpp \
118 VMMAll/TMAllVirtual.cpp \
119 VMMAll/TRPMAll.cpp \
120 VMMAll/VMAll.cpp \
121 VMMAll/VMMAll.cpp \
122 PATM/CSAM.cpp \
123 PATM/VMMAll/CSAMAll.cpp \
124 PATM/PATM.cpp \
125 PATM/PATMPatch.cpp \
126 PATM/PATMGuest.cpp \
127 PATM/PATMA.asm \
128 PATM/PATMSSM.cpp \
129 PATM/VMMAll/PATMAll.cpp
130VMMR3_SOURCES.x86 += \
131 VMMSwitcher/32BitTo32Bit.asm \
132 VMMSwitcher/32BitToPAE.asm \
133 VMMSwitcher/PAETo32Bit.asm \
134 VMMSwitcher/PAEToPAE.asm
135VMMR3_SOURCES.amd64 = \
136 VMMSwitcher/AMD64ToPAE.asm
137VMMR3_SOURCES.darwin.x86 += \
138 VMMSwitcher/AMD64ToPAE.asm
139
140ifdef VBOX_WITH_USB
141VMMR3_DEFS += VBOX_WITH_USB
142VMMR3_SOURCES += PDMUsb.cpp
143endif
144
145ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
146VMMR3_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
147VMMR3_DEFS.linux += __USE_FILE_OFFSET64 __USE_LARGEFILE64
148VMMR3_SOURCES += PDMAsyncCompletion.cpp
149VMMR3_SOURCES.linux += \
150 PDMAsyncCompletionSocketPosix.cpp \
151 PDMAsyncCompletionHostPosix.cpp
152
153VMMR3_SOURCES.win += \
154 PDMAsyncCompletionSocketWin.cpp \
155 PDMAsyncCompletionHostWin.cpp
156
157VMMR3_SOURCES.solaris += \
158 PDMAsyncCompletionSocketPosix.cpp \
159 PDMAsyncCompletionHostSolaris.cpp
160
161VMMR3_SOURCES.darwin += \
162 PDMAsyncCompletionSocketPosix.cpp \
163 PDMAsyncCompletionHostPosix.cpp
164
165VMMR3_SOURCES.freebsd += \
166 PDMAsyncCompletionSocketPosix.cpp \
167 PDMAsyncCompletionHostFreeBSD.cpp
168
169endif
170
171#
172# The VMM DLL.
173#
174DLLS += VBoxVMM
175
176VBoxVMM_TEMPLATE = VBOXR3
177VBoxVMM_DEFS = $(VMMR3_DEFS)
178VBoxVMM_DEFS.$(KBUILD_TARGET) = $(VMMR3_DEFS.$(KBUILD_TARGET))
179VBoxVMM_SOURCES = VBoxVMMDeps.cpp
180VBoxVMM_SONAME.linux = VBoxVMM.so
181
182VBoxVMM_LIBS = \
183 $(PATH_LIB)/VMMR3$(VBOX_SUFF_LIB) \
184 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
185ifdef VBOX_WITH_DEBUGGER
186VBoxVMM_LIBS += \
187 $(PATH_LIB)/Debugger$(VBOX_SUFF_LIB)
188endif
189VBoxVMM_LIBS += \
190 $(LIB_REM) \
191 $(LIB_RUNTIME)
192
193VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
194VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
195VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
196VBoxVMM_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxVMM.dylib
197VBoxVMM_LDFLAGS.solaris = -mimpure-text
198#ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
199# ifeq ($(KBUILD_HOST), linux)
200#VBoxVMM_LIBS += aio
201# endif
202#endif
203
204ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
205
206#
207# VMMGCBuiltin.lib
208#
209LIBRARIES += VMMGCBuiltin
210VMMGCBuiltin_TEMPLATE = VBOXGC
211ifeq ($(VBOX_LDR_FMT32),pe)
212VMMGCBuiltin_SOURCES = VMMGC/VMMGCBuiltin.def
213endif
214ifeq ($(VBOX_LDR_FMT32),lx)
215VMMGCBuiltin_SOURCES = $(PATH_VMMGCBuiltin)/VMMGCBuiltin.def
216$$(PATH_VMMGCBuiltin)/VMMGCBuiltin.def: $(PATH_SUB_CURRENT)/VMMGC/VMMGCBuiltin.def | $$(dir $$@)
217 $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' --output $@ $<
218endif
219
220
221#
222# VMMGCImp.lib
223#
224LIBRARIES += VMMGCImp
225VMMGCImp_TEMPLATE = VBOXGC
226ifeq ($(VBOX_LDR_FMT32),pe)
227VMMGCImp_SOURCES = VMMGC/VMMGC.def
228endif
229ifeq ($(VBOX_LDR_FMT32),lx)
230VMMGCImp_SOURCES = $(PATH_VMMGCImp)/VMMGC.def
231$$(PATH_VMMGCImp)/VMMGC.def: $(PATH_SUB_CURRENT)/VMMGC/VMMGC.def | $$(dir $$@)
232 $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' --output $@ $<
233 $(APPEND) "$@" ""
234 $(APPEND) "$@" " ___ehInit"
235endif
236
237endif # GC: pe + lx
238
239
240ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
241#
242# VMMR0Imp.lib
243#
244LIBRARIES += VMMR0Imp
245VMMR0Imp_TEMPLATE = VBOXR0
246 ifeq ($(VBOX_LDR_FMT),pe)
247VMMR0Imp_SOURCES = VMMR0/VMMR0.def
248 endif
249 ifeq ($(VBOX_LDR_FMT),lx)
250VMMR0Imp_SOURCES = $(PATH_VMMR0Imp)/VMMR0.def
251$$(PATH_VMMR0Imp)/VMMR0.def: $(PATH_SUB_CURRENT)/VMMR0/VMMR0.def | $$(dir $$@)
252 $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' --output $@ $<
253 $(APPEND) "$@" ""
254 $(APPEND) "$@" " ___ehInit"
255 endif
256endif # R0: pe + lx
257
258
259#
260# VMMGC.gc
261#
262SYSMODS += VMMGC
263VMMGC_TEMPLATE = VBOXGC
264VMMGC_INCS := \
265 $(PATH_SUB_CURRENT) \
266 VMMGC \
267 PATM
268VMMGC_DEFS = IN_VMM_RC IN_RT_GC IN_RT_RC IN_DIS DIS_CORE_ONLY
269ifdef VBOX_WITH_IDT_PATCHING
270VMMGC_DEFS += VBOX_WITH_IDT_PATCHING
271endif
272VMMGC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_RC
273VMMGC_SYSSUFF = .gc
274VMMGC_LIBS = \
275 $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
276 $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
277ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
278VMMGC_LIBS += \
279 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
280endif
281ifeq ($(VBOX_LDR_FMT32),pe)
282VMMGC_LDFLAGS = -Entry:VMMGCEntry
283endif
284VMMGC_SOURCES = \
285 VMMGC/VMMGC0.asm \
286 VMMGC/VMMGCDeps.cpp \
287 VMMGC/CPUMGC.cpp \
288 VMMGC/CPUMGCA.asm \
289 VMMGC/EMGCA.asm \
290 VMMGC/DBGFGC.cpp \
291 VMMGC/IOMGC.cpp \
292 VMMGC/MMRamGC.cpp \
293 VMMGC/MMRamGCA.asm \
294 VMMGC/PDMGCDevice.cpp \
295 VMMGC/PGMGC.cpp \
296 VMMGC/SELMGC.cpp \
297 VMMGC/TRPMGC.cpp \
298 VMMGC/TRPMGCHandlers.cpp \
299 VMMGC/TRPMGCHandlersA.asm \
300 VMMGC/VMMGC.cpp \
301 VMMGC/VMMGCA.asm \
302 VMMAll/CPUMAllRegs.cpp \
303 VMMAll/CPUMAllA.asm \
304 VMMAll/DBGFAll.cpp \
305 VMMAll/IOMAll.cpp \
306 VMMAll/IOMAllMMIO.cpp \
307 VMMAll/EMAll.cpp \
308 VMMAll/EMAllA.asm \
309 VMMAll/MMAll.cpp \
310 VMMAll/MMAllHyper.cpp \
311 VMMAll/PDMAll.cpp \
312 VMMAll/PDMAllCritSect.cpp \
313 VMMAll/PDMAllQueue.cpp \
314 VMMAll/PGMAll.cpp \
315 VMMAll/PGMAllHandler.cpp \
316 VMMAll/PGMAllMap.cpp \
317 VMMAll/PGMAllPhys.cpp \
318 VMMAll/PGMAllPool.cpp \
319 VMMAll/REMAll.cpp \
320 VMMAll/SELMAll.cpp \
321 VMMAll/TMAll.cpp \
322 VMMAll/TMAllCpu.cpp \
323 VMMAll/TMAllReal.cpp \
324 VMMAll/TMAllVirtual.cpp \
325 VMMAll/TRPMAll.cpp \
326 VMMAll/VMAll.cpp \
327 VMMAll/VMMAll.cpp \
328 PATM/VMMGC/CSAMGC.cpp \
329 PATM/VMMAll/CSAMAll.cpp \
330 PATM/VMMGC/PATMGC.cpp \
331 PATM/VMMAll/PATMAll.cpp
332
333ifeq ($(VBOX_LDR_FMT32),pe)
334VMMGC_SOURCES += VMMGC/VMMGC.def
335endif
336ifeq ($(VBOX_LDR_FMT32),lx)
337VMMGC_SOURCES += $(PATH_VMMGCImp)/VMMGC.def
338endif
339
340# the very last one.
341VMMGC_SOURCES += VMMGC/VMMGC99.asm
342
343VMMGC/VMMGCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMGCDeps.cpp to .c
344
345
346#
347# VMMR0.r0
348#
349SYSMODS += VMMR0
350VMMR0_TEMPLATE = VBOXR0
351VMMR0_INCS := \
352 $(PATH_SUB_CURRENT) \
353 PATM
354VMMR0_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
355## @todo eliminate IN_GVMM_R0 IN_GMM_R0
356ifdef VBOX_WITH_IDT_PATCHING
357VMMR0_DEFS += VBOX_WITH_IDT_PATCHING
358endif
359VMMR0_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0
360ifeq ($(VBOX_LDR_FMT),pe)
361VMMR0_LDFLAGS = -Entry:VMMR0EntryEx
362endif
363ifeq ($(VBOX_LDR_FMT),elf)
364 VMMR0_LDFLAGS = -e VMMR0EntryEx
365endif
366VMMR0_SYSSUFF = .r0
367VMMR0_SOURCES = \
368 VMMR0/CPUMR0.cpp \
369 VMMR0/DBGFR0.cpp \
370 VMMR0/GMMR0.cpp \
371 VMMR0/GVMMR0.cpp \
372 VMMR0/HWACCMR0.cpp \
373 VMMR0/HWACCMR0A.asm \
374 VMMR0/HWSVMR0.cpp \
375 VMMR0/HWVMXR0.cpp \
376 VMMR0/PDMR0Device.cpp \
377 VMMR0/PGMR0.cpp \
378 VMMR0/TRPMR0.cpp \
379 VMMR0/TRPMR0A.asm \
380 VMMR0/VMMR0.cpp \
381 VMMR0/VMMR0A.asm \
382 VMMAll/CPUMAllA.asm \
383 VMMAll/CPUMAllRegs.cpp \
384 VMMAll/DBGFAll.cpp \
385 VMMAll/EMAll.cpp \
386 VMMAll/EMAllA.asm \
387 VMMAll/HWACCMAll.cpp \
388 VMMAll/IOMAll.cpp \
389 VMMAll/IOMAllMMIO.cpp \
390 VMMAll/MMAll.cpp \
391 VMMAll/MMAllHyper.cpp \
392 VMMAll/MMAllPagePool.cpp \
393 VMMAll/PDMAll.cpp \
394 VMMAll/PDMAllCritSect.cpp \
395 VMMAll/PDMAllQueue.cpp \
396 VMMAll/PGMAll.cpp \
397 VMMAll/PGMAllHandler.cpp \
398 VMMAll/PGMAllMap.cpp \
399 VMMAll/PGMAllPhys.cpp \
400 VMMAll/PGMAllPool.cpp \
401 VMMAll/REMAll.cpp \
402 VMMAll/SELMAll.cpp \
403 VMMAll/TMAll.cpp \
404 VMMAll/TMAllCpu.cpp \
405 VMMAll/TMAllReal.cpp \
406 VMMAll/TMAllVirtual.cpp \
407 VMMAll/TRPMAll.cpp \
408 VMMAll/VMAll.cpp \
409 VMMAll/VMMAll.cpp \
410
411
412ifeq ($(VBOX_LDR_FMT),pe)
413VMMR0_SOURCES += VMMR0/VMMR0.def
414endif
415ifeq ($(VBOX_LDR_FMT),lx)
416VMMR0_SOURCES += $(PATH_VMMR0Imp)/VMMR0.def
417endif
418
419VMMR0_LIBS = \
420 $(PATH_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
421 $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
422 $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB)
423ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
424VMMR0_LIBS += \
425 $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
426endif
427
428#
429# For vmmGetSvnRev.
430#
431VMMAll/VMMAll.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
432
433include $(KBUILD_PATH)/subfooter.kmk
434
435
436# Alias the PGM templates to the object in which they are defined.
437PGMBth.o PGMGst.o PGMShw.o \
438PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
439PGMAllBth.o PGMAllGst.o PGMAllShw.o \
440PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
441PGMGCBth.o PGMGCGst.o PGMGCShw.o \
442PGMGCBth.obj PGMGCGst.obj PGMGCShw.obj: PGMGC.o
443PGMPhysRWTmpl.o PGMPhysRWTmpl.obj: PGMPhys.o
444
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