VirtualBox

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

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

Main: COM events work (smth along those lines could be done for generic events mechanisms too)

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