1 | # $Id: Makefile.kmk 35498 2011-01-12 08:10:13Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the VBox Main module.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2010 Oracle Corporation
|
---|
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 |
|
---|
18 | SUB_DEPTH = ../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 | #
|
---|
22 | # Include sub-makefile(s).
|
---|
23 | #
|
---|
24 | ifdef VBOX_WITH_WEBSERVICES
|
---|
25 | include $(PATH_SUB_CURRENT)/webservice/Makefile.kmk
|
---|
26 | endif
|
---|
27 | include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
|
---|
28 | include $(PATH_SUB_CURRENT)/cbinding/Makefile.kmk
|
---|
29 |
|
---|
30 |
|
---|
31 | #
|
---|
32 | # Targets and globals (bit of a mess...)
|
---|
33 | #
|
---|
34 | VBOX_PATH_MAIN_SRC := $(PATH_SUB_CURRENT)
|
---|
35 |
|
---|
36 | ifdef VBOX_ONLY_SDK
|
---|
37 | # I'm Evil! Dr. Evil.
|
---|
38 | VBoxCOM_0_OUTDIR = $(PATH_TARGET)/VBoxCOM
|
---|
39 | BLDDIRS += $(VBoxCOM_0_OUTDIR) $(PATH_BIN)/components
|
---|
40 | include $(KBUILD_PATH)/tools/VCC70.kmk
|
---|
41 | include $(KBUILD_PATH)/sdks/WINPSDK.kmk
|
---|
42 | endif # !VBOX_ONLY_SDK
|
---|
43 |
|
---|
44 |
|
---|
45 | # Construct VBOX_MAIN_DEFS
|
---|
46 | ## @todo eliminate or expand VBOX_MAIN_DEFS.
|
---|
47 | VBOX_MAIN_DEFS =
|
---|
48 | ifneq ($(KBUILD_TARGET),win)
|
---|
49 | ifndef VBOX_WITH_XPCOM
|
---|
50 | $(error "VBox: VBOX_WITH_XPCOM isn't defined")
|
---|
51 | endif
|
---|
52 | ifneq ($(KBUILD_TARGET),os2)
|
---|
53 | VBOX_MAIN_DEFS += VBOX_WITH_SYS_V_IPC_SESSION_WATCHER
|
---|
54 | endif
|
---|
55 | endif
|
---|
56 | VBOX_MAIN_DEFS += \
|
---|
57 | $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,) \
|
---|
58 | $(if $(VBOX_WITH_NETFLT),VBOX_WITH_NETFLT,) \
|
---|
59 | $(if $(VBOX_WITH_COPYTOGUEST),VBOX_WITH_COPYTOGUEST,) \
|
---|
60 | $(if $(VBOX_WITH_CROGL),VBOX_WITH_CROGL,) \
|
---|
61 | $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
|
---|
62 | $(if $(VBOX_WITH_GUEST_PROPS_RDONLY_GUEST),VBOX_WITH_GUEST_PROPS_RDONLY_GUEST,) \
|
---|
63 | $(if $(VBOX_WITH_GUEST_CONTROL),VBOX_WITH_GUEST_CONTROL,) \
|
---|
64 | $(if $(VBOX_WITH_HOSTNETIF_API),VBOX_WITH_HOSTNETIF_API,) \
|
---|
65 | $(if $(VBOX_WITH_VDE),VBOX_WITH_VDE,)
|
---|
66 |
|
---|
67 | # Unconditionally enable the new semaphore key generation code
|
---|
68 | VBOX_MAIN_DEFS += VBOX_WITH_NEW_SYS_V_KEYGEN
|
---|
69 |
|
---|
70 | VBOX_IDL_FILE.MSCOM = $(VBOX_PATH_SDK)/bindings/mscom/idl/VirtualBox.idl
|
---|
71 | VBOX_IDL_FILE.XPCOM = $(VBOX_PATH_SDK)/bindings/xpcom/idl/VirtualBox_XPCOM.idl
|
---|
72 |
|
---|
73 | VBOX_IDL_TYPELIB.XPCOM = $(PATH_BIN)/components/VirtualBox_XPCOM.xpt
|
---|
74 | VBOX_IDL_HEADER.XPCOM = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
75 |
|
---|
76 | # The MS COM specific stuff.
|
---|
77 | if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" == "win"
|
---|
78 | OTHERS += \
|
---|
79 | $(VBOX_IDL_FILE.MSCOM) \
|
---|
80 | $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h \
|
---|
81 | $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox.tlb \
|
---|
82 | $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
|
---|
83 | OTHER_CLEAN += \
|
---|
84 | $(VBOX_IDL_FILE.MSCOM) \
|
---|
85 | $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h \
|
---|
86 | $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox.tlb \
|
---|
87 | $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c \
|
---|
88 | $(VBoxCOM_0_OUTDIR)/VirtualBox.h \
|
---|
89 | $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
|
---|
90 | $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
|
---|
91 |
|
---|
92 | VBOX_MAIN_PREREQS += $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c
|
---|
93 | BLDDIRS += $(VBOX_PATH_SDK)/bindings/mscom/idl
|
---|
94 | endif
|
---|
95 |
|
---|
96 | # The XPCOM specific stuff.
|
---|
97 | if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" != "win"
|
---|
98 | OTHERS += $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM) $(VBOX_IDL_HEADER.XPCOM)
|
---|
99 | OTHER_CLEAN += \
|
---|
100 | $(VBOX_IDL_FILE.XPCOM) \
|
---|
101 | $(VBOX_IDL_HEADER.XPCOM) \
|
---|
102 | $(VBOX_IDL_TYPELIB.XPCOM)
|
---|
103 |
|
---|
104 | VBOX_MAIN_PREREQS += $(VBOX_IDL_TYPELIB.XPCOM) $(VBOX_IDL_HEADER.XPCOM)
|
---|
105 | BLDDIRS += \
|
---|
106 | $(VBOX_PATH_SDK)/bindings/xpcom/idl \
|
---|
107 | $(VBOX_PATH_SDK)/bindings/xpcom/include
|
---|
108 | endif # xpcom
|
---|
109 |
|
---|
110 |
|
---|
111 | #
|
---|
112 | # Strip documentation from source XIDL so that we don't get a full
|
---|
113 | # recompile every time a comma in the documentation is changed.
|
---|
114 | #
|
---|
115 | $(VBOX_XIDL_FILE).ts +| $(VBOX_XIDL_FILE): \
|
---|
116 | $(VBOX_XIDL_FILE_SRC) \
|
---|
117 | $(VBOX_PATH_MAIN_SRC)/idl/docstrip.xsl \
|
---|
118 | | $$(dir $$@)
|
---|
119 | # $(CP) -fv $< $(VBOX_XIDL_FILE).ts
|
---|
120 | $(QUIET)$(VBOX_XSLTPROC) -o $(VBOX_XIDL_FILE).ts $(VBOX_PATH_MAIN_SRC)/idl/docstrip.xsl $<
|
---|
121 | $(QUIET)$(CP) --changed -fv $(VBOX_XIDL_FILE).ts $(VBOX_XIDL_FILE)
|
---|
122 |
|
---|
123 | OTHER_CLEAN += $(VBOX_XIDL_FILE) $(VBOX_XIDL_FILE).ts
|
---|
124 |
|
---|
125 | #
|
---|
126 | # The Main API documentation
|
---|
127 | #
|
---|
128 | VBOX_MAIN_DOC_DIR = $(VBOX_PATH_SDK)/docs
|
---|
129 | BLDDIRS += $(VBOX_MAIN_DOC_DIR)
|
---|
130 |
|
---|
131 | $(PATH_TARGET)/docs.Main: \
|
---|
132 | $(VBOX_PATH_MAIN_SRC)/Doxyfile.Main \
|
---|
133 | $(VBOX_PATH_MAIN_SRC)/idl/doxygen.xsl \
|
---|
134 | $(VBOX_XIDL_FILE_SRC) \
|
---|
135 | | $(PATH_TARGET)/ \
|
---|
136 | $(VBOX_MAIN_DOC_DIR)/
|
---|
137 | $(call MSG_TOOL,xsltproc,doxygen input,$<,$@)
|
---|
138 | $(QUIET)$(RM) -f $(wildcard $(VBOX_MAIN_DOC_DIR)/html/*) $(PATH_TARGET)/docs.Main
|
---|
139 | $(QUIET)$(VBOX_XSLTPROC) -o $(PATH_TARGET)/VirtualBox.idl $(VBOX_PATH_MAIN_SRC)/idl/doxygen.xsl $(VBOX_XIDL_FILE_SRC)
|
---|
140 | $(QUIET)$(REDIRECT) -E 'DOCDIR=$(VBOX_MAIN_DOC_DIR)' -E 'PATH_TARGET=$(PATH_TARGET)' -E 'PATH_CHM=$(subst /,\,$(VBOX_MAIN_DOC_DIR)/VirtualBoxAPI.chm)' \
|
---|
141 | -- doxygen $(VBOX_PATH_MAIN_SRC)/Doxyfile.Main
|
---|
142 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) ">>>>>>>>>>>>>>>>>>>> Main.err: >>>>>>>>>>>>>>>>>>>>>>>>"
|
---|
143 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(CAT) "$(PATH_TARGET)/Main.err"
|
---|
144 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "<<<<<<<<<<<<<<<<<<<< Main.err <<<<<<<<<<<<<<<<<<<<<<<<<"
|
---|
145 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> **************************************************"
|
---|
146 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> Please fix above doxygen errors/warnings listed in"
|
---|
147 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> $(PATH_TARGET)/Main.err"
|
---|
148 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> **************************************************"
|
---|
149 | -$(EXEC_X86_WIN32) $(VBOX_PATH_HTML_HELP_WORKSHOP)/hhc.exe $(subst /,\\,$(VBOX_MAIN_DOC_DIR)/html/index.hhp)
|
---|
150 | $(APPEND) $(PATH_TARGET)/docs.Main
|
---|
151 | # aliases
|
---|
152 | docs.main docs.Main: $(PATH_TARGET)/docs.Main
|
---|
153 | if !defined(VBOX_ONLY_DOCS)
|
---|
154 | docs: $(PATH_TARGET)/docs.Main
|
---|
155 | endif
|
---|
156 |
|
---|
157 |
|
---|
158 | #
|
---|
159 | # Some SDK bit.
|
---|
160 | #
|
---|
161 | INSTALLS += VBox-main-xidl
|
---|
162 | VBox-main-xidl_INST = $(INST_SDK)bindings/
|
---|
163 | VBox-main-xidl_SOURCES = $(VBOX_XIDL_FILE_SRC)
|
---|
164 |
|
---|
165 | ifdef VBOX_WITH_PYTHON
|
---|
166 |
|
---|
167 | # or to some subdir?
|
---|
168 | VBOX_PYTHON_CONSTANTS = $(PATH_TARGET)/VirtualBox_constants.py
|
---|
169 |
|
---|
170 | INSTALLS += VBox-python-glue
|
---|
171 | VBox-python-glue_INST = $(INST_SDK)installer
|
---|
172 | VBox-python-glue_SOURCES = glue/vboxapi.py=>vboxapi/__init__.py \
|
---|
173 | $(VBOX_PYTHON_CONSTANTS)=>vboxapi/VirtualBox_constants.py
|
---|
174 |
|
---|
175 | $(VBOX_PYTHON_CONSTANTS): $(VBOX_PATH_MAIN_SRC)/glue/constants-python.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
176 | $(call MSG_TOOL,xsltproc,Python constants,$<,$@)
|
---|
177 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
|
---|
178 |
|
---|
179 | endif # VBOX_WITH_PYTHON
|
---|
180 |
|
---|
181 | ifndef VBOX_ONLY_SDK # Note this goes on for *very* long
|
---|
182 |
|
---|
183 | #
|
---|
184 | # Generate SchemaDefs.h and SchemaDefs.cpp from XML Schema
|
---|
185 | # These two files are used by both VBoxC and VBoxSVC.
|
---|
186 | #
|
---|
187 | BLDDIRS += $(PATH_TARGET)/Main
|
---|
188 | VBOX_XML_SCHEMADEFS_H = $(PATH_TARGET)/Main/SchemaDefs.h
|
---|
189 | VBOX_XML_SCHEMADEFS_CPP = $(PATH_TARGET)/Main/SchemaDefs.cpp
|
---|
190 | VBOX_XML_SCHEMADEFS_XSL = $(VBOX_PATH_MAIN_SRC)/xml/SchemaDefs.xsl
|
---|
191 |
|
---|
192 | VBOX_AUTOGEN_EVENT_H = $(PATH_TARGET)/Main/VBoxEvents.h
|
---|
193 | VBOX_AUTOGEN_EVENT_CPP = $(PATH_TARGET)/Main/VBoxEvents.cpp
|
---|
194 |
|
---|
195 | testschemadefs: $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
196 |
|
---|
197 |
|
---|
198 | #
|
---|
199 | # VBoxSVC executable
|
---|
200 | #
|
---|
201 | PROGRAMS += VBoxSVC
|
---|
202 | VBoxSVC_TEMPLATE = VBOXMAINEXE
|
---|
203 | VBoxSVC_DEFS = \
|
---|
204 | VBOX_MAIN_SETTINGS_ADDONS \
|
---|
205 | IN_VMM_STATIC \
|
---|
206 | $(VBOX_MAIN_DEFS) \
|
---|
207 | $(if $(VBOX_WITH_VBOXSDL),VBOX_WITH_VBOXSDL,) \
|
---|
208 | $(if $(VBOX_WITH_HEADLESS),VBOX_WITH_HEADLESS,) \
|
---|
209 | $(if $(VBOX_WITH_QTGUI),VBOX_WITH_QTGUI,) \
|
---|
210 | $(if $(VBOX_WITH_COCOA_QT),VBOX_WITH_COCOA_QT,) \
|
---|
211 | $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
|
---|
212 | $(if $(VBOX_MAIN_RELEASE_LOG),VBOX_MAIN_RELEASE_LOG LOG_ENABLED,) \
|
---|
213 | $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
|
---|
214 | $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
|
---|
215 | $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
|
---|
216 | $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS,) \
|
---|
217 | $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
|
---|
218 | $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
|
---|
219 | $(if $(VBOX_WITH_AHCI),VBOX_WITH_AHCI,) \
|
---|
220 | $(if $(VBOX_WITH_LSILOGIC),VBOX_WITH_LSILOGIC,) \
|
---|
221 | $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
|
---|
222 | $(if $(VBOX_WITH_RESOURCE_USAGE_API),VBOX_WITH_RESOURCE_USAGE_API,) \
|
---|
223 | $(if $(VBOX_WITH_PDM_ASYNC_COMPLETION),VBOX_WITH_PDM_ASYNC_COMPLETION,) \
|
---|
224 | $(if $(VBOX_WITH_DBUS),$(if $(VBOX_USB_WITH_DBUS),VBOX_USB_WITH_DBUS,),) \
|
---|
225 | $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,) \
|
---|
226 | $(if $(VBOX_USB_WITH_INOTIFY),VBOX_USB_WITH_INOTIFY,) \
|
---|
227 | $(if $(VBOX_WITH_LIVE_MIGRATION),VBOX_WITH_LIVE_MIGRATION,) \
|
---|
228 | $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK,) \
|
---|
229 | $(if $(VBOX_WITH_VUSB),VBOX_WITH_VUSB,) \
|
---|
230 | $(if $(VBOX_WITH_S3),VBOX_WITH_S3,)
|
---|
231 | ifdef VBOX_WITH_USB
|
---|
232 | VBoxSVC_DEFS += \
|
---|
233 | VBOX_WITH_USB \
|
---|
234 | $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI,) \
|
---|
235 | $(if $(VBOX_WITH_NEW_USB_CODE_ON_DARWIN),VBOX_WITH_NEW_USB_CODE_ON_DARWIN,)
|
---|
236 | endif
|
---|
237 | VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
|
---|
238 | VBoxSVC_DEFS.win.x86 += _WIN32_WINNT=0x0500
|
---|
239 | VBoxSVC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
|
---|
240 | # Try to load and use libhal at runtime for probing removable media
|
---|
241 | # VBoxSVC_DEFS.linux += VBOX_USE_LIBHAL
|
---|
242 | VBoxSVC_DEFS.solaris += VBOX_USE_LIBHAL
|
---|
243 | VBoxSVC_DEFS.freebsd += VBOX_USE_LIBHAL
|
---|
244 |
|
---|
245 | VBoxSVC_CXXFLAGS = $(filter-out -Wno-unused,$(TEMPLATE_VBOXMAINEXE_CXXFLAGS))
|
---|
246 | ## @todo We're disabling optimizations on FreeBSD to work around strange linker
|
---|
247 | # errors in release builds. Figure out why and how to work around it in a
|
---|
248 | # more optimal fashion.
|
---|
249 | VBoxSVC_CXXFLAGS.freebsd = -O0
|
---|
250 |
|
---|
251 | VBoxSVC_INCS = \
|
---|
252 | include \
|
---|
253 | $(VBoxSVC_0_OUTDIR) \
|
---|
254 | $(dir $(VBOX_XML_SCHEMADEFS_H)) \
|
---|
255 | .
|
---|
256 | VBoxSVC_INCS.win = \
|
---|
257 | $(VBoxCOM_0_OUTDIR)
|
---|
258 | ifdef VBOX_WITH_USB
|
---|
259 | VBoxSVC_INCS.os2 = \
|
---|
260 | $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
|
---|
261 | endif
|
---|
262 |
|
---|
263 | VBoxSVC_LIBS += \
|
---|
264 | $(PATH_LIB)/SSMStandalone$(VBOX_SUFF_LIB) \
|
---|
265 | $(LIB_DDU)
|
---|
266 | VBoxSVC_SDKS = VBOX_LIBPNG VBOX_ZLIB
|
---|
267 | VBoxSVC_LIBS.solaris = \
|
---|
268 | adm \
|
---|
269 | nsl \
|
---|
270 | devinfo \
|
---|
271 | socket \
|
---|
272 | $(LIB_VMM)
|
---|
273 |
|
---|
274 | VBoxSVC_INTERMEDIATES = \
|
---|
275 | $(VBOX_MAIN_PREREQS) \
|
---|
276 | $(VBOX_XML_SCHEMADEFS_H) \
|
---|
277 | $(VBOX_AUTOGEN_EVENT_H)
|
---|
278 |
|
---|
279 | VBoxSVC_SOURCES = \
|
---|
280 | src-all/DisplayPNGUtil.cpp \
|
---|
281 | src-all/DisplayResampleImage.cpp \
|
---|
282 | src-all/DisplayUtils.cpp \
|
---|
283 | src-all/EventImpl.cpp \
|
---|
284 | src-all/Global.cpp \
|
---|
285 | src-all/Logging.cpp \
|
---|
286 | src-all/PciDeviceAttachmentImpl.cpp \
|
---|
287 | src-all/ProgressImpl.cpp \
|
---|
288 | src-all/SharedFolderImpl.cpp \
|
---|
289 | src-all/VirtualBoxBase.cpp \
|
---|
290 | src-all/VirtualBoxErrorInfoImpl.cpp \
|
---|
291 | $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
|
---|
292 | src-server/ApplianceImpl.cpp \
|
---|
293 | src-server/ApplianceImplExport.cpp \
|
---|
294 | src-server/ApplianceImplImport.cpp \
|
---|
295 | src-server/ApplianceImplIO.cpp \
|
---|
296 | src-server/AudioAdapterImpl.cpp \
|
---|
297 | src-server/BandwidthControlImpl.cpp \
|
---|
298 | src-server/BandwidthGroupImpl.cpp \
|
---|
299 | src-server/BIOSSettingsImpl.cpp \
|
---|
300 | src-server/DHCPServerImpl.cpp \
|
---|
301 | src-server/DHCPServerRunner.cpp \
|
---|
302 | src-server/GuestOSTypeImpl.cpp \
|
---|
303 | src-server/HostImpl.cpp \
|
---|
304 | src-server/HostNetworkInterfaceImpl.cpp \
|
---|
305 | src-server/HostPower.cpp \
|
---|
306 | src-server/MachineImpl.cpp \
|
---|
307 | src-server/Matching.cpp \
|
---|
308 | src-server/MediumAttachmentImpl.cpp \
|
---|
309 | src-server/MediumFormatImpl.cpp \
|
---|
310 | src-server/MediumImpl.cpp \
|
---|
311 | src-server/MediumLock.cpp \
|
---|
312 | src-server/NATEngineImpl.cpp \
|
---|
313 | src-server/NetworkAdapterImpl.cpp \
|
---|
314 | src-server/ParallelPortImpl.cpp \
|
---|
315 | src-server/ProgressProxyImpl.cpp \
|
---|
316 | src-server/SerialPortImpl.cpp \
|
---|
317 | src-server/SnapshotImpl.cpp \
|
---|
318 | src-server/StorageControllerImpl.cpp \
|
---|
319 | src-server/SystemPropertiesImpl.cpp \
|
---|
320 | src-server/USBControllerImpl.cpp \
|
---|
321 | src-server/VFSExplorerImpl.cpp \
|
---|
322 | src-server/VirtualBoxImpl.cpp \
|
---|
323 | src-server/VRDEServerImpl.cpp \
|
---|
324 | xml/ovfreader.cpp \
|
---|
325 | xml/Settings.cpp \
|
---|
326 | $(VBOX_XML_SCHEMADEFS_CPP) \
|
---|
327 | $(VBOX_AUTOGEN_EVENT_CPP) \
|
---|
328 | $(if $(VBOX_WITH_XPCOM),src-server/xpcom/server.cpp,)
|
---|
329 |
|
---|
330 | VBoxSVC_SOURCES.darwin = \
|
---|
331 | src-server/darwin/iokit.cpp \
|
---|
332 | src-server/darwin/HostPowerDarwin.cpp
|
---|
333 |
|
---|
334 | ifdef VBOX_WITH_CROGL
|
---|
335 | ifneq ($(KBUILD_TARGET),darwin)
|
---|
336 | VBoxSVC_SOURCES += src-server/generic/OpenGLTest.cpp
|
---|
337 | endif
|
---|
338 | VBoxSVC_SOURCES.darwin += src-server/darwin/OpenGLTestDarwin.cpp
|
---|
339 | endif
|
---|
340 |
|
---|
341 | VBoxSVC_SOURCES.win = \
|
---|
342 | src-server/win/svcmain.cpp \
|
---|
343 | src-server/win/svchlp.cpp \
|
---|
344 | src-server/win/HostPowerWin.cpp \
|
---|
345 | src-server/win/VBoxSVC.rc \
|
---|
346 | src-server/win/VBoxComEvents.cpp
|
---|
347 |
|
---|
348 | VBoxSVC_SOURCES.linux = \
|
---|
349 | src-server/linux/HostHardwareLinux.cpp
|
---|
350 |
|
---|
351 | VBoxSVC_SOURCES.solaris = \
|
---|
352 | src-server/linux/vbox-libhal.cpp \
|
---|
353 | src-server/solaris/DynLoadLibSolaris.cpp
|
---|
354 |
|
---|
355 | VBoxSVC_SOURCES.freebsd = \
|
---|
356 | src-server/freebsd/HostHardwareFreeBSD.cpp
|
---|
357 |
|
---|
358 | ifdef VBOX_WITH_USB
|
---|
359 | ifdef VBOX_WITH_SYSFS_BY_DEFAULT
|
---|
360 | src-server/linux/USBProxyServiceLinux.cpp_DEFS += VBOX_WITH_SYSFS_BY_DEFAULT
|
---|
361 | endif
|
---|
362 | VBoxSVC_SOURCES += \
|
---|
363 | src-server/USBDeviceFilterImpl.cpp \
|
---|
364 | src-server/USBProxyService.cpp \
|
---|
365 | src-server/HostUSBDeviceImpl.cpp
|
---|
366 | VBoxSVC_SOURCES.darwin += src-server/darwin/USBProxyServiceDarwin.cpp
|
---|
367 | VBoxSVC_SOURCES.linux += src-server/linux/USBProxyServiceLinux.cpp
|
---|
368 | VBoxSVC_SOURCES.linux += src-server/linux/USBGetDevices.cpp
|
---|
369 | VBoxSVC_SOURCES.os2 += src-server/os2/USBProxyServiceOs2.cpp
|
---|
370 | VBoxSVC_SOURCES.solaris += src-server/solaris/USBProxyServiceSolaris.cpp
|
---|
371 | VBoxSVC_SOURCES.win += src-server/win/USBProxyServiceWindows.cpp
|
---|
372 | VBoxSVC_SOURCES.freebsd += src-server/freebsd/USBProxyServiceFreeBSD.cpp
|
---|
373 | endif
|
---|
374 |
|
---|
375 | ifdef VBOX_WITH_NETFLT
|
---|
376 | # Note! The includes from the TOOL has lower priority than the SDKs,
|
---|
377 | # since comdef.h is in both the DDK and VCC we want to make sure
|
---|
378 | # we're using the VCC since we're not using the DDK compiler/crt.
|
---|
379 | # Since this is potentially risky, restrict it to the source file
|
---|
380 | # needing it.
|
---|
381 | src-server/win/NetIf-win.cpp_INCS.win += $(PATH_TOOL_$(VBOX_VCC_TOOL)_INC)
|
---|
382 | VBoxSVC_LIBS.win += \
|
---|
383 | $(PATH_LIB)/WinNetConfig.lib \
|
---|
384 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
385 | $(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
|
---|
386 | ifdef VBOX_NETFLT_ONDEMAND_BIND
|
---|
387 | VBoxSVC_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
|
---|
388 | endif
|
---|
389 | endif
|
---|
390 | VBoxSVC_LDFLAGS.darwin = -framework IOKit -framework SystemConfiguration
|
---|
391 |
|
---|
392 | ifdef VBOX_WITH_CROGL
|
---|
393 | VBoxSVC_LDFLAGS.darwin += -framework OpenGL
|
---|
394 | endif
|
---|
395 |
|
---|
396 | ifeq ($(KBUILD_TYPE),debug)
|
---|
397 | VBoxSVC_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
|
---|
398 | endif
|
---|
399 |
|
---|
400 | ifdef VBOX_WITH_RESOURCE_USAGE_API
|
---|
401 | VBoxSVC_SOURCES += \
|
---|
402 | src-server/PerformanceImpl.cpp \
|
---|
403 | src-server/Performance.cpp
|
---|
404 | VBoxSVC_SOURCES.darwin += src-server/darwin/PerformanceDarwin.cpp
|
---|
405 | VBoxSVC_SOURCES.freebsd += src-server/freebsd/PerformanceFreeBSD.cpp
|
---|
406 | VBoxSVC_SOURCES.linux += src-server/linux/PerformanceLinux.cpp
|
---|
407 | VBoxSVC_SOURCES.os2 += src-server/os2/PerformanceOs2.cpp
|
---|
408 | VBoxSVC_SOURCES.solaris += src-server/solaris/PerformanceSolaris.cpp
|
---|
409 | VBoxSVC_SOURCES.win += src-server/win/PerformanceWin.cpp
|
---|
410 | VBoxSVC_LDFLAGS.darwin += -lproc
|
---|
411 | VBoxSVC_LDFLAGS.solaris += -lkstat
|
---|
412 | VBoxSVC_LDFLAGS.win += psapi.lib powrprof.lib
|
---|
413 | endif
|
---|
414 |
|
---|
415 | ifdef VBOX_WITH_HOSTNETIF_API
|
---|
416 | VBoxSVC_SOURCES.win += src-server/win/NetIf-win.cpp
|
---|
417 | VBoxSVC_SOURCES.linux += src-server/linux/NetIf-linux.cpp
|
---|
418 | VBoxSVC_SOURCES.os2 += src-server/os2/NetIf-os2.cpp
|
---|
419 | VBoxSVC_SOURCES.darwin += src-server/darwin/NetIf-darwin.cpp
|
---|
420 | VBoxSVC_SOURCES.solaris += src-server/solaris/NetIf-solaris.cpp
|
---|
421 | VBoxSVC_SOURCES.freebsd += src-server/freebsd/NetIf-freebsd.cpp
|
---|
422 | VBoxSVC_DEFS += VBOX_WITH_HOSTNETIF_API
|
---|
423 | if1of ($(KBUILD_TARGET), linux darwin solaris freebsd)
|
---|
424 | VBoxSVC_SOURCES += src-server/generic/NetIf-generic.cpp
|
---|
425 | endif
|
---|
426 | endif
|
---|
427 |
|
---|
428 | src-server/win/VBoxSVC.rc_INCS = $(VBoxSVC_0_OUTDIR)
|
---|
429 | src-server/win/VBoxSVC.rc_DEPS = $(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs $(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc
|
---|
430 | src-server/win/VBoxSVC.rc_CLEAN = $(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs $(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc
|
---|
431 |
|
---|
432 | $$(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$(@D))
|
---|
433 | $(APPEND) -t $@ '1 ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
|
---|
434 |
|
---|
435 | $$(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs: $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$(@D))
|
---|
436 | $(VBOX_XSLTPROC) --stringparam Module VBoxSVC -o $@ $< $(VBOX_XIDL_FILE)
|
---|
437 |
|
---|
438 |
|
---|
439 | #
|
---|
440 | # Embed XML Schema files to VBoxSVC
|
---|
441 | #
|
---|
442 | VBOX_XML_SCHEMA_COMMON = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-common.xsd
|
---|
443 | VBOX_XML_SCHEMA.darwin = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-macosx.xsd
|
---|
444 | VBOX_XML_SCHEMA.linux = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-linux.xsd
|
---|
445 | VBOX_XML_SCHEMA.freebsd = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-freebsd.xsd
|
---|
446 | VBOX_XML_SCHEMA.win = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-windows.xsd
|
---|
447 | VBOX_XML_SCHEMA.os2 = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-os2.xsd
|
---|
448 | VBOX_XML_SCHEMA.solaris = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-solaris.xsd
|
---|
449 |
|
---|
450 | VBOX_XML_CONVERTER_TEMPLATE = $(VBOX_PATH_MAIN_SRC)/xml/SettingsConverter.xsl
|
---|
451 |
|
---|
452 | $$(VBoxSVC_0_OUTDIR)/xml_VirtualBox_settings_xsd.h: $(VBOX_XML_SCHEMA.$(KBUILD_TARGET)) $(VBOX_BIN2C)
|
---|
453 | $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
|
---|
454 | $(QUIET)$(VBOX_BIN2C) _xml_VirtualBox_settings_xsd $< $@
|
---|
455 |
|
---|
456 | $$(VBoxSVC_0_OUTDIR)/xml_VirtualBox_settings_common_xsd.h: $(VBOX_XML_SCHEMA_COMMON) $(VBOX_BIN2C)
|
---|
457 | $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
|
---|
458 | $(QUIET)$(VBOX_BIN2C) _xml_VirtualBox_settings_common_xsd $< $@
|
---|
459 |
|
---|
460 | $$(VBoxSVC_0_OUTDIR)/xml_SettingsConverter_xsl.h: $(VBOX_XML_CONVERTER_TEMPLATE) $(VBOX_BIN2C)
|
---|
461 | $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
|
---|
462 | $(QUIET)$(VBOX_BIN2C) _xml_SettingsConverter_xsl $< $@
|
---|
463 |
|
---|
464 | $(VBOX_XML_SCHEMADEFS_H): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET)) $(VBOX_XML_SCHEMA_COMMON) | $$(dir $$@)
|
---|
465 | $(call MSG_GENERATE,SchemaDefs,$@,$<)
|
---|
466 | $(QUIET)$(VBOX_XSLTPROC) --stringparam mode declare -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET))
|
---|
467 |
|
---|
468 | $(VBOX_XML_SCHEMADEFS_CPP): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET)) $(VBOX_XML_SCHEMA_COMMON) | $$(dir $$@)
|
---|
469 | $(call MSG_GENERATE,SchemaDefs,$@,$<)
|
---|
470 | $(QUIET)$(VBOX_XSLTPROC) --stringparam mode define -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET))
|
---|
471 |
|
---|
472 | OTHER_CLEAN += $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
473 |
|
---|
474 |
|
---|
475 | #
|
---|
476 | # Generate some event stuff for VBoxSVC and VBoxC.
|
---|
477 | #
|
---|
478 | $(VBOX_AUTOGEN_EVENT_H): $(VBOX_PATH_MAIN_SRC)/idl/comimpl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
479 | $(call MSG_TOOL,xsltproc,autogen events,$<,$@)
|
---|
480 | $(QUIET)$(VBOX_XSLTPROC) --stringparam G_kind VBoxEventHeader -o $@ $< $(VBOX_XIDL_FILE)
|
---|
481 |
|
---|
482 | $(VBOX_AUTOGEN_EVENT_CPP): $(VBOX_PATH_MAIN_SRC)/idl/comimpl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
483 | $(call MSG_TOOL,xsltproc,autogen events,$<,$@)
|
---|
484 | $(QUIET)$(VBOX_XSLTPROC) --stringparam G_kind VBoxEvent -o $@ $< $(VBOX_XIDL_FILE)
|
---|
485 |
|
---|
486 | OTHER_CLEAN += $(VBOX_AUTOGEN_EVENT_H) $(VBOX_AUTOGEN_EVENT_CPP)
|
---|
487 |
|
---|
488 |
|
---|
489 | #
|
---|
490 | # VBoxTestOGL - OpenGL support test app.
|
---|
491 | # Note! Doesn't link with VBOX_WITH_DEBUG_VCC_CRT defined because it uses Qt.
|
---|
492 | #
|
---|
493 | if ( defined(VBOX_WITH_QTGUI) \
|
---|
494 | && (defined(VBOX_WITH_CROGL) || defined(VBOX_WITH_VIDEOHWACCEL)) \
|
---|
495 | && !defined(VBOX_WITH_DEBUG_VCC_CRT))
|
---|
496 | ifneq ($(KBUILD_TARGET),darwin)
|
---|
497 | ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
498 | USES += qt4
|
---|
499 | endif
|
---|
500 | PROGRAMS += VBoxTestOGL
|
---|
501 | VBoxTestOGL_TEMPLATE = $(if $(VBOX_WITH_VIDEOHWACCEL),$(if $(VBOX_WITH_HARDENING),VBOXQT4GUI,VBOXQT4GUIEXE),VBOXMAINEXE)
|
---|
502 | VBoxTestOGL_SOURCES = src-server/generic/OpenGLTestApp.cpp
|
---|
503 | VBoxTestOGL_LIBS = \
|
---|
504 | $(if $(VBOX_WITH_CROGL), \
|
---|
505 | $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
|
---|
506 | $(VBOX_LIB_OGL_HOSTCRUTIL),) \
|
---|
507 | $(if $(VBOX_WITH_VIDEOHWACCEL), $(PATH_LIB)/VBoxOGL2D$(VBOX_SUFF_LIB),) \
|
---|
508 | $(LIB_RUNTIME)
|
---|
509 | VBoxTestOGL_DEFS += \
|
---|
510 | $(if $(VBOX_WITH_CROGL), VBOX_WITH_CROGL,) \
|
---|
511 | $(if $(VBOX_WITH_VIDEOHWACCEL), VBOX_WITH_VIDEOHWACCEL,) \
|
---|
512 | VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\" \
|
---|
513 | $(if $(VBOX_BLEEDING_EDGE),VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\",)
|
---|
514 | ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
515 | VBoxTestOGL_QT_MODULES += Core Gui OpenGL
|
---|
516 | VBoxTestOGL_LDFLAGS.darwin += -framework OpenGL
|
---|
517 | VBoxTestOGL_LIBS.win += $(PATH_SDK_WINPSDK_LIB)/Opengl32.lib
|
---|
518 | if1of ($(KBUILD_TARGET), solaris linux freebsd)
|
---|
519 | # must come after VBoxOGL2D, therefore don't set the arch-specific LIBS variable here!
|
---|
520 | VBoxTestOGL_LIBS += GL
|
---|
521 | endif
|
---|
522 | endif
|
---|
523 | VBoxTestOGL_LDFLAGS.win = /SUBSYSTEM:windows
|
---|
524 | endif
|
---|
525 | endif
|
---|
526 |
|
---|
527 |
|
---|
528 | ifdef VBOX_WITH_XPCOM
|
---|
529 | #
|
---|
530 | # VBoxSVCM - VBoxSVC wrapper module
|
---|
531 | #
|
---|
532 | DLLS += VBoxSVCM
|
---|
533 | VBoxSVCM_TEMPLATE = VBOXMAINCOMP
|
---|
534 | VBoxSVCM_DEFS = IN_RING3 $(VBOX_MAIN_DEFS)
|
---|
535 | ifdef VBOX_WITH_HARDENING
|
---|
536 | VBoxSVCM_DEFS += VBOX_WITH_HARDENING
|
---|
537 | endif
|
---|
538 | VBoxSVCM_INCS = \
|
---|
539 | include \
|
---|
540 | $(VBoxC_0_OUTDIR) \
|
---|
541 | .
|
---|
542 | VBoxSVCM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
|
---|
543 | VBoxSVCM_SOURCES = \
|
---|
544 | src-server/xpcom/server_module.cpp
|
---|
545 | VBoxSVCM_LDFLAGS.darwin = \
|
---|
546 | -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxSVCM.dylib \
|
---|
547 | -exported_symbols_list $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
|
---|
548 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
549 | VBoxSVCM_ORDERDEPS += $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
|
---|
550 | VBoxSVCM_CLEAN += $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
|
---|
551 | $$(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def:
|
---|
552 | $(RM) -f $@
|
---|
553 | $(APPEND) $@ _NSGetModule
|
---|
554 | endif
|
---|
555 | VBoxSVCM_INTERMEDIATES += $(VBOX_IDL_HEADER.XPCOM)
|
---|
556 | endif # VBOX_WITH_XPCOM
|
---|
557 |
|
---|
558 |
|
---|
559 | #
|
---|
560 | # VBoxC module
|
---|
561 | #
|
---|
562 | DLLS += VBoxC
|
---|
563 | VBoxC_TEMPLATE = VBOXMAINCOMP
|
---|
564 | VBoxC_SDKS = VBOX_LIBPNG VBOX_ZLIB
|
---|
565 | VBoxC_DEFS = \
|
---|
566 | IN_RING3 \
|
---|
567 | $(VBOX_MAIN_DEFS) \
|
---|
568 | VBOX_COM_INPROC \
|
---|
569 | $(if $(VBOX_WITH_VRDP_VIDEO_CHANNEL),VBOX_WITH_VRDP_VIDEO_CHANNEL,) \
|
---|
570 | $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
|
---|
571 | $(if $(VBOX_MAIN_RELEASE_LOG),VBOX_MAIN_RELEASE_LOG LOG_ENABLED,) \
|
---|
572 | $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
|
---|
573 | $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
|
---|
574 | $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
|
---|
575 | $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS,) \
|
---|
576 | $(if $(VBOX_WITH_CROSSBOW),VBOX_WITH_CROSSBOW,) \
|
---|
577 | $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
|
---|
578 | $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
|
---|
579 | $(if $(VBOX_WITH_EFI),VBOX_WITH_EFI,) \
|
---|
580 | $(if $(VBOX_WITH_PDM_ASYNC_COMPLETION),VBOX_WITH_PDM_ASYNC_COMPLETION,) \
|
---|
581 | $(if $(VBOX_WITH_LIVE_MIGRATION),VBOX_WITH_LIVE_MIGRATION,) \
|
---|
582 | $(if $(VBOX_WITH_VUSB),VBOX_WITH_VUSB,) \
|
---|
583 | $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
|
---|
584 | $(if $(VBOX_WITH_VIDEOHWACCEL),VBOX_WITH_VIDEOHWACCEL,) \
|
---|
585 | $(if $(VBOX_WITH_USB),VBOX_WITH_USB,) \
|
---|
586 | $(if-expr defined(VBOX_WITH_EHCI) && defined(VBOX_WITH_USB),VBOX_WITH_EHCI,) \
|
---|
587 | $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK,)
|
---|
588 |
|
---|
589 | VBoxC_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE
|
---|
590 | VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
|
---|
591 | VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
|
---|
592 |
|
---|
593 | VBoxC_INCS = \
|
---|
594 | include \
|
---|
595 | $(VBoxC_0_OUTDIR) \
|
---|
596 | $(dir $(VBOX_XML_SCHEMADEFS_H))
|
---|
597 | VBoxC_INCS.win = \
|
---|
598 | $(VBoxCOM_0_OUTDIR) \
|
---|
599 | .
|
---|
600 |
|
---|
601 | VBoxC_LDFLAGS.darwin = \
|
---|
602 | -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxC.dylib \
|
---|
603 | -exported_symbols_list $(VBoxC_0_OUTDIR)/VBoxC.def \
|
---|
604 | -framework IOKit
|
---|
605 | ifdef VBOX_USE_VCC80
|
---|
606 | VBoxC_LDFLAGS.win = /MANIFEST
|
---|
607 | endif
|
---|
608 |
|
---|
609 | VBoxC_LIBS += \
|
---|
610 | $(LIB_VMM) \
|
---|
611 | $(LIB_REM)
|
---|
612 |
|
---|
613 | ifdef VBOX_WITH_NETFLT
|
---|
614 | VBoxC_LIBS.win += $(PATH_LIB)/WinNetConfig.lib \
|
---|
615 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
616 | $(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
|
---|
617 | endif
|
---|
618 |
|
---|
619 | VBoxC_INTERMEDIATES = \
|
---|
620 | $(VBOX_MAIN_PREREQS) \
|
---|
621 | $(VBOX_XML_SCHEMADEFS_H) \
|
---|
622 | $(VBOX_AUTOGEN_EVENT_H)
|
---|
623 |
|
---|
624 | VBoxC_SOURCES = \
|
---|
625 | src-all/DisplayPNGUtil.cpp \
|
---|
626 | src-all/DisplayResampleImage.cpp \
|
---|
627 | src-all/DisplayUtils.cpp \
|
---|
628 | src-all/EventImpl.cpp \
|
---|
629 | src-all/Global.cpp \
|
---|
630 | src-all/Logging.cpp \
|
---|
631 | src-all/PciDeviceAttachmentImpl.cpp \
|
---|
632 | src-all/ProgressImpl.cpp \
|
---|
633 | src-all/SharedFolderImpl.cpp \
|
---|
634 | src-all/VirtualBoxBase.cpp \
|
---|
635 | src-all/VirtualBoxErrorInfoImpl.cpp \
|
---|
636 | $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
|
---|
637 | src-client/AudioSnifferInterface.cpp \
|
---|
638 | src-client/BusAssignmentManager.cpp \
|
---|
639 | src-client/ConsoleImpl.cpp \
|
---|
640 | src-client/ConsoleImpl2.cpp \
|
---|
641 | src-client/ConsoleImplTeleporter.cpp \
|
---|
642 | src-client/ConsoleVRDPServer.cpp \
|
---|
643 | src-client/DisplayImpl.cpp \
|
---|
644 | src-client/GuestCtrlImpl.cpp \
|
---|
645 | src-client/GuestImpl.cpp \
|
---|
646 | src-client/KeyboardImpl.cpp \
|
---|
647 | src-client/MachineDebuggerImpl.cpp \
|
---|
648 | src-client/MouseImpl.cpp \
|
---|
649 | src-client/RemoteUSBDeviceImpl.cpp \
|
---|
650 | src-client/SessionImpl.cpp \
|
---|
651 | src-client/USBDeviceImpl.cpp \
|
---|
652 | src-client/VBoxDriversRegister.cpp \
|
---|
653 | src-client/VirtualBoxClientImpl.cpp \
|
---|
654 | src-client/VMMDevInterface.cpp \
|
---|
655 | $(VBOX_AUTOGEN_EVENT_CPP) \
|
---|
656 | $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
657 | VBoxC_SOURCES.win = \
|
---|
658 | src-client/win/dllmain.cpp \
|
---|
659 | src-client/win/VBoxC.def \
|
---|
660 | src-client/win/VBoxC.rc
|
---|
661 |
|
---|
662 |
|
---|
663 | ifdef VBOX_WITH_XPCOM
|
---|
664 | VBoxC_SOURCES += \
|
---|
665 | src-client/xpcom/module.cpp
|
---|
666 | endif
|
---|
667 |
|
---|
668 | ifdef VBOX_WITH_HGCM
|
---|
669 | VBoxC_SOURCES += \
|
---|
670 | src-client/HGCMObjects.cpp \
|
---|
671 | src-client/HGCMThread.cpp \
|
---|
672 | src-client/HGCM.cpp
|
---|
673 | endif
|
---|
674 |
|
---|
675 | ifdef VBOX_WITH_CRHGSMI
|
---|
676 | VBoxC_DEFS += VBOX_WITH_CRHGSMI
|
---|
677 | endif
|
---|
678 |
|
---|
679 | ifdef VBOX_WITH_USB
|
---|
680 | VBoxC_SOURCES += \
|
---|
681 | src-client/RemoteUSBBackend.cpp
|
---|
682 | endif
|
---|
683 |
|
---|
684 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
685 | VBoxC_ORDERDEPS += $(VBoxC_0_OUTDIR)/VBoxC.def
|
---|
686 | VBoxC_CLEAN += $(VBoxC_0_OUTDIR)/VBoxC.def
|
---|
687 | $$(VBoxC_0_OUTDIR)/VBoxC.def: $(MAKEFILE_CURRENT)
|
---|
688 | $(RM) -f $@
|
---|
689 | $(APPEND) $@ _NSGetModule
|
---|
690 | $(APPEND) $@ _VBoxDriversRegister
|
---|
691 | endif
|
---|
692 |
|
---|
693 | src-client/ConsoleImpl.cpp_DEFS = \
|
---|
694 | VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\" \
|
---|
695 | $(if $(VBOX_BLEEDING_EDGE),VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\",)
|
---|
696 |
|
---|
697 |
|
---|
698 | src-client/win/VBoxC.rc_DEPS = $(VBoxC_0_OUTDIR)/VBoxC.rgs $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
|
---|
699 | VBoxC_CLEAN.win += $(VBoxC_0_OUTDIR)/VBoxC.rgs
|
---|
700 |
|
---|
701 | $$(VBoxC_0_OUTDIR)/VBoxC.rgs: $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
702 | $(VBOX_XSLTPROC) --stringparam Module VBoxC -o $@ $< $(VBOX_XIDL_FILE)
|
---|
703 |
|
---|
704 |
|
---|
705 | #
|
---|
706 | # VBoxCOM - COM Abstraction Layer library
|
---|
707 | #
|
---|
708 | LIBRARIES += VBoxCOM
|
---|
709 | VBoxCOM_TEMPLATE = VBOXMAINLIB
|
---|
710 | VBoxCOM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
|
---|
711 | VBoxCOM_SOURCES = \
|
---|
712 | glue/com.cpp \
|
---|
713 | glue/initterm.cpp \
|
---|
714 | glue/string.cpp \
|
---|
715 | glue/AutoLock.cpp \
|
---|
716 | glue/EventQueue.cpp \
|
---|
717 | glue/ErrorInfo.cpp \
|
---|
718 | glue/errorprint.cpp \
|
---|
719 | glue/VirtualBoxErrorInfo.cpp
|
---|
720 | VBoxCOM_INCS += \
|
---|
721 | include
|
---|
722 | ifeq ($(KBUILD_TARGET),win)
|
---|
723 | VBoxCOM_DEFS.x86 += _WIN32_WINNT=0x0500
|
---|
724 | VBoxCOM_DEFS.amd64 += _WIN32_WINNT=0x0510
|
---|
725 | VBoxCOM_SOURCES += \
|
---|
726 | $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c
|
---|
727 | else # !win
|
---|
728 | VBoxCOM_SOURCES += \
|
---|
729 | glue/xpcom/helpers.cpp
|
---|
730 | endif # !win
|
---|
731 |
|
---|
732 |
|
---|
733 | #
|
---|
734 | # The VBoxExtPackHelperApp.
|
---|
735 | #
|
---|
736 | ifdef VBOX_WITH_EXTPACK
|
---|
737 | PROGRAMS += VBoxExtPackHelperApp
|
---|
738 | VBoxExtPackHelperApp_TEMPLATE = VBoxR3SetUidToRoot
|
---|
739 | VBoxExtPackHelperApp_LDFLAGS.darwin = -framework Security
|
---|
740 | VBoxExtPackHelperApp_LDFLAGS.win = /SUBSYSTEM:windows
|
---|
741 | VBoxExtPackHelperApp_SOURCES = \
|
---|
742 | src-helper-apps/VBoxExtPackHelperApp.cpp \
|
---|
743 | src-all/ExtPackUtil.cpp
|
---|
744 | VBoxExtPackHelperApp_LIBS = \
|
---|
745 | $(LIB_RUNTIME)
|
---|
746 | endif # VBOX_WITH_EXTPACK
|
---|
747 |
|
---|
748 |
|
---|
749 | endif # !VBOX_ONLY_SDK (the ifndef is far above)
|
---|
750 |
|
---|
751 |
|
---|
752 | #
|
---|
753 | # Installs com related thing(s) to bin.
|
---|
754 | #
|
---|
755 | INSTALLS.win += VBoxMain-com-inst
|
---|
756 | VBoxMain-com-inst_INST = $(INST_BIN)
|
---|
757 | VBoxMain-com-inst_SOURCES = src-all/win/comregister.cmd
|
---|
758 |
|
---|
759 |
|
---|
760 | if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "linux"
|
---|
761 | #
|
---|
762 | # Installs linux/hardening related things to components.
|
---|
763 | #
|
---|
764 | INSTALLS.linux += VBoxMain-hardening-inst
|
---|
765 | VBoxMain-hardening-inst_INST = $(INST_BIN)components/
|
---|
766 | VBoxMain-hardening-inst_SYMLINKS = \
|
---|
767 | VBoxDDU.so=>../VBoxDDU.so \
|
---|
768 | VBoxREM.so=>../VBoxREM.so \
|
---|
769 | VBoxRT.so=>../VBoxRT.so \
|
---|
770 | VBoxVMM.so=>../VBoxVMM.so \
|
---|
771 | VBoxXPCOM.so=>../VBoxXPCOM.so
|
---|
772 | endif
|
---|
773 |
|
---|
774 |
|
---|
775 | # generate rules
|
---|
776 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
777 |
|
---|
778 |
|
---|
779 |
|
---|
780 | #
|
---|
781 | # Additions rules.
|
---|
782 | #
|
---|
783 |
|
---|
784 | ## @todo this hack ain't cutting it any longer. (the file name is abspath'ed since ages now.)
|
---|
785 | glue/xpcom/helpers.cpp: $(VBOX_IDL_TYPELIB.XPCOM)
|
---|
786 |
|
---|
787 | $(VBOX_IDL_FILE.XPCOM): $(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
788 | $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
|
---|
789 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
|
---|
790 |
|
---|
791 | $(VBOX_IDL_TYPELIB.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
|
---|
792 | $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
|
---|
793 | $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m typelib -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
|
---|
794 | $(CHMOD) 0644 $@
|
---|
795 | ## @todo ^^^^^^^^^^^^ fix horrible hack
|
---|
796 |
|
---|
797 | $(VBOX_IDL_HEADER.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
|
---|
798 | $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
|
---|
799 | $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m header -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
|
---|
800 |
|
---|
801 |
|
---|
802 | VBOX_MAIN_IDL ?= $(EXEC_X86_WIN32) $(call VBOX_FN_MAKE_WIN_PATH,$(firstword $(wildcard \
|
---|
803 | $(PATH_SDK_WINPSDK_BIN)/Midl.Exe\
|
---|
804 | $(PATH_SDK_WINPSDK)/Bin/Midl.Exe\
|
---|
805 | $(PATH_DEVTOOLS)/win.x86/bin/midl.exe\
|
---|
806 | ) Sorry_Cannot_Find_The_Midl_Compiler_In_The_PSDK))
|
---|
807 | IDL_DEFS = /nologo
|
---|
808 |
|
---|
809 | $(VBOX_IDL_FILE.MSCOM): $(VBOX_PATH_MAIN_SRC)/idl/midl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
810 | $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
|
---|
811 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
|
---|
812 |
|
---|
813 | # Aliases for testing purposes.
|
---|
814 | ifdef VBOX_WITH_XPCOM
|
---|
815 | testidl: $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM)
|
---|
816 | testidlhdr: $(VBOX_IDL_HEADER.XPCOM)
|
---|
817 | else
|
---|
818 | testidl: $(VBOX_IDL_FILE.MSCOM) $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c
|
---|
819 | endif
|
---|
820 |
|
---|
821 |
|
---|
822 | ## @todo r=bird: last changes to this rule showed incorrect dependencies here as it broke testcase (see testboxwin2).
|
---|
823 | # This is kind of obvious when looking at the rule, because it's (a) not specifying all it output
|
---|
824 | # and (b) generating more stuff *after* the main target has been completed.
|
---|
825 | #
|
---|
826 | # What needs to be done is to not depend on _i.c in the object subdir, but on all the final outputs.
|
---|
827 | $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
|
---|
828 | + $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c \
|
---|
829 | + $(VBoxCOM_0_OUTDIR)/VirtualBox.h \
|
---|
830 | + $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h \
|
---|
831 | + $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb \
|
---|
832 | + $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
|
---|
833 | $(VBOX_MAIN_IDL) $(IDL_DEFS) \
|
---|
834 | /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM_0_OUTDIR)) \
|
---|
835 | /cpp_cmd $(subst $(EXEC_X86_WIN32),,$(call VBOX_FN_MAKE_WIN_PATH,$(TOOL_$(VBOX_VCC_TOOL)_CC))) \
|
---|
836 | /I $(call VBOX_FN_MAKE_WIN_PATH,$(PATH_SDK_WINPSDK_INC)) \
|
---|
837 | /I idl \
|
---|
838 | $(call VBOX_FN_MAKE_WIN_PATH,$<)
|
---|
839 | $(MKDIR) -p $(VBOX_PATH_SDK)/bindings/mscom/include
|
---|
840 | $(CP) $(VBoxCOM_0_OUTDIR)/VirtualBox.h $(VBOX_PATH_SDK)/bindings/mscom/include
|
---|
841 | $(MKDIR) -p $(VBOX_PATH_SDK)/bindings/mscom/lib
|
---|
842 | $(CP) $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb $(VBOX_PATH_SDK)/bindings/mscom/lib
|
---|
843 | $(CP) $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c $(VBOX_PATH_SDK)/bindings/mscom/lib
|
---|
844 |
|
---|
845 | #
|
---|
846 | # Translation stuff
|
---|
847 | #
|
---|
848 | VBoxSVC_VBOX_HEADERS = \
|
---|
849 | include/collection.h \
|
---|
850 | include/MachineImpl.h
|
---|
851 | VBoxSVC_VBOX_TRANSLATIONS = \
|
---|
852 | nls/VBoxSVC_de.ts
|
---|
853 |
|
---|
854 | VBoxC_VBOX_HEADERS = \
|
---|
855 | include/ConsoleImpl.h
|
---|
856 | VBoxC_VBOX_TRANSLATIONS = \
|
---|
857 | nls/VBoxC_de.ts
|
---|
858 |
|
---|
859 | ifdef VBOX_WITH_JMSCOM
|
---|
860 | INSTALLS += VBoxJMscom-inst-jar
|
---|
861 |
|
---|
862 | #
|
---|
863 | # Java glue JAR files
|
---|
864 | #
|
---|
865 | VBOX_JMSCOM_JAR = $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar
|
---|
866 | VBOX_JMSCOM_TARGET := $(PATH_TARGET)/vboxjmscom-gen
|
---|
867 | VBOX_JMSCOM_GEN = $(VBOX_JMSCOM_TARGET)/jmscomgen
|
---|
868 | VBOX_JMSCOM_JDEST := $(VBOX_JMSCOM_TARGET)/jdest
|
---|
869 | VBOX_GLUE_XSLT_DIR := $(PATH_ROOT)/src/VBox/Main/glue
|
---|
870 | VBOX_JACOB_DIR := $(PATH_ROOT)/src/libs/jacob-1.15-M3
|
---|
871 |
|
---|
872 | VBoxJMscom-inst-jar_INST = $(INST_SDK)bindings/mscom/java/
|
---|
873 | VBoxJMscom-inst-jar_SOURCES = \
|
---|
874 | $(VBOX_JMSCOM_JAR)
|
---|
875 | VBoxJMscom-inst-jar_CLEAN = \
|
---|
876 | $(VBOX_JMSCOM_JAR) \
|
---|
877 | $(VBOX_JMSCOM_GEN)/jmscomglue.list \
|
---|
878 | $(wildcard \
|
---|
879 | $(VBOX_JMSCOM_GEN)/java/*.java \
|
---|
880 | $(VBOX_JMSCOM_JDEST)/*.class \
|
---|
881 | $(VBOX_JMSCOM_JDEST)/*/*.class \
|
---|
882 | $(VBOX_JMSCOM_JDEST)/*/*/*.class \
|
---|
883 | $(VBOX_JMSCOM_JDEST)/*/*/*/*.class \
|
---|
884 | )
|
---|
885 | VBoxJMscom-inst-jar_BLDDIRS += $(VBOX_JMSCOM_GEN)/java
|
---|
886 |
|
---|
887 | $(VBOX_JMSCOM_GEN)/jmscomglue.list: \
|
---|
888 | $(VBOX_XIDL_FILE) \
|
---|
889 | $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl \
|
---|
890 | $(VBOX_FILESPLIT) \
|
---|
891 | | $(VBOX_JMSCOM_GEN)/java/
|
---|
892 | $(call MSG_L1,Generating Java MSCOM glue files from XIDL)
|
---|
893 | $(QUIET)$(RM) -f $(wildcard $(VBOX_JMSCOM_GEN)/java/*.java)
|
---|
894 | $(QUIET)$(VBOX_XSLTPROC) \
|
---|
895 | --stringparam G_vboxApiSuffix $(VBOX_API_SUFFIX) \
|
---|
896 | --stringparam G_vboxGlueStyle mscom \
|
---|
897 | -o $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl $<
|
---|
898 | $(QUIET)$(VBOX_FILESPLIT) $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_JMSCOM_GEN)/java
|
---|
899 | $(QUIET)echo $(VBOX_JMSCOM_GEN)/java/*.java > $@
|
---|
900 |
|
---|
901 | $$(VBOX_JMSCOM_JAR): $(VBOX_JMSCOM_GEN)/jmscomglue.list | $$(dir $$@)
|
---|
902 | $(call MSG_TOOL,javac,$(notdir $@),jmscomgen.list,)
|
---|
903 | $(QUIET)$(RM) -Rf $(VBOX_JMSCOM_JDEST)
|
---|
904 | $(QUIET)$(MKDIR) -p $(VBOX_JMSCOM_JDEST)
|
---|
905 | $(call MSG_TOOL,javac,$(notdir $@),...,)
|
---|
906 | $(VBOX_JAVAC) $(VBOX_JAVAC_OPTS) \
|
---|
907 | @$(VBOX_JMSCOM_GEN)/jmscomglue.list \
|
---|
908 | -d $(VBOX_JMSCOM_JDEST) -classpath $(VBOX_JMSCOM_JDEST)$(VBOX_SEP)$(VBOX_JACOB_DIR)/jacob.jar
|
---|
909 | $(call MSG_LINK,$(notdir $@),$@)
|
---|
910 | $(VBOX_JAR) cf $@ -C $(VBOX_JMSCOM_JDEST) .
|
---|
911 |
|
---|
912 | endif # VBOX_WITH_JMSCOM
|
---|
913 |
|
---|
914 | #
|
---|
915 | # Install Java glue sample code.
|
---|
916 | #
|
---|
917 | INSTALLS += javagluesample
|
---|
918 | javagluesample_INST = $(INST_SDK)bindings/glue/java
|
---|
919 | javagluesample_MODE = a+rx,u+w
|
---|
920 | javagluesample_SOURCES = \
|
---|
921 | $(VBOX_PATH_MAIN_SRC)/glue/tests/TestVBox.java=>TestVBox.java \
|
---|
922 | $(VBOX_PATH_MAIN_SRC)/glue/tests/Makefile.kmk=>Makefile.kmk
|
---|
923 |
|
---|
924 | updatenls::
|
---|
925 | $(VBOX_LUPDATE) $(VBoxSVC_SOURCES) $(VBoxSVC_VBOX_HEADERS) -ts $(VBoxSVC_VBOX_TRANSLATIONS)
|
---|
926 | $(VBOX_LUPDATE) $(VBoxC_SOURCES) $(VBoxC_VBOX_HEADERS) -ts $(VBoxC_VBOX_TRANSLATIONS)
|
---|
927 |
|
---|
928 | testconverter:: $(VBOX_USER_HOME)/VirtualBox.xml
|
---|
929 | $(call MSG_TOOL,xsltproc,Test Settings Converter,$<,$(VBOX_USER_HOME)/VirtualBox.xml.test)
|
---|
930 | $(QUIET)$(VBOX_XSLTPROC) -o $(VBOX_USER_HOME)/VirtualBox.xml.test xml/SettingsConverter.xsl $<
|
---|
931 |
|
---|
932 | testconverter2:: $(VBOX_USER_HOME)/Machines/dos/dos.xml
|
---|
933 | $(call MSG_TOOL,xsltproc,Test Settings Converter,$<,$<.test)
|
---|
934 | $(QUIET)$(VBOX_XSLTPROC) -o $<.test xml/SettingsConverter.xsl $<
|
---|