VirtualBox

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

Last change on this file since 94657 was 94643, checked in by vboxsync, 3 years ago

Main/Update check: Big overhaul of the API and functionality.

  • Now uses VBOX_WITH_UPDATE_AGENT to entirely disable the feature (enabled by default).
  • Main: Uses new (more abstract) API as proposed in the latest UML docs.
  • Main: Added support for several events.
  • Main: Added support for update severities, order and dependencies (all optional).
  • Settings/XML: Now has own "Updates" branch to also cover other updatable components (later); not part of the system properties anymore.
  • Prepared for GuestAdditions and ExtPack updates.
  • FE/Qt: Adapted to new API.
  • FE/VBoxManage: Adapted to new API; uses more uniform (common) synopsis "modify" and "list" for modifying and listing (showing) update settings.
  • Docs: Fixed various typos, extended documentation.

Work in progress. bugref:7983

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 67.5 KB
Line 
1# $Id: Makefile.kmk 94643 2022-04-20 09:08:37Z vboxsync $
2## @file
3# Makefile for the VBox Main module.
4#
5
6#
7# Copyright (C) 2004-2022 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# Make sure our Config.kmk is included.
23#
24ifndef VBOX_MAIN_CONFIG_KMK_INCLUDED
25 include $(PATH_SUB_CURRENT)/Config.kmk
26endif
27
28#
29# Include sub-makefile(s).
30#
31ifndef VBOX_ONLY_EXTPACKS
32 ifdef VBOX_WITH_WEBSERVICES
33 include $(PATH_SUB_CURRENT)/webservice/Makefile.kmk
34 endif
35 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
36 include $(PATH_SUB_CURRENT)/cbinding/Makefile.kmk
37 include $(PATH_SUB_CURRENT)/UnattendedTemplates/Makefile.kmk
38 ifndef VBOX_ONLY_SDK
39 include $(PATH_SUB_CURRENT)/src-helper-apps/OpenGLTest/Makefile.kmk
40 endif
41 if defined(VBOX_WITH_OPEN_WATCOM) && defined(VBOX_WITH_UNATTENDED)
42 include $(PATH_SUB_CURRENT)/src-helper-apps/os2/Makefile.kmk
43 endif
44endif
45
46
47#
48# Targets and globals (bit of a mess...)
49#
50VBOX_PATH_MAIN_SRC := $(PATH_SUB_CURRENT)
51
52ifdef VBOX_ONLY_SDK
53 # HACK ALERT! VBoxCOM is skipped, but its output dir is referenced a lot. So, define it.
54 VBoxCOM_0_OUTDIR := $(call TARGET_PATH,VBoxCOM)
55 BLDDIRS += $(VBoxCOM_0_OUTDIR) $(PATH_STAGE_BIN)/components
56 ifndef TOOL_$(VBOX_VCC_TOOL)
57 include $(KBUILD_PATH)/tools/$(VBOX_VCC_TOOL).kmk # For the idl /cpp statement.
58 endif
59 ifndef SDK_$(VBOX_WINPSDK)
60 include $(KBUILD_PATH)/sdks/$(VBOX_WINPSDK).kmk
61 endif
62endif # !VBOX_ONLY_SDK
63
64
65## VBOX_MAIN_DEFS is used by VBoxC, VBoxClient-x86, VBoxSVC and VBoxSVCM, making
66# sure they all have the same set of features enabled.
67VBOX_MAIN_DEFS :=
68ifneq ($(KBUILD_TARGET),win)
69 ifndef VBOX_WITH_XPCOM
70$(error "VBox: VBOX_WITH_XPCOM isn't defined")
71 endif
72VBOX_MAIN_DEFS += VBOX_WITH_GENERIC_SESSION_WATCHER
73endif
74ifdef VBOX_WITH_AUDIO_ALSA
75VBOX_MAIN_DEFS += VBOX_WITH_AUDIO_ALSA
76endif
77ifdef VBOX_WITH_AUDIO_DEBUG
78VBOX_MAIN_DEFS += VBOX_WITH_AUDIO_DEBUG
79endif
80ifdef VBOX_WITH_AUDIO_OSS
81VBOX_MAIN_DEFS += VBOX_WITH_AUDIO_OSS
82endif
83ifdef VBOX_WITH_AUDIO_PULSE
84VBOX_MAIN_DEFS += VBOX_WITH_AUDIO_PULSE
85endif
86ifdef VBOX_WITH_AUDIO_VALIDATIONKIT
87VBOX_MAIN_DEFS += VBOX_WITH_AUDIO_VALIDATIONKIT
88endif
89ifdef VBOX_WITH_AUDIO_VRDE
90VBOX_MAIN_DEFS += VBOX_WITH_AUDIO_VRDE
91endif
92ifdef VBOX_WITH_COPYTOGUEST
93VBOX_MAIN_DEFS += VBOX_WITH_COPYTOGUEST
94endif
95ifdef VBOX_WITH_E1000
96VBOX_MAIN_DEFS += VBOX_WITH_E1000
97endif
98ifdef VBOX_WITH_EXTPACK
99VBOX_MAIN_DEFS += VBOX_WITH_EXTPACK
100endif
101ifdef VBOX_WITH_GUEST_CONTROL
102VBOX_MAIN_DEFS += VBOX_WITH_GUEST_CONTROL
103endif
104ifdef VBOX_WITH_GUEST_PROPS
105VBOX_MAIN_DEFS += VBOX_WITH_GUEST_PROPS
106 ifdef VBOX_WITH_GUEST_PROPS_RDONLY_GUEST
107VBOX_MAIN_DEFS += VBOX_WITH_GUEST_PROPS_RDONLY_GUEST
108 endif
109endif
110ifdef VBOX_WITH_HGCM
111VBOX_MAIN_DEFS += VBOX_WITH_HGCM
112endif
113ifdef VBOX_WITH_HOSTNETIF_API
114VBOX_MAIN_DEFS += VBOX_WITH_HOSTNETIF_API
115endif
116ifdef VBOX_WITH_DHCPD
117VBOX_MAIN_DEFS += VBOX_WITH_DHCPD
118endif
119ifdef VBOX_WITH_LIVE_MIGRATION
120VBOX_MAIN_DEFS += VBOX_WITH_LIVE_MIGRATION
121endif
122ifdef VBOX_WITH_MIDL_PROXY_STUB
123VBOX_MAIN_DEFS += VBOX_WITH_MIDL_PROXY_STUB
124endif
125ifdef VBOX_WITH_NETFLT
126VBOX_MAIN_DEFS += VBOX_WITH_NETFLT
127endif
128if defined(VBOX_WITH_VMNET) && "$(KBUILD_TARGET)" == "darwin"
129VBOX_MAIN_DEFS += VBOX_WITH_VMNET
130endif
131ifdef VBOX_WITH_CLOUD_NET
132VBOX_MAIN_DEFS += VBOX_WITH_CLOUD_NET
133endif
134ifdef VBOX_WITH_PCI_PASSTHROUGH
135VBOX_MAIN_DEFS += VBOX_WITH_PCI_PASSTHROUGH
136endif
137ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
138VBOX_MAIN_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
139endif
140ifdef VBOX_WITH_SDS
141VBOX_MAIN_DEFS += VBOX_WITH_SDS
142endif
143ifdef VBOX_WITH_SHARED_CLIPBOARD
144VBOX_MAIN_DEFS += VBOX_WITH_SHARED_CLIPBOARD
145 ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
146 VBOX_MAIN_DEFS += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
147 endif
148endif
149ifdef VBOX_WITH_UPDATE_AGENT
150VBOX_MAIN_DEFS += VBOX_WITH_UPDATE_AGENT
151endif
152ifdef VBOX_WITH_USB_CARDREADER
153VBOX_MAIN_DEFS += VBOX_WITH_USB_CARDREADER
154endif
155ifdef VBOX_WITH_USB_CARDREADER_TEST
156VBOX_MAIN_DEFS += VBOX_WITH_USB_CARDREADER_TEST
157endif
158ifdef VBOX_WITH_VIRTIO
159VBOX_MAIN_DEFS += VBOX_WITH_VIRTIO
160endif
161ifdef VBOX_WITH_VIRTIO_1_0
162VBOX_MAIN_DEFS += VBOX_WITH_VIRTIO_1_0
163endif
164ifdef VBOX_WITH_VIRTIO_NET_1_0
165VBOX_MAIN_DEFS += VBOX_WITH_VIRTIO_NET_1_0
166endif
167ifdef VBOX_WITH_VMSVGA
168VBOX_MAIN_DEFS += VBOX_WITH_VMSVGA
169endif
170ifdef VBOX_WITH_VMSVGA3D
171VBOX_MAIN_DEFS += VBOX_WITH_VMSVGA3D
172endif
173ifdef VBOX_WITH_VUSB
174VBOX_MAIN_DEFS += VBOX_WITH_VUSB
175endif
176ifdef VBOX_WITH_EHCI
177 ifdef VBOX_WITH_USB
178 VBOX_MAIN_DEFS += VBOX_WITH_EHCI
179 endif
180endif
181ifdef VBOX_WITH_EFI_IN_DD2
182 VBOX_MAIN_DEFS += VBOX_WITH_EFI_IN_DD2
183endif
184ifdef VBOX_WITH_MAIN_NLS
185 VBOX_MAIN_DEFS += VBOX_WITH_MAIN_NLS
186endif
187# Unconditionally enable the new semaphore key generation code
188VBOX_MAIN_DEFS += VBOX_WITH_NEW_SYS_V_KEYGEN
189
190
191VBOX_IDL_FILE.MSCOM = $(VBOX_PATH_SDK)/bindings/mscom/idl/VirtualBox.idl
192VBOX_IDL_FILE.XPCOM = $(VBOX_PATH_SDK)/bindings/xpcom/idl/VirtualBox_XPCOM.idl
193
194VBOX_IDL_TYPELIB.XPCOM = $(PATH_STAGE_BIN)/components/VirtualBox_XPCOM.xpt
195VBOX_IDL_HEADER.XPCOM = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
196
197# The MS COM specific stuff.
198if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" == "win"
199 OTHERS += \
200 $(VBOX_IDL_FILE.MSCOM)
201 OTHER_CLEAN += \
202 $(VBOX_IDL_FILE.MSCOM)
203
204 INSTALLS += VBox-mscom-bindings-include VBox-mscom-bindings-lib
205 VBox-mscom-bindings-include_INST = $(INST_SDK)bindings/mscom/include/
206 VBox-mscom-bindings-include_MODE = a+r,u+w
207 VBox-mscom-bindings-include_SOURCES = $(VBoxCOM_0_OUTDIR)/VirtualBox.h
208 VBox-mscom-bindings-include_CLEAN = $(VBoxCOM_0_OUTDIR)/VirtualBox.h
209 VBox-mscom-bindings-lib_INST = $(INST_SDK)bindings/mscom/lib/
210 VBox-mscom-bindings-lib_MODE = a+r,u+w
211 VBox-mscom-bindings-lib_SOURCES = $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
212 $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
213 VBox-mscom-bindings-lib_CLEAN = $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
214 $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
215
216 BLDDIRS += $(VBOX_PATH_SDK)/bindings/mscom/idl
217endif
218
219# The XPCOM specific stuff.
220# if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" != "win" -- does not build on Windows
221if "$(KBUILD_TARGET)" != "win"
222 OTHERS += $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM) $(VBOX_IDL_HEADER.XPCOM)
223 OTHER_CLEAN += \
224 $(VBOX_IDL_FILE.XPCOM) \
225 $(VBOX_IDL_HEADER.XPCOM) \
226 $(VBOX_IDL_TYPELIB.XPCOM)
227
228 INSTALLS += VBox-xpcom-bindings-lib
229 VBox-xpcom-bindings-lib_INST = $(INST_SDK)bindings/xpcom/lib/
230 VBox-xpcom-bindings-lib_MODE = a+r,u+w
231 VBox-xpcom-bindings-lib_SOURCES = $(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c=>VirtualBox_i.c
232 VBox-xpcom-bindings-lib_CLEAN = $(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c
233
234 VBOX_MAIN_PREREQS += $(VBOX_IDL_TYPELIB.XPCOM) $(VBOX_IDL_HEADER.XPCOM)
235 BLDDIRS += \
236 $(VBOX_PATH_SDK)/bindings/xpcom/idl \
237 $(VBOX_PATH_SDK)/bindings/xpcom/include
238 # disable VBoxSDS for XPCOM
239 override VBOX_WITH_SDS =
240endif # xpcom
241
242
243#
244# Strip documentation from source XIDL so that we don't get a full
245# recompile every time a comma in the documentation is changed.
246#
247$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_XIDL_FILE).ts)
248$(VBOX_XIDL_FILE).ts +| $(VBOX_XIDL_FILE): \
249 $(VBOX_XIDL_FILE_SRC) \
250 $(VBOX_PATH_MAIN_SRC)/idl/docstrip.xsl \
251 | $$(dir $$@)
252 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
253 $(QUIET)$(VBOX_XSLTPROC) -o $(VBOX_XIDL_FILE).ts-tmp $(VBOX_PATH_MAIN_SRC)/idl/docstrip.xsl $(VBOX_XIDL_FILE_SRC)
254 $(QUIET)$(SED) -e 's/ *$(DOLLAR)//g' -e '/^$(DOLLAR)/d' --output $(VBOX_XIDL_FILE).ts $(VBOX_XIDL_FILE).ts-tmp
255 $(QUIET)$(RM) -- $(VBOX_XIDL_FILE).ts-tmp
256 $(QUIET)$(CP) --changed -fv -- $(VBOX_XIDL_FILE).ts $(VBOX_XIDL_FILE)
257
258OTHER_CLEAN += $(VBOX_XIDL_FILE) $(VBOX_XIDL_FILE).ts
259
260
261#
262# The Main API documentation
263#
264VBOX_MAIN_DOC_DIR = $(VBOX_PATH_SDK)/docs
265BLDDIRS += $(VBOX_MAIN_DOC_DIR)
266
267$(PATH_TARGET)/docs.Main: \
268 $(VBOX_PATH_MAIN_SRC)/Doxyfile.Main \
269 $(VBOX_PATH_MAIN_SRC)/idl/doxygen.xsl \
270 $(VBOX_XIDL_FILE_SRC) \
271 | $(PATH_TARGET)/ \
272 $(VBOX_MAIN_DOC_DIR)/
273 $(call MSG_TOOL,xsltproc,doxygen input,$<,$@)
274 $(QUIET)$(RM) -f $(wildcard $(VBOX_MAIN_DOC_DIR)/html/*) $(PATH_TARGET)/docs.Main
275 $(QUIET)$(VBOX_XSLTPROC) --path ".:$(PATH_ROOT)/doc/manual" -o $(PATH_TARGET)/VirtualBox.idl $(VBOX_PATH_MAIN_SRC)/idl/doxygen.xsl $(VBOX_XIDL_FILE_SRC)
276 $(QUIET)$(REDIRECT) -E 'DOCDIR=$(VBOX_MAIN_DOC_DIR)' -E 'PATH_TARGET=$(PATH_TARGET)' \
277 -- doxygen $(VBOX_PATH_MAIN_SRC)/Doxyfile.Main
278 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) ">>>>>>>>>>>>>>>>>>>> Main.err: >>>>>>>>>>>>>>>>>>>>>>>>"
279 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(CAT) "$(PATH_TARGET)/Main.err"
280 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "<<<<<<<<<<<<<<<<<<<< Main.err <<<<<<<<<<<<<<<<<<<<<<<<<"
281 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> **************************************************"
282 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> Please fix above doxygen errors/warnings listed in"
283 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> $(PATH_TARGET)/Main.err"
284 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> **************************************************"
285 $(APPEND) $(PATH_TARGET)/docs.Main
286# aliases
287docs.main docs.Main: $(PATH_TARGET)/docs.Main
288if !defined(VBOX_ONLY_DOCS) && defined(VBOX_WITH_ALL_DOXYGEN_TARGETS)
289docs: $(PATH_TARGET)/docs.Main
290else
291docs:
292endif
293
294
295ifndef VBOX_ONLY_SDK
296 #
297 # Generate library with API class wrappers from the XIDL file.
298 #
299 LIBRARIES += VBoxAPIWrap
300 VBoxAPIWrap_TEMPLATE = VBoxMainLib
301 ifeq ($(KBUILD_TARGET),win)
302 VBoxAPIWrap_USES = vccprecomp
303 VBoxAPIWrap_PCH_HDR := $(PATH_SUB_CURRENT)/src-all/win/VBoxAPIWrap-precomp_vcc.h
304 else if $(KBUILD_KMK_REVISION) >= 3256 && "$(KBUILD_TARGET)" != "darwin" && !defined(VBOX_WITHOUT_PRECOMPILED_HEADERS)
305 if $(VBOX_GCC_VERSION_CXX) >= 50000 # GCC 4.x runs into trouble compiling the header.
306VBoxAPIWrap_USES = gccprecomp
307VBoxAPIWrap_PCH_HDR := $(PATH_SUB_CURRENT)/src-all/xpcom/VBoxAPIWrap-precomp_gcc.h
308 endif
309 endif
310 VBoxAPIWrap_SOURCES = \
311 $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d \
312 $(if-expr defined(VBOX_ONLY_EXTPACKS) \
313 , $(addprefix $(VBoxAPIWrap_0_OUTDIR)/,$(filter \
314 Cloud%\
315 DataStreamWrap.cpp\
316 %FormValueWrap.cpp\
317 %FormWrap.cpp\
318 StringArrayWrap.cpp\
319 , $(notdir $(VBOX_MAIN_APIWRAPPER_GEN_SRCS)))) \
320 , $(VBOX_MAIN_APIWRAPPER_GEN_SRCS))
321 VBoxAPIWrap_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
322 VBoxAPIWrap_DEFS.win.x86 += _WIN32_WINNT=0x0500
323 VBoxAPIWrap_DEFS.win.amd64 += _WIN32_WINNT=0x0510
324 VBoxAPIWrap_INCS += \
325 include
326 if ("$(KBUILD_TARGET)" == "solaris" && $(VBOX_GCC_VERSION_CXX) >= 70000)
327 # Avoid too long symbol names with Solaris 11.4 "dtrace: failed to link script .../VBoxAPI.d: failed to allocate space for probe"
328 VBoxAPIWrap_CXXFLAGS.solaris += -freorder-blocks-algorithm=simple -fno-reorder-blocks-and-partition -fno-reorder-functions
329 endif
330 VBoxAPIWrap_CLEAN = \
331 $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.cpp) \
332 $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.h) \
333 $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d.ts \
334 $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d \
335 $(VBoxAPIWrap_0_OUTDIR)/apiwrappers-headers \
336 $(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-even \
337 $(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-odd
338
339 # Two VBox variables used here and/or in the rules generating wrappers.
340 VBoxAPIWrap_VBOX_XSLT = \
341 $(VBOX_PATH_MAIN_SRC)/idl/apiwrap-server.xsl
342
343
344 # This include file (generated at the bottom of this file), defines
345 # VBOX_MAIN_APIWRAPPER_GEN_SRCS and VBOX_MAIN_APIWRAPPER_GEN_HDRS.
346 VBoxAPIWrap_VBOX_KMK_FILE = $(PATH_OUT)/vboxapiwrap.kmk
347 include $(VBoxAPIWrap_VBOX_KMK_FILE)
348 OTHER_CLEAN += $(VBoxAPIWrap_VBOX_KMK_FILE) $(VBoxAPIWrap_VBOX_KMK_FILE).ts
349
350 ifdef VBOX_WITH_32_ON_64_MAIN_API
351 LIBRARIES += VBoxAPIWrap-x86
352 VBoxAPIWrap-x86_TEMPLATE = VBoxMainLib-x86
353 VBoxAPIWrap-x86_EXTENDS = VBoxAPIWrap
354 VBoxAPIWrap-x86_DTRACE_HDR_FLAGS = -32 # ugly, should be fixed in the tool in Config.kmk
355 ifeq ($(KBUILD_TARGET),win) ## @todo fix inheritance (fixed in r3253)
356 VBoxAPIWrap-x86_USES = vccprecomp
357 VBoxAPIWrap-x86_PCH_HDR := $(PATH_SUB_CURRENT)/src-all/win/VBoxAPIWrap-precomp_vcc.h
358 endif
359 endif
360
361endif # !VBOX_ONLY_SDK
362
363#
364# Some SDK bit.
365#
366INSTALLS += VBox-main-xidl
367VBox-main-xidl_INST = $(INST_SDK)bindings/
368VBox-main-xidl_MODE = a+r,u+w
369VBox-main-xidl_SOURCES = $(VBOX_XIDL_FILE_SRC)
370
371if defined(VBOX_WITH_PYTHON) && !defined(VBOX_ONLY_EXTPACKS)
372 INSTALLS += VBox-python-glue
373 VBox-python-glue_INST = $(INST_SDK)installer/vboxapi/
374 VBox-python-glue_MODE = a+r,u+w
375 VBox-python-glue_SOURCES = \
376 glue/vboxapi.py=>__init__.py \
377 $(VBox-python-glue_0_OUTDIR)/VirtualBox_constants.py
378 VBox-python-glue_CLEAN = \
379 $(VBox-python-glue_0_OUTDIR)/VirtualBox_constants.py \
380 $(VBox-python-glue_0_OUTDIR)/VirtualBox_constants_err_h_1.txt
381 $(call KB_FN_DO_PASS0_ON_TARGET,VBox-python-glue)
382 $(call KB_FN_AUTO_CMD_DEPS,$(VBox-python-glue_0_OUTDIR)/VirtualBox_constants.py)
383 $(VBox-python-glue_0_OUTDIR)/VirtualBox_constants.py \
384 + $(VBox-python-glue_0_OUTDIR)/VirtualBox_constants_err_h_1.txt: \
385 $(VBOX_PATH_MAIN_SRC)/glue/constants-python.xsl \
386 $(VBOX_PATH_MAIN_SRC)/glue/vbox-err-consts.sed \
387 $(PATH_ROOT)/include/iprt/err.h \
388 $(PATH_ROOT)/include/VBox/err.h \
389 $(VBOX_XIDL_FILE) \
390 | $$(dir $$@)
391 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
392 $(call MSG_TOOL,xsltproc,Python constants,$<,$@)
393 $(SED) -f $(VBOX_PATH_MAIN_SRC)/glue/vbox-err-consts.sed \
394 --output $(VBox-python-glue_0_OUTDIR)/VirtualBox_constants_err_h_1.txt \
395 $(PATH_ROOT)/include/iprt/err.h \
396 $(PATH_ROOT)/include/VBox/err.h
397 $(QUIET)$(VBOX_XSLTPROC) -o $@ \
398 --stringparam "g_sErrHFile" "$(VBox-python-glue_0_OUTDIR)/VirtualBox_constants_err_h_1.txt" \
399 $(VBOX_PATH_MAIN_SRC)/glue/constants-python.xsl $(VBOX_XIDL_FILE)
400endif # VBOX_WITH_PYTHON && !VBOX_ONLY_EXTPACKS
401
402if !defined(VBOX_ONLY_SDK) && !defined(VBOX_ONLY_EXTPACKS) # Note this goes on for *very* long
403
404#
405# Generate SchemaDefs.h and SchemaDefs.cpp from XML Schema
406# These two files are used by both VBoxC and VBoxSVC.
407#
408BLDDIRS += $(PATH_TARGET)/Main
409
410testschemadefs: $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
411
412
413#
414# Trust anchors and certificates -> .cpp
415#
416VBOX_SVC_CERTS_FILE = $(VBoxSVC_0_OUTDIR)/TrustAnchorsAndCerts.cpp
417VBOX_SVC_CERTS := \
418 UefiMicrosoftKek=MicCorKEKCA2011_2011-06-24.crt \
419 UefiMicrosoftCa=MicCorUEFCA2011_2011-06-27.crt \
420 UefiMicrosoftProPca=MicWinProPCA2011_2011-10-19.crt \
421 UefiOracleDefPk=OrclUefiDefPk2021_2021-09-29.crt
422
423VBOX_SVC_CERT_NAMES := $(foreach cert,$(VBOX_SVC_CERTS),$(firstword $(subst =,$(SPACE) ,$(cert))))
424VBOX_SVC_PATH_CERTIFICATES := $(PATH_SUB_CURRENT)/Certificates
425
426$$(VBOX_SVC_CERTS_FILE): $(MAKEFILE_CURRENT) \
427 $(foreach cert,$(VBOX_SVC_CERTS),$(VBOX_SVC_PATH_CERTIFICATES)/$(lastword $(subst =,$(SPACE) ,$(cert)))) \
428 $(VBOX_BIN2C) \
429 | $$(dir $$@)
430 $(QUIET)$(RM) -f -- $@
431 $(QUIET)$(APPEND) -n "$@" \
432 '' \
433 '#include "TrustAnchorsAndCerts.h"' \
434 ''
435 $(foreach cert,$(VBOX_SVC_CERTS), $(NLTAB)$(VBOX_BIN2C) -ascii --append \
436 "$(firstword $(subst =,$(SP) ,$(cert)))" \
437 "$(VBOX_SVC_PATH_CERTIFICATES)/$(lastword $(subst =,$(SP) ,$(cert)))" \
438 "$@")
439
440OTHER_CLEAN += $(VBOX_SVC_CERTS_FILE)
441
442tst-main-certificates: $(VBOX_SVC_CERTS_FILE)
443
444
445#
446# VBoxSDS executable
447#
448if defined(VBOX_WITH_SDS) && "$(KBUILD_TARGET)" == "win"
449PROGRAMS.win += VBoxSDS
450VBoxSDS_TEMPLATE = VBOXMAINEXE
451VBoxSDS_DEFS += VBOX_COM_OUTOFPROC_MODULE _WIN32_WINNT=0x0600
452 ifdef VBOX_WITH_VBOXSDL
453VBoxSDS_DEFS += VBOX_WITH_VBOXSDL
454 endif
455 ifdef VBOX_WITH_HEADLESS
456VBoxSDS_DEFS += VBOX_WITH_HEADLESS
457 endif
458 ifdef VBOX_WITH_QTGUI
459VBoxSDS_DEFS += VBOX_WITH_QTGUI
460 endif
461VBoxSDS_INCS = \
462 include \
463 $(VBoxSDS_0_OUTDIR) \
464 $(VBoxCOM_0_OUTDIR)
465VBoxSDS_INTERMEDIATES = \
466 $(VBOX_MAIN_PREREQS)
467VBoxSDS_SOURCES = \
468 src-global/win/VBoxSDS.cpp \
469 src-global/win/VirtualBoxSDSImpl.cpp \
470 src-global/win/VBoxSDS.rc \
471 src-all/MachineLaunchVMCommonWorker.cpp
472$(call KB_FN_DO_PASS0_ON_TARGET,VBoxSDS) # Sets VBoxSDS_0_OUTDIR
473
474src-global/win/VBoxSDS.rc_INCS = $(VBoxSDS_0_OUTDIR)
475src-global/win/VBoxSDS.rc_DEPS = $(VBoxSDS_0_OUTDIR)/VBoxSDS-icon.rc #$(VBoxSDS_0_OUTDIR)/VBoxSDS.rgs
476VBoxSDS_CLEAN = $(VBoxSDS_0_OUTDIR)/VBoxSDS-icon.rc #$(VBoxSDS_0_OUTDIR)/VBoxSDS.rgs
477
478$(call KB_FN_AUTO_CMD_DEPS,$(VBoxSDS_0_OUTDIR)/VBoxSDS-icon.rc)
479$(VBoxSDS_0_OUTDIR)/VBoxSDS-icon.rc: $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
480 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
481 $(APPEND) -t $@ '1 ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
482
483# $(call KB_FN_AUTO_CMD_DEPS,$(VBoxSDS_0_OUTDIR)/VBoxSDS.rgs)
484# $(VBoxSDS_0_OUTDIR)/VBoxSDS.rgs: $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
485# $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
486# $(VBOX_XSLTPROC) \
487# --stringparam Application "VirtualBox System" \
488# --stringparam Module VBoxSDS \
489# -o $@ \
490# $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl \
491# $(VBOX_XIDL_FILE)
492#
493endif #if defined(VBOX_WITH_SDS) && "$(KBUILD_TARGET)" == "win"
494
495#
496# VBoxSVC executable
497#
498PROGRAMS += VBoxSVC
499VBoxSVC_TEMPLATE = VBOXMAINEXE
500if defined(VBOX_WITH_PRECOMPILED_HEADERS) && "$(KBUILD_TARGET)" == "win"
501 VBoxSVC_USES += vccprecomp
502 VBoxSVC_PCH_HDR := $(PATH_SUB_CURRENT)/src-server/win/precomp_vcc.h
503else if $(KBUILD_KMK_REVISION) >= 3256 && "$(KBUILD_TARGET)" != "darwin" && !defined(VBOX_WITHOUT_PRECOMPILED_HEADERS)
504 if $(VBOX_GCC_VERSION_CXX) >= 50000 # GCC 4.x runs into trouble compiling the header.
505VBoxSVC_USES += gccprecomp
506VBoxSVC_PCH_HDR := $(PATH_SUB_CURRENT)/src-server/xpcom/precomp_gcc.h
507 endif
508endif
509VBoxSVC_DEFS = \
510 IN_VBOXSVC \
511 VBOX_MAIN_SETTINGS_ADDONS \
512 IN_VMM_STATIC \
513 $(VBOX_MAIN_DEFS) \
514 $(if $(VBOX_WITH_VBOXSDL),VBOX_WITH_VBOXSDL,) \
515 $(if $(VBOX_WITH_HEADLESS),VBOX_WITH_HEADLESS,) \
516 $(if $(VBOX_WITH_QTGUI),VBOX_WITH_QTGUI,) \
517 $(if $(VBOX_WITH_AHCI),VBOX_WITH_AHCI,) \
518 $(if $(VBOX_WITH_LSILOGIC),VBOX_WITH_LSILOGIC,) \
519 $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
520 $(if $(VBOX_WITH_RESOURCE_USAGE_API),VBOX_WITH_RESOURCE_USAGE_API,) \
521 $(if $(VBOX_WITH_UNATTENDED),VBOX_WITH_UNATTENDED,) \
522 $(if $(VBOX_WITH_DBUS),VBOX_WITH_DBUS,) \
523 $(if $(VBOX_WITH_DBUS),$(if $(VBOX_USB_WITH_DBUS),VBOX_USB_WITH_DBUS,),) \
524 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,) \
525 $(if $(VBOX_USB_WITH_INOTIFY),VBOX_USB_WITH_INOTIFY,) \
526 $(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE,) \
527 $(if $(VBOX_WITH_UPDATE_AGENT),VBOX_WITH_UPDATE_AGENT,) \
528 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
529 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,) \
530 $(if $(VBOX_WITH_TPM),VBOX_WITH_TPM,) \
531 $(if-expr defined(VBOX_WITH_SDS),VBOX_WITH_SDS,)
532ifdef VBOX_WITH_USB
533 VBoxSVC_DEFS += \
534 VBOX_WITH_USB \
535 $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI,) \
536 $(if $(VBOX_WITH_NEW_USB_CODE_ON_DARWIN),VBOX_WITH_NEW_USB_CODE_ON_DARWIN,)
537endif
538VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE _WIN32_WINNT=0x0600
539# Try to load and use libhal at runtime for probing removable media
540# VBoxSVC_DEFS.linux += VBOX_USE_LIBHAL
541VBoxSVC_DEFS.solaris += VBOX_USE_LIBHAL
542
543if $(KBUILD_TARGET) != "win" && $(VBOX_GCC_VERSION_CXX) >= 40900 # gcc 4.9.x (4.8.x is causing endless RT_ELEMENT trouble)
544 VBoxSVC_CXXFLAGS = -Wunused -Wconversion
545endif
546
547VBoxSVC_INCS = \
548 include \
549 $(VBoxSVC_0_OUTDIR) \
550 $(dir $(VBOX_XML_SCHEMADEFS_H)) \
551 $(VBOX_MAIN_APIWRAPPER_INCS) \
552 . \
553 $(VBOX_GRAPHICS_INCS)
554VBoxSVC_INCS.win = \
555 $(VBoxCOM_0_OUTDIR)
556ifdef VBOX_WITH_USB
557 VBoxSVC_INCS.os2 = \
558 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
559endif
560
561VBoxSVC_LIBS += \
562 $(PATH_STAGE_LIB)/VBoxAPIWrap$(VBOX_SUFF_LIB) \
563 $(PATH_STAGE_LIB)/SSMStandalone$(VBOX_SUFF_LIB) \
564 $(LIB_DDU)
565
566VBoxSVC_SDKS = VBOX_LIBPNG VBOX_ZLIB
567VBoxSVC_LIBS.solaris = \
568 adm \
569 nsl \
570 devinfo \
571 socket
572
573VBoxSVC_LIBS.win += \
574 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/dnsapi.lib
575
576VBoxSVC_INTERMEDIATES = \
577 $(VBOX_MAIN_PREREQS) \
578 $(VBOX_XML_SCHEMADEFS_H) \
579 $(VBOX_AUTOGEN_EVENT_H) \
580 $(VBOX_AUTOGEN_STRINGIFY_ENUMS_H) \
581 $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
582
583VBoxSVC_SOURCES = \
584 $(VBOX_SVC_CERTS_FILE) \
585 $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d \
586 src-all/AuthLibrary.cpp \
587 src-all/DisplayPNGUtil.cpp \
588 src-all/DisplayResampleImage.cpp \
589 src-all/DisplayUtils.cpp \
590 src-all/EventImpl.cpp \
591 src-all/Global.cpp \
592 src-all/GlobalStatusConversion.cpp \
593 src-all/HashedPw.cpp \
594 src-all/Logging.cpp \
595 src-all/NvramStoreImpl.cpp \
596 src-all/PCIDeviceAttachmentImpl.cpp \
597 src-all/ProgressImpl.cpp \
598 src-all/SecretKeyStore.cpp \
599 src-all/SharedFolderImpl.cpp \
600 src-all/AutoCaller.cpp \
601 src-all/ThreadTask.cpp \
602 src-all/VirtualBoxBase.cpp \
603 src-all/VirtualBoxErrorInfoImpl.cpp \
604 $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
605 src-server/CertificateImpl.cpp \
606 src-server/ApplianceImpl.cpp \
607 src-server/ApplianceImplExport.cpp \
608 src-server/ApplianceImplImport.cpp \
609 src-server/AudioAdapterImpl.cpp \
610 src-server/BandwidthControlImpl.cpp \
611 src-server/BandwidthGroupImpl.cpp \
612 src-server/BIOSSettingsImpl.cpp \
613 src-server/RecordingSettingsImpl.cpp \
614 src-server/RecordingScreenSettingsImpl.cpp \
615 src-server/GraphicsAdapterImpl.cpp \
616 src-server/ClientWatcher.cpp \
617 src-server/ClientToken.cpp \
618 src-server/CloudProviderManagerImpl.cpp \
619 src-server/CPUProfileImpl.cpp \
620 src-server/DataStreamImpl.cpp \
621 src-server/DHCPServerImpl.cpp \
622 src-server/DHCPConfigImpl.cpp \
623 ../NetworkServices/Dhcpd/DhcpOptions.cpp \
624 src-server/NetworkServiceRunner.cpp \
625 src-server/NATNetworkImpl.cpp \
626 $(if $(VBOX_WITH_CLOUD_NET), \
627 src-server/CloudNetworkImpl.cpp \
628 ,) \
629 src-server/GuestOSTypeImpl.cpp \
630 src-server/HostDnsService.cpp \
631 src-server/HostImpl.cpp \
632 src-server/HostNetworkInterfaceImpl.cpp \
633 src-server/HostPower.cpp \
634 $(if $(VBOX_WITH_UPDATE_AGENT),src-server/UpdateAgentImpl.cpp,) \
635 src-server/HostVideoInputDeviceImpl.cpp \
636 src-server/HostDrivePartitionImpl.cpp \
637 src-server/HostDriveImpl.cpp \
638 src-server/MachineImpl.cpp \
639 src-all/MachineLaunchVMCommonWorker.cpp \
640 src-server/MachineImplCloneVM.cpp \
641 src-server/MachineImplMoveVM.cpp \
642 src-server/Matching.cpp \
643 src-server/MediumAttachmentImpl.cpp \
644 src-server/MediumFormatImpl.cpp \
645 src-server/MediumImpl.cpp \
646 src-server/MediumLock.cpp \
647 src-server/MediumIOImpl.cpp \
648 src-server/NATEngineImpl.cpp \
649 src-server/NetworkAdapterImpl.cpp \
650 src-server/ParallelPortImpl.cpp \
651 src-server/ProgressProxyImpl.cpp \
652 src-server/SerialPortImpl.cpp \
653 src-server/SnapshotImpl.cpp \
654 src-server/StorageControllerImpl.cpp \
655 src-server/SystemPropertiesImpl.cpp \
656 src-server/TokenImpl.cpp \
657 src-server/TrustedPlatformModuleImpl.cpp \
658 src-server/UefiVariableStoreImpl.cpp \
659 $(if $(VBOX_WITH_UNATTENDED), \
660 src-server/UnattendedImpl.cpp \
661 src-server/UnattendedInstaller.cpp \
662 src-server/UnattendedOs2Installer.cpp \
663 src-server/UnattendedScript.cpp \
664 src-all/TextScript.cpp \
665 ,) \
666 src-server/USBControllerImpl.cpp \
667 src-server/USBDeviceFiltersImpl.cpp \
668 src-server/VFSExplorerImpl.cpp \
669 src-server/VirtualBoxImpl.cpp \
670 src-server/VRDEServerImpl.cpp \
671 src-server/generic/AutostartDb-generic.cpp \
672 xml/ovfreader.cpp \
673 xml/Settings.cpp \
674 $(VBOX_XML_SCHEMADEFS_CPP) \
675 $(VBOX_AUTOGEN_EVENT_CPP) \
676 $(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP) \
677 $(if $(VBOX_WITH_XPCOM),src-server/xpcom/server.cpp,)
678
679ifdef VBOX_WITH_MAIN_NLS
680VBoxSVC_SOURCES += \
681 src-all/VirtualBoxTranslator.cpp \
682 src-all/QMTranslatorImpl.cpp
683endif
684
685ifn1of ($(KBUILD_TARGET), win darwin)
686VBoxSVC_SOURCES += $(PATH_ROOT)/src/VBox/Devices/Network/slirp/resolv_conf_parser.c
687#$(PATH_ROOT)/src/VBox/Devices/Network/slirp/resolv_conf_parser.c_DEFS += LOG_GROUP=LOG_GROUP_MAIN
688endif
689
690VBoxSVC_SOURCES.darwin = \
691 src-server/darwin/iokit.cpp \
692 src-server/darwin/HostPowerDarwin.cpp \
693 src-server/darwin/HostDnsServiceDarwin.cpp
694ifdef VBOX_WITH_VMNET
695 VBoxSVC_SOURCES.darwin += \
696 src-server/HostOnlyNetworkImpl.cpp
697endif
698
699VBoxSVC_SOURCES.win = \
700 src-server/win/svcmain.cpp \
701 src-server/win/svchlp.cpp \
702 src-server/win/HostPowerWin.cpp \
703 src-server/win/VBoxSVC.rc \
704 src-server/win/HostDnsServiceWin.cpp
705
706VBoxSVC_SOURCES.linux = \
707 src-server/linux/HostHardwareLinux.cpp \
708 src-server/linux/HostDnsServiceLinux.cpp \
709 $(if $(VBOX_WITH_DBUS),src-server/linux/HostPowerLinux.cpp) \
710 src-server/HostDnsServiceResolvConf.cpp
711
712VBoxSVC_SOURCES.solaris = \
713 src-server/linux/vbox-libhal.cpp \
714 src-server/solaris/DynLoadLibSolaris.cpp \
715 src-server/HostDnsServiceResolvConf.cpp
716
717VBoxSVC_SOURCES.os2 = \
718 src-server/HostDnsServiceResolvConf.cpp
719
720VBoxSVC_SOURCES.freebsd = \
721 src-server/freebsd/HostHardwareFreeBSD.cpp \
722 src-server/HostDnsServiceResolvConf.cpp
723
724VBoxSVC_LDFLAGS.freebsd += -lcam
725
726
727ifdef VBOX_WITH_USB
728 ifdef VBOX_WITH_SYSFS_BY_DEFAULT
729 src-server/linux/USBProxyBackendLinux.cpp_DEFS += VBOX_WITH_SYSFS_BY_DEFAULT
730 endif
731 VBoxSVC_SOURCES += \
732 src-server/USBDeviceFilterImpl.cpp \
733 src-server/USBProxyService.cpp \
734 src-server/USBProxyBackend.cpp \
735 src-server/generic/USBProxyBackendUsbIp.cpp \
736 src-server/HostUSBDeviceImpl.cpp
737 VBoxSVC_SOURCES.darwin += src-server/darwin/USBProxyBackendDarwin.cpp
738 VBoxSVC_SOURCES.linux += src-server/linux/USBProxyBackendLinux.cpp
739 VBoxSVC_SOURCES.linux += src-server/linux/USBGetDevices.cpp
740 VBoxSVC_SOURCES.os2 += src-server/os2/USBProxyBackendOs2.cpp
741 VBoxSVC_SOURCES.solaris += src-server/solaris/USBProxyBackendSolaris.cpp
742 VBoxSVC_SOURCES.win += src-server/win/USBProxyBackendWindows.cpp
743 VBoxSVC_SOURCES.freebsd += src-server/freebsd/USBProxyBackendFreeBSD.cpp
744endif
745
746ifdef VBOX_WITH_NETFLT
747 VBoxSVC_SDKS.win += VBOX_WIN_NEWDEV
748 VBoxSVC_LIBS.win += \
749 $(PATH_STAGE_LIB)/WinNetConfigNonStatic$(VBOX_SUFF_LIB) \
750 $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
751 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
752 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
753endif
754VBoxSVC_LDFLAGS.darwin = -framework IOKit -framework SystemConfiguration
755
756ifdef VBOX_WITH_3D_ACCELERATION
757 VBoxSVC_DEFS += VBOX_WITH_3D_ACCELERATION
758 VBoxSVC_LIBS += $(PATH_STAGE_LIB)/VBoxOGLTest$(VBOX_SUFF_LIB)
759 VBoxSVC_LDFLAGS.darwin += -framework OpenGL
760endif
761
762ifeq ($(KBUILD_TYPE),debug)
763 VBoxSVC_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
764endif
765
766ifdef VBOX_WITH_RESOURCE_USAGE_API
767 VBoxSVC_SOURCES += \
768 src-server/PerformanceImpl.cpp \
769 src-server/Performance.cpp
770 VBoxSVC_SOURCES.darwin += src-server/darwin/PerformanceDarwin.cpp
771 VBoxSVC_SOURCES.freebsd += src-server/freebsd/PerformanceFreeBSD.cpp
772 VBoxSVC_SOURCES.linux += src-server/linux/PerformanceLinux.cpp
773 VBoxSVC_SOURCES.os2 += src-server/os2/PerformanceOs2.cpp
774 VBoxSVC_SOURCES.solaris += src-server/solaris/PerformanceSolaris.cpp
775 VBoxSVC_SOURCES.win += src-server/win/PerformanceWin.cpp
776 VBoxSVC_LDFLAGS.darwin += -lproc
777 VBoxSVC_LDFLAGS.solaris += -lkstat -lnvpair
778 VBoxSVC_LDFLAGS.win += psapi.lib powrprof.lib
779endif
780
781ifdef VBOX_WITH_HOSTNETIF_API
782 VBoxSVC_SOURCES.win += src-server/win/NetIf-win.cpp
783 VBoxSVC_SOURCES.linux += src-server/linux/NetIf-linux.cpp
784 VBoxSVC_SOURCES.os2 += src-server/os2/NetIf-os2.cpp
785 VBoxSVC_SOURCES.darwin += src-server/darwin/NetIf-darwin.cpp
786 VBoxSVC_SOURCES.solaris += src-server/solaris/NetIf-solaris.cpp
787 VBoxSVC_SOURCES.freebsd += src-server/freebsd/NetIf-freebsd.cpp
788 VBoxSVC_DEFS += VBOX_WITH_HOSTNETIF_API
789 if1of ($(KBUILD_TARGET), linux darwin solaris freebsd)
790 VBoxSVC_SOURCES += src-server/generic/NetIf-generic.cpp
791 endif
792endif
793
794$(call KB_FN_DO_PASS0_ON_TARGET,VBoxSVC) # Sets VBoxSVC_0_OUTDIR
795
796ifdef VBOX_WITH_MAIN_USB_ID_DATABASE # Generate a database of USB vendor IDs and device IDs.
797 VBoxSVC_DEFS += VBOX_WITH_MAIN_USB_ID_DATABASE
798 VBoxSVC_SOURCES += $(VBoxSVC_0_OUTDIR)/USBIdDatabase.cpp
799 VBoxSVC_CLEAN += $(VBoxSVC_0_OUTDIR)/USBIdDatabase.cpp
800
801 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxSVC_0_OUTDIR)/USBIdDatabase.cpp)
802 $(VBoxSVC_0_OUTDIR)/USBIdDatabase.cpp: $$(USBIdDatabaseGenerator_1_TARGET) \
803 $(PATH_SUB_CURRENT)/src-server/usb.ids $(PATH_SUB_CURRENT)/src-server/custom.ids | $$(dir $$@)
804 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
805 $(call MSG_GENERATE,USBIdDatabase,$@,$(USBIdDatabaseGenerator_1_TARGET))
806 $(QUIET)$(USBIdDatabaseGenerator_1_TARGET) -o "$@" $(filter %.ids,$^)
807
808 BLDPROGS += USBIdDatabaseGenerator
809 USBIdDatabaseGenerator_TEMPLATE = VBoxAdvBldProg
810 USBIdDatabaseGenerator_SOURCES = src-server/USBIdDatabaseGenerator.cpp
811else
812 VBoxSVC_SOURCES += src-server/USBIdDatabaseStub.cpp
813endif
814
815src-server/win/VBoxSVC.rc_INCS = $(VBoxSVC_0_OUTDIR)
816src-server/win/VBoxSVC.rc_DEPS = $(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc
817VBoxSVC_CLEAN += $(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc
818$(call KB_FN_AUTO_CMD_DEPS,$(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc)
819$(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc: $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
820 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
821 $(APPEND) -t $@ '1 ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
822
823ifndef VBOX_WITH_MIDL_PROXY_STUB
824 src-server/win/VBoxSVC.rc_DEPS += $(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs
825 VBoxSVC_CLEAN += $(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs
826 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs)
827 $(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs: $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
828 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
829 $(VBOX_XSLTPROC) \
830 --stringparam Application VirtualBox \
831 --stringparam Module VBoxSVC \
832 -o $@ \
833 $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl \
834 $(VBOX_XIDL_FILE)
835endif
836
837## @todo r=klaus unfortunately we don't have xmllint everywhere, would be
838# good to check the validity for every VirtualBox.xidl change.
839#$(VBOX_XIDL_FILE).validated.ts: $(VBOX_XIDL_FILE_SRC)
840# xmllint --dtdvalid $(VBOX_PATH_MAIN_SRC)/idl/VirtualBox.dtd --noout $<
841# $(QUIET)$(CP) --changed -fv $< $(VBOX_XIDL_FILE).validated.ts
842#
843#OTHERS += $(VBOX_XIDL_FILE).validated.ts
844#OTHER_CLEAN += $(VBOX_XIDL_FILE).validated.ts
845
846testvalidxidl: $(VBOX_XIDL_FILE_SRC)
847 xmllint --dtdvalid $(VBOX_PATH_MAIN_SRC)/idl/VirtualBox.dtd --noout $<
848
849
850#
851# Embed some constraints from XML Schema file into VBoxSVC
852#
853VBOX_XML_SCHEMA = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings.xsd
854
855$(VBOX_XML_SCHEMADEFS_H): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA) | $$(dir $$@)
856 $(call MSG_GENERATE,SchemaDefs,$@,$<)
857 $(QUIET)$(VBOX_XSLTPROC) --stringparam mode declare -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA)
858
859$(VBOX_XML_SCHEMADEFS_CPP): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA) | $$(dir $$@)
860 $(call MSG_GENERATE,SchemaDefs,$@,$<)
861 $(QUIET)$(VBOX_XSLTPROC) --stringparam mode define -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA)
862
863testvalidsettings: $(VBOX_XML_SCHEMA)
864 xmllint --schema $< --noout $(HOME)/.VirtualBox/VirtualBox.xml
865 xmllint --schema $< --noout $(HOME)/.VirtualBox/Machines/*/*.xml
866 xmllint --schema $< --noout $(HOME)/.VirtualBox/Machines/*/*.vbox
867 xmllint --schema $< --noout $(HOME)/VirtualBox\ VMs/*/*.vbox
868
869OTHER_CLEAN += $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
870
871
872#
873# Generate some event stuff for VBoxSVC and VBoxC.
874#
875
876# Events
877$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_AUTOGEN_EVENT_H).ts)
878$(VBOX_AUTOGEN_EVENT_H).ts +| $(VBOX_AUTOGEN_EVENT_H): $(VBOX_PATH_MAIN_SRC)/idl/comimpl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
879 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
880 $(call MSG_TOOL,xsltproc,autogen events,$<,$@)
881 $(QUIET)$(VBOX_XSLTPROC) --stringparam G_kind VBoxEventHeader -o "$@" "$(VBOX_PATH_MAIN_SRC)/idl/comimpl.xsl" "$(VBOX_XIDL_FILE)"
882 $(QUIET)$(CP) --changed -fv -- "$@" "$(VBOX_AUTOGEN_EVENT_H)"
883
884$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_AUTOGEN_EVENT_CPP).ts)
885$(VBOX_AUTOGEN_EVENT_CPP).ts +| $(VBOX_AUTOGEN_EVENT_CPP): $(VBOX_PATH_MAIN_SRC)/idl/comimpl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
886 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
887 $(call MSG_TOOL,xsltproc,autogen events,$<,$@)
888 $(QUIET)$(VBOX_XSLTPROC) --stringparam G_kind VBoxEvent -o "$@" "$(VBOX_PATH_MAIN_SRC)/idl/comimpl.xsl" "$(VBOX_XIDL_FILE)"
889 $(QUIET)$(CP) --changed -fv -- "$@" "$(VBOX_AUTOGEN_EVENT_CPP)"
890
891OTHER_CLEAN += $(VBOX_AUTOGEN_EVENT_H).ts $(VBOX_AUTOGEN_EVENT_H) $(VBOX_AUTOGEN_EVENT_CPP).ts $(VBOX_AUTOGEN_EVENT_CPP)
892
893# Enum stringifiers
894$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_AUTOGEN_STRINGIFY_ENUMS_H).ts)
895$(VBOX_AUTOGEN_STRINGIFY_ENUMS_H).ts +| $(VBOX_AUTOGEN_STRINGIFY_ENUMS_H): $(VBOX_PATH_MAIN_SRC)/idl/stringify-enums.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
896 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
897 $(call MSG_TOOL,xsltproc,autogen enum stringifiers,$<,$@)
898 $(QUIET)$(VBOX_XSLTPROC) --stringparam G_kind header -o "$@" "$(VBOX_PATH_MAIN_SRC)/idl/stringify-enums.xsl" "$(VBOX_XIDL_FILE)"
899 $(QUIET)$(CP) --changed -fv -- "$@" "$(VBOX_AUTOGEN_STRINGIFY_ENUMS_H)"
900
901$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP).ts)
902$(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP).ts +| $(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP): $(VBOX_PATH_MAIN_SRC)/idl/stringify-enums.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
903 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
904 $(call MSG_TOOL,xsltproc,autogen enum stringifiers,$<,$@)
905 $(QUIET)$(VBOX_XSLTPROC) --stringparam G_kind source -o "$@" "$(VBOX_PATH_MAIN_SRC)/idl/stringify-enums.xsl" "$(VBOX_XIDL_FILE)"
906 $(QUIET)$(CP) --changed -fv -- "$@" "$(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP)"
907
908OTHER_CLEAN += $(VBOX_AUTOGEN_STRINGIFY_ENUMS_H).ts $(VBOX_AUTOGEN_STRINGIFY_ENUMS_H) $(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP).ts $(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP)
909
910ifdef VBOX_WITH_XPCOM
911#
912# VBoxSVCM - VBoxSVC wrapper module
913#
914DLLS += VBoxSVCM
915VBoxSVCM_TEMPLATE = VBOXMAINCOMP
916VBoxSVCM_DEFS = IN_RING3 $(VBOX_MAIN_DEFS)
917 ifdef VBOX_WITH_HARDENING
918VBoxSVCM_DEFS += VBOX_WITH_HARDENING
919 endif
920VBoxSVCM_INCS = \
921 include \
922 $(VBoxC_0_OUTDIR) \
923 .
924VBoxSVCM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
925VBoxSVCM_SOURCES = \
926 src-server/xpcom/server_module.cpp
927VBoxSVCM_LDFLAGS.darwin = \
928 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxSVCM.dylib \
929 -exported_symbols_list $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
930 ifeq ($(KBUILD_TARGET),darwin)
931VBoxSVCM_ORDERDEPS += $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
932VBoxSVCM_CLEAN += $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
933$$(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def:
934 $(RM) -f $@
935 $(APPEND) $@ _NSGetModule
936 endif
937VBoxSVCM_INTERMEDIATES += $(VBOX_IDL_HEADER.XPCOM)
938
939 # 32-bit version of the module.
940 ifdef VBOX_WITH_32_ON_64_MAIN_API
941DLLS += VBoxSVCM-x86
942VBoxSVCM-x86_TEMPLATE = VBoxMainComp-x86
943VBoxSVCM-x86_EXTENDS = VBoxSVCM
944 endif
945
946endif # VBOX_WITH_XPCOM
947
948
949#
950# VBoxC module
951#
952DLLS += VBoxC
953VBoxC_TEMPLATE = VBOXMAINCOMP
954if defined(VBOX_WITH_PRECOMPILED_HEADERS) && "$(KBUILD_TARGET)" == "win"
955 VBoxC_USES = vccprecomp
956 VBoxC_PCH_HDR := $(PATH_SUB_CURRENT)/src-client/win/precomp_vcc.h
957else if $(KBUILD_KMK_REVISION) >= 3256 && "$(KBUILD_TARGET)" != "darwin" && !defined(VBOX_WITHOUT_PRECOMPILED_HEADERS)
958 if $(VBOX_GCC_VERSION_CXX) >= 50000 # GCC 4.x runs into trouble compiling the header.
959VBoxC_USES += gccprecomp
960VBoxC_PCH_HDR := $(PATH_SUB_CURRENT)/src-client/xpcom/precomp_gcc.h
961 endif
962endif
963VBoxC_DEFS = \
964 IN_RING3 \
965 $(VBOX_MAIN_DEFS) \
966 VBOX_COM_INPROC \
967 $(if $(VBOX_WITH_EFI),VBOX_WITH_EFI,) \
968 $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
969 $(if $(VBOX_WITH_VIDEOHWACCEL),VBOX_WITH_VIDEOHWACCEL,) \
970 $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP,) \
971 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,) \
972 $(if $(VBOX_WITH_USB),VBOX_WITH_USB,) \
973 $(if $(VBOX_WITH_VRDEAUTH_IN_VBOXSVC),VBOX_WITH_VRDEAUTH_IN_VBOXSVC,) \
974 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
975 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,) \
976 $(if $(VBOX_WITH_TPM),VBOX_WITH_TPM,)
977ifdef VBOX_WITH_NETSHAPER
978 VBoxC_DEFS += VBOX_WITH_NETSHAPER
979endif
980VBoxC_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE
981VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
982VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
983
984if $(KBUILD_TARGET) != "win" && $(VBOX_GCC_VERSION_CXX) >= 40900 # gcc 4.9.x (4.8.x is causing endless RT_ELEMENT trouble)
985# VBoxC_CXXFLAGS = -Wunused -Wconversion
986endif
987
988VBoxC_SDKS = VBOX_LIBPNG VBOX_ZLIB
989
990if defined(VBOX_WITH_RECORDING) && defined(VBOX_WITH_LIBVPX)
991VBoxC_SDKS += VBOX_VPX
992VBoxC_DEFS += VBOX_WITH_RECORDING VBOX_WITH_LIBVPX
993VBoxC_SOURCES += \
994 xml/Settings.cpp \
995 src-client/EBMLWriter.cpp \
996 src-client/WebMWriter.cpp \
997 src-client/Recording.cpp \
998 src-client/RecordingInternals.cpp \
999 src-client/RecordingStream.cpp \
1000 src-client/RecordingUtils.cpp
1001
1002 if defined(VBOX_WITH_AUDIO_RECORDING) && defined(VBOX_WITH_LIBOPUS)
1003VBoxC_SDKS += VBOX_OPUS
1004VBoxC_DEFS += VBOX_WITH_AUDIO_RECORDING VBOX_WITH_LIBOPUS
1005VBoxC_SOURCES += src-client/DrvAudioRec.cpp
1006 endif
1007endif # VBOX_WITH_RECORDING && VBOX_WITH_LIBVPX
1008
1009ifdef VBOX_WITH_OPENSSL_FIPS
1010VBoxC_SDKS += VBOX_OPENSSL2
1011endif
1012
1013VBoxC_INCS = \
1014 include \
1015 $(VBoxC_0_OUTDIR) \
1016 $(VBOX_MAIN_APIWRAPPER_INCS) \
1017 $(dir $(VBOX_XML_SCHEMADEFS_H)) \
1018 $(VBOX_MAIN_APIWRAPPER_DIR)/dtrace \
1019 $(VBOX_GRAPHICS_INCS)
1020VBoxC_INCS.win = \
1021 $(VBoxCOM_0_OUTDIR) \
1022 .
1023
1024VBoxC_LDFLAGS.darwin = \
1025 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxC.dylib \
1026 -exported_symbols_list $(VBoxC_0_OUTDIR)/VBoxC.def \
1027 -framework IOKit
1028VBoxC_LDFLAGS.win += /MANIFEST \
1029 /DELAYLOAD:user32.dll
1030
1031
1032VBoxC_LIBS += \
1033 $(PATH_STAGE_LIB)/VBoxAPIWrap$(VBOX_SUFF_LIB)
1034VBoxC_LIBS.win += \
1035 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/psapi.lib \
1036 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
1037ifdef VBOX_WITH_NETFLT
1038 VBoxC_SDKS.win += VBOX_WIN_NEWDEV
1039 VBoxC_LIBS.win += \
1040 $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
1041 $(PATH_STAGE_LIB)/WinNetConfigNonStatic$(VBOX_SUFF_LIB) \
1042 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
1043 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
1044 VBoxC_LDFLAGS.win += \
1045 /DELAYLOAD:newdev.dll \
1046 /DELAYLOAD:setupapi.dll \
1047 /DELAYLOAD:iphlpapi.dll
1048endif
1049
1050ifdef VBOX_WITH_DRAG_AND_DROP
1051 VBoxC_LIBS += $(PATH_STAGE_LIB)/VBoxDnDHostR3Lib$(VBOX_SUFF_LIB)
1052endif
1053
1054VBoxC_INTERMEDIATES = \
1055 $(VBOX_MAIN_PREREQS) \
1056 $(VBOX_XML_SCHEMADEFS_H) \
1057 $(VBOX_AUTOGEN_EVENT_H) \
1058 $(VBOX_AUTOGEN_STRINGIFY_ENUMS_H) \
1059 $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
1060
1061VBoxC_SOURCES += \
1062 $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d \
1063 src-all/DisplayPNGUtil.cpp \
1064 src-all/DisplayResampleImage.cpp \
1065 src-all/EventImpl.cpp \
1066 src-all/Global.cpp \
1067 src-all/GlobalStatusConversion.cpp \
1068 src-all/HashedPw.cpp \
1069 src-all/Logging.cpp \
1070 src-all/NvramStoreImpl.cpp \
1071 src-all/PCIDeviceAttachmentImpl.cpp \
1072 src-all/ProgressImpl.cpp \
1073 src-all/SecretKeyStore.cpp \
1074 src-all/SharedFolderImpl.cpp \
1075 src-all/AutoCaller.cpp \
1076 src-all/ThreadTask.cpp \
1077 src-all/VirtualBoxBase.cpp \
1078 src-all/VirtualBoxErrorInfoImpl.cpp \
1079 $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
1080 src-client/UsbWebcamInterface.cpp \
1081 $(if $(VBOX_WITH_USB_CARDREADER),src-client/UsbCardReader.cpp,) \
1082 src-client/AdditionsFacilityImpl.cpp \
1083 src-client/BusAssignmentManager.cpp \
1084 $(if $(VBOX_WITH_PCI_PASSTHROUGH),src-client/PCIRawDevImpl.cpp,) \
1085 src-client/ClientTokenHolder.cpp \
1086 src-client/ConsoleImpl.cpp \
1087 src-client/ConsoleImpl2.cpp \
1088 src-client/ConsoleImplTeleporter.cpp \
1089 src-client/ConsoleVRDPServer.cpp \
1090 src-client/DisplayImpl.cpp \
1091 src-client/DisplayImplLegacy.cpp \
1092 src-client/DisplaySourceBitmapImpl.cpp \
1093 src-client/EmulatedUSBImpl.cpp \
1094 src-client/GuestImpl.cpp \
1095 src-client/GuestCtrlImpl.cpp \
1096 src-client/KeyboardImpl.cpp \
1097 src-client/MachineDebuggerImpl.cpp \
1098 src-client/MouseImpl.cpp \
1099 src-client/RemoteUSBDeviceImpl.cpp \
1100 src-client/SessionImpl.cpp \
1101 src-client/USBDeviceImpl.cpp \
1102 src-client/VBoxDriversRegister.cpp \
1103 src-client/VirtualBoxClientImpl.cpp \
1104 src-client/VMMDevInterface.cpp \
1105 $(VBOX_AUTOGEN_EVENT_CPP) \
1106 $(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP) \
1107 $(VBOX_XML_SCHEMADEFS_CPP)
1108
1109ifdef VBOX_WITH_MAIN_NLS
1110VBoxC_SOURCES += \
1111 src-all/VirtualBoxTranslator.cpp \
1112 src-all/QMTranslatorImpl.cpp
1113endif
1114
1115# Experimental cloud support
1116if defined(VBOX_WITH_CLOUD_NET)
1117 if defined(VBOX_WITH_LIBSSH)
1118 VBoxC_SDKS += VBOX_SSH VBOX_OPENSSL
1119 VBoxC_DEFS += LIBSSH_STATIC VBOX_WITH_LIBSSH
1120 endif
1121 VBoxC_SOURCES += src-client/CloudGateway.cpp
1122endif
1123
1124# Audio bits.
1125VBoxC_SOURCES += \
1126 src-client/AudioDriver.cpp \
1127 $(if $(VBOX_WITH_AUDIO_VRDE),src-client/DrvAudioVRDE.cpp,)
1128
1129VBoxC_SOURCES.win = \
1130 src-client/win/dllmain.cpp \
1131 src-client/win/VBoxC.def \
1132 src-client/win/VBoxC.rc
1133ifdef VBOX_WITH_GUEST_CONTROL
1134 VBoxC_SOURCES += \
1135 src-client/GuestSessionImplTasks.cpp \
1136 src-client/GuestCtrlPrivate.cpp \
1137 src-client/GuestDirectoryImpl.cpp \
1138 src-client/GuestFileImpl.cpp \
1139 src-client/GuestFsObjInfoImpl.cpp \
1140 src-client/GuestProcessImpl.cpp \
1141 src-client/GuestSessionImpl.cpp
1142endif
1143ifdef VBOX_WITH_DRAG_AND_DROP
1144 VBoxC_SOURCES += \
1145 src-client/GuestDnDPrivate.cpp \
1146 src-client/GuestDnDSourceImpl.cpp \
1147 src-client/GuestDnDTargetImpl.cpp
1148endif
1149ifdef VBOX_WITH_XPCOM
1150 VBoxC_SOURCES += \
1151 src-client/xpcom/module.cpp
1152endif
1153ifdef VBOX_WITH_HGCM
1154 VBoxC_SOURCES += \
1155 src-client/HGCMObjects.cpp \
1156 src-client/HGCMThread.cpp \
1157 src-client/HGCM.cpp
1158endif
1159ifdef VBOX_WITH_USB
1160 VBoxC_SOURCES += \
1161 src-client/RemoteUSBBackend.cpp
1162endif
1163ifndef VBOX_WITH_VRDEAUTH_IN_VBOXSVC
1164 VBoxC_SOURCES += \
1165 src-all/AuthLibrary.cpp
1166endif
1167
1168$(call KB_FN_DO_PASS0_ON_TARGET,VBoxC) # Sets VBoxC_0_OUTDIR
1169
1170ifeq ($(KBUILD_TARGET),darwin)
1171 VBoxC_ORDERDEPS += $(VBoxC_0_OUTDIR)/VBoxC.def
1172 VBoxC_CLEAN += $(VBoxC_0_OUTDIR)/VBoxC.def
1173 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxC_0_OUTDIR)/VBoxC.def)
1174 $(VBoxC_0_OUTDIR)/VBoxC.def:
1175 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1176 $(RM) -f $@
1177 $(APPEND) $@ _NSGetModule
1178 $(APPEND) $@ _VBoxDriversRegister
1179endif
1180
1181src-client/ConsoleImpl.cpp_DEFS = \
1182 $(if $(VBOX_WITH_OPENSSL_FIPS), VBOX_OPENSSL_FIPS,)
1183
1184
1185src-client/win/VBoxC.rc_DEPS = $(VBoxC_0_OUTDIR)/VBoxC.rgs $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
1186VBoxC_CLEAN.win += $(VBoxC_0_OUTDIR)/VBoxC.rgs
1187$(call KB_FN_AUTO_CMD_DEPS,$(VBoxC_0_OUTDIR)/VBoxC.rgs)
1188$(VBoxC_0_OUTDIR)/VBoxC.rgs: $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
1189 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1190 $(VBOX_XSLTPROC) \
1191 --stringparam Application VirtualBox \
1192 --stringparam Module VBoxC \
1193 -o $@ \
1194 $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl \
1195 $(VBOX_XIDL_FILE)
1196
1197ifdef VBOX_WITH_32_ON_64_MAIN_API
1198 #
1199 # 32-bit VBox API Client In-Process module.
1200 #
1201 # This is currently just a 32-bit version of VBoxC. It might be desirable to
1202 # split up VBoxC into a simple client and a VM client part later, in which
1203 # case this module will be a simple client.
1204 #
1205 # Note! One important thing is that the typelib for this DLL must be build
1206 # with the /env win32 switch and the VBoxC typelib with /env amd64, if
1207 # not they will overwrite each others typelib module entry.
1208 #
1209 DLLS += VBoxClient-x86
1210 VBoxClient-x86_TEMPLATE = VBoxMainComp-x86
1211 VBoxClient-x86_EXTENDS = VBoxC
1212if defined(VBOX_WITH_PRECOMPILED_HEADERS) && "$(KBUILD_TARGET)" == "win" ## @todo fix inheritance (fixed in r3253)
1213 VBoxClient-x86_USES = vccprecomp
1214 VBoxClient-x86_PCH_HDR := $(PATH_SUB_CURRENT)/src-client/win/precomp_vcc.h
1215endif
1216 VBoxClient-x86_SDKS = $(filter-out VBOX_OPUS VBOX_VPX,$(VBoxC_SDKS))
1217 VBoxClient-x86_DEFS = VBOX_COM_INPROC_API_CLIENT \
1218 $(filter-out VBOX_WITH_RECORDING VBOX_WITH_LIBVPX VBOX_WITH_AUDIO_RECORDING VBOX_WITH_LIBOPUS,$(VBoxC_DEFS))
1219 VBoxClient-x86_INCS.win = \
1220 $(VBoxClient-x86_0_OUTDIR) \
1221 $(VBoxCOM-x86_0_OUTDIR) \
1222 $(VBoxC_INCS.win)
1223 VBoxClient-x86_SOURCES = \
1224 src-all/EventImpl.cpp \
1225 src-all/Global.cpp \
1226 src-all/GlobalStatusConversion.cpp \
1227 src-all/AutoCaller.cpp \
1228 src-all/ThreadTask.cpp \
1229 src-all/VirtualBoxBase.cpp \
1230 src-all/VirtualBoxErrorInfoImpl.cpp \
1231 src-client/ClientTokenHolder.cpp \
1232 src-client/SessionImpl.cpp \
1233 src-client/VirtualBoxClientImpl.cpp \
1234 $(VBOX_AUTOGEN_EVENT_CPP) \
1235 $(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP) \
1236 $(VBOX_XML_SCHEMADEFS_CPP)
1237 ifdef VBOX_WITH_MAIN_NLS
1238 VBoxClient-x86_SOURCES += \
1239 src-all/VirtualBoxTranslator.cpp \
1240 src-all/QMTranslatorImpl.cpp
1241 endif
1242 VBoxClient-x86_SOURCES.win = \
1243 src-client/win/dllmain.cpp \
1244 src-client/win/VBoxClient-x86.def \
1245 src-client/win/VBoxClient-x86.rc
1246 ifdef VBOX_WITH_XPCOM
1247 VBoxClient-x86_SOURCES += \
1248 src-client/xpcom/module.cpp
1249 endif
1250 VBoxClient-x86_LIBS = \
1251 $(PATH_STAGE_LIB)/VBoxAPIWrap-x86$(VBOX_SUFF_LIB)
1252 VBoxClient-x86_LIBS.win = $(NO_SUCH_VARIABLE)
1253 VBoxClient-x86_LIBS.win.x86 += \
1254 $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/delayimp.lib \
1255 $(PATH_SDK_$(VBOX_WINPSDK)_LIB.x86)/WbemUuid.Lib
1256 VBoxClient-x86_CLEAN.win += $(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs
1257 $(call KB_FN_DO_PASS0_ON_TARGET,VBoxClient-x86) # Sets VBoxClient-x86_0_OUTDIR
1258
1259 src-client/win/VBoxClient-x86.rc_DEPS = \
1260 $(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs \
1261 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb
1262
1263 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs)
1264 $(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs: \
1265 $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl \
1266 $(VBOX_XIDL_FILE) | $$(dir $$@)
1267 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1268 $(VBOX_XSLTPROC) \
1269 --stringparam Application VirtualBox \
1270 --stringparam Module VBoxC \
1271 -o $@ \
1272 $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl \
1273 $(VBOX_XIDL_FILE)
1274endif
1275
1276#
1277# The VBoxExtPackHelperApp.
1278#
1279ifdef VBOX_WITH_EXTPACK
1280 PROGRAMS += VBoxExtPackHelperApp
1281 VBoxExtPackHelperApp_TEMPLATE = VBoxR3SetUidToRoot
1282 VBoxExtPackHelperApp_LDFLAGS.darwin = -framework Security
1283 VBoxExtPackHelperApp_LDFLAGS.win = /SUBSYSTEM:windows
1284 VBoxExtPackHelperApp_SOURCES = \
1285 src-helper-apps/VBoxExtPackHelperApp.cpp \
1286 src-all/ExtPackUtil.cpp
1287 VBoxExtPackHelperApp_SOURCES.win = \
1288 src-helper-apps/VBoxExtPackHelperApp.rc
1289 VBoxExtPackHelperApp_LIBS = \
1290 $(LIB_RUNTIME)
1291endif # VBOX_WITH_EXTPACK
1292
1293#
1294# VolInfo
1295#
1296ifdef VBOX_WITH_DEVMAPPER
1297 PROGRAMS.linux += VBoxVolInfo
1298 VBoxVolInfo_TEMPLATE = VBoxR3SetUidToRoot
1299 VBoxVolInfo_SOURCES = src-helper-apps/VBoxVolInfo.cpp
1300 VBoxVolInfo_LIBS = devmapper
1301endif
1302
1303
1304endif # !defined(VBOX_ONLY_SDK) && !defined(VBOX_ONLY_EXTPACKS) (the ifndef is far above)
1305ifndef VBOX_ONLY_SDK
1306
1307
1308#
1309# VBoxCOM - COM Abstraction Layer library
1310#
1311LIBRARIES += VBoxCOM
1312VBoxCOM_TEMPLATE = VBoxMainLib
1313VBoxCOM_INTERMEDIATES = $(VBOX_MAIN_PREREQS) \
1314 $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
1315VBoxCOM_SOURCES = \
1316 glue/com.cpp \
1317 glue/VBoxLogRelCreate.cpp \
1318 glue/GetVBoxUserHomeDirectory.cpp \
1319 glue/initterm.cpp \
1320 glue/string.cpp \
1321 glue/string-base64.cpp \
1322 glue/AutoLock.cpp \
1323 glue/EventQueue.cpp \
1324 glue/NativeEventQueue.cpp \
1325 glue/ErrorInfo.cpp \
1326 glue/errorprint.cpp
1327VBoxCOM_INCS += $(VBOX_MAIN_APIWRAPPER_INCS) \
1328 include
1329ifeq ($(KBUILD_TARGET),win)
1330 ifdef VBOX_WITH_MIDL_PROXY_STUB
1331 VBoxCOM_DEFS.win = VBOX_WITH_AUTO_COM_REG_UPDATE
1332 endif
1333 ifdef VBOX_WITH_SDS
1334 VBoxCOM_DEFS.win += VBOX_WITH_SDS
1335 endif
1336 VBoxCOM_DEFS.x86 = _WIN32_WINNT=0x0500
1337 VBoxCOM_DEFS.amd64 = _WIN32_WINNT=0x0510
1338 VBoxCOM_SOURCES += \
1339 $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c
1340 VBoxCOM_CLEAN = \
1341 $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
1342 $(VBoxCOM_0_OUTDIR)/VirtualBox_p.c \
1343 $(VBoxCOM_0_OUTDIR)/dlldata.c \
1344 $(VBoxCOM_0_OUTDIR)/VirtualBox.h \
1345 $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
1346 VBoxCOM_CLEAN += \
1347 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c \
1348 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c \
1349 $(VBoxCOM_0_OUTDIR)/legacy/dlldata.c \
1350 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.h \
1351 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.tlb
1352 VBoxCOM_BLDDIRS = $(VBoxCOM_0_OUTDIR)/legacy/
1353else # !win
1354 VBoxCOM_SOURCES += \
1355 $(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c \
1356 glue/xpcom/helpers.cpp
1357endif # !win
1358
1359ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
1360glue/VBoxLogRelCreate.cpp_DEFS = KBUILD_TYPE="$(KBUILD_TYPE)"
1361else
1362glue/VBoxLogRelCreate.cpp_DEFS = KBUILD_TYPE=\"$(KBUILD_TYPE)\"
1363endif
1364
1365# 32-bit version of VBoxCOM.
1366if defined(VBOX_WITH_32_ON_64_MAIN_API) && !defined(VBOX_ONLY_EXTPACKS)
1367 LIBRARIES += VBoxCOM-x86
1368 VBoxCOM-x86_TEMPLATE = VBoxMainLib-x86
1369 VBoxCOM-x86_EXTENDS = VBoxCOM
1370 ifeq ($(KBUILD_TARGET),win)
1371 VBoxCOM-x86_CLEAN = \
1372 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c \
1373 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c \
1374 $(VBoxCOM-x86_0_OUTDIR)/dlldata.c \
1375 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox.h \
1376 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb
1377 endif
1378endif
1379
1380# -MD version for the GUI in -MDd builds.
1381ifeq ($(KBUILD_TARGET).$(VBOX_VCC_CRT_TYPE),win.d)
1382 ifndef VBOX_ONLY_EXTPACKS
1383 LIBRARIES += VBoxCOM-GUI
1384 USES += qt5
1385 VBoxCOM-GUI_TEMPLATE = VBOXQTGUI$(if-expr defined(VBOX_WITH_HARDENING),,EXE)
1386 VBoxCOM-GUI_EXTENDS = VBoxCOM
1387 endif
1388endif
1389
1390# define qt5 tools for translation even if VBOX_ONLY_EXTPACKS is enabled
1391ifdef VBOX_WITH_NLS
1392 USES += qt5
1393endif
1394
1395
1396endif # !VBOX_ONLY_SDK
1397
1398
1399#
1400# Installs com related thing(s) to bin.
1401#
1402INSTALLS.win += VBoxMain-com-inst
1403VBoxMain-com-inst_INST = $(INST_BIN)
1404VBoxMain-com-inst_MODE = a+r,u+w
1405VBoxMain-com-inst_SOURCES = src-all/win/comregister.cmd
1406
1407
1408if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "linux" && !defined(VBOX_ONLY_EXTPACKS)
1409 #
1410 # Installs linux/hardening related things to components.
1411 #
1412 INSTALLS.linux += VBoxMain-hardening-inst
1413 VBoxMain-hardening-inst_INST = $(INST_BIN)components/
1414 VBoxMain-hardening-inst_SYMLINKS = \
1415 VBoxDDU.so=>../VBoxDDU.so \
1416 VBoxRT.so=>../VBoxRT.so \
1417 VBoxVMM.so=>../VBoxVMM.so \
1418 VBoxXPCOM.so=>../VBoxXPCOM.so
1419endif
1420
1421
1422if defined(VBOX_WITH_MIDL_PROXY_STUB) && "$(KBUILD_TARGET)" == "win" && !defined(VBOX_ONLY_EXTPACKS)
1423 #
1424 # Experimental COM proxy + stub DLL w/ automatic registration updating.
1425 #
1426 # The Legacy stub is for older 64-bit windows versions (pre Windows 7) as we
1427 # were having various problems on windows server 2003 and 2008 with the code
1428 # MIDL generated. Also, in windows 7 there are some potentially interesting
1429 # changes in the generated code where it uses new helpers from OLE32.
1430 #
1431 DLLS += VBoxProxyStub
1432 VBoxProxyStub_TEMPLATE = VBOXMAINCOMP
1433 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
1434 VBoxProxyStub_DEFS := REGISTER_PROXY_DLL PROXY_CLSID_IS=$(quote $(VBOX_MIDL_PROXY_CLSID_IS))
1435 else
1436 VBoxProxyStub_DEFS := REGISTER_PROXY_DLL PROXY_CLSID_IS="$(VBOX_MIDL_PROXY_CLSID_IS)"
1437 endif
1438 ifdef VBOX_WITH_SDS
1439 VBoxProxyStub_DEFS += VBOX_WITH_SDS
1440 endif
1441 ifdef VBOX_WITH_SDS_CLIENT_WATCHER
1442 VBoxProxyStub_DEFS += VBOX_WITH_SDS_CLIENT_WATCHER,)
1443 endif
1444 VBoxProxyStub_DEFS.win.x86 = WIN32
1445 VBoxProxyStub_SDKS = VBOX_NTDLL
1446 VBoxProxyStub_DEFPATH = $(VBoxCOM_0_OUTDIR)/# Hack to workaround drive letter in $(VBoxCOM_0_OUTDIR)/ for CFLAGS hack below.
1447 VBoxProxyStub_INCS = $(VBoxCOM_0_OUTDIR)/
1448 VBoxProxyStub_SOURCES := \
1449 VirtualBox_p.c \
1450 VirtualBox_i.c \
1451 $(PATH_SUB_CURRENT)/src-all/win/VBoxProxyStub.def \
1452 $(PATH_SUB_CURRENT)/src-all/win/VBoxProxyStub.rc \
1453 $(PATH_SUB_CURRENT)/src-all/win/VBoxProxyStub.c
1454 src-all/win/VBoxProxyStub.rc_DEPS = $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
1455 VBoxProxyStub_VirtualBox_p.c_CFLAGS.x86 = /Gz # Workaround for incorrect ObjectStublessClient* prototypes in SDK v7.1.
1456
1457 DLLS += VBoxProxyStubLegacy
1458 VBoxProxyStubLegacy_TEMPLATE = VBOXMAINCOMP
1459 VBoxProxyStubLegacy_EXTENDS = VBoxProxyStub
1460 VBoxProxyStubLegacy_DEFS = $(VBoxProxyStub_DEFS) VBOX_IN_PROXY_STUB_LEGACY
1461 VBoxProxyStubLegacy_INCS = $(VBoxCOM_0_OUTDIR)/legacy/
1462 VBoxProxyStubLegacy_SOURCES = \
1463 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c \
1464 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c \
1465 src-all/win/VBoxProxyStub.def \
1466 src-all/win/VBoxProxyStubLegacy.rc \
1467 src-all/win/VBoxProxyStub.c
1468 src-all/win/VBoxProxyStubLegacy.rc_DEPS = $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.tlb
1469
1470 ifdef VBOX_WITH_32_ON_64_MAIN_API
1471 DLLS += VBoxProxyStub-x86
1472 VBoxProxyStub-x86_TEMPLATE = VBoxMainComp-x86
1473 VBoxProxyStub-x86_SDKS = VBOX_NTDLL
1474 VBoxProxyStub-x86_DEFS = $(VBoxProxyStub_DEFS) VBOX_PROXY_STUB_32_ON_64 WIN32
1475 VBoxProxyStub-x86_INCS = $(VBoxCOM-x86_0_OUTDIR)/
1476 VBoxProxyStub-x86_SOURCES = \
1477 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c \
1478 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c \
1479 src-all/win/VBoxProxyStub.c \
1480 src-all/win/VBoxProxyStub-x86.rc \
1481 src-all/win/VBoxProxyStub.def
1482 src-all/win/VBoxProxyStub-x86.rc_DEPS = $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb
1483 endif
1484endif
1485
1486
1487ifdef VBOX_WITH_MAIN_NLS
1488#
1489# NLS stuff.
1490#
1491include $(PATH_SUB_CURRENT)/nls/ApprovedLanguages.kmk
1492
1493PROGRAMS += VirtualBoxAPI
1494VirtualBoxAPI_TEMPLATE = VBoxNLS
1495VirtualBoxAPI_QT_TRANSLATIONS = $(addsuffix .ts,$(addprefix $(VBOX_PATH_MAIN_SRC)/nls/VirtualBoxAPI_,$(VBOX_APPROVED_MAIN_LANGUAGES)))
1496VirtualBoxAPI_VBOX_ALL_NLS_SOURCES = $(wildcard \
1497 $(VBOX_PATH_MAIN_SRC)/include/*.h\
1498 $(VBOX_PATH_MAIN_SRC)/src-all/*.cpp \
1499 $(VBOX_PATH_MAIN_SRC)/src-all/*.h \
1500 $(VBOX_PATH_MAIN_SRC)/src-server/*.cpp \
1501 $(VBOX_PATH_MAIN_SRC)/src-server/*.h \
1502 $(VBOX_PATH_MAIN_SRC)/src-client/*.cpp \
1503 $(VBOX_PATH_MAIN_SRC)/src-client/*.h )
1504
1505updatenls:: makeallnls $(VBOX_PATH_MAIN_SRC)/nls/VirtualBoxAPI_en.ts
1506
1507makeallnls:: $(VirtualBoxAPI_VBOX_ALL_NLS_SOURCES)
1508 $(call MSG_L1,lupdate all languages (nls/*.ts))
1509 $(QUIET)$(TOOL_QT5_LUPDATE) \
1510 $^ \
1511 -ts \
1512 $(filter-out nls/VirtualBoxAPI_en.ts, $(VirtualBoxAPI_QT_TRANSLATIONS)) \
1513 $(VBOX_PATH_MAIN_SRC)/nls/VirtualBoxAPI_xx_YY.ts
1514
1515#fake-main-nls:
1516# $(foreach file, $(VirtualBoxAPI_QT_TRANSLATIONS) \
1517# ,$(NLTAB)$(SED) -i \
1518# -e '/<source>.*<\/source>/h' \
1519# -e '/<source>.*<\/source>/p' \
1520# -e '/<translation type="unfinished"><\/translation>/{' \
1521# -e 'x' \
1522# -e 's/<source>\(.*\)<\/source>/<translation type="unfinished">$(notdir $(file)): \1<\/translation>/' \
1523# -e '}' \
1524# $(file) )
1525
1526
1527# Create the English translation file. This is something special cause it will
1528# contain the plural forms only.
1529$(VBOX_PATH_MAIN_SRC)/nls/VirtualBoxAPI_en.ts: $(VirtualBoxAPI_VBOX_ALL_NLS_SOURCES)
1530 $(call MSG_L1,lupdate $@)
1531 $(QUIET)$(TOOL_QT5_LUPDATE) \
1532 $^ \
1533 -ts \
1534 "$@"
1535 $(QUIET)$(SED) -n -i \
1536 -e '/<context>/,/<\/context>/!p' \
1537 -e '/<context>/h' \
1538 -e '/<name>/H' \
1539 -e '/<message numerus="yes">/,/<\/message>/H' \
1540 -e '/<\/context>/{H;x;/<message/p}' \
1541 "$@"
1542
1543endif # VBOX_WITH_MAIN_NLS
1544
1545
1546# generate rules
1547include $(FILE_KBUILD_SUB_FOOTER)
1548
1549
1550
1551#
1552# Additions rules.
1553#
1554
1555## @todo this hack ain't cutting it any longer. (the file name is abspath'ed since ages now.)
1556glue/xpcom/helpers.cpp: $(VBOX_IDL_TYPELIB.XPCOM)
1557
1558$(call KB_FN_AUTO_CMD_DEPS_EX,$(VBOX_IDL_FILE.XPCOM),$(PATH_OUT)/VBOX_IDL_FILE.XPCOM.vbox-dep)
1559$(VBOX_IDL_FILE.XPCOM): $(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
1560 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS_EX,$(PATH_OUT)/VBOX_IDL_FILE.XPCOM.vbox-dep)
1561 $(call MSG_TOOL,xsltproc,VBoxSVC,$(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl,$@)
1562 $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl $(VBOX_XIDL_FILE)
1563
1564$(call KB_FN_AUTO_CMD_DEPS_EX,$(VBOX_IDL_TYPELIB.XPCOM),$(PATH_OUT)/VBOX_IDL_TYPELIB.XPCOM.vbox-dep)
1565$(VBOX_IDL_TYPELIB.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
1566 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS_EX,$(PATH_OUT)/VBOX_IDL_TYPELIB.XPCOM.vbox-dep)
1567 $(call MSG_TOOL,xpidl,VBoxSVC,$(VBOX_IDL_FILE.XPCOM),$@)
1568 $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m typelib -I $(VBOX_PATH_XPCOM_IDL) -e $@ $(VBOX_IDL_FILE.XPCOM)
1569 $(CHMOD) 0644 $@
1570## @todo ^^^^^^^^^^^^ fix horrible hack
1571
1572$(call KB_FN_AUTO_CMD_DEPS_EX,$(VBOX_IDL_HEADER.XPCOM),$(PATH_OUT)/VBOX_IDL_HEADER.XPCOM.vbox-dep)
1573$(VBOX_IDL_HEADER.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
1574 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS_EX,$(PATH_OUT)/VBOX_IDL_HEADER.XPCOM.vbox-dep)
1575 $(call MSG_TOOL,xpidl,VBoxSVC,$(VBOX_IDL_FILE.XPCOM),$@)
1576 $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m header -I $(VBOX_PATH_XPCOM_IDL) -e $@ $(VBOX_IDL_FILE.XPCOM)
1577
1578$(call KB_FN_AUTO_CMD_DEPS_EX,$(VBOX_IDL_FILE.MSCOM),$(PATH_OUT)/VBOX_IDL_FILE.MSCOM.vbox-dep)
1579$(VBOX_IDL_FILE.MSCOM): $(VBOX_PATH_MAIN_SRC)/idl/midl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
1580 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS_EX,$(PATH_OUT)/VBOX_IDL_FILE.MSCOM.vbox-dep)
1581 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
1582 $(QUIET)$(VBOX_XSLTPROC) -o $@ \
1583 $(if $(VBOX_WITH_MIDL_PROXY_STUB),-stringparam g_fGenProxy yes,) \
1584 $(if $(VBOX_WITH_SDS),-stringparam g_fVBoxWithSDS yes,) \
1585 $(VBOX_PATH_MAIN_SRC)/idl/midl.xsl $(VBOX_XIDL_FILE)
1586
1587
1588# Aliases for testing purposes.
1589ifdef VBOX_WITH_XPCOM
1590testidl: $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM) $(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c
1591testidlhdr: $(VBOX_IDL_HEADER.XPCOM)
1592else
1593testidl: $(VBOX_IDL_FILE.MSCOM) $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
1594 $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c,)
1595endif
1596
1597
1598$(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c: $(VBOX_PATH_MAIN_SRC)/idl/xpidl_iid.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
1599 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
1600 $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
1601
1602if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" == "win"
1603
1604 # Note! Because we've got a different proxy stub DLL for pre windows 7 64-bit hosts, we target windows 7 for AMD64.
1605 # The output is different and hopefully more efficient, at least memory wise (using more helpers in OLE32).
1606 # Note! We're checking for win.amd64 below when setting the target because of the SDK build which happens on linux.amd64
1607 # but with a 32-bit Wine.
1608 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxCOM_0_OUTDIR)/VirtualBox_i.c)
1609 $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
1610 $(if $(VBOX_WITH_MIDL_PROXY_STUB), + $(VBoxCOM_0_OUTDIR)/VirtualBox_p.c + $(VBoxCOM_0_OUTDIR)/dlldata.c,) \
1611 + $(VBoxCOM_0_OUTDIR)/VirtualBox.h \
1612 + $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
1613 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1614 $(VBOX_MIDL_REDIRECT) $(VBOX_WIN_MIDL) /nologo /W4 \
1615 /env $(if-expr "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.amd64" ,amd64,win32) \
1616 /robust /protocol all /target $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),NT61,NT51) \
1617 /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM_0_OUTDIR)) \
1618 /cpp_cmd $(VBOX_MIDL_CPP_CMD) \
1619 $(foreachfile dir,$(SDK_$(VBOX_WINPSDK)_INCS),/I $(call VBOX_FN_MAKE_WIN_PATH,$(dir))) \
1620 /I idl \
1621 $(call VBOX_FN_MAKE_WIN_PATH,$(VBOX_IDL_FILE.MSCOM))
1622 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox.h)
1623 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox_i.c)
1624 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox_p.c)
1625
1626 if defined(VBOX_WITH_MIDL_PROXY_STUB)
1627 # -Windows Server 2003 AMD64 SP1 does not like the result when using '/protocol all' and '/target NT51'.
1628 # -Vista AMD64 SP1 and Windows Server 2008 AMD64 seems to have some objections as well, but it seemed
1629 # that using an older MIDL compiler (v7.00.0499 instead of v7.00.0555) helps. But the W2K3 fix also works.
1630 # To avoid 32-bit vs. 64-bit differences, we do the same for 32-bit windows versions.
1631 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c)
1632 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c \
1633 + $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c\
1634 + $(VBoxCOM_0_OUTDIR)/legacy/dlldata.c \
1635 + $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.h \
1636 + $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
1637 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1638 $(VBOX_MIDL_REDIRECT) $(VBOX_WIN_MIDL) /nologo /W4 \
1639 $(if-expr "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.amd64" \
1640 ,/env amd64 /x64 /target NT50 /robust \
1641 ,/env win32 /target NT51 /robust /protocol all ) \
1642 /out $(call VBOX_FN_MAKE_WIN_PATH,$(dir $@)) \
1643 /cpp_cmd $(VBOX_MIDL_CPP_CMD) \
1644 $(foreachfile dir,$(SDK_$(VBOX_WINPSDK)_INCS),/I $(call VBOX_FN_MAKE_WIN_PATH,$(dir))) \
1645 /I idl \
1646 $(call VBOX_FN_MAKE_WIN_PATH,$(VBOX_IDL_FILE.MSCOM))
1647 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.h)
1648 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c)
1649 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c)
1650 endif
1651
1652 if defined(VBOX_WITH_32_ON_64_MAIN_API) && !defined(VBOX_ONLY_EXTPACKS)
1653 # The XP targetted 32-bit proxy stub works with all versions of windows (the
1654 # issues leading to the VBoxProxyStubLegacy.dll are only on 64-bit windows).
1655 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c)
1656 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c \
1657 $(if $(VBOX_WITH_MIDL_PROXY_STUB), + $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c + $(VBoxCOM-x86_0_OUTDIR)/dlldata.c,) \
1658 + $(VBoxCOM-x86_0_OUTDIR)/VirtualBox.h \
1659 + $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
1660 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1661 $(VBOX_MIDL_REDIRECT_X86) $(VBOX_WIN_MIDL) /nologo /W4 \
1662 /env win32 /target NT51 /robust /protocol all \
1663 /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM-x86_0_OUTDIR)) \
1664 /tlb $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb) \
1665 /cpp_cmd $(VBOX_MIDL_CPP_CMD_X86) \
1666 $(foreachfile dir,$(SDK_$(VBOX_WINPSDK)_INCS),/I $(call VBOX_FN_MAKE_WIN_PATH,$(dir))) \
1667 /I idl \
1668 $(call VBOX_FN_MAKE_WIN_PATH,$(VBOX_IDL_FILE.MSCOM))
1669 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox.h)
1670 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c)
1671 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c)
1672 endif
1673
1674endif # defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" == "win"
1675
1676#
1677# Translation stuff
1678#
1679VBoxSVC_VBOX_HEADERS = \
1680 include/collection.h \
1681 include/MachineImpl.h
1682VBoxSVC_VBOX_TRANSLATIONS = \
1683 nls/VBoxSVC_de.ts
1684
1685VBoxC_VBOX_HEADERS = \
1686 include/ConsoleImpl.h
1687
1688VBoxC_VBOX_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
1689VBoxC_VBOX_HEADERS += $(VBOX_MAIN_APIWRAPPER_INCS)
1690
1691VBoxC_VBOX_TRANSLATIONS = \
1692 nls/VBoxC_de.ts
1693
1694ifdef VBOX_WITH_JMSCOM
1695
1696 #
1697 # Java glue JAR files
1698 #
1699 VBOX_JMSCOM_JAR = $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar
1700 VBOX_JMSCOM_TARGET := $(PATH_TARGET)/vboxjmscom-gen
1701 VBOX_JMSCOM_GEN = $(VBOX_JMSCOM_TARGET)/jmscomgen
1702 VBOX_JMSCOM_JDEST := $(VBOX_JMSCOM_TARGET)/jdest
1703 VBOX_GLUE_XSLT_DIR := $(PATH_ROOT)/src/VBox/Main/glue
1704 VBOX_JACOB_DIR := $(PATH_ROOT)/src/libs/jacob-1.17
1705
1706 INSTALLS += VBoxJMscom-inst-jar
1707 VBoxJMscom-inst-jar_INST = $(INST_SDK)bindings/mscom/java/
1708 VBoxJMscom-inst-jar_MODE = a+r,u+w
1709 VBoxJMscom-inst-jar_SOURCES = \
1710 $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar
1711 VBoxJMscom-inst-jar_CLEAN = \
1712 $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar \
1713 $(VBOX_JMSCOM_GEN)/jmscomglue.list \
1714 $(wildcard \
1715 $(VBOX_JMSCOM_GEN)/java/*.java \
1716 $(VBOX_JMSCOM_JDEST)/*.class \
1717 $(VBOX_JMSCOM_JDEST)/*/*.class \
1718 $(VBOX_JMSCOM_JDEST)/*/*/*.class \
1719 $(VBOX_JMSCOM_JDEST)/*/*/*/*.class \
1720 )
1721 VBoxJMscom-inst-jar_BLDDIRS += $(VBOX_JMSCOM_GEN)/java
1722 $(call KB_FN_DO_PASS0_ON_TARGET,VBoxJMscom-inst-jar) # Sets VBoxJMscom-inst-jar_0_OUTDIR
1723
1724 $(call KB_FN_AUTO_CMD_DEPS,$(VBOX_JMSCOM_GEN)/jmscomglue.list)
1725 $(VBOX_JMSCOM_GEN)/jmscomglue.list: \
1726 $(VBOX_XIDL_FILE) \
1727 $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl \
1728 $(VBOX_FILESPLIT) \
1729 | $(VBOX_JMSCOM_GEN)/java/
1730 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1731 $(call MSG_L1,Generating Java MSCOM glue files from XIDL)
1732 $(QUIET)$(RM) -f $(wildcard $(VBOX_JMSCOM_GEN)/java/*.java)
1733 $(QUIET)$(VBOX_XSLTPROC) \
1734 --stringparam filelistonly "" \
1735 --stringparam G_vboxApiSuffix $(VBOX_API_SUFFIX) \
1736 --stringparam G_vboxGlueStyle mscom \
1737 --stringparam G_vboxDirPrefix "" \
1738 -o $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl $(VBOX_XIDL_FILE)
1739 $(QUIET)$(VBOX_FILESPLIT) $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_JMSCOM_GEN)/java
1740 $(QUIET)echo $(VBOX_JMSCOM_GEN)/java/*.java > $@
1741
1742 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar)
1743 $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar: $(VBOX_JMSCOM_GEN)/jmscomglue.list | $$(dir $$@)
1744 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1745 $(call MSG_TOOL,javac,$(notdir $@),jmscomglue.list,)
1746 $(QUIET)$(RM) -Rf $(VBOX_JMSCOM_JDEST)
1747 $(QUIET)$(MKDIR) -p $(VBOX_JMSCOM_JDEST)
1748 $(call MSG_TOOL,javac,$(notdir $@),...,)
1749 $(QUIET)$(VBOX_JAVAC) $(VBOX_JAVAC_OPTS) @$(VBOX_JMSCOM_GEN)/jmscomglue.list \
1750 -d $(VBOX_JMSCOM_JDEST) -classpath "$(VBOX_JMSCOM_JDEST)$(VBOX_SEP)$(VBOX_JACOB_DIR)/jacob.jar"
1751 $(call MSG_LINK,$(notdir $@),$@)
1752 $(QUIET)$(VBOX_JAR) cf $@ -C $(VBOX_JMSCOM_JDEST) .
1753
1754 ## @todo compile TestVBox.java (see below) to have sanity checking
1755endif # VBOX_WITH_JMSCOM
1756
1757#
1758# Install Java glue sample code.
1759#
1760INSTALLS += javagluesample
1761javagluesample_INST = $(INST_SDK)bindings/glue/java/
1762javagluesample_MODE = a+r,u+w
1763javagluesample_SOURCES = \
1764 $(VBOX_PATH_MAIN_SRC)/glue/tests/TestVBox.java=>TestVBox.java \
1765 $(VBOX_PATH_MAIN_SRC)/glue/tests/Makefile=>Makefile
1766
1767#
1768# Rules associated with VBoxAPIWrap (in typical invocation order).
1769# We keep them down here to simplify the use of VBoxAPIWrap_0_OUTDIR.
1770#
1771
1772# Generate a make include file which lists the wrapper header and source files.
1773$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_VBOX_KMK_FILE).ts)
1774$(VBoxAPIWrap_VBOX_KMK_FILE).ts \
1775+| $(VBoxAPIWrap_VBOX_KMK_FILE): \
1776 $(VBOX_XIDL_FILE) \
1777 $(VBOX_PATH_MAIN_SRC)/idl/apiwrap-server-filelist.xsl \
1778 $(VBOX_PATH_MAIN_SRC)/Makefile.kmk
1779 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1780 $(call MSG_GENERATE,,$(VBoxAPIWrap_VBOX_KMK_FILE))
1781 $(QUIET)$(RM) -f $@
1782 $(QUIET)$(MKDIR) -p $(@D)
1783 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1784 $(if $(VBOX_WITH_SDS),-stringparam g_fVBoxWithSDS yes,) \
1785 -o $@ $(VBOX_PATH_MAIN_SRC)/idl/apiwrap-server-filelist.xsl $(VBOX_XIDL_FILE)
1786 $(QUIET)$(CP) --changed -fv $@ $(VBoxAPIWrap_VBOX_KMK_FILE)
1787
1788# Generate the header files for the wrappers.
1789$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-headers)
1790$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-headers \
1791+| $(VBOX_MAIN_APIWRAPPER_GEN_HDRS): \
1792 $(VBOX_XIDL_FILE) \
1793 $(VBOX_PATH_MAIN_SRC)/idl/typemap-shared.inc.xsl \
1794 $(VBoxAPIWrap_VBOX_XSLT) \
1795 $(VBOX_FILESPLIT) \
1796 | $$(dir $$@)
1797 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1798 $(call MSG_L1,Generating C++ Server API wrapper header files from XIDL)
1799 $(QUIET)$(RM) -f -- $(filter-out $(VBOX_MAIN_APIWRAPPER_GEN_HDRS), $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.h))
1800 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1801 --stringparam generating "headers" \
1802 -o $@ $(VBoxAPIWrap_VBOX_XSLT) $(VBOX_XIDL_FILE)
1803 $(QUIET)$(VBOX_FILESPLIT) $@ $(VBoxAPIWrap_0_OUTDIR)
1804
1805# Generate the DTrace probes for the wrappers and combine them with handcoded probes.
1806$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d.ts)
1807$(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d.ts \
1808+| $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d: \
1809 $(VBOX_XIDL_FILE) \
1810 $(VBOX_PATH_MAIN_SRC)/idl/typemap-shared.inc.xsl \
1811 $(VBoxAPIWrap_VBOX_XSLT) \
1812 $(VBOX_FILESPLIT) \
1813 | $$(dir $$@)
1814 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1815 $(call MSG_L1,Generating DTrace Provider for the VBox API (from XIDL))
1816 $(QUIET)$(RM) -f -- "$@" "[email protected]"
1817 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1818 --stringparam generating "dtrace-probes" \
1819 -o "$@" $(VBoxAPIWrap_VBOX_XSLT) $(VBOX_XIDL_FILE)
1820 $(QUIET)$(SED) -e '' -o "[email protected]" \
1821 "$(VBOX_PATH_MAIN_SRC)/src-all/VBoxAPI-start$(if-expr "$(VBOX_HOST_DTRACE_VERSION)" == "dtrace: Sun D 1.6.2",-alternative,).d" \
1822 "$@" \
1823 "$(VBOX_PATH_MAIN_SRC)/src-all/VBoxAPI-end$(if-expr "$(VBOX_HOST_DTRACE_VERSION)" == "dtrace: Sun D 1.6.2",-alternative,).d"
1824 $(QUIET)$(MV) -- "[email protected]" "$@"
1825 $(QUIET)$(CP) --changed -fv -- "$@" "$(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d"
1826
1827# Generate the wrapper source files - split in two due to long processing time
1828$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-even)
1829$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-even \
1830+| $(VBOX_MAIN_APIWRAPPER_GEN_SRCS_EVEN): \
1831 $(VBOX_XIDL_FILE) \
1832 $(VBOX_PATH_MAIN_SRC)/idl/typemap-shared.inc.xsl \
1833 $(VBoxAPIWrap_VBOX_XSLT) \
1834 $(VBOX_FILESPLIT) \
1835 | $$(dir $$@)
1836 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1837 $(call MSG_L1,Generating C++ Server API wrapper files from XIDL - part 1)
1838 $(QUIET)$(RM) -f -- $(filter-out $(VBOX_MAIN_APIWRAPPER_GEN_SRCS), $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.cpp))
1839 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1840 --stringparam generating "sources" \
1841 --param reminder 0 \
1842 -o $@ $(VBoxAPIWrap_VBOX_XSLT) $(VBOX_XIDL_FILE)
1843 $(QUIET)$(VBOX_FILESPLIT) $@ $(VBoxAPIWrap_0_OUTDIR)
1844
1845$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-odd)
1846$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-odd \
1847+| $(VBOX_MAIN_APIWRAPPER_GEN_SRCS_ODD): \
1848 $(VBOX_XIDL_FILE) \
1849 $(VBOX_PATH_MAIN_SRC)/idl/typemap-shared.inc.xsl \
1850 $(VBoxAPIWrap_VBOX_XSLT) \
1851 $(VBOX_FILESPLIT) \
1852 | $$(dir $$@)
1853 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1854 $(call MSG_L1,Generating C++ Server API wrapper files from XIDL - part 2)
1855 $(QUIET)$(RM) -f -- $(filter-out $(VBOX_MAIN_APIWRAPPER_GEN_SRCS), $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.cpp))
1856 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1857 --stringparam generating "sources" \
1858 --param reminder 1 \
1859 -o $@ $(VBoxAPIWrap_VBOX_XSLT) $(VBOX_XIDL_FILE)
1860 $(QUIET)$(VBOX_FILESPLIT) $@ $(VBoxAPIWrap_0_OUTDIR)
1861
1862testapiwrappers:: \
1863 $(VBoxAPIWrap_0_OUTDIR)/apiwrappers-headers \
1864 $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d.ts \
1865 $(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-odd \
1866 $(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-even
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