VirtualBox

source: vbox/trunk/src/VBox/Main/Makefile.kmk@ 32694

Last change on this file since 32694 was 32471, checked in by vboxsync, 14 years ago

Devices: refactoring, further PCI work

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette