VirtualBox

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

Last change on this file since 12594 was 12248, checked in by vboxsync, 16 years ago

VMM/Makefiles: Eliminated PATH_TARGET usage and pushed them up to root level (sub-makefile wise).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 10.5 KB
Line 
1# $Id: Makefile.kmk 12248 2008-09-09 01:21:58Z 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 PDMDriver.cpp \
72 PDMLdr.cpp \
73 PDMCritSect.cpp \
74 PDMQueue.cpp \
75 PDMThread.cpp \
76 PGM.cpp \
77 PGMDbg.cpp \
78 PGMHandler.cpp \
79 PGMMap.cpp \
80 PGMPhys.cpp \
81 PGMPool.cpp \
82 SELM.cpp \
83 SSM.cpp \
84 STAM.cpp \
85 TM.cpp \
86 TRPM.cpp \
87 VM.cpp \
88 VMEmt.cpp \
89 VMReq.cpp \
90 VMM.cpp \
91 VMMTests.cpp \
92 HWACCM.cpp \
93 VMMAll/CPUMAllRegs.cpp \
94 VMMAll/DBGFAll.cpp \
95 VMMAll/HWACCMAll.cpp \
96 VMMAll/IOMAll.cpp \
97 VMMAll/IOMAllMMIO.cpp \
98 VMMAll/MMAll.cpp \
99 VMMAll/MMAllHyper.cpp \
100 VMMAll/MMAllPagePool.cpp \
101 VMMAll/MMAllPhys.cpp \
102 VMMAll/PDMAll.cpp \
103 VMMAll/PDMAllCritSect.cpp \
104 VMMAll/PDMAllQueue.cpp \
105 VMMAll/PGMAll.cpp \
106 VMMAll/PGMAllHandler.cpp \
107 VMMAll/PGMAllMap.cpp \
108 VMMAll/PGMAllPhys.cpp \
109 VMMAll/PGMAllPool.cpp \
110 VMMAll/SELMAll.cpp \
111 VMMAll/EMAll.cpp \
112 VMMAll/EMAllA.asm \
113 VMMAll/TMAll.cpp \
114 VMMAll/TMAllCpu.cpp \
115 VMMAll/TMAllReal.cpp \
116 VMMAll/TMAllVirtual.cpp \
117 VMMAll/TRPMAll.cpp \
118 VMMAll/VMAll.cpp \
119 VMMAll/VMMAll.cpp \
120 PATM/CSAM.cpp \
121 PATM/VMMAll/CSAMAll.cpp \
122 PATM/PATM.cpp \
123 PATM/PATMPatch.cpp \
124 PATM/PATMGuest.cpp \
125 PATM/PATMA.asm \
126 PATM/PATMSSM.cpp \
127 PATM/VMMAll/PATMAll.cpp
128VMMR3_SOURCES.x86 += \
129 VMMSwitcher/32BitTo32Bit.asm \
130 VMMSwitcher/32BitToPAE.asm \
131 VMMSwitcher/PAETo32Bit.asm \
132 VMMSwitcher/PAEToPAE.asm
133VMMR3_SOURCES.amd64 = \
134 VMMSwitcher/AMD64ToPAE.asm
135VMMR3_SOURCES.darwin.x86 += \
136 VMMSwitcher/AMD64ToPAE.asm
137
138ifdef VBOX_WITH_USB
139VMMR3_DEFS += VBOX_WITH_USB
140VMMR3_SOURCES += PDMUsb.cpp
141endif
142
143ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
144VMMR3_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
145VMMR3_DEFS.linux += __USE_FILE_OFFSET64 __USE_LARGEFILE64
146VMMR3_SOURCES += PDMAsyncCompletion.cpp
147VMMR3_SOURCES.linux += \
148 PDMAsyncCompletionSocketPosix.cpp \
149 PDMAsyncCompletionHostPosix.cpp
150
151VMMR3_SOURCES.win += \
152 PDMAsyncCompletionSocketWin.cpp \
153 PDMAsyncCompletionHostWin.cpp
154
155VMMR3_SOURCES.solaris += \
156 PDMAsyncCompletionSocketPosix.cpp \
157 PDMAsyncCompletionHostSolaris.cpp
158
159VMMR3_SOURCES.darwin += \
160 PDMAsyncCompletionSocketPosix.cpp \
161 PDMAsyncCompletionHostPosix.cpp
162
163VMMR3_SOURCES.freebsd += \
164 PDMAsyncCompletionSocketPosix.cpp \
165 PDMAsyncCompletionHostFreeBSD.cpp
166
167endif
168
169#
170# The VMM DLL.
171#
172DLLS += VBoxVMM
173
174VBoxVMM_TEMPLATE = VBOXR3
175VBoxVMM_DEFS = $(VMMR3_DEFS)
176VBoxVMM_SOURCES = VBoxVMMDeps.cpp
177VBoxVMM_SONAME.linux = VBoxVMM.so
178
179VBoxVMM_LIBS = \
180 $(PATH_LIB)/VMMR3$(VBOX_SUFF_LIB) \
181 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
182ifdef VBOX_WITH_DEBUGGER
183VBoxVMM_LIBS += \
184 $(PATH_LIB)/Debugger$(VBOX_SUFF_LIB)
185endif
186VBoxVMM_LIBS += \
187 $(LIB_REM) \
188 $(LIB_RUNTIME)
189
190VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
191VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
192VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
193VBoxVMM_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxVMM.dylib
194VBoxVMM_LDFLAGS.solaris = -mimpure-text
195#ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
196# ifeq ($(KBUILD_HOST), linux)
197#VBoxVMM_LIBS += aio
198# endif
199#endif
200
201ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
202
203#
204# VMMGCBuiltin.lib
205#
206LIBRARIES += VMMGCBuiltin
207VMMGCBuiltin_TEMPLATE = VBOXGC
208ifeq ($(VBOX_LDR_FMT32),pe)
209VMMGCBuiltin_SOURCES = VMMGC/VMMGCBuiltin.def
210endif
211ifeq ($(VBOX_LDR_FMT32),lx)
212VMMGCBuiltin_SOURCES = $(PATH_VMMGCBuiltin)/VMMGCBuiltin.def
213$$(PATH_VMMGCBuiltin)/VMMGCBuiltin.def: $(PATH_SUB_CURRENT)/VMMGC/VMMGCBuiltin.def | $$(dir $$@)
214 $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' --output $@ $<
215endif
216
217
218#
219# VMMGCImp.lib
220#
221LIBRARIES += VMMGCImp
222VMMGCImp_TEMPLATE = VBOXGC
223ifeq ($(VBOX_LDR_FMT32),pe)
224VMMGCImp_SOURCES = VMMGC/VMMGC.def
225endif
226ifeq ($(VBOX_LDR_FMT32),lx)
227VMMGCImp_SOURCES = $(PATH_VMMGCImp)/VMMGC.def
228$$(PATH_VMMGCImp)/VMMGC.def: $(PATH_SUB_CURRENT)/VMMGC/VMMGC.def | $$(dir $$@)
229 $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' --output $@ $<
230 $(APPEND) "$@" ""
231 $(APPEND) "$@" " ___ehInit"
232endif
233
234endif # GC: pe + lx
235
236
237ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
238#
239# VMMR0Imp.lib
240#
241LIBRARIES += VMMR0Imp
242VMMR0Imp_TEMPLATE = VBOXR0
243 ifeq ($(VBOX_LDR_FMT),pe)
244VMMR0Imp_SOURCES = VMMR0/VMMR0.def
245 endif
246 ifeq ($(VBOX_LDR_FMT),lx)
247VMMR0Imp_SOURCES = $(PATH_VMMR0Imp)/VMMR0.def
248$$(PATH_VMMR0Imp)/VMMR0.def: $(PATH_SUB_CURRENT)/VMMR0/VMMR0.def | $$(dir $$@)
249 $(SED) -e '/not-os2/d' -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' --output $@ $<
250 $(APPEND) "$@" ""
251 $(APPEND) "$@" " ___ehInit"
252 endif
253endif # R0: pe + lx
254
255
256#
257# VMMGC.gc
258#
259SYSMODS += VMMGC
260VMMGC_TEMPLATE = VBOXGC
261VMMGC_INCS := \
262 $(PATH_SUB_CURRENT) \
263 VMMGC \
264 PATM
265VMMGC_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
266ifdef VBOX_WITH_IDT_PATCHING
267VMMGC_DEFS += VBOX_WITH_IDT_PATCHING
268endif
269VMMGC_SYSSUFF = .gc
270VMMGC_LIBS = \
271 $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
272 $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
273ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
274VMMGC_LIBS += \
275 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
276endif
277ifeq ($(VBOX_LDR_FMT32),pe)
278VMMGC_LDFLAGS = -Entry:VMMGCEntry
279endif
280VMMGC_SOURCES = \
281 VMMGC/VMMGC0.asm \
282 VMMGC/VMMGCDeps.cpp \
283 VMMGC/CPUMGC.cpp \
284 VMMGC/CPUMGCA.asm \
285 VMMGC/EMGCA.asm \
286 VMMGC/DBGFGC.cpp \
287 VMMGC/IOMGC.cpp \
288 VMMGC/MMRamGC.cpp \
289 VMMGC/MMRamGCA.asm \
290 VMMGC/PDMGCDevice.cpp \
291 VMMGC/PGMGC.cpp \
292 VMMGC/SELMGC.cpp \
293 VMMGC/TRPMGC.cpp \
294 VMMGC/TRPMGCHandlers.cpp \
295 VMMGC/TRPMGCHandlersA.asm \
296 VMMGC/VMMGC.cpp \
297 VMMGC/VMMGCA.asm \
298 VMMAll/CPUMAllRegs.cpp \
299 VMMAll/CPUMAllA.asm \
300 VMMAll/DBGFAll.cpp \
301 VMMAll/IOMAll.cpp \
302 VMMAll/IOMAllMMIO.cpp \
303 VMMAll/EMAll.cpp \
304 VMMAll/EMAllA.asm \
305 VMMAll/MMAll.cpp \
306 VMMAll/MMAllHyper.cpp \
307 VMMAll/PDMAll.cpp \
308 VMMAll/PDMAllCritSect.cpp \
309 VMMAll/PDMAllQueue.cpp \
310 VMMAll/PGMAll.cpp \
311 VMMAll/PGMAllHandler.cpp \
312 VMMAll/PGMAllMap.cpp \
313 VMMAll/PGMAllPhys.cpp \
314 VMMAll/PGMAllPool.cpp \
315 VMMAll/REMAll.cpp \
316 VMMAll/SELMAll.cpp \
317 VMMAll/TMAll.cpp \
318 VMMAll/TMAllCpu.cpp \
319 VMMAll/TMAllReal.cpp \
320 VMMAll/TMAllVirtual.cpp \
321 VMMAll/TRPMAll.cpp \
322 VMMAll/VMAll.cpp \
323 VMMAll/VMMAll.cpp \
324 PATM/VMMGC/CSAMGC.cpp \
325 PATM/VMMAll/CSAMAll.cpp \
326 PATM/VMMGC/PATMGC.cpp \
327 PATM/VMMAll/PATMAll.cpp
328
329ifeq ($(VBOX_LDR_FMT32),pe)
330VMMGC_SOURCES += VMMGC/VMMGC.def
331endif
332ifeq ($(VBOX_LDR_FMT32),lx)
333VMMGC_SOURCES += $(PATH_VMMGCImp)/VMMGC.def
334endif
335
336# the very last one.
337VMMGC_SOURCES += VMMGC/VMMGC99.asm
338
339VMMGC/VMMGCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMGCDeps.cpp to .c
340
341
342#
343# VMMR0.r0
344#
345SYSMODS += VMMR0
346VMMR0_TEMPLATE = VBOXR0
347VMMR0_INCS := \
348 $(PATH_SUB_CURRENT) \
349 PATM
350VMMR0_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
351ifdef VBOX_WITH_IDT_PATCHING
352VMMR0_DEFS += VBOX_WITH_IDT_PATCHING
353endif
354ifeq ($(VBOX_LDR_FMT),pe)
355VMMR0_LDFLAGS = -Entry:VMMR0EntryEx
356endif
357ifeq ($(VBOX_LDR_FMT),elf)
358 VMMR0_LDFLAGS = -e VMMR0EntryEx
359endif
360VMMR0_SYSSUFF = .r0
361VMMR0_SOURCES = \
362 VMMR0/CPUMR0.cpp \
363 VMMR0/DBGFR0.cpp \
364 VMMR0/GMMR0.cpp \
365 VMMR0/GVMMR0.cpp \
366 VMMR0/HWACCMR0.cpp \
367 VMMR0/HWACCMR0A.asm \
368 VMMR0/HWSVMR0.cpp \
369 VMMR0/HWVMXR0.cpp \
370 VMMR0/PDMR0Device.cpp \
371 VMMR0/PGMR0.cpp \
372 VMMR0/TRPMR0.cpp \
373 VMMR0/TRPMR0A.asm \
374 VMMR0/VMMR0.cpp \
375 VMMR0/VMMR0A.asm \
376 VMMAll/CPUMAllA.asm \
377 VMMAll/CPUMAllRegs.cpp \
378 VMMAll/DBGFAll.cpp \
379 VMMAll/EMAll.cpp \
380 VMMAll/EMAllA.asm \
381 VMMAll/HWACCMAll.cpp \
382 VMMAll/IOMAll.cpp \
383 VMMAll/IOMAllMMIO.cpp \
384 VMMAll/MMAll.cpp \
385 VMMAll/MMAllHyper.cpp \
386 VMMAll/MMAllPagePool.cpp \
387 VMMAll/MMAllPhys.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