VirtualBox

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

Last change on this file since 2584 was 2517, checked in by vboxsync, 18 years ago

Converted to sub-makefile.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 9.2 KB
Line 
1# $Id: Makefile.kmk 2517 2007-05-05 03:08:03Z vboxsync $
2## @file
3# Top-level makefile for the VMM.
4#
5
6#
7# Copyright (C) 2006 InnoTek Systemberatung 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 PGM.cpp \
79 PGMHandler.cpp \
80 PGMMap.cpp \
81 PGMPhys.cpp \
82 PGMPool.cpp \
83 SELM.cpp \
84 SSM.cpp \
85 STAM.cpp \
86 TM.cpp \
87 TRPM.cpp \
88 VM.cpp \
89 VMEmt.cpp \
90 VMReq.cpp \
91 VMM.cpp \
92 VMMTests.cpp \
93 HWACCM.cpp \
94 VMMAll/CPUMAllRegs.cpp \
95 VMMAll/CPUMAllA.asm \
96 VMMAll/DBGFAll.cpp \
97 VMMAll/IOMAll.cpp \
98 VMMAll/IOMAllMMIO.cpp \
99 VMMAll/MMAll.cpp \
100 VMMAll/MMAllHyper.cpp \
101 VMMAll/MMAllPagePool.cpp \
102 VMMAll/MMAllPhys.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
139
140#
141# The VMM DLL.
142#
143DLLS += VBoxVMM
144VBoxVMM_TEMPLATE = VBOXR3
145VBoxVMM_DEFS = $(VMMR3_DEFS)
146VBoxVMM_SOURCES = VBoxVMMDeps.cpp
147VBoxVMM_SONAME.linux = VBoxVMM.so
148
149VBoxVMM_LIBS = \
150 $(PATH_LIB)/VMMR3$(VBOX_SUFF_LIB) \
151 $(PATH_LIB)/Debugger$(VBOX_SUFF_LIB) \
152 $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB) \
153 $(LIB_REM) \
154 $(LIB_RUNTIME)
155
156VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
157VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
158VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
159VBoxVMM_LDFLAGS.darwin = -install_name @executable_path/VBoxVMM.dylib
160
161
162#
163# VMMGCBuiltin.lib
164#
165ifneq ($(BUILD_TARGET),darwin)
166LIBRARIES += VMMGCBuiltin
167VMMGCBuiltin_TEMPLATE = VBOXGC
168ifeq ($(VBOX_LDR_FMT32),pe)
169VMMGCBuiltin_SOURCES = VMMGC/VMMGCBuiltin.def
170endif
171ifeq ($(VBOX_LDR_FMT32),lx)
172VMMGCBuiltin_SOURCES = $(PATH_TARGET)/VMMGCBuiltin.def
173$(PATH_TARGET)/VMMGCBuiltin.def: VMMGC/VMMGCBuiltin.def | $(call DIRDEP,$(PATH_TARGET))
174 $(SED) -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > [email protected]
175 $(MV) -f [email protected] $@
176endif
177endif # !darwin
178
179
180#
181# VMMGCImp.lib
182#
183ifneq ($(BUILD_TARGET),darwin)
184LIBRARIES += VMMGCImp
185VMMGCImp_TEMPLATE = VBOXGC
186ifeq ($(VBOX_LDR_FMT32),pe)
187VMMGCImp_SOURCES = VMMGC/VMMGC.def
188endif
189ifeq ($(VBOX_LDR_FMT32),lx)
190VMMGCImp_SOURCES = $(PATH_TARGET)/VMMGC.def
191$(PATH_TARGET)/VMMGC.def: VMMGC/VMMGC.def | $(call DIRDEP,$(PATH_TARGET))
192 $(SED) -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > [email protected]
193 $(APPEND) "[email protected]" ""
194 $(APPEND) "[email protected]" " ___ehInit"
195 $(MV) -f [email protected] $@
196endif
197endif # !darwin
198
199
200#
201# VMMR0Imp.lib
202#
203ifneq ($(BUILD_TARGET),darwin)
204LIBRARIES += VMMR0Imp
205VMMR0Imp_TEMPLATE = VBOXR0
206ifeq ($(VBOX_LDR_FMT),pe)
207VMMR0Imp_SOURCES = VMMR0/VMMR0.def
208endif
209ifeq ($(VBOX_LDR_FMT),lx)
210VMMR0Imp_SOURCES = $(PATH_TARGET)/VMMR0.def
211$(PATH_TARGET)/VMMR0.def: VMMR0/VMMR0.def | $(call DIRDEP,$(PATH_TARGET))
212 $(SED) -e 's/^[ \t][ \t]*\([a-zA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > [email protected]
213 $(APPEND) "[email protected]" ""
214 $(APPEND) "[email protected]" " ___ehInit"
215 $(MV) -f [email protected] $@
216endif
217endif # !darwin
218
219
220#
221# VMMGC.gc
222#
223SYSMODS += VMMGC
224VMMGC_TEMPLATE = VBOXGC
225VMMGC_INCS := \
226 $(PATH_SUB_CURRENT) \
227 VMMGC \
228 PATM
229VMMGC_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
230VMMGC_SYSSUFF = .gc
231VMMGC_LIBS = \
232 $(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
233 $(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
234ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
235VMMGC_LIBS += \
236 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
237endif
238ifeq ($(VBOX_LDR_FMT32),pe)
239VMMGC_LDFLAGS = -Entry:VMMGCEntry
240endif
241VMMGC_SOURCES = \
242 VMMGC/VMMGC0.asm \
243 VMMGC/VMMGCDeps.cpp \
244 VMMGC/CPUMGC.cpp \
245 VMMGC/CPUMGCA.asm \
246 VMMGC/EMGCA.asm \
247 VMMGC/DBGFGC.cpp \
248 VMMGC/IOMGC.cpp \
249 VMMGC/MMRamGC.cpp \
250 VMMGC/MMRamGCA.asm \
251 VMMGC/PDMGCDevice.cpp \
252 VMMGC/PGMGC.cpp \
253 VMMGC/SELMGC.cpp \
254 VMMGC/TRPMGC.cpp \
255 VMMGC/TRPMGCHandlers.cpp \
256 VMMGC/TRPMGCHandlersA.asm \
257 VMMGC/VMMGC.cpp \
258 VMMGC/VMMGCA.asm \
259 VMMAll/CPUMAllRegs.cpp \
260 VMMAll/CPUMAllA.asm \
261 VMMAll/DBGFAll.cpp \
262 VMMAll/IOMAll.cpp \
263 VMMAll/IOMAllMMIO.cpp \
264 VMMAll/EMAll.cpp \
265 VMMAll/EMAllA.asm \
266 VMMAll/MMAll.cpp \
267 VMMAll/MMAllHyper.cpp \
268 VMMAll/PDMAll.cpp \
269 VMMAll/PDMAllCritSect.cpp \
270 VMMAll/PDMAllQueue.cpp \
271 VMMAll/PGMAll.cpp \
272 VMMAll/PGMAllHandler.cpp \
273 VMMAll/PGMAllMap.cpp \
274 VMMAll/PGMAllPhys.cpp \
275 VMMAll/PGMAllPool.cpp \
276 VMMAll/REMAll.cpp \
277 VMMAll/SELMAll.cpp \
278 VMMAll/TMAll.cpp \
279 VMMAll/TMAllCpu.cpp \
280 VMMAll/TMAllReal.cpp \
281 VMMAll/TMAllVirtual.cpp \
282 VMMAll/TRPMAll.cpp \
283 VMMAll/VMAll.cpp \
284 VMMAll/VMMAll.cpp \
285 PATM/VMMGC/CSAMGC.cpp \
286 PATM/VMMAll/CSAMAll.cpp \
287 PATM/VMMGC/PATMGC.cpp \
288 PATM/VMMAll/PATMAll.cpp
289
290ifeq ($(VBOX_LDR_FMT32),pe)
291VMMGC_SOURCES += VMMGC/VMMGC.def
292endif
293ifeq ($(VBOX_LDR_FMT32),lx)
294VMMGC_SOURCES += $(PATH_TARGET)/VMMGC.def
295endif
296
297# the very last one.
298VMMGC_SOURCES += VMMGC/VMMGC99.asm
299
300VMMGC/VMMGCDeps.cpp_CXXFLAGS.win = -Oi- -TC ## @todo rename VMMGCDeps.cpp to .c
301
302
303#
304# VMMR0.r0
305#
306SYSMODS += VMMR0
307VMMR0_TEMPLATE = VBOXR0
308VMMR0_INCS := \
309 $(PATH_SUB_CURRENT) \
310 PATM
311VMMR0_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
312ifeq ($(VBOX_LDR_FMT),pe)
313VMMR0_LDFLAGS = -Entry:VMMR0Entry
314endif
315ifeq ($(VBOX_LDR_FMT),elf)
316VMMR0_LDFLAGS = -entry=VMMR0Entry
317endif
318VMMR0_SYSSUFF = .r0
319VMMR0_SOURCES = \
320 VMMR0/VMMR0.cpp \
321 VMMR0/DBGFR0.cpp \
322 VMMAll/DBGFAll.cpp \
323 VMMAll/TRPMAll.cpp \
324 VMMAll/CPUMAllRegs.cpp \
325 VMMAll/CPUMAllA.asm \
326 VMMAll/MMAll.cpp \
327 VMMAll/MMAllHyper.cpp \
328 VMMAll/MMAllPagePool.cpp \
329 VMMAll/MMAllPhys.cpp \
330 VMMR0/VMMR0A.asm \
331 VMMR0/HWACCMR0.cpp \
332 VMMR0/HWACCMR0A.asm \
333 VMMR0/HWVMXR0.cpp \
334 VMMR0/HWSVMR0.cpp \
335 VMMR0/CPUMR0.cpp \
336 VMMR0/TRPMR0.cpp \
337 VMMR0/TRPMR0A.asm \
338 VMMR0/PDMR0Device.cpp \
339 VMMAll/EMAll.cpp \
340 VMMAll/EMAllA.asm \
341 VMMAll/PDMAll.cpp \
342 VMMAll/PDMAllCritSect.cpp \
343 VMMAll/PDMAllQueue.cpp \
344 VMMAll/PGMAll.cpp \
345 VMMAll/PGMAllHandler.cpp \
346 VMMAll/PGMAllMap.cpp \
347 VMMAll/PGMAllPhys.cpp \
348 VMMAll/PGMAllPool.cpp \
349 VMMAll/REMAll.cpp \
350 VMMAll/IOMAll.cpp \
351 VMMAll/IOMAllMMIO.cpp \
352 VMMAll/SELMAll.cpp \
353 VMMAll/TMAll.cpp \
354 VMMAll/TMAllCpu.cpp \
355 VMMAll/TMAllReal.cpp \
356 VMMAll/TMAllVirtual.cpp \
357 VMMAll/VMAll.cpp \
358 PATM/VMMAll/PATMAll.cpp
359
360ifeq ($(VBOX_LDR_FMT),pe)
361VMMR0_SOURCES += VMMR0/VMMR0.def
362endif
363ifeq ($(VBOX_LDR_FMT),lx)
364VMMR0_SOURCES += $(PATH_TARGET)/VMMR0.def
365endif
366
367VMMR0_LIBS = \
368 $(PATH_LIB)/ServicesR0$(VBOX_SUFF_LIB) \
369 $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) \
370 $(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB)
371ifneq ($(BUILD_TARGET),darwin)
372VMMR0_LIBS += \
373 $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
374endif
375ifeq ($(VBOX_LDR_FMT),elf)
376VMMR0_LIBS += \
377 $(VBOX_GCC_LIBGCC)
378endif
379
380
381include $(PATH_KBUILD)/subfooter.kmk
382
383
384# Alias the PGM templates to the object in which they are defined.
385PGMBth.o PGMGst.o PGMShw.o \
386PGMBth.obj PGMGst.obj PGMShw.obj: PGM.o
387PGMAllBth.o PGMAllGst.o PGMAllShw.o \
388PGMAllBth.obj PGMAllGst.obj PGMAllShw.obj: PGMAll.o
389PGMGCBth.o PGMGCGst.o PGMGCShw.o \
390PGMGCBth.obj PGMGCGst.obj PGMGCShw.obj: PGMGC.o
391
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