VirtualBox

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

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

*: a few OTHER_CLEAN typos and fixes

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