VirtualBox

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

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

Guest Copy/VBoxManage+Main: Added very first bits (not enabled by default yet, untested).

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