VirtualBox

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

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

Main/Solaris: New DVD drive enumeration, works on Solaris 10 & Nevada. Removed now obsolete NSL_RESOLVED stuff on Solaris.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 29.7 KB
Line 
1# $Id: Makefile.kmk 31337 2010-08-03 14:05:05Z 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
190VBOX_AUTOGEN_EVENT_CPP = $(PATH_TARGET)/Main/VBoxEvents.cpp
191
192testschemadefs: $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
193
194
195#
196# VBoxSVC executable
197#
198PROGRAMS += VBoxSVC
199VBoxSVC_TEMPLATE = VBOXMAINEXE
200VBoxSVC_DEFS = \
201 VBOX_MAIN_SETTINGS_ADDONS \
202 IN_VMM_STATIC \
203 $(VBOX_MAIN_DEFS) \
204 $(if $(VBOX_WITH_VBOXSDL),VBOX_WITH_VBOXSDL,) \
205 $(if $(VBOX_WITH_VRDP),VBOX_WITH_VRDP,) \
206 $(if $(VBOX_WITH_HEADLESS),VBOX_WITH_HEADLESS,) \
207 $(if $(VBOX_WITH_QTGUI),VBOX_WITH_QTGUI,) \
208 $(if $(VBOX_WITH_COCOA_QT),VBOX_WITH_COCOA_QT,) \
209 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
210 $(if $(VBOX_MAIN_RELEASE_LOG),VBOX_MAIN_RELEASE_LOG LOG_ENABLED,) \
211 $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
212 $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
213 $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
214 $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS,) \
215 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
216 $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
217 $(if $(VBOX_WITH_AHCI),VBOX_WITH_AHCI,) \
218 $(if $(VBOX_WITH_LSILOGIC),VBOX_WITH_LSILOGIC,) \
219 $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
220 $(if $(VBOX_WITH_RESOURCE_USAGE_API),VBOX_WITH_RESOURCE_USAGE_API,) \
221 $(if $(VBOX_WITH_PDM_ASYNC_COMPLETION),VBOX_WITH_PDM_ASYNC_COMPLETION,) \
222 $(if $(VBOX_WITH_DBUS),$(if $(VBOX_USB_WITH_DBUS),VBOX_USB_WITH_DBUS,),) \
223 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,) \
224 $(if $(VBOX_USB_WITH_INOTIFY),VBOX_USB_WITH_INOTIFY,) \
225 $(if $(VBOX_WITH_LIVE_MIGRATION),VBOX_WITH_LIVE_MIGRATION,) \
226 $(if $(VBOX_WITH_VUSB),VBOX_WITH_VUSB,)
227ifdef VBOX_WITH_USB
228 VBoxSVC_DEFS += \
229VBOX_WITH_USB \
230 $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI,) \
231 $(if $(VBOX_WITH_NEW_USB_CODE_ON_DARWIN),VBOX_WITH_NEW_USB_CODE_ON_DARWIN,) \
232 $(if $(VBOX_WITH_NEW_USB_CODE_ON_SOLARIS),VBOX_WITH_NEW_USB_CODE_ON_SOLARIS,)
233endif
234VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
235VBoxSVC_DEFS.win.x86 += _WIN32_WINNT=0x0500
236VBoxSVC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
237# Try to load and use libhal at runtime for probing removable media
238# VBoxSVC_DEFS.linux += VBOX_USE_LIBHAL
239VBoxSVC_DEFS.solaris += VBOX_USE_LIBHAL
240VBoxSVC_DEFS.freebsd += VBOX_USE_LIBHAL
241
242VBoxSVC_CXXFLAGS = $(filter-out -Wno-unused,$(TEMPLATE_VBOXMAINEXE_CXXFLAGS))
243## @todo We're disabling optimizations on FreeBSD to work around strange linker
244# errors in release builds. Figure out why and how to work around it in a
245# more optimal fashion.
246VBoxSVC_CXXFLAGS.freebsd = -O0
247
248VBoxSVC_INCS = \
249 include \
250 $(PATH_VBoxSVC) \
251 $(dir $(VBOX_XML_SCHEMADEFS_H)) \
252 .
253VBoxSVC_INCS.win = \
254 $(PATH_VBoxCOM)
255ifdef VBOX_WITH_USB
256 VBoxSVC_INCS.os2 = \
257 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
258endif
259
260VBoxSVC_LIBS += \
261 $(PATH_LIB)/SSMStandalone$(VBOX_SUFF_LIB) \
262 $(LIB_DDU)
263VBoxSVC_LIBS.solaris = \
264 adm \
265 nsl \
266 devinfo \
267 socket
268
269VBoxSVC_INTERMEDIATES = \
270 $(VBOX_MAIN_PREREQS) \
271 $(VBOX_XML_SCHEMADEFS_H)
272
273VBoxSVC_SOURCES = \
274 Global.cpp \
275 Logging.cpp \
276 Matching.cpp \
277 xml/Settings.cpp \
278 VirtualBoxBase.cpp \
279 VirtualBoxErrorInfoImpl.cpp \
280 VirtualBoxImpl.cpp \
281 ApplianceImpl.cpp \
282 ApplianceImplExport.cpp \
283 ApplianceImplImport.cpp \
284 xml/ovfreader.cpp \
285 VFSExplorerImpl.cpp \
286 MachineImpl.cpp \
287 SnapshotImpl.cpp \
288 MediumImpl.cpp \
289 MediumLock.cpp \
290 MediumAttachmentImpl.cpp \
291 MediumFormatImpl.cpp \
292 ProgressImpl.cpp \
293 ProgressProxyImpl.cpp \
294 HostImpl.cpp \
295 HostNetworkInterfaceImpl.cpp \
296 DHCPServerImpl.cpp \
297 DHCPServerRunner.cpp \
298 GuestOSTypeImpl.cpp \
299 NATEngineImpl.cpp \
300 NetworkAdapterImpl.cpp \
301 SerialPortImpl.cpp \
302 ParallelPortImpl.cpp \
303 USBControllerImpl.cpp \
304 StorageControllerImpl.cpp \
305 AudioAdapterImpl.cpp \
306 SharedFolderImpl.cpp \
307 SystemPropertiesImpl.cpp \
308 BIOSSettingsImpl.cpp \
309 HostPower.cpp \
310 EventImpl.cpp \
311 $(VBOX_AUTOGEN_EVENT_CPP) \
312 $(if $(VBOX_WITH_VRDP),VRDPServerImpl.cpp,) \
313 $(if $(VBOX_WITH_XPCOM),xpcom/server.cpp,) \
314 $(VBOX_XML_SCHEMADEFS_CPP)
315
316$(VBOX_AUTOGEN_EVENT_CPP): $(VBOX_PATH_MAIN_SRC)/idl/comimpl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
317 $(call MSG_TOOL,xsltproc,autogen events,$<,$@)
318 $(QUIET)$(VBOX_XSLTPROC) --stringparam G_kind VBoxEvent -o $@ $< $(VBOX_XIDL_FILE)
319
320VBoxSVC_SOURCES.darwin = \
321 darwin/iokit.cpp \
322 darwin/HostPowerDarwin.cpp
323
324ifdef VBOX_WITH_CROGL
325 ifneq ($(KBUILD_TARGET),darwin)
326 VBoxSVC_SOURCES += generic/OpenGLTest.cpp
327 endif
328 VBoxSVC_SOURCES.darwin += darwin/OpenGLTestDarwin.cpp
329endif
330
331VBoxSVC_SOURCES.win = \
332 win/svcmain.cpp \
333 win/svchlp.cpp \
334 win/HostPowerWin.cpp \
335 win/VBoxSVC.rc \
336 win/VBoxComEvents.cpp
337
338VBoxSVC_SOURCES.linux = \
339 linux/HostHardwareLinux.cpp
340
341VBoxSVC_SOURCES.solaris = \
342 linux/vbox-libhal.cpp \
343 solaris/DynLoadLibSolaris.cpp
344
345VBoxSVC_SOURCES.freebsd = \
346 freebsd/HostHardwareFreeBSD.cpp
347
348ifdef VBOX_WITH_USB
349 ifdef VBOX_WITH_SYSFS_BY_DEFAULT
350 linux/USBProxyServiceLinux.cpp_DEFS += VBOX_WITH_SYSFS_BY_DEFAULT
351 endif
352 VBoxSVC_SOURCES += \
353 USBDeviceFilterImpl.cpp \
354 USBProxyService.cpp \
355 HostUSBDeviceImpl.cpp
356 VBoxSVC_SOURCES.darwin += darwin/USBProxyServiceDarwin.cpp
357 VBoxSVC_SOURCES.linux += linux/USBProxyServiceLinux.cpp
358 VBoxSVC_SOURCES.os2 += os2/USBProxyServiceOs2.cpp
359 VBoxSVC_SOURCES.solaris += solaris/USBProxyServiceSolaris.cpp
360 VBoxSVC_SOURCES.win += win/USBProxyServiceWindows.cpp
361 VBoxSVC_SOURCES.freebsd += freebsd/USBProxyServiceFreeBSD.cpp
362endif
363
364ifdef VBOX_WITH_NETFLT
365 # Note! The includes from the TOOL has lower priority than the SDKs,
366 # since comdef.h is in both the DDK and VCC we want to make sure
367 # we're using the VCC since we're not using the DDK compiler/crt.
368 # Since this is potentially risky, restrict it to the source file
369 # needing it.
370 win/NetIf-win.cpp_INCS.win += $(PATH_TOOL_$(VBOX_VCC_TOOL)_INC)
371 VBoxSVC_LIBS.win += \
372 $(PATH_LIB)/WinNetConfig.lib \
373 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
374 $(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
375 ifdef VBOX_NETFLT_ONDEMAND_BIND
376 VBoxSVC_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
377 endif
378endif
379VBoxSVC_LDFLAGS.darwin = -framework IOKit -framework SystemConfiguration
380
381ifdef VBOX_WITH_CROGL
382 VBoxSVC_LDFLAGS.darwin += -framework OpenGL
383endif
384
385ifeq ($(KBUILD_TYPE),debug)
386 VBoxSVC_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
387endif
388
389ifdef VBOX_WITH_RESOURCE_USAGE_API
390 VBoxSVC_SOURCES += \
391 PerformanceImpl.cpp \
392 Performance.cpp
393 VBoxSVC_SOURCES.darwin += darwin/PerformanceDarwin.cpp
394 VBoxSVC_SOURCES.freebsd += freebsd/PerformanceFreeBSD.cpp
395 VBoxSVC_SOURCES.linux += linux/PerformanceLinux.cpp
396 VBoxSVC_SOURCES.os2 += os2/PerformanceOs2.cpp
397 VBoxSVC_SOURCES.solaris += solaris/PerformanceSolaris.cpp
398 VBoxSVC_SOURCES.win += win/PerformanceWin.cpp
399 VBoxSVC_LDFLAGS.darwin += -lproc
400 VBoxSVC_LDFLAGS.solaris += -lkstat
401 VBoxSVC_LDFLAGS.win += psapi.lib powrprof.lib
402endif
403
404ifdef VBOX_WITH_HOSTNETIF_API
405 VBoxSVC_SOURCES.win += win/NetIf-win.cpp
406 VBoxSVC_SOURCES.linux += linux/NetIf-linux.cpp
407 VBoxSVC_SOURCES.os2 += os2/NetIf-os2.cpp
408 VBoxSVC_SOURCES.darwin += darwin/NetIf-darwin.cpp
409 VBoxSVC_SOURCES.solaris += solaris/NetIf-solaris.cpp
410 VBoxSVC_SOURCES.freebsd += freebsd/NetIf-freebsd.cpp
411 VBoxSVC_DEFS += VBOX_WITH_HOSTNETIF_API
412 if1of ($(KBUILD_TARGET), linux darwin solaris freebsd)
413 VBoxSVC_SOURCES += generic/NetIf-generic.cpp
414 endif
415endif
416
417win/VBoxSVC.rc_INCS = $(PATH_VBoxSVC)
418win/VBoxSVC.rc_DEPS = $(PATH_VBoxSVC)/VBoxSVC.rgs $(PATH_VBoxSVC)/VBoxSVC-icon.rc
419win/VBoxSVC.rc_CLEAN = $(PATH_VBoxSVC)/VBoxSVC.rgs $(PATH_VBoxSVC)/VBoxSVC-icon.rc
420
421$$(PATH_VBoxSVC)/VBoxSVC-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$(@D))
422 $(APPEND) -t $@ '1 ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
423
424$$(PATH_VBoxSVC)/VBoxSVC.rgs: $(VBOX_PATH_MAIN_SRC)/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$(@D))
425 $(VBOX_XSLTPROC) --stringparam Module VBoxSVC -o $@ $< $(VBOX_XIDL_FILE)
426
427#
428# Embed XML Schema files to VBoxSVC
429#
430VBOX_XML_SCHEMA_COMMON = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-common.xsd
431VBOX_XML_SCHEMA.darwin = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-macosx.xsd
432VBOX_XML_SCHEMA.linux = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-linux.xsd
433VBOX_XML_SCHEMA.freebsd = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-freebsd.xsd
434VBOX_XML_SCHEMA.win = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-windows.xsd
435VBOX_XML_SCHEMA.os2 = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-os2.xsd
436VBOX_XML_SCHEMA.solaris = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-solaris.xsd
437
438VBOX_XML_CONVERTER_TEMPLATE = $(VBOX_PATH_MAIN_SRC)/xml/SettingsConverter.xsl
439
440$$(PATH_VBoxSVC)/xml_VirtualBox_settings_xsd.h: $(VBOX_XML_SCHEMA.$(KBUILD_TARGET)) $(VBOX_BIN2C)
441 $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
442 $(QUIET)$(VBOX_BIN2C) _xml_VirtualBox_settings_xsd $< $@
443
444$$(PATH_VBoxSVC)/xml_VirtualBox_settings_common_xsd.h: $(VBOX_XML_SCHEMA_COMMON) $(VBOX_BIN2C)
445 $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
446 $(QUIET)$(VBOX_BIN2C) _xml_VirtualBox_settings_common_xsd $< $@
447
448$$(PATH_VBoxSVC)/xml_SettingsConverter_xsl.h: $(VBOX_XML_CONVERTER_TEMPLATE) $(VBOX_BIN2C)
449 $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
450 $(QUIET)$(VBOX_BIN2C) _xml_SettingsConverter_xsl $< $@
451
452$(VBOX_XML_SCHEMADEFS_H): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET)) $(VBOX_XML_SCHEMA_COMMON) | $$(dir $$@)
453 $(call MSG_GENERATE,SchemaDefs,$@,$<)
454 $(VBOX_XSLTPROC) --stringparam mode declare -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET))
455
456$(VBOX_XML_SCHEMADEFS_CPP): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET)) $(VBOX_XML_SCHEMA_COMMON) | $$(dir $$@)
457 $(call MSG_GENERATE,SchemaDefs,$@,$<)
458 $(VBOX_XSLTPROC) --stringparam mode define -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET))
459
460OTHER_CLEAN += $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
461
462
463if ( defined(VBOX_WITH_QTGUI) \
464 && (defined(VBOX_WITH_CROGL) || defined(VBOX_WITH_VIDEOHWACCEL)) \
465 && !defined(VBOX_WITH_DEBUG_VCC_CRT))
466 ifneq ($(KBUILD_TARGET),darwin)
467 #
468 # VBoxTestOGL - OpenGL support test app.
469 # Note! Doesn't link with VBOX_WITH_DEBUG_VCC_CRT defined because it uses Qt.
470 #
471 ifdef VBOX_WITH_VIDEOHWACCEL
472 USES += qt4
473 endif
474 PROGRAMS += VBoxTestOGL
475 VBoxTestOGL_TEMPLATE = $(if $(VBOX_WITH_VIDEOHWACCEL),$(if $(VBOX_WITH_HARDENING),VBOXQT4GUI,VBOXQT4GUIEXE),VBOXMAINEXE)
476 VBoxTestOGL_SOURCES = generic/OpenGLTestApp.cpp
477 VBoxTestOGL_LIBS = \
478 $(if $(VBOX_WITH_CROGL), \
479 $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
480 $(VBOX_LIB_OGL_HOSTCRUTIL),) \
481 $(if $(VBOX_WITH_VIDEOHWACCEL), $(PATH_LIB)/VBoxOGL2D$(VBOX_SUFF_LIB),) \
482 $(LIB_RUNTIME)
483 VBoxTestOGL_DEFS += \
484 $(if $(VBOX_WITH_CROGL), VBOX_WITH_CROGL,) \
485 $(if $(VBOX_WITH_VIDEOHWACCEL), VBOX_WITH_VIDEOHWACCEL,) \
486 VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\" \
487 $(if $(VBOX_BLEEDING_EDGE),VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\",)
488 ifdef VBOX_WITH_VIDEOHWACCEL
489 VBoxTestOGL_QT_MODULES += Core Gui OpenGL
490 VBoxTestOGL_LDFLAGS.darwin += -framework OpenGL
491 VBoxTestOGL_LIBS.win += $(PATH_SDK_WINPSDK_LIB)/Opengl32.lib
492 if1of ($(KBUILD_TARGET), solaris linux freebsd)
493 # must come after VBoxOGL2D, therefore don't set the arch-specific LIBS variable here!
494 VBoxTestOGL_LIBS += GL
495 endif
496 endif
497 VBoxTestOGL_LDFLAGS.win = /SUBSYSTEM:windows
498 endif
499endif
500
501
502ifdef VBOX_WITH_XPCOM
503#
504# VBoxSVCM - VBoxSVC wrapper module
505#
506DLLS += VBoxSVCM
507VBoxSVCM_TEMPLATE = VBOXMAINCOMP
508VBoxSVCM_DEFS = IN_RING3 $(VBOX_MAIN_DEFS)
509ifdef VBOX_WITH_HARDENING
510 VBoxSVCM_DEFS += VBOX_WITH_HARDENING
511endif
512VBoxSVCM_INCS = \
513 include \
514 $(PATH_VBoxC) \
515 .
516VBoxSVCM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
517VBoxSVCM_SOURCES = \
518 xpcom/server_module.cpp
519VBoxSVCM_LDFLAGS.darwin = \
520 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxSVCM.dylib \
521 -exported_symbols_list $(PATH_VBoxSVCM)/VBoxSVCM.def
522 ifeq ($(KBUILD_TARGET),darwin)
523VBoxSVCM_ORDERDEPS += $(PATH_VBoxSVCM)/VBoxSVCM.def
524VBoxSVCM_CLEAN += $(PATH_VBoxSVCM)/VBoxSVCM.def
525$$(PATH_VBoxSVCM)/VBoxSVCM.def:
526 $(RM) -f $@
527 $(APPEND) $@ _NSGetModule
528 endif
529VBoxSVCM_INTERMEDIATES += $(VBOX_IDL_HEADER.XPCOM)
530
531endif # VBOX_WITH_XPCOM
532
533#
534# VBoxC module
535#
536DLLS += VBoxC
537VBoxC_TEMPLATE = VBOXMAINCOMP
538VBoxC_SDKS = VBOX_LIBPNG VBOX_ZLIB
539VBoxC_DEFS = \
540 IN_RING3 \
541 $(VBOX_MAIN_DEFS) \
542 VBOX_COM_INPROC \
543 $(if $(VBOX_WITH_VRDP),VBOX_WITH_VRDP,) \
544 $(if $(VBOX_WITH_VRDP_VIDEO_CHANNEL),VBOX_WITH_VRDP_VIDEO_CHANNEL,) \
545 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
546 $(if $(VBOX_MAIN_RELEASE_LOG),VBOX_MAIN_RELEASE_LOG LOG_ENABLED,) \
547 $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
548 $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
549 $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
550 $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS,) \
551 $(if $(VBOX_WITH_CROSSBOW),VBOX_WITH_CROSSBOW,) \
552 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
553 $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
554 $(if $(VBOX_WITH_EFI),VBOX_WITH_EFI,) \
555 $(if $(VBOX_WITH_HPET),VBOX_WITH_HPET,) \
556 $(if $(VBOX_WITH_SMC),VBOX_WITH_SMC,) \
557 $(if $(VBOX_WITH_LPC),VBOX_WITH_LPC,) \
558 $(if $(VBOX_WITH_PDM_ASYNC_COMPLETION),VBOX_WITH_PDM_ASYNC_COMPLETION,) \
559 $(if $(VBOX_WITH_LIVE_MIGRATION),VBOX_WITH_LIVE_MIGRATION,) \
560 $(if $(VBOX_WITH_VUSB),VBOX_WITH_VUSB,)
561ifdef VBOX_WITH_USB
562VBoxC_DEFS += \
563 VBOX_WITH_USB \
564 $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI,)
565endif
566ifdef VBOX_WITH_OLD_VBVA_LOCK
567VBoxC_DEFS += VBOX_WITH_OLD_VBVA_LOCK
568endif
569ifdef VBOX_WITH_HGSMI
570VBoxC_DEFS += VBOX_WITH_HGSMI
571endif
572ifdef VBOX_WITH_VIDEOHWACCEL
573VBoxC_DEFS += VBOX_WITH_VIDEOHWACCEL
574endif
575
576ifdef VBOX_DYNAMIC_NET_ATTACH
577VBoxC_DEFS += VBOX_DYNAMIC_NET_ATTACH
578endif
579
580VBoxC_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE
581VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
582VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
583
584#temporary define
585VBoxC_DEFS += MMSEAMLESS
586
587VBoxC_INCS = \
588 include \
589 $(PATH_VBoxC) \
590 $(dir $(VBOX_XML_SCHEMADEFS_H))
591VBoxC_INCS.win = \
592 $(PATH_VBoxCOM) \
593 .
594
595VBoxC_LDFLAGS.darwin = \
596 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxC.dylib \
597 -exported_symbols_list $(PATH_VBoxC)/VBoxC.def \
598 -framework IOKit
599ifdef VBOX_USE_VCC80
600 VBoxC_LDFLAGS.win = /MANIFEST
601endif
602
603VBoxC_LIBS += \
604 $(LIB_VMM) \
605 $(LIB_REM)
606
607ifdef VBOX_WITH_NETFLT
608 VBoxC_LIBS.win += $(PATH_LIB)/WinNetConfig.lib \
609 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
610 $(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
611endif
612
613VBoxC_INTERMEDIATES = \
614 $(VBOX_MAIN_PREREQS) \
615 $(VBOX_XML_SCHEMADEFS_H)
616
617VBoxC_SOURCES = \
618 Global.cpp \
619 Logging.cpp \
620 VBoxDll.cpp \
621 USBDeviceImpl.cpp \
622 RemoteUSBDeviceImpl.cpp \
623 VirtualBoxBase.cpp \
624 VirtualBoxErrorInfoImpl.cpp \
625 ProgressImpl.cpp \
626 SharedFolderImpl.cpp \
627 SessionImpl.cpp \
628 ConsoleImpl.cpp \
629 ConsoleImpl2.cpp \
630 ConsoleImplTeleporter.cpp \
631 ConsoleVRDPServer.cpp \
632 GuestImpl.cpp \
633 KeyboardImpl.cpp \
634 MouseImpl.cpp \
635 DisplayImpl.cpp \
636 DisplayResampleImage.cpp \
637 MachineDebuggerImpl.cpp \
638 VBoxDriversRegister.cpp \
639 AudioSnifferInterface.cpp \
640 VMMDevInterface.cpp \
641 EventImpl.cpp \
642 $(VBOX_AUTOGEN_EVENT_CPP) \
643 $(VBOX_XML_SCHEMADEFS_CPP)
644VBoxC_SOURCES.win = \
645 win/dllmain.cpp \
646 win/VBoxC.def \
647 win/VBoxC.rc
648
649
650ifdef VBOX_WITH_XPCOM
651VBoxC_SOURCES += \
652 xpcom/module.cpp
653endif
654
655ifdef VBOX_WITH_HGCM
656VBoxC_SOURCES += \
657 hgcm/HGCMObjects.cpp \
658 hgcm/HGCMThread.cpp \
659 hgcm/HGCM.cpp
660endif
661
662ifdef VBOX_WITH_USB
663VBoxC_SOURCES += \
664 RemoteUSBBackend.cpp
665endif
666
667ifeq ($(KBUILD_TARGET),darwin)
668VBoxC_ORDERDEPS += $(PATH_VBoxC)/VBoxC.def
669VBoxC_CLEAN += $(PATH_VBoxC)/VBoxC.def
670$$(PATH_VBoxC)/VBoxC.def: $(MAKEFILE_CURRENT)
671 $(RM) -f $@
672 $(APPEND) $@ _NSGetModule
673 $(APPEND) $@ _VBoxDriversRegister
674endif
675
676ConsoleImpl.cpp_DEFS = \
677 VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\" \
678 $(if $(VBOX_BLEEDING_EDGE),VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\",)
679
680
681win/VBoxC.rc_DEPS = $(PATH_VBoxC)/VBoxC.rgs $(PATH_VBoxCOM)/VirtualBox.tlb
682VBoxC_CLEAN.win += $(PATH_VBoxC)/VBoxC.rgs
683
684$$(PATH_VBoxC)/VBoxC.rgs: $(VBOX_PATH_MAIN_SRC)/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(PATH_VBoxC)/
685 $(VBOX_XSLTPROC) --stringparam Module VBoxC -o $@ $< $(VBOX_XIDL_FILE)
686
687
688#
689# VBoxCOM - COM Abstraction Layer library
690#
691LIBRARIES += VBoxCOM
692VBoxCOM_TEMPLATE = VBOXMAINLIB
693VBoxCOM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
694VBoxCOM_SOURCES = \
695 glue/com.cpp \
696 glue/initterm.cpp \
697 glue/string.cpp \
698 glue/AutoLock.cpp \
699 glue/EventQueue.cpp \
700 glue/ErrorInfo.cpp \
701 glue/errorprint.cpp \
702 glue/VirtualBoxErrorInfo.cpp
703VBoxCOM_INCS += \
704 include
705ifeq ($(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
710else # !win
711 VBoxCOM_SOURCES += \
712 xpcom/helpers.cpp
713endif # !win
714
715
716endif # !VBOX_ONLY_SDK (the ifndef is far above)
717
718
719#
720# Installs com related thing(s) to bin.
721#
722INSTALLS.win += VBoxMain-com-inst
723VBoxMain-com-inst_INST = $(INST_BIN)
724VBoxMain-com-inst_SOURCES = \
725 win/comregister.cmd
726
727
728if 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
740endif
741
742
743# generate rules
744include $(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.)
753xpcom/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
770VBOX_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))
775IDL_DEFS = /nologo
776ifdef VBOX_WITH_VRDP
777 IDL_DEFS += /D VBOX_WITH_VRDP
778endif
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.
785ifdef VBOX_WITH_XPCOM
786testidl: $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM)
787testidlhdr: $(VBOX_IDL_HEADER.XPCOM)
788else
789testidl: $(VBOX_IDL_FILE.MSCOM) $(PATH_VBoxCOM)/VirtualBox_i.c
790endif
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#
819VBoxSVC_VBOX_HEADERS = \
820 include/collection.h \
821 include/MachineImpl.h
822VBoxSVC_VBOX_TRANSLATIONS = \
823 nls/VBoxSVC_de.ts
824
825VBoxC_VBOX_HEADERS = \
826 include/ConsoleImpl.h
827VBoxC_VBOX_TRANSLATIONS = \
828 nls/VBoxC_de.ts
829
830ifdef VBOX_WITH_JMSCOM
831INSTALLS += VBoxJMscom-inst-jar
832
833#
834# Java glue JAR files
835#
836VBOX_JMSCOM_JAR = $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar
837VBOX_JMSCOM_TARGET := $(PATH_TARGET)/vboxjmscom-gen
838VBOX_JMSCOM_GEN = $(VBOX_JMSCOM_TARGET)/jmscomgen
839VBOX_JMSCOM_JDEST := $(VBOX_JMSCOM_TARGET)/jdest
840VBOX_GLUE_XSLT_DIR := $(PATH_ROOT)/src/VBox/Main/glue
841VBOX_JACOB_DIR := $(PATH_ROOT)/src/libs/jacob-1.15-M3
842
843VBoxJMscom-inst-jar_INST = $(INST_SDK)bindings/mscom/java/
844VBoxJMscom-inst-jar_SOURCES = \
845 $(VBOX_JMSCOM_JAR)
846VBoxJMscom-inst-jar_CLEAN = \
847 $(VBOX_JMSCOM_JAR) \
848 $(VBOX_JMSCOM_GEN)/jmscomglue.list \
849 $(wildcard \
850 $(VBOX_JMSCOM_GEN)/java/*.java \
851 $(VBOX_JMSCOM_JDEST)/*.class \
852 $(VBOX_JMSCOM_JDEST)/*/*.class \
853 $(VBOX_JMSCOM_JDEST)/*/*/*.class \
854 $(VBOX_JMSCOM_JDEST)/*/*/*/*.class \
855 )
856VBoxJMscom-inst-jar_BLDDIRS += $(VBOX_JMSCOM_GEN)/java
857
858$(VBOX_JMSCOM_GEN)/jmscomglue.list: \
859 $(VBOX_XIDL_FILE) \
860 $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl \
861 $(VBOX_FILESPLIT) \
862 | $(VBOX_JMSCOM_GEN)/java/
863 $(call MSG_L1,Generating Java MSCOM glue files from XIDL)
864 $(QUIET)$(RM) -f $(wildcard $(VBOX_JMSCOM_GEN)/java/*.java)
865 $(QUIET)$(VBOX_XSLTPROC) \
866 --stringparam G_vboxApiSuffix $(VBOX_API_SUFFIX) \
867 --stringparam G_vboxGlueStyle mscom \
868 -o $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl $<
869 $(QUIET)$(VBOX_FILESPLIT) $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_JMSCOM_GEN)/java
870 $(QUIET)echo $(VBOX_JMSCOM_GEN)/java/*.java > $@
871
872$$(VBOX_JMSCOM_JAR): $(VBOX_JMSCOM_GEN)/jmscomglue.list | $$(dir $$@)
873 $(call MSG_TOOL,javac,$(notdir $@),jmscomgen.list,)
874 $(QUIET)$(RM) -Rf $(VBOX_JMSCOM_JDEST)
875 $(QUIET)$(MKDIR) -p $(VBOX_JMSCOM_JDEST)
876 $(call MSG_TOOL,javac,$(notdir $@),...,)
877 $(VBOX_JAVAC) $(VBOX_JAVAC_OPTS) \
878 @$(VBOX_JMSCOM_GEN)/jmscomglue.list \
879 -d $(VBOX_JMSCOM_JDEST) -classpath $(VBOX_JMSCOM_JDEST)$(VBOX_SEP)$(VBOX_JACOB_DIR)/jacob.jar
880 $(call MSG_LINK,$(notdir $@),$@)
881 $(VBOX_JAR) cf $@ -C $(VBOX_JMSCOM_JDEST) .
882
883endif # VBOX_WITH_JMSCOM
884
885#
886# Install Java glue sample code.
887#
888INSTALLS += javagluesample
889javagluesample_INST = $(INST_SDK)bindings/glue/java
890javagluesample_MODE = a+rx,u+w
891javagluesample_SOURCES = \
892 $(VBOX_PATH_MAIN_SRC)/glue/tests/TestVBox.java=>TestVBox.java \
893 $(VBOX_PATH_MAIN_SRC)/glue/tests/Makefile.kmk=>Makefile.kmk
894
895updatenls::
896 $(VBOX_LUPDATE) $(VBoxSVC_SOURCES) $(VBoxSVC_VBOX_HEADERS) -ts $(VBoxSVC_VBOX_TRANSLATIONS)
897 $(VBOX_LUPDATE) $(VBoxC_SOURCES) $(VBoxC_VBOX_HEADERS) -ts $(VBoxC_VBOX_TRANSLATIONS)
898
899testconverter:: $(VBOX_USER_HOME)/VirtualBox.xml
900 $(call MSG_TOOL,xsltproc,Test Settings Converter,$<,$(VBOX_USER_HOME)/VirtualBox.xml.test)
901 $(QUIET)$(VBOX_XSLTPROC) -o $(VBOX_USER_HOME)/VirtualBox.xml.test xml/SettingsConverter.xsl $<
902
903testconverter2:: $(VBOX_USER_HOME)/Machines/dos/dos.xml
904 $(call MSG_TOOL,xsltproc,Test Settings Converter,$<,$<.test)
905 $(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