VirtualBox

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

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

ExtPack: Sketches and some code.

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