VirtualBox

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

Last change on this file since 12983 was 12980, checked in by vboxsync, 16 years ago

Split up PDMDevice.cpp, moving all the devhlps into two new files named PDMDevHlp.cpp and PDMDevMiscHlp.cpp.

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