VirtualBox

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

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

Quickly made PDMThread.cpp compile (still a bit unfinished).

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