VirtualBox

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

Last change on this file since 47348 was 47018, checked in by vboxsync, 11 years ago

Main: re-commit r86967
Main/Network: DHCP server has got the ear in Main, and we able create/describe more complex infrostructures. DHCP server together with Lwip NAT can handle per vm/slot configuration and store them in xml settings.
place-holder: Host interface nameserver list, domain name and search strings, I suppose that this functions should be used on initialization stage and then on host configuration change even or directly from event.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 32.3 KB
Line 
1# $Id: Makefile.kmk 47018 2013-07-06 17:31:11Z 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# Generate library with API class wrappers from the XIDL file.
168#
169LIBRARIES += VBoxAPIWrap
170VBoxAPIWrap_TEMPLATE = VBOXMAINLIB
171VBoxAPIWrap_SOURCES = $(VBoxAPIWrap_GENERATEDCPP)
172VBoxAPIWrap_GENERATEDCPP = $(filter %.cpp,$(VBoxAPIWrap_GENERATEDSOURCES))
173VBoxAPIWrap_GENERATEDSOURCES = $(addprefix $(VBoxAPIWrap_0_OUTDIR)/,$(VBoxAPIWrap_VBOX_APIWRAPPERFILES))
174VBoxAPIWrap_RAWSRC = \
175 $(VBoxAPIWrap_0_OUTDIR)/apiwrappers
176VBoxAPIWrap_XSLT = \
177 $(VBOX_PATH_MAIN_SRC)/idl/apiwrap-server.xsl
178VBoxAPIWrap_DEFS.win.x86 += _WIN32_WINNT=0x0500
179VBoxAPIWrap_DEFS.win.amd64 += _WIN32_WINNT=0x0510
180VBoxAPIWrap_INCS += \
181 include
182VBoxAPIWrap_CLEAN = \
183 $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.cpp) \
184 $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.h) \
185 $(VBoxAPIWrap_RAWSRC)
186VBoxAPIWrap_KMK = $(PATH_OUT)/vboxapiwrap.kmk
187include $(VBoxAPIWrap_KMK)
188
189
190#
191# Some SDK bit.
192#
193INSTALLS += VBox-main-xidl
194VBox-main-xidl_INST = $(INST_SDK)bindings/
195VBox-main-xidl_MODE = a+r,u+w
196VBox-main-xidl_SOURCES = $(VBOX_XIDL_FILE_SRC)
197
198ifdef VBOX_WITH_PYTHON
199INSTALLS += VBox-python-glue
200VBox-python-glue_INST = $(INST_SDK)installer/vboxapi/
201VBox-python-glue_MODE = a+r,u+w
202VBox-python-glue_SOURCES = \
203 glue/vboxapi.py=>__init__.py \
204 $(VBox-python-glue_0_OUTDIR)/VirtualBox_constants.py
205VBox-python-glue_CLEAN = \
206 $(VBox-python-glue_0_OUTDIR)/VirtualBox_constants.py
207
208$$(VBox-python-glue_0_OUTDIR)/VirtualBox_constants.py: \
209 $(VBOX_PATH_MAIN_SRC)/glue/constants-python.xsl \
210 $(VBOX_XIDL_FILE) \
211 | $$(dir $$@)
212 $(call MSG_TOOL,xsltproc,Python constants,$<,$@)
213 $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
214
215endif # VBOX_WITH_PYTHON
216
217ifndef VBOX_ONLY_SDK # Note this goes on for *very* long
218
219#
220# Generate SchemaDefs.h and SchemaDefs.cpp from XML Schema
221# These two files are used by both VBoxC and VBoxSVC.
222#
223BLDDIRS += $(PATH_TARGET)/Main
224VBOX_XML_SCHEMADEFS_H = $(PATH_TARGET)/Main/SchemaDefs.h
225VBOX_XML_SCHEMADEFS_CPP = $(PATH_TARGET)/Main/SchemaDefs.cpp
226VBOX_XML_SCHEMADEFS_XSL = $(VBOX_PATH_MAIN_SRC)/xml/SchemaDefs.xsl
227
228VBOX_AUTOGEN_EVENT_H = $(PATH_TARGET)/Main/VBoxEvents.h
229VBOX_AUTOGEN_EVENT_CPP = $(PATH_TARGET)/Main/VBoxEvents.cpp
230
231testschemadefs: $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
232
233
234#
235# VBoxSVC executable
236#
237PROGRAMS += VBoxSVC
238VBoxSVC_TEMPLATE = VBOXMAINEXE
239VBoxSVC_DEFS = \
240 VBOX_MAIN_SETTINGS_ADDONS \
241 IN_VMM_STATIC \
242 $(VBOX_MAIN_DEFS) \
243 $(if $(VBOX_WITH_VBOXSDL),VBOX_WITH_VBOXSDL,) \
244 $(if $(VBOX_WITH_HEADLESS),VBOX_WITH_HEADLESS,) \
245 $(if $(VBOX_WITH_QTGUI),VBOX_WITH_QTGUI,) \
246 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
247 $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
248 $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
249 $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
250 $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS,) \
251 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
252 $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
253 $(if $(VBOX_WITH_AHCI),VBOX_WITH_AHCI,) \
254 $(if $(VBOX_WITH_LSILOGIC),VBOX_WITH_LSILOGIC,) \
255 $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
256 $(if $(VBOX_WITH_RESOURCE_USAGE_API),VBOX_WITH_RESOURCE_USAGE_API,) \
257 $(if $(VBOX_WITH_PDM_ASYNC_COMPLETION),VBOX_WITH_PDM_ASYNC_COMPLETION,) \
258 $(if $(VBOX_WITH_DBUS),$(if $(VBOX_USB_WITH_DBUS),VBOX_USB_WITH_DBUS,),) \
259 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,) \
260 $(if $(VBOX_USB_WITH_INOTIFY),VBOX_USB_WITH_INOTIFY,) \
261 $(if $(VBOX_WITH_LIVE_MIGRATION),VBOX_WITH_LIVE_MIGRATION,) \
262 $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK,) \
263 $(if $(VBOX_WITH_VUSB),VBOX_WITH_VUSB,) \
264 $(if $(VBOX_WITH_S3),VBOX_WITH_S3,) \
265 $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH,) \
266 $(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE,)
267ifdef VBOX_WITH_USB
268 VBoxSVC_DEFS += \
269 VBOX_WITH_USB \
270 $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI,) \
271 $(if $(VBOX_WITH_NEW_USB_CODE_ON_DARWIN),VBOX_WITH_NEW_USB_CODE_ON_DARWIN,)
272endif
273VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
274VBoxSVC_DEFS.win += _WIN32_WINNT=0x0510
275# Try to load and use libhal at runtime for probing removable media
276# VBoxSVC_DEFS.linux += VBOX_USE_LIBHAL
277VBoxSVC_DEFS.solaris += VBOX_USE_LIBHAL
278VBoxSVC_DEFS.freebsd += VBOX_USE_LIBHAL
279
280VBoxSVC_CXXFLAGS = $(filter-out -Wno-unused,$(TEMPLATE_VBOXMAINEXE_CXXFLAGS))
281
282VBoxSVC_DEPS = $(filter %.h,$(VBoxAPIWrap_GENERATEDSOURCES))
283
284VBoxSVC_INCS = \
285 include \
286 $(VBoxSVC_0_OUTDIR) \
287 $(dir $(VBOX_XML_SCHEMADEFS_H)) \
288 $(VBoxAPIWrap_0_OUTDIR) \
289 .
290VBoxSVC_INCS.win = \
291 $(VBoxCOM_0_OUTDIR)
292ifdef VBOX_WITH_USB
293 VBoxSVC_INCS.os2 = \
294 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
295endif
296
297VBoxSVC_LIBS += \
298 $(PATH_STAGE_LIB)/VBoxAPIWrap$(VBOX_SUFF_LIB) \
299 $(PATH_STAGE_LIB)/SSMStandalone$(VBOX_SUFF_LIB) \
300 $(LIB_DDU)
301VBoxSVC_SDKS = VBOX_LIBPNG VBOX_ZLIB
302VBoxSVC_LIBS.solaris = \
303 adm \
304 nsl \
305 devinfo \
306 socket \
307 $(LIB_VMM)
308
309VBoxSVC_INTERMEDIATES = \
310 $(VBOX_MAIN_PREREQS) \
311 $(VBOX_XML_SCHEMADEFS_H) \
312 $(VBOX_AUTOGEN_EVENT_H)
313
314VBoxSVC_SOURCES = \
315 src-all/DisplayPNGUtil.cpp \
316 src-all/DisplayResampleImage.cpp \
317 src-all/DisplayUtils.cpp \
318 src-all/EventImpl.cpp \
319 src-all/Global.cpp \
320 src-all/HashedPw.cpp \
321 src-all/Logging.cpp \
322 src-all/PCIDeviceAttachmentImpl.cpp \
323 src-all/ProgressImpl.cpp \
324 src-all/SharedFolderImpl.cpp \
325 src-all/VirtualBoxBase.cpp \
326 src-all/VirtualBoxErrorInfoImpl.cpp \
327 $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
328 src-server/ApplianceImpl.cpp \
329 src-server/ApplianceImplExport.cpp \
330 src-server/ApplianceImplImport.cpp \
331 src-server/ApplianceImplIO.cpp \
332 src-server/AudioAdapterImpl.cpp \
333 src-server/BandwidthControlImpl.cpp \
334 src-server/BandwidthGroupImpl.cpp \
335 src-server/BIOSSettingsImpl.cpp \
336 src-server/DHCPServerImpl.cpp \
337 src-server/NetworkServiceRunner.cpp \
338 src-server/NATNetworkImpl.cpp \
339 src-server/GuestOSTypeImpl.cpp \
340 src-server/HostImpl.cpp \
341 src-server/HostNetworkInterfaceImpl.cpp \
342 src-server/HostPower.cpp \
343 src-server/MachineImpl.cpp \
344 src-server/MachineImplCloneVM.cpp \
345 src-server/Matching.cpp \
346 src-server/MediumAttachmentImpl.cpp \
347 src-server/MediumFormatImpl.cpp \
348 src-server/MediumImpl.cpp \
349 src-server/MediumLock.cpp \
350 src-server/NATEngineImpl.cpp \
351 src-server/NetworkAdapterImpl.cpp \
352 src-server/ParallelPortImpl.cpp \
353 src-server/ProgressProxyImpl.cpp \
354 src-server/SerialPortImpl.cpp \
355 src-server/SnapshotImpl.cpp \
356 src-server/StorageControllerImpl.cpp \
357 src-server/SystemPropertiesImpl.cpp \
358 src-server/USBControllerImpl.cpp \
359 src-server/VFSExplorerImpl.cpp \
360 src-server/VirtualBoxImpl.cpp \
361 src-server/VRDEServerImpl.cpp \
362 src-server/generic/AutostartDb-generic.cpp \
363 xml/ovfreader.cpp \
364 xml/Settings.cpp \
365 $(VBOX_XML_SCHEMADEFS_CPP) \
366 $(VBOX_AUTOGEN_EVENT_CPP) \
367 $(if $(VBOX_WITH_XPCOM),src-server/xpcom/server.cpp,)
368
369VBoxSVC_SOURCES.darwin = \
370 src-server/darwin/iokit.cpp \
371 src-server/darwin/HostPowerDarwin.cpp
372
373VBoxSVC_SOURCES.win = \
374 src-server/win/svcmain.cpp \
375 src-server/win/svchlp.cpp \
376 src-server/win/HostPowerWin.cpp \
377 src-server/win/VBoxSVC.rc \
378 src-server/win/VBoxComEvents.cpp
379
380VBoxSVC_SOURCES.linux = \
381 src-server/linux/HostHardwareLinux.cpp
382
383VBoxSVC_SOURCES.solaris = \
384 src-server/linux/vbox-libhal.cpp \
385 src-server/solaris/DynLoadLibSolaris.cpp
386
387VBoxSVC_SOURCES.freebsd = \
388 src-server/freebsd/HostHardwareFreeBSD.cpp
389
390
391ifdef VBOX_WITH_USB
392 ifdef VBOX_WITH_SYSFS_BY_DEFAULT
393 src-server/linux/USBProxyServiceLinux.cpp_DEFS += VBOX_WITH_SYSFS_BY_DEFAULT
394 endif
395 VBoxSVC_SOURCES += \
396 src-server/USBDeviceFilterImpl.cpp \
397 src-server/USBProxyService.cpp \
398 src-server/HostUSBDeviceImpl.cpp
399 VBoxSVC_SOURCES.darwin += src-server/darwin/USBProxyServiceDarwin.cpp
400 VBoxSVC_SOURCES.linux += src-server/linux/USBProxyServiceLinux.cpp
401 VBoxSVC_SOURCES.linux += src-server/linux/USBGetDevices.cpp
402 VBoxSVC_SOURCES.os2 += src-server/os2/USBProxyServiceOs2.cpp
403 VBoxSVC_SOURCES.solaris += src-server/solaris/USBProxyServiceSolaris.cpp
404 VBoxSVC_SOURCES.win += src-server/win/USBProxyServiceWindows.cpp
405 VBoxSVC_SOURCES.freebsd += src-server/freebsd/USBProxyServiceFreeBSD.cpp
406endif
407
408ifdef VBOX_WITH_NETFLT
409 VBoxSVC_LIBS.win += \
410 $(PATH_STAGE_LIB)/WinNetConfig$(VBOX_SUFF_LIB) \
411 $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
412 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
413 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
414 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
415endif
416VBoxSVC_LDFLAGS.darwin = -framework IOKit -framework SystemConfiguration
417
418ifdef VBOX_WITH_CROGL
419 VBoxSVC_LIBS += $(PATH_STAGE_LIB)/VBoxOGLTest$(VBOX_SUFF_LIB)
420 VBoxSVC_LDFLAGS.darwin += -framework OpenGL
421endif
422
423ifeq ($(KBUILD_TYPE),debug)
424 VBoxSVC_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
425endif
426
427ifdef VBOX_WITH_RESOURCE_USAGE_API
428 VBoxSVC_SOURCES += \
429 src-server/PerformanceImpl.cpp \
430 src-server/Performance.cpp
431 VBoxSVC_SOURCES.darwin += src-server/darwin/PerformanceDarwin.cpp
432 VBoxSVC_SOURCES.freebsd += src-server/freebsd/PerformanceFreeBSD.cpp
433 VBoxSVC_SOURCES.linux += src-server/linux/PerformanceLinux.cpp
434 VBoxSVC_SOURCES.os2 += src-server/os2/PerformanceOs2.cpp
435 VBoxSVC_SOURCES.solaris += src-server/solaris/PerformanceSolaris.cpp
436 VBoxSVC_SOURCES.win += src-server/win/PerformanceWin.cpp
437 VBoxSVC_LDFLAGS.darwin += -lproc
438 VBoxSVC_LDFLAGS.solaris += -lkstat -lnvpair
439 VBoxSVC_LDFLAGS.win += psapi.lib powrprof.lib
440endif
441
442ifdef VBOX_WITH_HOSTNETIF_API
443 VBoxSVC_SOURCES.win += src-server/win/NetIf-win.cpp
444 VBoxSVC_SOURCES.linux += src-server/linux/NetIf-linux.cpp
445 VBoxSVC_SOURCES.os2 += src-server/os2/NetIf-os2.cpp
446 VBoxSVC_SOURCES.darwin += src-server/darwin/NetIf-darwin.cpp
447 VBoxSVC_SOURCES.solaris += src-server/solaris/NetIf-solaris.cpp
448 VBoxSVC_SOURCES.freebsd += src-server/freebsd/NetIf-freebsd.cpp
449 VBoxSVC_DEFS += VBOX_WITH_HOSTNETIF_API
450 if1of ($(KBUILD_TARGET), linux darwin solaris freebsd)
451 VBoxSVC_SOURCES += src-server/generic/NetIf-generic.cpp
452 endif
453endif
454
455src-server/win/VBoxSVC.rc_INCS = $(VBoxSVC_0_OUTDIR)
456src-server/win/VBoxSVC.rc_DEPS = $(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs $(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc
457src-server/win/VBoxSVC.rc_CLEAN = $(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs $(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc
458
459$$(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$(@D))
460 $(APPEND) -t $@ '1 ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
461
462$$(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs: $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$(@D))
463 $(VBOX_XSLTPROC) --stringparam Module VBoxSVC -o $@ $< $(VBOX_XIDL_FILE)
464
465
466#
467# Embed some constraints from XML Schema file into VBoxSVC
468#
469VBOX_XML_SCHEMA = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings.xsd
470
471$(VBOX_XML_SCHEMADEFS_H): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA) | $$(dir $$@)
472 $(call MSG_GENERATE,SchemaDefs,$@,$<)
473 $(QUIET)$(VBOX_XSLTPROC) --stringparam mode declare -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA)
474
475$(VBOX_XML_SCHEMADEFS_CPP): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA) | $$(dir $$@)
476 $(call MSG_GENERATE,SchemaDefs,$@,$<)
477 $(QUIET)$(VBOX_XSLTPROC) --stringparam mode define -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA)
478
479testvalidsettings: $(VBOX_XML_SCHEMA)
480 xmllint --schema $< --noout $(HOME)/.VirtualBox/VirtualBox.xml
481 xmllint --schema $< --noout $(HOME)/.VirtualBox/Machines/*/*.xml
482 xmllint --schema $< --noout $(HOME)/.VirtualBox/Machines/*/*.vbox
483 xmllint --schema $< --noout $(HOME)/VirtualBox\ VMs/*/*.vbox
484
485OTHER_CLEAN += $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
486
487
488#
489# Generate some event stuff for VBoxSVC and VBoxC.
490#
491$(VBOX_AUTOGEN_EVENT_H): $(VBOX_PATH_MAIN_SRC)/idl/comimpl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
492 $(call MSG_TOOL,xsltproc,autogen events,$<,$@)
493 $(QUIET)$(VBOX_XSLTPROC) --stringparam G_kind VBoxEventHeader -o $@ $< $(VBOX_XIDL_FILE)
494
495$(VBOX_AUTOGEN_EVENT_CPP): $(VBOX_PATH_MAIN_SRC)/idl/comimpl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
496 $(call MSG_TOOL,xsltproc,autogen events,$<,$@)
497 $(QUIET)$(VBOX_XSLTPROC) --stringparam G_kind VBoxEvent -o $@ $< $(VBOX_XIDL_FILE)
498
499OTHER_CLEAN += $(VBOX_AUTOGEN_EVENT_H) $(VBOX_AUTOGEN_EVENT_CPP)
500
501ifdef VBOX_WITH_XPCOM
502#
503# VBoxSVCM - VBoxSVC wrapper module
504#
505DLLS += VBoxSVCM
506VBoxSVCM_TEMPLATE = VBOXMAINCOMP
507VBoxSVCM_DEFS = IN_RING3 $(VBOX_MAIN_DEFS)
508ifdef VBOX_WITH_HARDENING
509 VBoxSVCM_DEFS += VBOX_WITH_HARDENING
510endif
511VBoxSVCM_INCS = \
512 include \
513 $(VBoxC_0_OUTDIR) \
514 .
515VBoxSVCM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
516VBoxSVCM_SOURCES = \
517 src-server/xpcom/server_module.cpp
518VBoxSVCM_LDFLAGS.darwin = \
519 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxSVCM.dylib \
520 -exported_symbols_list $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
521 ifeq ($(KBUILD_TARGET),darwin)
522VBoxSVCM_ORDERDEPS += $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
523VBoxSVCM_CLEAN += $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
524$$(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def:
525 $(RM) -f $@
526 $(APPEND) $@ _NSGetModule
527 endif
528VBoxSVCM_INTERMEDIATES += $(VBOX_IDL_HEADER.XPCOM)
529endif # VBOX_WITH_XPCOM
530
531
532#
533# VBoxC module
534#
535DLLS += VBoxC
536VBoxC_TEMPLATE = VBOXMAINCOMP
537VBoxC_DEFS = \
538 IN_RING3 \
539 $(VBOX_MAIN_DEFS) \
540 VBOX_COM_INPROC \
541 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
542 $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
543 $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
544 $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
545 $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS,) \
546 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
547 $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
548 $(if $(VBOX_WITH_EFI),VBOX_WITH_EFI,) \
549 $(if $(VBOX_WITH_PDM_ASYNC_COMPLETION),VBOX_WITH_PDM_ASYNC_COMPLETION,) \
550 $(if $(VBOX_WITH_LIVE_MIGRATION),VBOX_WITH_LIVE_MIGRATION,) \
551 $(if $(VBOX_WITH_VUSB),VBOX_WITH_VUSB,) \
552 $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
553 $(if $(VBOX_WITH_VIDEOHWACCEL),VBOX_WITH_VIDEOHWACCEL,) \
554 $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP,) \
555 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,) \
556 $(if $(VBOX_WITH_USB),VBOX_WITH_USB,) \
557 $(if-expr defined(VBOX_WITH_EHCI) && defined(VBOX_WITH_USB),VBOX_WITH_EHCI,) \
558 $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK,) \
559 $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH,) \
560 $(if $(VBOX_WITH_VPX),VBOX_WITH_VPX,)
561
562
563VBoxC_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE
564VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
565VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
566
567VBoxC_SDKS = VBOX_LIBPNG VBOX_ZLIB
568ifdef VBOX_WITH_VPX
569 VBoxC_SDKS += VBOX_VPX
570endif
571
572VBoxC_DEPS = $(filter %.h,$(VBoxAPIWrap_GENERATEDSOURCES))
573
574VBoxC_INCS = \
575 include \
576 $(VBoxC_0_OUTDIR) \
577 $(VBoxAPIWrap_0_OUTDIR) \
578 $(dir $(VBOX_XML_SCHEMADEFS_H))
579VBoxC_INCS.win = \
580 $(VBoxCOM_0_OUTDIR) \
581 .
582
583VBoxC_LDFLAGS.darwin = \
584 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxC.dylib \
585 -exported_symbols_list $(VBoxC_0_OUTDIR)/VBoxC.def \
586 -framework IOKit
587VBoxC_LDFLAGS.win += /MANIFEST
588
589VBoxC_LIBS += \
590 $(if-expr "$(LIB_VMM)" == "$(VBOX_LIB_VMM_LAZY)",$(LIB_REM),) \
591 $(VBOX_LIB_VMM_LAZY)
592
593ifdef VBOX_WITH_NETFLT
594 VBoxC_LIBS.win += \
595 $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
596 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
597 $(PATH_STAGE_LIB)/WinNetConfig$(VBOX_SUFF_LIB) \
598 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
599 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib \
600 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
601endif
602
603ifdef VBOX_WITH_CROGL
604 VBoxC_LIBS += $(PATH_STAGE_LIB)/VBoxOGLTest$(VBOX_SUFF_LIB)
605 VBoxC_LDFLAGS.darwin += -framework OpenGL
606endif
607
608
609VBoxC_INTERMEDIATES = \
610 $(VBOX_MAIN_PREREQS) \
611 $(VBOX_XML_SCHEMADEFS_H) \
612 $(VBOX_AUTOGEN_EVENT_H)
613
614VBoxC_SOURCES = \
615 src-all/DisplayPNGUtil.cpp \
616 src-all/DisplayResampleImage.cpp \
617 src-all/DisplayUtils.cpp \
618 src-all/EventImpl.cpp \
619 src-all/Global.cpp \
620 src-all/HashedPw.cpp \
621 src-all/Logging.cpp \
622 src-all/PCIDeviceAttachmentImpl.cpp \
623 src-all/ProgressImpl.cpp \
624 src-all/SharedFolderImpl.cpp \
625 src-all/VirtualBoxBase.cpp \
626 src-all/VirtualBoxErrorInfoImpl.cpp \
627 $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
628 $(if $(VBOX_WITH_USB_VIDEO),src-client/UsbWebcamInterface.cpp,) \
629 $(if $(VBOX_WITH_USB_CARDREADER),src-client/UsbCardReader.cpp,) \
630 src-client/Nvram.cpp \
631 src-client/AdditionsFacilityImpl.cpp \
632 src-client/AudioSnifferInterface.cpp \
633 src-client/BusAssignmentManager.cpp \
634 $(if $(VBOX_WITH_PCI_PASSTHROUGH),src-client/PCIRawDevImpl.cpp,) \
635 src-client/ConsoleImpl.cpp \
636 src-client/ConsoleImpl2.cpp \
637 src-client/ConsoleImplTeleporter.cpp \
638 src-client/ConsoleVRDPServer.cpp \
639 src-client/DisplayImpl.cpp \
640 src-client/GuestImpl.cpp \
641 src-client/GuestDirectoryImpl.cpp \
642 src-client/GuestFileImpl.cpp \
643 src-client/GuestFsObjInfoImpl.cpp \
644 src-client/GuestProcessImpl.cpp \
645 src-client/GuestSessionImpl.cpp \
646 src-client/GuestCtrlImpl.cpp \
647 src-client/KeyboardImpl.cpp \
648 src-client/MachineDebuggerImpl.cpp \
649 src-client/MouseImpl.cpp \
650 src-client/RemoteUSBDeviceImpl.cpp \
651 src-client/SessionImpl.cpp \
652 src-client/USBDeviceImpl.cpp \
653 src-client/VBoxDriversRegister.cpp \
654 src-client/VirtualBoxClientImpl.cpp \
655 src-client/VMMDevInterface.cpp \
656 $(VBOX_AUTOGEN_EVENT_CPP) \
657 $(VBOX_XML_SCHEMADEFS_CPP)
658VBoxC_SOURCES.win = \
659 src-client/win/dllmain.cpp \
660 src-client/win/VBoxC.def \
661 src-client/win/VBoxC.rc
662
663ifdef VBOX_WITH_GUEST_CONTROL
664VBoxC_SOURCES += \
665 src-client/GuestSessionImplTasks.cpp \
666 src-client/GuestCtrlPrivate.cpp
667endif
668
669ifdef VBOX_WITH_DRAG_AND_DROP
670VBoxC_SOURCES += \
671 src-client/GuestDnDImpl.cpp
672endif
673
674ifdef VBOX_WITH_XPCOM
675VBoxC_SOURCES += \
676 src-client/xpcom/module.cpp
677endif
678
679ifdef VBOX_WITH_HGCM
680VBoxC_SOURCES += \
681 src-client/HGCMObjects.cpp \
682 src-client/HGCMThread.cpp \
683 src-client/HGCM.cpp
684endif
685
686ifdef VBOX_WITH_CRHGSMI
687VBoxC_DEFS += VBOX_WITH_CRHGSMI
688endif
689
690ifdef VBOX_WITH_USB
691VBoxC_SOURCES += \
692 src-client/RemoteUSBBackend.cpp
693endif
694
695ifdef VBOX_WITH_VPX
696VBoxC_SOURCES += \
697 src-client/EbmlWriter.cpp \
698 src-client/VideoRec.cpp
699endif
700
701ifdef VBOX_WITH_NETSHAPER
702VBoxC_DEFS += VBOX_WITH_NETSHAPER
703endif
704
705ifeq ($(KBUILD_TARGET),darwin)
706VBoxC_ORDERDEPS += $(VBoxC_0_OUTDIR)/VBoxC.def
707VBoxC_CLEAN += $(VBoxC_0_OUTDIR)/VBoxC.def
708$$(VBoxC_0_OUTDIR)/VBoxC.def: $(MAKEFILE_CURRENT)
709 $(RM) -f $@
710 $(APPEND) $@ _NSGetModule
711 $(APPEND) $@ _VBoxDriversRegister
712endif
713
714src-client/ConsoleImpl.cpp_DEFS = \
715 $(if $(VBOX_BLEEDING_EDGE),VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\",)
716
717
718src-client/win/VBoxC.rc_DEPS = $(VBoxC_0_OUTDIR)/VBoxC.rgs $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
719VBoxC_CLEAN.win += $(VBoxC_0_OUTDIR)/VBoxC.rgs
720
721$$(VBoxC_0_OUTDIR)/VBoxC.rgs: $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
722 $(VBOX_XSLTPROC) --stringparam Module VBoxC -o $@ $< $(VBOX_XIDL_FILE)
723
724
725#
726# VBoxCOM - COM Abstraction Layer library
727#
728LIBRARIES += VBoxCOM
729VBoxCOM_TEMPLATE = VBOXMAINLIB
730VBoxCOM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
731VBoxCOM_SOURCES = \
732 glue/com.cpp \
733 glue/initterm.cpp \
734 glue/string.cpp \
735 glue/AutoLock.cpp \
736 glue/EventQueue.cpp \
737 glue/NativeEventQueue.cpp \
738 glue/ErrorInfo.cpp \
739 glue/errorprint.cpp
740VBoxCOM_INCS += \
741 include
742ifeq ($(KBUILD_TARGET),win)
743 VBoxCOM_DEFS.x86 += _WIN32_WINNT=0x0500
744 VBoxCOM_DEFS.amd64 += _WIN32_WINNT=0x0510
745 VBoxCOM_SOURCES += \
746 $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c
747else # !win
748 VBoxCOM_SOURCES += \
749 glue/xpcom/helpers.cpp
750endif # !win
751
752glue/com.cpp_DEFS = \
753 $(if $(VBOX_BLEEDING_EDGE),VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\",)
754
755
756#
757# The VBoxExtPackHelperApp.
758#
759ifdef VBOX_WITH_EXTPACK
760 PROGRAMS += VBoxExtPackHelperApp
761 VBoxExtPackHelperApp_TEMPLATE = VBoxR3SetUidToRoot
762 VBoxExtPackHelperApp_LDFLAGS.darwin = -framework Security
763 VBoxExtPackHelperApp_LDFLAGS.win = /SUBSYSTEM:windows
764 VBoxExtPackHelperApp_SOURCES = \
765 src-helper-apps/VBoxExtPackHelperApp.cpp \
766 src-all/ExtPackUtil.cpp
767 VBoxExtPackHelperApp_LIBS = \
768 $(LIB_RUNTIME)
769endif # VBOX_WITH_EXTPACK
770
771
772endif # !VBOX_ONLY_SDK (the ifndef is far above)
773
774
775#
776# Installs com related thing(s) to bin.
777#
778INSTALLS.win += VBoxMain-com-inst
779VBoxMain-com-inst_INST = $(INST_BIN)
780VBoxMain-com-inst_MODE = a+r,u+w
781VBoxMain-com-inst_SOURCES = src-all/win/comregister.cmd
782
783
784if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "linux"
785 #
786 # Installs linux/hardening related things to components.
787 #
788 INSTALLS.linux += VBoxMain-hardening-inst
789 VBoxMain-hardening-inst_INST = $(INST_BIN)components/
790 VBoxMain-hardening-inst_SYMLINKS = \
791 VBoxDDU.so=>../VBoxDDU.so \
792 VBoxREM.so=>../VBoxREM.so \
793 VBoxRT.so=>../VBoxRT.so \
794 VBoxVMM.so=>../VBoxVMM.so \
795 VBoxXPCOM.so=>../VBoxXPCOM.so
796endif
797
798
799# generate rules
800include $(FILE_KBUILD_SUB_FOOTER)
801
802
803
804#
805# Additions rules.
806#
807
808## @todo this hack ain't cutting it any longer. (the file name is abspath'ed since ages now.)
809glue/xpcom/helpers.cpp: $(VBOX_IDL_TYPELIB.XPCOM)
810
811$(VBOX_IDL_FILE.XPCOM): $(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
812 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
813 $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
814
815$(VBOX_IDL_TYPELIB.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
816 $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
817 $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m typelib -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
818 $(CHMOD) 0644 $@
819## @todo ^^^^^^^^^^^^ fix horrible hack
820
821$(VBOX_IDL_HEADER.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
822 $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
823 $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m header -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
824
825$(VBOX_IDL_FILE.MSCOM): $(VBOX_PATH_MAIN_SRC)/idl/midl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
826 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
827 $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
828
829# Aliases for testing purposes.
830ifdef VBOX_WITH_XPCOM
831testidl: $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM)
832testidlhdr: $(VBOX_IDL_HEADER.XPCOM)
833else
834testidl: $(VBOX_IDL_FILE.MSCOM) $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c
835endif
836
837
838$(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
839+ $(VBoxCOM_0_OUTDIR)/VirtualBox.h \
840+ $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
841 $(VBOX_WIN_MIDL) /nologo \
842 /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM_0_OUTDIR)) \
843 /cpp_cmd $(subst $(EXEC_X86_WIN32),,$(call VBOX_FN_MAKE_WIN_PATH,$(TOOL_$(VBOX_VCC_TOOL)_CC))) \
844 /I $(call VBOX_FN_MAKE_WIN_PATH,$(PATH_SDK_$(VBOX_WINPSDK)_INC)) \
845 /I idl \
846 $(call VBOX_FN_MAKE_WIN_PATH,$<)
847
848#
849# Translation stuff
850#
851VBoxSVC_VBOX_HEADERS = \
852 include/collection.h \
853 include/MachineImpl.h
854VBoxSVC_VBOX_TRANSLATIONS = \
855 nls/VBoxSVC_de.ts
856
857VBoxC_VBOX_HEADERS = \
858 include/ConsoleImpl.h
859VBoxC_VBOX_TRANSLATIONS = \
860 nls/VBoxC_de.ts
861
862ifdef VBOX_WITH_JMSCOM
863
864#
865# Java glue JAR files
866#
867VBOX_JMSCOM_JAR = $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar
868VBOX_JMSCOM_TARGET := $(PATH_TARGET)/vboxjmscom-gen
869VBOX_JMSCOM_GEN = $(VBOX_JMSCOM_TARGET)/jmscomgen
870VBOX_JMSCOM_JDEST := $(VBOX_JMSCOM_TARGET)/jdest
871VBOX_GLUE_XSLT_DIR := $(PATH_ROOT)/src/VBox/Main/glue
872VBOX_JACOB_DIR := $(PATH_ROOT)/src/libs/jacob-1.15-M3
873
874INSTALLS += VBoxJMscom-inst-jar
875VBoxJMscom-inst-jar_INST = $(INST_SDK)bindings/mscom/java/
876VBoxJMscom-inst-jar_MODE = a+r,u+w
877VBoxJMscom-inst-jar_SOURCES = \
878 $(VBOX_JMSCOM_JAR)
879VBoxJMscom-inst-jar_CLEAN = \
880 $(VBOX_JMSCOM_JAR) \
881 $(VBOX_JMSCOM_GEN)/jmscomglue.list \
882 $(wildcard \
883 $(VBOX_JMSCOM_GEN)/java/*.java \
884 $(VBOX_JMSCOM_JDEST)/*.class \
885 $(VBOX_JMSCOM_JDEST)/*/*.class \
886 $(VBOX_JMSCOM_JDEST)/*/*/*.class \
887 $(VBOX_JMSCOM_JDEST)/*/*/*/*.class \
888 )
889VBoxJMscom-inst-jar_BLDDIRS += $(VBOX_JMSCOM_GEN)/java
890
891$(VBOX_JMSCOM_GEN)/jmscomglue.list: \
892 $(VBOX_XIDL_FILE) \
893 $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl \
894 $(VBOX_FILESPLIT) \
895 | $(VBOX_JMSCOM_GEN)/java/
896 $(call MSG_L1,Generating Java MSCOM glue files from XIDL)
897 $(QUIET)$(RM) -f $(wildcard $(VBOX_JMSCOM_GEN)/java/*.java)
898 $(QUIET)$(VBOX_XSLTPROC) \
899 --stringparam G_vboxApiSuffix $(VBOX_API_SUFFIX) \
900 --stringparam G_vboxGlueStyle mscom \
901 --stringparam G_vboxDirPrefix "" \
902 -o $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl $<
903 $(QUIET)$(VBOX_FILESPLIT) $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_JMSCOM_GEN)/java
904 $(QUIET)echo $(VBOX_JMSCOM_GEN)/java/*.java > $@
905
906$$(VBOX_JMSCOM_JAR): $(VBOX_JMSCOM_GEN)/jmscomglue.list | $$(dir $$@)
907 $(call MSG_TOOL,javac,$(notdir $@),jmscomgen.list,)
908 $(QUIET)$(RM) -Rf $(VBOX_JMSCOM_JDEST)
909 $(QUIET)$(MKDIR) -p $(VBOX_JMSCOM_JDEST)
910 $(call MSG_TOOL,javac,$(notdir $@),...,)
911 $(VBOX_JAVAC) $(VBOX_JAVAC_OPTS) \
912 @$(VBOX_JMSCOM_GEN)/jmscomglue.list \
913 -d $(VBOX_JMSCOM_JDEST) -classpath $(VBOX_JMSCOM_JDEST)$(VBOX_SEP)$(VBOX_JACOB_DIR)/jacob.jar
914 $(call MSG_LINK,$(notdir $@),$@)
915 $(VBOX_JAR) cf $@ -C $(VBOX_JMSCOM_JDEST) .
916
917## @todo compile TestVBox.java (see below) to have sanity checking
918
919endif # VBOX_WITH_JMSCOM
920
921#
922# Install Java glue sample code.
923#
924INSTALLS += javagluesample
925javagluesample_INST = $(INST_SDK)bindings/glue/java/
926javagluesample_MODE = a+r,u+w
927javagluesample_SOURCES = \
928 $(VBOX_PATH_MAIN_SRC)/glue/tests/TestVBox.java=>TestVBox.java \
929 $(VBOX_PATH_MAIN_SRC)/glue/tests/Makefile=>Makefile
930
931# moved those rules to the end so that VBoxAPIWrap_0_OUTDIR can be expanded without $$ trickery
932$(VBoxAPIWrap_RAWSRC) \
933+| $(VBoxAPIWrap_GENERATEDSOURCES): \
934 $(VBOX_XIDL_FILE) \
935 $(VBoxAPIWrap_XSLT) \
936 $(VBOX_FILESPLIT) \
937 | $$(dir $$@)
938 $(call MSG_L1,Generating C++ Server API wrapper files from XIDL)
939 $(QUIET)$(RM) -f $(filter-out $(VBoxAPIWrap_GENERATEDSOURCES),$(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.cpp) $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.h))
940 $(QUIET)$(VBOX_XSLTPROC) --stringparam filelistonly "" -o $@ $(VBoxAPIWrap_XSLT) $<
941 $(QUIET)$(VBOX_FILESPLIT) $@ $(VBoxAPIWrap_0_OUTDIR)
942
943$(VBoxAPIWrap_KMK).ts +| $(VBoxAPIWrap_KMK): $(VBOX_XIDL_FILE) $(VBoxAPIWrap_XSLT)
944 $(call MSG_GENERATE,,$(VBoxAPIWrap_KMK))
945 $(QUIET)$(RM) -f $@
946 $(QUIET)$(MKDIR) -p $(@D)
947 $(QUIET)$(VBOX_XSLTPROC) --stringparam filelistonly VBoxAPIWrap_VBOX_APIWRAPPERFILES -o $@ $(VBoxAPIWrap_XSLT) $<
948 $(QUIET)$(CP) --changed -fv $@ $(VBoxAPIWrap_KMK)
949
950updatenls::
951 $(VBOX_LUPDATE) $(VBoxSVC_SOURCES) $(VBoxSVC_VBOX_HEADERS) -ts $(VBoxSVC_VBOX_TRANSLATIONS)
952 $(VBOX_LUPDATE) $(VBoxC_SOURCES) $(VBoxC_VBOX_HEADERS) -ts $(VBoxC_VBOX_TRANSLATIONS)
953
954testconverter:: $(VBOX_USER_HOME)/VirtualBox.xml
955 $(call MSG_TOOL,xsltproc,Test Settings Converter,$<,$(VBOX_USER_HOME)/VirtualBox.xml.test)
956 $(QUIET)$(VBOX_XSLTPROC) -o $(VBOX_USER_HOME)/VirtualBox.xml.test xml/SettingsConverter.xsl $<
957
958testconverter2:: $(VBOX_USER_HOME)/Machines/dos/dos.xml
959 $(call MSG_TOOL,xsltproc,Test Settings Converter,$<,$<.test)
960 $(QUIET)$(VBOX_XSLTPROC) -o $<.test xml/SettingsConverter.xsl $<
961
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