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