VirtualBox

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

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

Main: callbacks removal

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