VirtualBox

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

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