VirtualBox

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

Last change on this file since 4050 was 3888, checked in by vboxsync, 17 years ago

Solaris.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 9.3 KB
Line 
1# $Id: Makefile.kmk 3888 2007-07-26 16:26:39Z vboxsync $
2## @file
3# Top-level makefile for the VMM.
4#
5
6#
7# Copyright (C) 2006-2007 innotek GmbH
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 as published by the Free Software Foundation,
13# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14# distribution. VirtualBox OSE is distributed in the hope that it will
15# be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17# If you received this file as part of a commercial VirtualBox
18# distribution, then only the terms of your commercial VirtualBox
19# license agreement apply instead of the previous paragraph.
20#
21
22DEPTH = ../../..
23include $(PATH_KBUILD)/subheader.kmk
24
25## @todo get rid of these.
26# Enable the PDM lock.
27#DEFS += VBOX_WITH_PDM_LOCK
28ifdef VBOX_WITH_INTERNAL_NETWORKING
29DEFS += VBOX_WITH_INTERNAL_NETWORKING
30endif
31
32# Include sub-makefiles.
33include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
34
35
36#
37# VMMR3.dll
38#
39LIBRARIES += VMMR3
40
41VMMR3_TEMPLATE = VBOXR3
42VMMR3_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 \
43 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
44ifdef VBOX_OSE
45 ifeq ($(BUILD_TARGET),darwin)
46 VMMR3_DEFS += PDMLDR_FAKE_MODE
47 endif
48endif
49VMMR3_INCS := \
50 PATM \
51 $(PATH_SUB_CURRENT)
52
53VMMR3_SOURCES = \
54 CFGM.cpp \
55 CPUM.cpp \
56 CPUMStack.cpp \
57 DBGF.cpp \
58 DBGFAddr.cpp \
59 DBGFBp.cpp \
60 DBGFDisas.cpp \
61 DBGFInfo.cpp \
62 DBGFLog.cpp \
63 DBGFStack.cpp \
64 DBGFSym.cpp \
65 EM.cpp \
66 IOM.cpp \
67 MM.cpp \
68 MMHeap.cpp \
69 MMHyper.cpp \
70 MMPagePool.cpp \
71 MMPhys.cpp \
72 PDM.cpp \
73 PDMDevice.cpp \
74 PDMDriver.cpp \
75 PDMLdr.cpp \
76 PDMCritSect.cpp \
77 PDMQueue.cpp \
78 PDMThread.cpp \
79 PGM.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/CPUMAllA.asm \
97 VMMAll/DBGFAll.cpp \
98 VMMAll/IOMAll.cpp \
99 VMMAll/IOMAllMMIO.cpp \
100 VMMAll/MMAll.cpp \
101 VMMAll/MMAllHyper.cpp \
102 VMMAll/MMAllPagePool.cpp \
103 VMMAll/MMAllPhys.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
145
146#
147# The VMM DLL.
148#
149DLLS += VBoxVMM
150VBoxVMM_TEMPLATE = VBOXR3
151VBoxVMM_DEFS = $(VMMR3_DEFS)
152VBoxVMM_SOURCES = VBoxVMMDeps.cpp
153VBoxVMM_SONAME.linux = VBoxVMM.so
154
155VBoxVMM_LIBS = \
156 $(PATH_LIB)/VMMR3$(VBOX_SUFF_LIB) \
157 $(PATH_LIB)/Debugger$(VBOX_SUFF_LIB) \
158 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB) \
159 $(LIB_REM) \
160 $(LIB_RUNTIME)
161
162VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
163VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
164VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
165VBoxVMM_LDFLAGS.darwin = -install_name @executable_path/VBoxVMM.dylib
166VBoxVMM_LDFLAGS.solaris = -mimpure-text
167
168
169#
170# VMMGCBuiltin.lib
171#
172ifneq ($(BUILD_TARGET),darwin)
173LIBRARIES += VMMGCBuiltin
174VMMGCBuiltin_TEMPLATE = VBOXGC
175ifeq ($(VBOX_LDR_FMT32),pe)
176VMMGCBuiltin_SOURCES = VMMGC/VMMGCBuiltin.def
177endif
178ifeq ($(VBOX_LDR_FMT32),lx)
179VMMGCBuiltin_SOURCES = $(PATH_TARGET)/VMMGCBuiltin.def
180$(PATH_TARGET)/VMMGCBuiltin.def: VMMGC/VMMGCBuiltin.def | $(call DIRDEP,$(PATH_TARGET))
181 $(SED) -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > $@.tmp
182 $(MV) -f $@.tmp $@
183endif
184endif # !darwin
185
186
187#
188# VMMGCImp.lib
189#
190ifneq ($(BUILD_TARGET),darwin)
191LIBRARIES += VMMGCImp
192VMMGCImp_TEMPLATE = VBOXGC
193ifeq ($(VBOX_LDR_FMT32),pe)
194VMMGCImp_SOURCES = VMMGC/VMMGC.def
195endif
196ifeq ($(VBOX_LDR_FMT32),lx)
197VMMGCImp_SOURCES = $(PATH_TARGET)/VMMGC.def
198$(PATH_TARGET)/VMMGC.def: VMMGC/VMMGC.def | $(call DIRDEP,$(PATH_TARGET))
199 $(SED) -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > $@.tmp
200 $(APPEND) "$@.tmp" ""
201 $(APPEND) "$@.tmp" " ___ehInit"
202 $(MV) -f $@.tmp $@
203endif
204endif # !darwin
205
206
207#
208# VMMR0Imp.lib
209#
210ifneq ($(BUILD_TARGET),darwin)
211LIBRARIES += VMMR0Imp
212VMMR0Imp_TEMPLATE = VBOXR0
213ifeq ($(VBOX_LDR_FMT),pe)
214VMMR0Imp_SOURCES = VMMR0/VMMR0.def
215endif
216ifeq ($(VBOX_LDR_FMT),lx)
217VMMR0Imp_SOURCES = $(PATH_TARGET)/VMMR0.def
218$(PATH_TARGET)/VMMR0.def: VMMR0/VMMR0.def | $(call DIRDEP,$(PATH_TARGET))
219 $(SED) -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > $@.tmp
220 $(APPEND) "$@.tmp" ""
221 $(APPEND) "$@.tmp" " ___ehInit"
222 $(MV) -f $@.tmp $@
223endif
224endif # !darwin
225
226
227#
228# VMMGC.gc
229#
230SYSMODS += VMMGC
231VMMGC_TEMPLATE = VBOXGC
232VMMGC_INCS := \
233 $(PATH_SUB_CURRENT) \
234 VMMGC \
235 PATM
236VMMGC_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
237VMMGC_SYSSUFF = .gc
238VMMGC_LIBS = \
239 $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
240 $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
241ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
242VMMGC_LIBS += \
243 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
244endif
245ifeq ($(VBOX_LDR_FMT32),pe)
246VMMGC_LDFLAGS = -Entry:VMMGCEntry
247endif
248VMMGC_SOURCES = \
249 VMMGC/VMMGC0.asm \
250 VMMGC/VMMGCDeps.cpp \
251 VMMGC/CPUMGC.cpp \
252 VMMGC/CPUMGCA.asm \
253 VMMGC/EMGCA.asm \
254 VMMGC/DBGFGC.cpp \
255 VMMGC/IOMGC.cpp \
256 VMMGC/MMRamGC.cpp \
257 VMMGC/MMRamGCA.asm \
258 VMMGC/PDMGCDevice.cpp \
259 VMMGC/PGMGC.cpp \
260 VMMGC/SELMGC.cpp \
261 VMMGC/TRPMGC.cpp \
262 VMMGC/TRPMGCHandlers.cpp \
263 VMMGC/TRPMGCHandlersA.asm \
264 VMMGC/VMMGC.cpp \
265 VMMGC/VMMGCA.asm \
266 VMMAll/CPUMAllRegs.cpp \
267 VMMAll/CPUMAllA.asm \
268 VMMAll/DBGFAll.cpp \
269 VMMAll/IOMAll.cpp \
270 VMMAll/IOMAllMMIO.cpp \
271 VMMAll/EMAll.cpp \
272 VMMAll/EMAllA.asm \
273 VMMAll/MMAll.cpp \
274 VMMAll/MMAllHyper.cpp \
275 VMMAll/PDMAll.cpp \
276 VMMAll/PDMAllCritSect.cpp \
277 VMMAll/PDMAllQueue.cpp \
278 VMMAll/PGMAll.cpp \
279 VMMAll/PGMAllHandler.cpp \
280 VMMAll/PGMAllMap.cpp \
281 VMMAll/PGMAllPhys.cpp \
282 VMMAll/PGMAllPool.cpp \
283 VMMAll/REMAll.cpp \
284 VMMAll/SELMAll.cpp \
285 VMMAll/TMAll.cpp \
286 VMMAll/TMAllCpu.cpp \
287 VMMAll/TMAllReal.cpp \
288 VMMAll/TMAllVirtual.cpp \
289 VMMAll/TRPMAll.cpp \
290 VMMAll/VMAll.cpp \
291 VMMAll/VMMAll.cpp \
292 PATM/VMMGC/CSAMGC.cpp \
293 PATM/VMMAll/CSAMAll.cpp \
294 PATM/VMMGC/PATMGC.cpp \
295 PATM/VMMAll/PATMAll.cpp
296
297ifeq ($(VBOX_LDR_FMT32),pe)
298VMMGC_SOURCES += VMMGC/VMMGC.def
299endif
300ifeq ($(VBOX_LDR_FMT32),lx)
301VMMGC_SOURCES += $(PATH_TARGET)/VMMGC.def
302endif
303
304# the very last one.
305VMMGC_SOURCES += VMMGC/VMMGC99.asm
306
307VMMGC/VMMGCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMGCDeps.cpp to .c
308
309
310#
311# VMMR0.r0
312#
313SYSMODS += VMMR0
314VMMR0_TEMPLATE = VBOXR0
315VMMR0_INCS := \
316 $(PATH_SUB_CURRENT) \
317 PATM
318VMMR0_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 DIS_CORE_ONLY
319ifeq ($(VBOX_LDR_FMT),pe)
320VMMR0_LDFLAGS = -Entry:VMMR0Entry
321endif
322ifeq ($(VBOX_LDR_FMT),elf)
323VMMR0_LDFLAGS = -entry=VMMR0Entry
324endif
325VMMR0_SYSSUFF = .r0
326VMMR0_SOURCES = \
327 VMMR0/VMMR0.cpp \
328 VMMR0/DBGFR0.cpp \
329 VMMAll/DBGFAll.cpp \
330 VMMAll/TRPMAll.cpp \
331 VMMAll/CPUMAllRegs.cpp \
332 VMMAll/CPUMAllA.asm \
333 VMMAll/MMAll.cpp \
334 VMMAll/MMAllHyper.cpp \
335 VMMAll/MMAllPagePool.cpp \
336 VMMAll/MMAllPhys.cpp \
337 VMMR0/VMMR0A.asm \
338 VMMR0/HWACCMR0.cpp \
339 VMMR0/HWACCMR0A.asm \
340 VMMR0/HWVMXR0.cpp \
341 VMMR0/HWSVMR0.cpp \
342 VMMR0/CPUMR0.cpp \
343 VMMR0/TRPMR0.cpp \
344 VMMR0/TRPMR0A.asm \
345 VMMR0/PDMR0Device.cpp \
346 VMMAll/EMAll.cpp \
347 VMMAll/EMAllA.asm \
348 VMMAll/PDMAll.cpp \
349 VMMAll/PDMAllCritSect.cpp \
350 VMMAll/PDMAllQueue.cpp \
351 VMMAll/PGMAll.cpp \
352 VMMAll/PGMAllHandler.cpp \
353 VMMAll/PGMAllMap.cpp \
354 VMMAll/PGMAllPhys.cpp \
355 VMMAll/PGMAllPool.cpp \
356 VMMAll/REMAll.cpp \
357 VMMAll/IOMAll.cpp \
358 VMMAll/IOMAllMMIO.cpp \
359 VMMAll/SELMAll.cpp \
360 VMMAll/TMAll.cpp \
361 VMMAll/TMAllCpu.cpp \
362 VMMAll/TMAllReal.cpp \
363 VMMAll/TMAllVirtual.cpp \
364 VMMAll/VMAll.cpp \
365 PATM/VMMAll/PATMAll.cpp
366
367ifeq ($(VBOX_LDR_FMT),pe)
368VMMR0_SOURCES += VMMR0/VMMR0.def
369endif
370ifeq ($(VBOX_LDR_FMT),lx)
371VMMR0_SOURCES += $(PATH_TARGET)/VMMR0.def
372endif
373
374VMMR0_LIBS = \
375 $(PATH_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
376 $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
377 $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB)
378ifneq ($(BUILD_TARGET),darwin)
379VMMR0_LIBS += \
380 $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
381endif
382ifeq ($(VBOX_LDR_FMT),elf)
383VMMR0_LIBS += \
384 $(VBOX_GCC_LIBGCC)
385endif
386
387
388include $(PATH_KBUILD)/subfooter.kmk
389
390
391# Alias the PGM templates to the object in which they are defined.
392PGMBth.o PGMGst.o PGMShw.o \
393PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
394PGMAllBth.o PGMAllGst.o PGMAllShw.o \
395PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
396PGMGCBth.o PGMGCGst.o PGMGCShw.o \
397PGMGCBth.obj PGMGCGst.obj PGMGCShw.obj: PGMGC.o
398
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