VirtualBox

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

Last change on this file since 42699 was 42551, checked in by vboxsync, 12 years ago

Main: big API naming cleanup, use all caps acronyms everywhere, including SDK docs
Frontends/VBoxManage: implement guestcontrol execute for new API, disabled by default

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