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