VirtualBox

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

Last change on this file since 45434 was 45415, checked in by vboxsync, 12 years ago

GuestCtrl: Implemented using (public) VirtualBox events instead of own callback mechanisms. Bugfixes for testcases (still work in progress).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 30.4 KB
Line 
1# $Id: Makefile.kmk 45415 2013-04-08 21:40:42Z vboxsync $
2## @file
3# Makefile for the VBox Main module.
4#
5
6#
7# Copyright (C) 2004-2013 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 # I'm Evil! Dr. Evil.
38 VBoxCOM_0_OUTDIR = $(PATH_TARGET)/VBoxCOM
39 BLDDIRS += $(VBoxCOM_0_OUTDIR) $(PATH_STAGE_BIN)/components
40 include $(KBUILD_PATH)/tools/$(VBOX_VCC_TOOL).kmk # For the idl /cpp statement.
41 include $(KBUILD_PATH)/sdks/$(VBOX_WINPSDK).kmk
42endif # !VBOX_ONLY_SDK
43
44
45# Construct VBOX_MAIN_DEFS
46## @todo eliminate or expand VBOX_MAIN_DEFS.
47VBOX_MAIN_DEFS =
48ifneq ($(KBUILD_TARGET),win)
49 ifndef VBOX_WITH_XPCOM
50 $(error "VBox: VBOX_WITH_XPCOM isn't defined")
51 endif
52 ifneq ($(KBUILD_TARGET),os2)
53 VBOX_MAIN_DEFS += VBOX_WITH_SYS_V_IPC_SESSION_WATCHER
54 endif
55endif
56VBOX_MAIN_DEFS += \
57 $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,) \
58 $(if $(VBOX_WITH_RAW_RING1),VBOX_WITH_RAW_RING1,) \
59 $(if $(VBOX_WITH_NETFLT),VBOX_WITH_NETFLT,) \
60 $(if $(VBOX_WITH_COPYTOGUEST),VBOX_WITH_COPYTOGUEST,) \
61 $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP,) \
62 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,) \
63 $(if $(VBOX_WITH_CROGL),VBOX_WITH_CROGL,) \
64 $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
65 $(if $(VBOX_WITH_GUEST_PROPS_RDONLY_GUEST),VBOX_WITH_GUEST_PROPS_RDONLY_GUEST,) \
66 $(if $(VBOX_WITH_GUEST_CONTROL),VBOX_WITH_GUEST_CONTROL,) \
67 $(if $(VBOX_WITH_USB_VIDEO),VBOX_WITH_USB_VIDEO,) \
68 $(if $(VBOX_WITH_USB_CARDREADER),VBOX_WITH_USB_CARDREADER,) \
69 $(if $(VBOX_WITH_USB_CARDREADER_TEST),VBOX_WITH_USB_CARDREADER_TEST,) \
70 $(if $(VBOX_WITH_HOSTNETIF_API),VBOX_WITH_HOSTNETIF_API,) \
71
72# Unconditionally enable the new semaphore key generation code
73VBOX_MAIN_DEFS += VBOX_WITH_NEW_SYS_V_KEYGEN
74
75VBOX_IDL_FILE.MSCOM = $(VBOX_PATH_SDK)/bindings/mscom/idl/VirtualBox.idl
76VBOX_IDL_FILE.XPCOM = $(VBOX_PATH_SDK)/bindings/xpcom/idl/VirtualBox_XPCOM.idl
77
78VBOX_IDL_TYPELIB.XPCOM = $(PATH_STAGE_BIN)/components/VirtualBox_XPCOM.xpt
79VBOX_IDL_HEADER.XPCOM = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
80
81# The MS COM specific stuff.
82if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" == "win"
83 OTHERS += \
84 $(VBOX_IDL_FILE.MSCOM)
85 OTHER_CLEAN += \
86 $(VBOX_IDL_FILE.MSCOM)
87
88 INSTALLS += VBox-mscom-bindings-include VBox-mscom-bindings-lib
89 VBox-mscom-bindings-include_INST = $(INST_SDK)bindings/mscom/include/
90 VBox-mscom-bindings-include_MODE = a+r,u+w
91 VBox-mscom-bindings-include_SOURCES = $(VBoxCOM_0_OUTDIR)/VirtualBox.h
92 VBox-mscom-bindings-include_CLEAN = $(VBoxCOM_0_OUTDIR)/VirtualBox.h
93 VBox-mscom-bindings-lib_INST = $(INST_SDK)bindings/mscom/lib/
94 VBox-mscom-bindings-lib_MODE = a+r,u+w
95 VBox-mscom-bindings-lib_SOURCES = $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
96 $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
97 VBox-mscom-bindings-lib_CLEAN = $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
98 $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
99
100 BLDDIRS += $(VBOX_PATH_SDK)/bindings/mscom/idl
101endif
102
103# The XPCOM specific stuff.
104# if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" != "win" -- does not build on Windows
105if "$(KBUILD_TARGET)" != "win"
106 OTHERS += $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM) $(VBOX_IDL_HEADER.XPCOM)
107 OTHER_CLEAN += \
108 $(VBOX_IDL_FILE.XPCOM) \
109 $(VBOX_IDL_HEADER.XPCOM) \
110 $(VBOX_IDL_TYPELIB.XPCOM)
111
112 VBOX_MAIN_PREREQS += $(VBOX_IDL_TYPELIB.XPCOM) $(VBOX_IDL_HEADER.XPCOM)
113 BLDDIRS += \
114 $(VBOX_PATH_SDK)/bindings/xpcom/idl \
115 $(VBOX_PATH_SDK)/bindings/xpcom/include
116endif # xpcom
117
118
119#
120# Strip documentation from source XIDL so that we don't get a full
121# recompile every time a comma in the documentation is changed.
122#
123$(VBOX_XIDL_FILE).ts +| $(VBOX_XIDL_FILE): \
124 $(VBOX_XIDL_FILE_SRC) \
125 $(VBOX_PATH_MAIN_SRC)/idl/docstrip.xsl \
126 | $$(dir $$@)
127# $(CP) -fv $< $(VBOX_XIDL_FILE).ts
128 $(QUIET)$(VBOX_XSLTPROC) -o $(VBOX_XIDL_FILE).ts $(VBOX_PATH_MAIN_SRC)/idl/docstrip.xsl $<
129 $(QUIET)$(CP) --changed -fv $(VBOX_XIDL_FILE).ts $(VBOX_XIDL_FILE)
130
131OTHER_CLEAN += $(VBOX_XIDL_FILE) $(VBOX_XIDL_FILE).ts
132
133#
134# The Main API documentation
135#
136VBOX_MAIN_DOC_DIR = $(VBOX_PATH_SDK)/docs
137BLDDIRS += $(VBOX_MAIN_DOC_DIR)
138
139$(PATH_TARGET)/docs.Main: \
140 $(VBOX_PATH_MAIN_SRC)/Doxyfile.Main \
141 $(VBOX_PATH_MAIN_SRC)/idl/doxygen.xsl \
142 $(VBOX_XIDL_FILE_SRC) \
143 | $(PATH_TARGET)/ \
144 $(VBOX_MAIN_DOC_DIR)/
145 $(call MSG_TOOL,xsltproc,doxygen input,$<,$@)
146 $(QUIET)$(RM) -f $(wildcard $(VBOX_MAIN_DOC_DIR)/html/*) $(PATH_TARGET)/docs.Main
147 $(QUIET)$(VBOX_XSLTPROC) -o $(PATH_TARGET)/VirtualBox.idl $(VBOX_PATH_MAIN_SRC)/idl/doxygen.xsl $(VBOX_XIDL_FILE_SRC)
148 $(QUIET)$(REDIRECT) -E 'DOCDIR=$(VBOX_MAIN_DOC_DIR)' -E 'PATH_TARGET=$(PATH_TARGET)' -E 'PATH_CHM=$(subst /,\,$(VBOX_MAIN_DOC_DIR)/VirtualBoxAPI.chm)' \
149 -- doxygen $(VBOX_PATH_MAIN_SRC)/Doxyfile.Main
150 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) ">>>>>>>>>>>>>>>>>>>> Main.err: >>>>>>>>>>>>>>>>>>>>>>>>"
151 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(CAT) "$(PATH_TARGET)/Main.err"
152 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "<<<<<<<<<<<<<<<<<<<< Main.err <<<<<<<<<<<<<<<<<<<<<<<<<"
153 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> **************************************************"
154 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> Please fix above doxygen errors/warnings listed in"
155 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> $(PATH_TARGET)/Main.err"
156 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> **************************************************"
157 -$(EXEC_X86_WIN32) $(VBOX_PATH_HTML_HELP_WORKSHOP)/hhc.exe $(subst /,\\,$(VBOX_MAIN_DOC_DIR)/html/index.hhp)
158 $(APPEND) $(PATH_TARGET)/docs.Main
159# aliases
160docs.main docs.Main: $(PATH_TARGET)/docs.Main
161if !defined(VBOX_ONLY_DOCS)
162docs: $(PATH_TARGET)/docs.Main
163endif
164
165
166#
167# Some SDK bit.
168#
169INSTALLS += VBox-main-xidl
170VBox-main-xidl_INST = $(INST_SDK)bindings/
171VBox-main-xidl_MODE = a+r,u+w
172VBox-main-xidl_SOURCES = $(VBOX_XIDL_FILE_SRC)
173
174ifdef VBOX_WITH_PYTHON
175INSTALLS += VBox-python-glue
176VBox-python-glue_INST = $(INST_SDK)installer/vboxapi/
177VBox-python-glue_MODE = a+r,u+w
178VBox-python-glue_SOURCES = \
179 glue/vboxapi.py=>__init__.py \
180 $(VBox-python-glue_0_OUTDIR)/VirtualBox_constants.py
181VBox-python-glue_CLEAN = \
182 $(VBox-python-glue_0_OUTDIR)/VirtualBox_constants.py
183
184$$(VBox-python-glue_0_OUTDIR)/VirtualBox_constants.py: \
185 $(VBOX_PATH_MAIN_SRC)/glue/constants-python.xsl \
186 $(VBOX_XIDL_FILE) \
187 | $$(dir $$@)
188 $(call MSG_TOOL,xsltproc,Python constants,$<,$@)
189 $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
190
191endif # VBOX_WITH_PYTHON
192
193ifndef VBOX_ONLY_SDK # Note this goes on for *very* long
194
195#
196# Generate SchemaDefs.h and SchemaDefs.cpp from XML Schema
197# These two files are used by both VBoxC and VBoxSVC.
198#
199BLDDIRS += $(PATH_TARGET)/Main
200VBOX_XML_SCHEMADEFS_H = $(PATH_TARGET)/Main/SchemaDefs.h
201VBOX_XML_SCHEMADEFS_CPP = $(PATH_TARGET)/Main/SchemaDefs.cpp
202VBOX_XML_SCHEMADEFS_XSL = $(VBOX_PATH_MAIN_SRC)/xml/SchemaDefs.xsl
203
204VBOX_AUTOGEN_EVENT_H = $(PATH_TARGET)/Main/VBoxEvents.h
205VBOX_AUTOGEN_EVENT_CPP = $(PATH_TARGET)/Main/VBoxEvents.cpp
206
207testschemadefs: $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
208
209
210#
211# VBoxSVC executable
212#
213PROGRAMS += VBoxSVC
214VBoxSVC_TEMPLATE = VBOXMAINEXE
215VBoxSVC_DEFS = \
216 VBOX_MAIN_SETTINGS_ADDONS \
217 IN_VMM_STATIC \
218 $(VBOX_MAIN_DEFS) \
219 $(if $(VBOX_WITH_VBOXSDL),VBOX_WITH_VBOXSDL,) \
220 $(if $(VBOX_WITH_HEADLESS),VBOX_WITH_HEADLESS,) \
221 $(if $(VBOX_WITH_QTGUI),VBOX_WITH_QTGUI,) \
222 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
223 $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
224 $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
225 $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
226 $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS,) \
227 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
228 $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
229 $(if $(VBOX_WITH_AHCI),VBOX_WITH_AHCI,) \
230 $(if $(VBOX_WITH_LSILOGIC),VBOX_WITH_LSILOGIC,) \
231 $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
232 $(if $(VBOX_WITH_RESOURCE_USAGE_API),VBOX_WITH_RESOURCE_USAGE_API,) \
233 $(if $(VBOX_WITH_PDM_ASYNC_COMPLETION),VBOX_WITH_PDM_ASYNC_COMPLETION,) \
234 $(if $(VBOX_WITH_DBUS),$(if $(VBOX_USB_WITH_DBUS),VBOX_USB_WITH_DBUS,),) \
235 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,) \
236 $(if $(VBOX_USB_WITH_INOTIFY),VBOX_USB_WITH_INOTIFY,) \
237 $(if $(VBOX_WITH_LIVE_MIGRATION),VBOX_WITH_LIVE_MIGRATION,) \
238 $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK,) \
239 $(if $(VBOX_WITH_VUSB),VBOX_WITH_VUSB,) \
240 $(if $(VBOX_WITH_S3),VBOX_WITH_S3,) \
241 $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH,) \
242 $(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE,)
243ifdef VBOX_WITH_USB
244 VBoxSVC_DEFS += \
245 VBOX_WITH_USB \
246 $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI,) \
247 $(if $(VBOX_WITH_NEW_USB_CODE_ON_DARWIN),VBOX_WITH_NEW_USB_CODE_ON_DARWIN,)
248endif
249VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
250VBoxSVC_DEFS.win += _WIN32_WINNT=0x0510
251# Try to load and use libhal at runtime for probing removable media
252# VBoxSVC_DEFS.linux += VBOX_USE_LIBHAL
253VBoxSVC_DEFS.solaris += VBOX_USE_LIBHAL
254VBoxSVC_DEFS.freebsd += VBOX_USE_LIBHAL
255
256VBoxSVC_CXXFLAGS = $(filter-out -Wno-unused,$(TEMPLATE_VBOXMAINEXE_CXXFLAGS))
257
258VBoxSVC_INCS = \
259 include \
260 $(VBoxSVC_0_OUTDIR) \
261 $(dir $(VBOX_XML_SCHEMADEFS_H)) \
262 .
263VBoxSVC_INCS.win = \
264 $(VBoxCOM_0_OUTDIR)
265ifdef VBOX_WITH_USB
266 VBoxSVC_INCS.os2 = \
267 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
268endif
269
270VBoxSVC_LIBS += \
271 $(PATH_STAGE_LIB)/SSMStandalone$(VBOX_SUFF_LIB) \
272 $(LIB_DDU)
273VBoxSVC_SDKS = VBOX_LIBPNG VBOX_ZLIB
274VBoxSVC_LIBS.solaris = \
275 adm \
276 nsl \
277 devinfo \
278 socket \
279 $(LIB_VMM)
280
281VBoxSVC_INTERMEDIATES = \
282 $(VBOX_MAIN_PREREQS) \
283 $(VBOX_XML_SCHEMADEFS_H) \
284 $(VBOX_AUTOGEN_EVENT_H)
285
286VBoxSVC_SOURCES = \
287 src-all/DisplayPNGUtil.cpp \
288 src-all/DisplayResampleImage.cpp \
289 src-all/DisplayUtils.cpp \
290 src-all/EventImpl.cpp \
291 src-all/Global.cpp \
292 src-all/HashedPw.cpp \
293 src-all/Logging.cpp \
294 src-all/PCIDeviceAttachmentImpl.cpp \
295 src-all/ProgressImpl.cpp \
296 src-all/SharedFolderImpl.cpp \
297 src-all/VirtualBoxBase.cpp \
298 src-all/VirtualBoxErrorInfoImpl.cpp \
299 $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
300 src-server/ApplianceImpl.cpp \
301 src-server/ApplianceImplExport.cpp \
302 src-server/ApplianceImplImport.cpp \
303 src-server/ApplianceImplIO.cpp \
304 src-server/AudioAdapterImpl.cpp \
305 src-server/BandwidthControlImpl.cpp \
306 src-server/BandwidthGroupImpl.cpp \
307 src-server/BIOSSettingsImpl.cpp \
308 src-server/DHCPServerImpl.cpp \
309 src-server/DHCPServerRunner.cpp \
310 src-server/NATNetworkImpl.cpp \
311 $(if $(VBOX_WITH_NAT_SERVICE),src-server/NATNetworkServiceRunner.cpp,) \
312 src-server/GuestOSTypeImpl.cpp \
313 src-server/HostImpl.cpp \
314 src-server/HostNetworkInterfaceImpl.cpp \
315 src-server/HostPower.cpp \
316 src-server/MachineImpl.cpp \
317 src-server/MachineImplCloneVM.cpp \
318 src-server/Matching.cpp \
319 src-server/MediumAttachmentImpl.cpp \
320 src-server/MediumFormatImpl.cpp \
321 src-server/MediumImpl.cpp \
322 src-server/MediumLock.cpp \
323 src-server/NATEngineImpl.cpp \
324 src-server/NetworkAdapterImpl.cpp \
325 src-server/ParallelPortImpl.cpp \
326 src-server/ProgressProxyImpl.cpp \
327 src-server/SerialPortImpl.cpp \
328 src-server/SnapshotImpl.cpp \
329 src-server/StorageControllerImpl.cpp \
330 src-server/SystemPropertiesImpl.cpp \
331 src-server/USBControllerImpl.cpp \
332 src-server/VFSExplorerImpl.cpp \
333 src-server/VirtualBoxImpl.cpp \
334 src-server/VRDEServerImpl.cpp \
335 src-server/generic/AutostartDb-generic.cpp \
336 xml/ovfreader.cpp \
337 xml/Settings.cpp \
338 $(VBOX_XML_SCHEMADEFS_CPP) \
339 $(VBOX_AUTOGEN_EVENT_CPP) \
340 $(if $(VBOX_WITH_XPCOM),src-server/xpcom/server.cpp,)
341
342VBoxSVC_SOURCES.darwin = \
343 src-server/darwin/iokit.cpp \
344 src-server/darwin/HostPowerDarwin.cpp
345
346VBoxSVC_SOURCES.win = \
347 src-server/win/svcmain.cpp \
348 src-server/win/svchlp.cpp \
349 src-server/win/HostPowerWin.cpp \
350 src-server/win/VBoxSVC.rc \
351 src-server/win/VBoxComEvents.cpp
352
353VBoxSVC_SOURCES.linux = \
354 src-server/linux/HostHardwareLinux.cpp
355
356VBoxSVC_SOURCES.solaris = \
357 src-server/linux/vbox-libhal.cpp \
358 src-server/solaris/DynLoadLibSolaris.cpp
359
360VBoxSVC_SOURCES.freebsd = \
361 src-server/freebsd/HostHardwareFreeBSD.cpp
362
363
364ifdef VBOX_WITH_USB
365 ifdef VBOX_WITH_SYSFS_BY_DEFAULT
366 src-server/linux/USBProxyServiceLinux.cpp_DEFS += VBOX_WITH_SYSFS_BY_DEFAULT
367 endif
368 VBoxSVC_SOURCES += \
369 src-server/USBDeviceFilterImpl.cpp \
370 src-server/USBProxyService.cpp \
371 src-server/HostUSBDeviceImpl.cpp
372 VBoxSVC_SOURCES.darwin += src-server/darwin/USBProxyServiceDarwin.cpp
373 VBoxSVC_SOURCES.linux += src-server/linux/USBProxyServiceLinux.cpp
374 VBoxSVC_SOURCES.linux += src-server/linux/USBGetDevices.cpp
375 VBoxSVC_SOURCES.os2 += src-server/os2/USBProxyServiceOs2.cpp
376 VBoxSVC_SOURCES.solaris += src-server/solaris/USBProxyServiceSolaris.cpp
377 VBoxSVC_SOURCES.win += src-server/win/USBProxyServiceWindows.cpp
378 VBoxSVC_SOURCES.freebsd += src-server/freebsd/USBProxyServiceFreeBSD.cpp
379endif
380
381ifdef VBOX_WITH_NETFLT
382 VBoxSVC_LIBS.win += \
383 $(PATH_STAGE_LIB)/WinNetConfig$(VBOX_SUFF_LIB) \
384 $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
385 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
386 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
387 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
388endif
389VBoxSVC_LDFLAGS.darwin = -framework IOKit -framework SystemConfiguration
390
391ifdef VBOX_WITH_CROGL
392 VBoxSVC_LIBS += $(PATH_STAGE_LIB)/VBoxOGLTest$(VBOX_SUFF_LIB)
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 src-server/PerformanceImpl.cpp \
403 src-server/Performance.cpp
404 VBoxSVC_SOURCES.darwin += src-server/darwin/PerformanceDarwin.cpp
405 VBoxSVC_SOURCES.freebsd += src-server/freebsd/PerformanceFreeBSD.cpp
406 VBoxSVC_SOURCES.linux += src-server/linux/PerformanceLinux.cpp
407 VBoxSVC_SOURCES.os2 += src-server/os2/PerformanceOs2.cpp
408 VBoxSVC_SOURCES.solaris += src-server/solaris/PerformanceSolaris.cpp
409 VBoxSVC_SOURCES.win += src-server/win/PerformanceWin.cpp
410 VBoxSVC_LDFLAGS.darwin += -lproc
411 VBoxSVC_LDFLAGS.solaris += -lkstat -lnvpair
412 VBoxSVC_LDFLAGS.win += psapi.lib powrprof.lib
413endif
414
415ifdef VBOX_WITH_HOSTNETIF_API
416 VBoxSVC_SOURCES.win += src-server/win/NetIf-win.cpp
417 VBoxSVC_SOURCES.linux += src-server/linux/NetIf-linux.cpp
418 VBoxSVC_SOURCES.os2 += src-server/os2/NetIf-os2.cpp
419 VBoxSVC_SOURCES.darwin += src-server/darwin/NetIf-darwin.cpp
420 VBoxSVC_SOURCES.solaris += src-server/solaris/NetIf-solaris.cpp
421 VBoxSVC_SOURCES.freebsd += src-server/freebsd/NetIf-freebsd.cpp
422 VBoxSVC_DEFS += VBOX_WITH_HOSTNETIF_API
423 if1of ($(KBUILD_TARGET), linux darwin solaris freebsd)
424 VBoxSVC_SOURCES += src-server/generic/NetIf-generic.cpp
425 endif
426endif
427
428src-server/win/VBoxSVC.rc_INCS = $(VBoxSVC_0_OUTDIR)
429src-server/win/VBoxSVC.rc_DEPS = $(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs $(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc
430src-server/win/VBoxSVC.rc_CLEAN = $(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs $(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc
431
432$$(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$(@D))
433 $(APPEND) -t $@ '1 ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
434
435$$(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs: $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$(@D))
436 $(VBOX_XSLTPROC) --stringparam Module VBoxSVC -o $@ $< $(VBOX_XIDL_FILE)
437
438
439#
440# Embed some constraints from XML Schema file into VBoxSVC
441#
442VBOX_XML_SCHEMA = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings.xsd
443
444$(VBOX_XML_SCHEMADEFS_H): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA) | $$(dir $$@)
445 $(call MSG_GENERATE,SchemaDefs,$@,$<)
446 $(QUIET)$(VBOX_XSLTPROC) --stringparam mode declare -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA)
447
448$(VBOX_XML_SCHEMADEFS_CPP): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA) | $$(dir $$@)
449 $(call MSG_GENERATE,SchemaDefs,$@,$<)
450 $(QUIET)$(VBOX_XSLTPROC) --stringparam mode define -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA)
451
452testvalidsettings: $(VBOX_XML_SCHEMA)
453 xmllint --schema $< --noout $(HOME)/.VirtualBox/VirtualBox.xml
454 xmllint --schema $< --noout $(HOME)/.VirtualBox/Machines/*/*.xml
455 xmllint --schema $< --noout $(HOME)/.VirtualBox/Machines/*/*.vbox
456 xmllint --schema $< --noout $(HOME)/VirtualBox\ VMs/*/*.vbox
457
458OTHER_CLEAN += $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
459
460
461#
462# Generate some event stuff for VBoxSVC and VBoxC.
463#
464$(VBOX_AUTOGEN_EVENT_H): $(VBOX_PATH_MAIN_SRC)/idl/comimpl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
465 $(call MSG_TOOL,xsltproc,autogen events,$<,$@)
466 $(QUIET)$(VBOX_XSLTPROC) --stringparam G_kind VBoxEventHeader -o $@ $< $(VBOX_XIDL_FILE)
467
468$(VBOX_AUTOGEN_EVENT_CPP): $(VBOX_PATH_MAIN_SRC)/idl/comimpl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
469 $(call MSG_TOOL,xsltproc,autogen events,$<,$@)
470 $(QUIET)$(VBOX_XSLTPROC) --stringparam G_kind VBoxEvent -o $@ $< $(VBOX_XIDL_FILE)
471
472OTHER_CLEAN += $(VBOX_AUTOGEN_EVENT_H) $(VBOX_AUTOGEN_EVENT_CPP)
473
474ifdef VBOX_WITH_XPCOM
475#
476# VBoxSVCM - VBoxSVC wrapper module
477#
478DLLS += VBoxSVCM
479VBoxSVCM_TEMPLATE = VBOXMAINCOMP
480VBoxSVCM_DEFS = IN_RING3 $(VBOX_MAIN_DEFS)
481ifdef VBOX_WITH_HARDENING
482 VBoxSVCM_DEFS += VBOX_WITH_HARDENING
483endif
484VBoxSVCM_INCS = \
485 include \
486 $(VBoxC_0_OUTDIR) \
487 .
488VBoxSVCM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
489VBoxSVCM_SOURCES = \
490 src-server/xpcom/server_module.cpp
491VBoxSVCM_LDFLAGS.darwin = \
492 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxSVCM.dylib \
493 -exported_symbols_list $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
494 ifeq ($(KBUILD_TARGET),darwin)
495VBoxSVCM_ORDERDEPS += $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
496VBoxSVCM_CLEAN += $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
497$$(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def:
498 $(RM) -f $@
499 $(APPEND) $@ _NSGetModule
500 endif
501VBoxSVCM_INTERMEDIATES += $(VBOX_IDL_HEADER.XPCOM)
502endif # VBOX_WITH_XPCOM
503
504
505#
506# VBoxC module
507#
508DLLS += VBoxC
509VBoxC_TEMPLATE = VBOXMAINCOMP
510VBoxC_DEFS = \
511 IN_RING3 \
512 $(VBOX_MAIN_DEFS) \
513 VBOX_COM_INPROC \
514 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
515 $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
516 $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
517 $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
518 $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS,) \
519 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
520 $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
521 $(if $(VBOX_WITH_EFI),VBOX_WITH_EFI,) \
522 $(if $(VBOX_WITH_PDM_ASYNC_COMPLETION),VBOX_WITH_PDM_ASYNC_COMPLETION,) \
523 $(if $(VBOX_WITH_LIVE_MIGRATION),VBOX_WITH_LIVE_MIGRATION,) \
524 $(if $(VBOX_WITH_VUSB),VBOX_WITH_VUSB,) \
525 $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
526 $(if $(VBOX_WITH_VIDEOHWACCEL),VBOX_WITH_VIDEOHWACCEL,) \
527 $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP,) \
528 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,) \
529 $(if $(VBOX_WITH_USB),VBOX_WITH_USB,) \
530 $(if-expr defined(VBOX_WITH_EHCI) && defined(VBOX_WITH_USB),VBOX_WITH_EHCI,) \
531 $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK,) \
532 $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH,) \
533 $(if $(VBOX_WITH_VPX),VBOX_WITH_VPX,)
534
535
536VBoxC_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE
537VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
538VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
539
540ifdef VBOX_WITH_VPX
541 VBoxC_SDKS = VBOX_LIBPNG VBOX_ZLIB VBOX_VPX
542else
543 VBoxC_SDKS = VBOX_LIBPNG VBOX_ZLIB
544endif
545
546VBoxC_INCS = \
547 include \
548 $(VBoxC_0_OUTDIR) \
549 $(dir $(VBOX_XML_SCHEMADEFS_H))
550VBoxC_INCS.win = \
551 $(VBoxCOM_0_OUTDIR) \
552 .
553
554VBoxC_LDFLAGS.darwin = \
555 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxC.dylib \
556 -exported_symbols_list $(VBoxC_0_OUTDIR)/VBoxC.def \
557 -framework IOKit
558VBoxC_LDFLAGS.win += /DELAYLOAD:VBoxVMM.dll /MANIFEST
559
560VBoxC_LIBS += \
561 $(LIB_VMM) \
562 $(LIB_REM)
563
564ifdef VBOX_WITH_NETFLT
565 VBoxC_LIBS.win += \
566 $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
567 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
568 $(PATH_STAGE_LIB)/WinNetConfig$(VBOX_SUFF_LIB) \
569 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
570 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib \
571 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
572endif
573
574ifdef VBOX_WITH_CROGL
575 VBoxC_LIBS += $(PATH_STAGE_LIB)/VBoxOGLTest$(VBOX_SUFF_LIB)
576 VBoxC_LDFLAGS.darwin += -framework OpenGL
577endif
578
579
580VBoxC_INTERMEDIATES = \
581 $(VBOX_MAIN_PREREQS) \
582 $(VBOX_XML_SCHEMADEFS_H) \
583 $(VBOX_AUTOGEN_EVENT_H)
584
585VBoxC_SOURCES = \
586 src-all/DisplayPNGUtil.cpp \
587 src-all/DisplayResampleImage.cpp \
588 src-all/DisplayUtils.cpp \
589 src-all/EventImpl.cpp \
590 src-all/Global.cpp \
591 src-all/HashedPw.cpp \
592 src-all/Logging.cpp \
593 src-all/PCIDeviceAttachmentImpl.cpp \
594 src-all/ProgressImpl.cpp \
595 src-all/SharedFolderImpl.cpp \
596 src-all/VirtualBoxBase.cpp \
597 src-all/VirtualBoxErrorInfoImpl.cpp \
598 $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
599 $(if $(VBOX_WITH_USB_VIDEO),src-client/UsbWebcamInterface.cpp,) \
600 $(if $(VBOX_WITH_USB_CARDREADER),src-client/UsbCardReader.cpp,) \
601 src-client/Nvram.cpp \
602 src-client/AdditionsFacilityImpl.cpp \
603 src-client/AudioSnifferInterface.cpp \
604 src-client/BusAssignmentManager.cpp \
605 $(if $(VBOX_WITH_PCI_PASSTHROUGH),src-client/PCIRawDevImpl.cpp,) \
606 src-client/ConsoleImpl.cpp \
607 src-client/ConsoleImpl2.cpp \
608 src-client/ConsoleImplTeleporter.cpp \
609 src-client/ConsoleVRDPServer.cpp \
610 src-client/DisplayImpl.cpp \
611 src-client/GuestImpl.cpp \
612 src-client/GuestDirectoryImpl.cpp \
613 src-client/GuestErrorInfoImpl.cpp \
614 src-client/GuestFileImpl.cpp \
615 src-client/GuestFsObjInfoImpl.cpp \
616 src-client/GuestProcessImpl.cpp \
617 src-client/GuestSessionImpl.cpp \
618 src-client/GuestCtrlImpl.cpp \
619 src-client/KeyboardImpl.cpp \
620 src-client/MachineDebuggerImpl.cpp \
621 src-client/MouseImpl.cpp \
622 src-client/RemoteUSBDeviceImpl.cpp \
623 src-client/SessionImpl.cpp \
624 src-client/USBDeviceImpl.cpp \
625 src-client/VBoxDriversRegister.cpp \
626 src-client/VirtualBoxClientImpl.cpp \
627 src-client/VMMDevInterface.cpp \
628 $(VBOX_AUTOGEN_EVENT_CPP) \
629 $(VBOX_XML_SCHEMADEFS_CPP)
630VBoxC_SOURCES.win = \
631 src-client/win/dllmain.cpp \
632 src-client/win/VBoxC.def \
633 src-client/win/VBoxC.rc
634
635ifdef VBOX_WITH_GUEST_CONTROL
636VBoxC_SOURCES += \
637 src-client/GuestSessionImplTasks.cpp \
638 src-client/GuestCtrlPrivate.cpp
639endif
640
641ifdef VBOX_WITH_DRAG_AND_DROP
642VBoxC_SOURCES += \
643 src-client/GuestDnDImpl.cpp
644endif
645
646ifdef VBOX_WITH_XPCOM
647VBoxC_SOURCES += \
648 src-client/xpcom/module.cpp
649endif
650
651ifdef VBOX_WITH_HGCM
652VBoxC_SOURCES += \
653 src-client/HGCMObjects.cpp \
654 src-client/HGCMThread.cpp \
655 src-client/HGCM.cpp
656endif
657
658ifdef VBOX_WITH_CRHGSMI
659VBoxC_DEFS += VBOX_WITH_CRHGSMI
660endif
661
662ifdef VBOX_WITH_USB
663VBoxC_SOURCES += \
664 src-client/RemoteUSBBackend.cpp
665endif
666
667ifdef VBOX_WITH_VPX
668VBoxC_SOURCES += \
669 src-client/EbmlWriter.cpp \
670 src-client/VideoRec.cpp
671endif
672
673ifdef VBOX_WITH_NETSHAPER
674VBoxC_DEFS += VBOX_WITH_NETSHAPER
675endif
676
677ifeq ($(KBUILD_TARGET),darwin)
678VBoxC_ORDERDEPS += $(VBoxC_0_OUTDIR)/VBoxC.def
679VBoxC_CLEAN += $(VBoxC_0_OUTDIR)/VBoxC.def
680$$(VBoxC_0_OUTDIR)/VBoxC.def: $(MAKEFILE_CURRENT)
681 $(RM) -f $@
682 $(APPEND) $@ _NSGetModule
683 $(APPEND) $@ _VBoxDriversRegister
684endif
685
686src-client/ConsoleImpl.cpp_DEFS = \
687 $(if $(VBOX_BLEEDING_EDGE),VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\",)
688
689
690src-client/win/VBoxC.rc_DEPS = $(VBoxC_0_OUTDIR)/VBoxC.rgs $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
691VBoxC_CLEAN.win += $(VBoxC_0_OUTDIR)/VBoxC.rgs
692
693$$(VBoxC_0_OUTDIR)/VBoxC.rgs: $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
694 $(VBOX_XSLTPROC) --stringparam Module VBoxC -o $@ $< $(VBOX_XIDL_FILE)
695
696
697#
698# VBoxCOM - COM Abstraction Layer library
699#
700LIBRARIES += VBoxCOM
701VBoxCOM_TEMPLATE = VBOXMAINLIB
702VBoxCOM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
703VBoxCOM_SOURCES = \
704 glue/com.cpp \
705 glue/initterm.cpp \
706 glue/string.cpp \
707 glue/AutoLock.cpp \
708 glue/EventQueue.cpp \
709 glue/ErrorInfo.cpp \
710 glue/errorprint.cpp
711VBoxCOM_INCS += \
712 include
713ifeq ($(KBUILD_TARGET),win)
714 VBoxCOM_DEFS.x86 += _WIN32_WINNT=0x0500
715 VBoxCOM_DEFS.amd64 += _WIN32_WINNT=0x0510
716 VBoxCOM_SOURCES += \
717 $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c
718else # !win
719 VBoxCOM_SOURCES += \
720 glue/xpcom/helpers.cpp
721endif # !win
722
723glue/com.cpp_DEFS = \
724 $(if $(VBOX_BLEEDING_EDGE),VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\",)
725
726
727#
728# The VBoxExtPackHelperApp.
729#
730ifdef VBOX_WITH_EXTPACK
731 PROGRAMS += VBoxExtPackHelperApp
732 VBoxExtPackHelperApp_TEMPLATE = VBoxR3SetUidToRoot
733 VBoxExtPackHelperApp_LDFLAGS.darwin = -framework Security
734 VBoxExtPackHelperApp_LDFLAGS.win = /SUBSYSTEM:windows
735 VBoxExtPackHelperApp_SOURCES = \
736 src-helper-apps/VBoxExtPackHelperApp.cpp \
737 src-all/ExtPackUtil.cpp
738 VBoxExtPackHelperApp_LIBS = \
739 $(LIB_RUNTIME)
740endif # VBOX_WITH_EXTPACK
741
742
743endif # !VBOX_ONLY_SDK (the ifndef is far above)
744
745
746#
747# Installs com related thing(s) to bin.
748#
749INSTALLS.win += VBoxMain-com-inst
750VBoxMain-com-inst_INST = $(INST_BIN)
751VBoxMain-com-inst_MODE = a+r,u+w
752VBoxMain-com-inst_SOURCES = src-all/win/comregister.cmd
753
754
755if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "linux"
756 #
757 # Installs linux/hardening related things to components.
758 #
759 INSTALLS.linux += VBoxMain-hardening-inst
760 VBoxMain-hardening-inst_INST = $(INST_BIN)components/
761 VBoxMain-hardening-inst_SYMLINKS = \
762 VBoxDDU.so=>../VBoxDDU.so \
763 VBoxREM.so=>../VBoxREM.so \
764 VBoxRT.so=>../VBoxRT.so \
765 VBoxVMM.so=>../VBoxVMM.so \
766 VBoxXPCOM.so=>../VBoxXPCOM.so
767endif
768
769
770# generate rules
771include $(FILE_KBUILD_SUB_FOOTER)
772
773
774
775#
776# Additions rules.
777#
778
779## @todo this hack ain't cutting it any longer. (the file name is abspath'ed since ages now.)
780glue/xpcom/helpers.cpp: $(VBOX_IDL_TYPELIB.XPCOM)
781
782$(VBOX_IDL_FILE.XPCOM): $(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
783 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
784 $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
785
786$(VBOX_IDL_TYPELIB.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
787 $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
788 $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m typelib -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
789 $(CHMOD) 0644 $@
790## @todo ^^^^^^^^^^^^ fix horrible hack
791
792$(VBOX_IDL_HEADER.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
793 $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
794 $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m header -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
795
796$(VBOX_IDL_FILE.MSCOM): $(VBOX_PATH_MAIN_SRC)/idl/midl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
797 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
798 $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
799
800# Aliases for testing purposes.
801ifdef VBOX_WITH_XPCOM
802testidl: $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM)
803testidlhdr: $(VBOX_IDL_HEADER.XPCOM)
804else
805testidl: $(VBOX_IDL_FILE.MSCOM) $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c
806endif
807
808
809$(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
810+ $(VBoxCOM_0_OUTDIR)/VirtualBox.h \
811+ $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
812 $(VBOX_WIN_MIDL) /nologo \
813 /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM_0_OUTDIR)) \
814 /cpp_cmd $(subst $(EXEC_X86_WIN32),,$(call VBOX_FN_MAKE_WIN_PATH,$(TOOL_$(VBOX_VCC_TOOL)_CC))) \
815 /I $(call VBOX_FN_MAKE_WIN_PATH,$(PATH_SDK_$(VBOX_WINPSDK)_INC)) \
816 /I idl \
817 $(call VBOX_FN_MAKE_WIN_PATH,$<)
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
834
835#
836# Java glue JAR files
837#
838VBOX_JMSCOM_JAR = $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar
839VBOX_JMSCOM_TARGET := $(PATH_TARGET)/vboxjmscom-gen
840VBOX_JMSCOM_GEN = $(VBOX_JMSCOM_TARGET)/jmscomgen
841VBOX_JMSCOM_JDEST := $(VBOX_JMSCOM_TARGET)/jdest
842VBOX_GLUE_XSLT_DIR := $(PATH_ROOT)/src/VBox/Main/glue
843VBOX_JACOB_DIR := $(PATH_ROOT)/src/libs/jacob-1.15-M3
844
845INSTALLS += VBoxJMscom-inst-jar
846VBoxJMscom-inst-jar_INST = $(INST_SDK)bindings/mscom/java/
847VBoxJMscom-inst-jar_MODE = a+r,u+w
848VBoxJMscom-inst-jar_SOURCES = \
849 $(VBOX_JMSCOM_JAR)
850VBoxJMscom-inst-jar_CLEAN = \
851 $(VBOX_JMSCOM_JAR) \
852 $(VBOX_JMSCOM_GEN)/jmscomglue.list \
853 $(wildcard \
854 $(VBOX_JMSCOM_GEN)/java/*.java \
855 $(VBOX_JMSCOM_JDEST)/*.class \
856 $(VBOX_JMSCOM_JDEST)/*/*.class \
857 $(VBOX_JMSCOM_JDEST)/*/*/*.class \
858 $(VBOX_JMSCOM_JDEST)/*/*/*/*.class \
859 )
860VBoxJMscom-inst-jar_BLDDIRS += $(VBOX_JMSCOM_GEN)/java
861
862$(VBOX_JMSCOM_GEN)/jmscomglue.list: \
863 $(VBOX_XIDL_FILE) \
864 $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl \
865 $(VBOX_FILESPLIT) \
866 | $(VBOX_JMSCOM_GEN)/java/
867 $(call MSG_L1,Generating Java MSCOM glue files from XIDL)
868 $(QUIET)$(RM) -f $(wildcard $(VBOX_JMSCOM_GEN)/java/*.java)
869 $(QUIET)$(VBOX_XSLTPROC) \
870 --stringparam G_vboxApiSuffix $(VBOX_API_SUFFIX) \
871 --stringparam G_vboxGlueStyle mscom \
872 --stringparam G_vboxDirPrefix "" \
873 -o $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl $<
874 $(QUIET)$(VBOX_FILESPLIT) $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_JMSCOM_GEN)/java
875 $(QUIET)echo $(VBOX_JMSCOM_GEN)/java/*.java > $@
876
877$$(VBOX_JMSCOM_JAR): $(VBOX_JMSCOM_GEN)/jmscomglue.list | $$(dir $$@)
878 $(call MSG_TOOL,javac,$(notdir $@),jmscomgen.list,)
879 $(QUIET)$(RM) -Rf $(VBOX_JMSCOM_JDEST)
880 $(QUIET)$(MKDIR) -p $(VBOX_JMSCOM_JDEST)
881 $(call MSG_TOOL,javac,$(notdir $@),...,)
882 $(VBOX_JAVAC) $(VBOX_JAVAC_OPTS) \
883 @$(VBOX_JMSCOM_GEN)/jmscomglue.list \
884 -d $(VBOX_JMSCOM_JDEST) -classpath $(VBOX_JMSCOM_JDEST)$(VBOX_SEP)$(VBOX_JACOB_DIR)/jacob.jar
885 $(call MSG_LINK,$(notdir $@),$@)
886 $(VBOX_JAR) cf $@ -C $(VBOX_JMSCOM_JDEST) .
887
888## @todo compile TestVBox.java (see below) to have sanity checking
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+r,u+w
898javagluesample_SOURCES = \
899 $(VBOX_PATH_MAIN_SRC)/glue/tests/TestVBox.java=>TestVBox.java \
900 $(VBOX_PATH_MAIN_SRC)/glue/tests/Makefile=>Makefile
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 $<
913
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