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