VirtualBox

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

Last change on this file since 95274 was 95274, checked in by vboxsync, 2 years ago

FE/VBoxAutostart/adi: Added experimental support for running VBoxSVC session 0 (service session). Did some minor cleanup for the patch posted at comment 95. Disabled by default for now. bugref:9341

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 67.8 KB
Line 
1# $Id: Makefile.kmk 95274 2022-06-14 10:48:33Z 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
149if defined(VBOX_WITH_LIBCURL) && defined(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
461 ifdef VBOX_WITH_VBOXSVC_SESSION_0
462VBoxSDS_DEFS += VBOX_WITH_VBOXSVC_SESSION_0
463 endif
464VBoxSDS_INCS = \
465 include \
466 $(VBoxSDS_0_OUTDIR) \
467 $(VBoxCOM_0_OUTDIR)
468VBoxSDS_INTERMEDIATES = \
469 $(VBOX_MAIN_PREREQS)
470VBoxSDS_SOURCES = \
471 src-global/win/VBoxSDS.cpp \
472 src-global/win/VirtualBoxSDSImpl.cpp \
473 src-global/win/VBoxSDS.rc \
474 src-all/MachineLaunchVMCommonWorker.cpp
475$(call KB_FN_DO_PASS0_ON_TARGET,VBoxSDS) # Sets VBoxSDS_0_OUTDIR
476
477src-global/win/VBoxSDS.rc_INCS = $(VBoxSDS_0_OUTDIR)
478src-global/win/VBoxSDS.rc_DEPS = $(VBoxSDS_0_OUTDIR)/VBoxSDS-icon.rc #$(VBoxSDS_0_OUTDIR)/VBoxSDS.rgs
479VBoxSDS_CLEAN = $(VBoxSDS_0_OUTDIR)/VBoxSDS-icon.rc #$(VBoxSDS_0_OUTDIR)/VBoxSDS.rgs
480
481$(call KB_FN_AUTO_CMD_DEPS,$(VBoxSDS_0_OUTDIR)/VBoxSDS-icon.rc)
482$(VBoxSDS_0_OUTDIR)/VBoxSDS-icon.rc: $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
483 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
484 $(APPEND) -t $@ '1 ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
485
486# $(call KB_FN_AUTO_CMD_DEPS,$(VBoxSDS_0_OUTDIR)/VBoxSDS.rgs)
487# $(VBoxSDS_0_OUTDIR)/VBoxSDS.rgs: $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
488# $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
489# $(VBOX_XSLTPROC) \
490# --stringparam Application "VirtualBox System" \
491# --stringparam Module VBoxSDS \
492# -o $@ \
493# $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl \
494# $(VBOX_XIDL_FILE)
495#
496endif #if defined(VBOX_WITH_SDS) && "$(KBUILD_TARGET)" == "win"
497
498#
499# VBoxSVC executable
500#
501PROGRAMS += VBoxSVC
502VBoxSVC_TEMPLATE = VBOXMAINEXE
503if defined(VBOX_WITH_PRECOMPILED_HEADERS) && "$(KBUILD_TARGET)" == "win"
504 VBoxSVC_USES += vccprecomp
505 VBoxSVC_PCH_HDR := $(PATH_SUB_CURRENT)/src-server/win/precomp_vcc.h
506else if $(KBUILD_KMK_REVISION) >= 3256 && "$(KBUILD_TARGET)" != "darwin" && !defined(VBOX_WITHOUT_PRECOMPILED_HEADERS)
507 if $(VBOX_GCC_VERSION_CXX) >= 50000 # GCC 4.x runs into trouble compiling the header.
508VBoxSVC_USES += gccprecomp
509VBoxSVC_PCH_HDR := $(PATH_SUB_CURRENT)/src-server/xpcom/precomp_gcc.h
510 endif
511endif
512VBoxSVC_DEFS = \
513 IN_VBOXSVC \
514 VBOX_MAIN_SETTINGS_ADDONS \
515 IN_VMM_STATIC \
516 $(VBOX_MAIN_DEFS) \
517 $(if $(VBOX_WITH_VBOXSDL),VBOX_WITH_VBOXSDL,) \
518 $(if $(VBOX_WITH_HEADLESS),VBOX_WITH_HEADLESS,) \
519 $(if $(VBOX_WITH_QTGUI),VBOX_WITH_QTGUI,) \
520 $(if $(VBOX_WITH_AHCI),VBOX_WITH_AHCI,) \
521 $(if $(VBOX_WITH_LSILOGIC),VBOX_WITH_LSILOGIC,) \
522 $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
523 $(if $(VBOX_WITH_RESOURCE_USAGE_API),VBOX_WITH_RESOURCE_USAGE_API,) \
524 $(if $(VBOX_WITH_UNATTENDED),VBOX_WITH_UNATTENDED,) \
525 $(if $(VBOX_WITH_DBUS),VBOX_WITH_DBUS,) \
526 $(if $(VBOX_WITH_DBUS),$(if $(VBOX_USB_WITH_DBUS),VBOX_USB_WITH_DBUS,),) \
527 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,) \
528 $(if $(VBOX_USB_WITH_INOTIFY),VBOX_USB_WITH_INOTIFY,) \
529 $(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE,) \
530 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
531 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,) \
532 $(if $(VBOX_WITH_TPM),VBOX_WITH_TPM,) \
533 $(if $(VBOX_WITH_FULL_VM_ENCRYPTION),VBOX_WITH_FULL_VM_ENCRYPTION,) \
534 $(if-expr defined(VBOX_WITH_SDS),VBOX_WITH_SDS,)
535ifdef VBOX_WITH_USB
536 VBoxSVC_DEFS += \
537 VBOX_WITH_USB \
538 $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI,) \
539 $(if $(VBOX_WITH_NEW_USB_CODE_ON_DARWIN),VBOX_WITH_NEW_USB_CODE_ON_DARWIN,)
540endif
541VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE _WIN32_WINNT=0x0600
542# Try to load and use libhal at runtime for probing removable media
543# VBoxSVC_DEFS.linux += VBOX_USE_LIBHAL
544VBoxSVC_DEFS.solaris += VBOX_USE_LIBHAL
545
546if $(KBUILD_TARGET) != "win" && $(VBOX_GCC_VERSION_CXX) >= 40900 # gcc 4.9.x (4.8.x is causing endless RT_ELEMENT trouble)
547 VBoxSVC_CXXFLAGS = -Wunused -Wconversion
548endif
549
550VBoxSVC_INCS = \
551 include \
552 $(VBoxSVC_0_OUTDIR) \
553 $(dir $(VBOX_XML_SCHEMADEFS_H)) \
554 $(VBOX_MAIN_APIWRAPPER_INCS) \
555 . \
556 $(VBOX_GRAPHICS_INCS)
557VBoxSVC_INCS.win = \
558 $(VBoxCOM_0_OUTDIR)
559ifdef VBOX_WITH_USB
560 VBoxSVC_INCS.os2 = \
561 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
562endif
563
564VBoxSVC_LIBS += \
565 $(PATH_STAGE_LIB)/VBoxAPIWrap$(VBOX_SUFF_LIB) \
566 $(PATH_STAGE_LIB)/SSMStandalone$(VBOX_SUFF_LIB) \
567 $(LIB_DDU)
568
569VBoxSVC_SDKS = VBOX_LIBPNG VBOX_ZLIB
570VBoxSVC_LIBS.solaris = \
571 adm \
572 nsl \
573 devinfo \
574 socket
575
576VBoxSVC_LIBS.win += \
577 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/dnsapi.lib
578
579VBoxSVC_INTERMEDIATES = \
580 $(VBOX_MAIN_PREREQS) \
581 $(VBOX_XML_SCHEMADEFS_H) \
582 $(VBOX_AUTOGEN_EVENT_H) \
583 $(VBOX_AUTOGEN_STRINGIFY_ENUMS_H) \
584 $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
585
586VBoxSVC_SOURCES = \
587 $(VBOX_SVC_CERTS_FILE) \
588 $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d \
589 src-all/AuthLibrary.cpp \
590 src-all/CryptoUtils.cpp \
591 src-all/DisplayPNGUtil.cpp \
592 src-all/DisplayResampleImage.cpp \
593 src-all/DisplayUtils.cpp \
594 src-all/EventImpl.cpp \
595 src-all/Global.cpp \
596 src-all/GlobalStatusConversion.cpp \
597 src-all/HashedPw.cpp \
598 src-all/Logging.cpp \
599 src-all/NvramStoreImpl.cpp \
600 src-all/PCIDeviceAttachmentImpl.cpp \
601 src-all/ProgressImpl.cpp \
602 src-all/SecretKeyStore.cpp \
603 src-all/SharedFolderImpl.cpp \
604 src-all/AutoCaller.cpp \
605 src-all/ThreadTask.cpp \
606 src-all/VirtualBoxBase.cpp \
607 src-all/VirtualBoxErrorInfoImpl.cpp \
608 $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
609 src-server/CertificateImpl.cpp \
610 src-server/ApplianceImpl.cpp \
611 src-server/ApplianceImplExport.cpp \
612 src-server/ApplianceImplImport.cpp \
613 src-server/AudioAdapterImpl.cpp \
614 src-server/BandwidthControlImpl.cpp \
615 src-server/BandwidthGroupImpl.cpp \
616 src-server/BIOSSettingsImpl.cpp \
617 src-server/RecordingSettingsImpl.cpp \
618 src-server/RecordingScreenSettingsImpl.cpp \
619 src-server/GraphicsAdapterImpl.cpp \
620 src-server/ClientWatcher.cpp \
621 src-server/ClientToken.cpp \
622 src-server/CloudProviderManagerImpl.cpp \
623 src-server/CPUProfileImpl.cpp \
624 src-server/DataStreamImpl.cpp \
625 src-server/DHCPServerImpl.cpp \
626 src-server/DHCPConfigImpl.cpp \
627 ../NetworkServices/Dhcpd/DhcpOptions.cpp \
628 src-server/NetworkServiceRunner.cpp \
629 src-server/NATNetworkImpl.cpp \
630 $(if $(VBOX_WITH_CLOUD_NET), \
631 src-server/CloudNetworkImpl.cpp \
632 ,) \
633 src-server/GuestOSTypeImpl.cpp \
634 src-server/HostDnsService.cpp \
635 src-server/HostImpl.cpp \
636 src-server/HostNetworkInterfaceImpl.cpp \
637 src-server/HostPower.cpp \
638 $(if $(VBOX_WITH_LIBCURL), \
639 $(if $(VBOX_WITH_UPDATE_AGENT), \
640 src-server/UpdateAgentImpl.cpp,), \
641 ) \
642 src-server/HostVideoInputDeviceImpl.cpp \
643 src-server/HostDrivePartitionImpl.cpp \
644 src-server/HostDriveImpl.cpp \
645 src-server/MachineImpl.cpp \
646 src-all/MachineLaunchVMCommonWorker.cpp \
647 src-server/MachineImplCloneVM.cpp \
648 src-server/MachineImplMoveVM.cpp \
649 src-server/Matching.cpp \
650 src-server/MediumAttachmentImpl.cpp \
651 src-server/MediumFormatImpl.cpp \
652 src-server/MediumImpl.cpp \
653 src-server/MediumLock.cpp \
654 src-server/MediumIOImpl.cpp \
655 src-server/NATEngineImpl.cpp \
656 src-server/NetworkAdapterImpl.cpp \
657 src-server/ParallelPortImpl.cpp \
658 src-server/ProgressProxyImpl.cpp \
659 src-server/SerialPortImpl.cpp \
660 src-server/SnapshotImpl.cpp \
661 src-server/StorageControllerImpl.cpp \
662 src-server/SystemPropertiesImpl.cpp \
663 src-server/TokenImpl.cpp \
664 src-server/TrustedPlatformModuleImpl.cpp \
665 src-server/UefiVariableStoreImpl.cpp \
666 $(if $(VBOX_WITH_UNATTENDED), \
667 src-server/UnattendedImpl.cpp \
668 src-server/UnattendedInstaller.cpp \
669 src-server/UnattendedOs2Installer.cpp \
670 src-server/UnattendedScript.cpp \
671 src-all/TextScript.cpp \
672 ,) \
673 src-server/USBControllerImpl.cpp \
674 src-server/USBDeviceFiltersImpl.cpp \
675 src-server/VFSExplorerImpl.cpp \
676 src-server/VirtualBoxImpl.cpp \
677 src-server/VRDEServerImpl.cpp \
678 src-server/generic/AutostartDb-generic.cpp \
679 xml/ovfreader.cpp \
680 xml/Settings.cpp \
681 $(VBOX_XML_SCHEMADEFS_CPP) \
682 $(VBOX_AUTOGEN_EVENT_CPP) \
683 $(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP) \
684 $(if $(VBOX_WITH_XPCOM),src-server/xpcom/server.cpp,)
685
686ifdef VBOX_WITH_MAIN_NLS
687VBoxSVC_SOURCES += \
688 src-all/VirtualBoxTranslator.cpp \
689 src-all/QMTranslatorImpl.cpp
690endif
691
692ifn1of ($(KBUILD_TARGET), win darwin)
693VBoxSVC_SOURCES += $(PATH_ROOT)/src/VBox/Devices/Network/slirp/resolv_conf_parser.c
694#$(PATH_ROOT)/src/VBox/Devices/Network/slirp/resolv_conf_parser.c_DEFS += LOG_GROUP=LOG_GROUP_MAIN
695endif
696
697VBoxSVC_SOURCES.darwin = \
698 src-server/darwin/iokit.cpp \
699 src-server/darwin/HostPowerDarwin.cpp \
700 src-server/darwin/HostDnsServiceDarwin.cpp
701ifdef VBOX_WITH_VMNET
702 VBoxSVC_SOURCES.darwin += \
703 src-server/HostOnlyNetworkImpl.cpp
704endif
705
706VBoxSVC_SOURCES.win = \
707 src-server/win/svcmain.cpp \
708 src-server/win/svchlp.cpp \
709 src-server/win/HostPowerWin.cpp \
710 src-server/win/VBoxSVC.rc \
711 src-server/win/HostDnsServiceWin.cpp
712
713VBoxSVC_SOURCES.linux = \
714 src-server/linux/HostHardwareLinux.cpp \
715 src-server/linux/HostDnsServiceLinux.cpp \
716 $(if $(VBOX_WITH_DBUS),src-server/linux/HostPowerLinux.cpp) \
717 src-server/HostDnsServiceResolvConf.cpp
718
719VBoxSVC_SOURCES.solaris = \
720 src-server/linux/vbox-libhal.cpp \
721 src-server/solaris/DynLoadLibSolaris.cpp \
722 src-server/HostDnsServiceResolvConf.cpp
723
724VBoxSVC_SOURCES.os2 = \
725 src-server/HostDnsServiceResolvConf.cpp
726
727VBoxSVC_SOURCES.freebsd = \
728 src-server/freebsd/HostHardwareFreeBSD.cpp \
729 src-server/HostDnsServiceResolvConf.cpp
730
731VBoxSVC_LDFLAGS.freebsd += -lcam
732
733
734ifdef VBOX_WITH_USB
735 ifdef VBOX_WITH_SYSFS_BY_DEFAULT
736 src-server/linux/USBProxyBackendLinux.cpp_DEFS += VBOX_WITH_SYSFS_BY_DEFAULT
737 endif
738 VBoxSVC_SOURCES += \
739 src-server/USBDeviceFilterImpl.cpp \
740 src-server/USBProxyService.cpp \
741 src-server/USBProxyBackend.cpp \
742 src-server/generic/USBProxyBackendUsbIp.cpp \
743 src-server/HostUSBDeviceImpl.cpp
744 VBoxSVC_SOURCES.darwin += src-server/darwin/USBProxyBackendDarwin.cpp
745 VBoxSVC_SOURCES.linux += src-server/linux/USBProxyBackendLinux.cpp
746 VBoxSVC_SOURCES.linux += src-server/linux/USBGetDevices.cpp
747 VBoxSVC_SOURCES.os2 += src-server/os2/USBProxyBackendOs2.cpp
748 VBoxSVC_SOURCES.solaris += src-server/solaris/USBProxyBackendSolaris.cpp
749 VBoxSVC_SOURCES.win += src-server/win/USBProxyBackendWindows.cpp
750 VBoxSVC_SOURCES.freebsd += src-server/freebsd/USBProxyBackendFreeBSD.cpp
751endif
752
753ifdef VBOX_WITH_NETFLT
754 VBoxSVC_SDKS.win += VBOX_WIN_NEWDEV
755 VBoxSVC_LIBS.win += \
756 $(PATH_STAGE_LIB)/WinNetConfigNonStatic$(VBOX_SUFF_LIB) \
757 $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
758 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
759 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
760endif
761VBoxSVC_LDFLAGS.darwin = -framework IOKit -framework SystemConfiguration
762
763ifdef VBOX_WITH_3D_ACCELERATION
764 VBoxSVC_DEFS += VBOX_WITH_3D_ACCELERATION
765 VBoxSVC_LIBS += $(PATH_STAGE_LIB)/VBoxOGLTest$(VBOX_SUFF_LIB)
766 VBoxSVC_LDFLAGS.darwin += -framework OpenGL
767endif
768
769ifeq ($(KBUILD_TYPE),debug)
770 VBoxSVC_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
771endif
772
773ifdef VBOX_WITH_RESOURCE_USAGE_API
774 VBoxSVC_SOURCES += \
775 src-server/PerformanceImpl.cpp \
776 src-server/Performance.cpp
777 VBoxSVC_SOURCES.darwin += src-server/darwin/PerformanceDarwin.cpp
778 VBoxSVC_SOURCES.freebsd += src-server/freebsd/PerformanceFreeBSD.cpp
779 VBoxSVC_SOURCES.linux += src-server/linux/PerformanceLinux.cpp
780 VBoxSVC_SOURCES.os2 += src-server/os2/PerformanceOs2.cpp
781 VBoxSVC_SOURCES.solaris += src-server/solaris/PerformanceSolaris.cpp
782 VBoxSVC_SOURCES.win += src-server/win/PerformanceWin.cpp
783 VBoxSVC_LDFLAGS.darwin += -lproc
784 VBoxSVC_LDFLAGS.solaris += -lkstat -lnvpair
785 VBoxSVC_LDFLAGS.win += psapi.lib powrprof.lib
786endif
787
788ifdef VBOX_WITH_HOSTNETIF_API
789 VBoxSVC_SOURCES.win += src-server/win/NetIf-win.cpp
790 VBoxSVC_SOURCES.linux += src-server/linux/NetIf-linux.cpp
791 VBoxSVC_SOURCES.os2 += src-server/os2/NetIf-os2.cpp
792 VBoxSVC_SOURCES.darwin += src-server/darwin/NetIf-darwin.cpp
793 VBoxSVC_SOURCES.solaris += src-server/solaris/NetIf-solaris.cpp
794 VBoxSVC_SOURCES.freebsd += src-server/freebsd/NetIf-freebsd.cpp
795 VBoxSVC_DEFS += VBOX_WITH_HOSTNETIF_API
796 if1of ($(KBUILD_TARGET), linux darwin solaris freebsd)
797 VBoxSVC_SOURCES += src-server/generic/NetIf-generic.cpp
798 endif
799endif
800
801$(call KB_FN_DO_PASS0_ON_TARGET,VBoxSVC) # Sets VBoxSVC_0_OUTDIR
802
803ifdef VBOX_WITH_MAIN_USB_ID_DATABASE # Generate a database of USB vendor IDs and device IDs.
804 VBoxSVC_DEFS += VBOX_WITH_MAIN_USB_ID_DATABASE
805 VBoxSVC_SOURCES += $(VBoxSVC_0_OUTDIR)/USBIdDatabase.cpp
806 VBoxSVC_CLEAN += $(VBoxSVC_0_OUTDIR)/USBIdDatabase.cpp
807
808 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxSVC_0_OUTDIR)/USBIdDatabase.cpp)
809 $(VBoxSVC_0_OUTDIR)/USBIdDatabase.cpp: $$(USBIdDatabaseGenerator_1_TARGET) \
810 $(PATH_SUB_CURRENT)/src-server/usb.ids $(PATH_SUB_CURRENT)/src-server/custom.ids | $$(dir $$@)
811 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
812 $(call MSG_GENERATE,USBIdDatabase,$@,$(USBIdDatabaseGenerator_1_TARGET))
813 $(QUIET)$(USBIdDatabaseGenerator_1_TARGET) -o "$@" $(filter %.ids,$^)
814
815 BLDPROGS += USBIdDatabaseGenerator
816 USBIdDatabaseGenerator_TEMPLATE = VBoxAdvBldProg
817 USBIdDatabaseGenerator_SOURCES = src-server/USBIdDatabaseGenerator.cpp
818else
819 VBoxSVC_SOURCES += src-server/USBIdDatabaseStub.cpp
820endif
821
822src-server/win/VBoxSVC.rc_INCS = $(VBoxSVC_0_OUTDIR)
823src-server/win/VBoxSVC.rc_DEPS = $(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc
824VBoxSVC_CLEAN += $(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc
825$(call KB_FN_AUTO_CMD_DEPS,$(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc)
826$(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc: $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
827 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
828 $(APPEND) -t $@ '1 ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
829
830ifndef VBOX_WITH_MIDL_PROXY_STUB
831 src-server/win/VBoxSVC.rc_DEPS += $(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs
832 VBoxSVC_CLEAN += $(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs
833 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs)
834 $(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs: $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
835 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
836 $(VBOX_XSLTPROC) \
837 --stringparam Application VirtualBox \
838 --stringparam Module VBoxSVC \
839 -o $@ \
840 $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl \
841 $(VBOX_XIDL_FILE)
842endif
843
844## @todo r=klaus unfortunately we don't have xmllint everywhere, would be
845# good to check the validity for every VirtualBox.xidl change.
846#$(VBOX_XIDL_FILE).validated.ts: $(VBOX_XIDL_FILE_SRC)
847# xmllint --dtdvalid $(VBOX_PATH_MAIN_SRC)/idl/VirtualBox.dtd --noout $<
848# $(QUIET)$(CP) --changed -fv $< $(VBOX_XIDL_FILE).validated.ts
849#
850#OTHERS += $(VBOX_XIDL_FILE).validated.ts
851#OTHER_CLEAN += $(VBOX_XIDL_FILE).validated.ts
852
853testvalidxidl: $(VBOX_XIDL_FILE_SRC)
854 xmllint --dtdvalid $(VBOX_PATH_MAIN_SRC)/idl/VirtualBox.dtd --noout $<
855
856
857#
858# Embed some constraints from XML Schema file into VBoxSVC
859#
860VBOX_XML_SCHEMA = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings.xsd
861
862$(VBOX_XML_SCHEMADEFS_H): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA) | $$(dir $$@)
863 $(call MSG_GENERATE,SchemaDefs,$@,$<)
864 $(QUIET)$(VBOX_XSLTPROC) --stringparam mode declare -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA)
865
866$(VBOX_XML_SCHEMADEFS_CPP): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA) | $$(dir $$@)
867 $(call MSG_GENERATE,SchemaDefs,$@,$<)
868 $(QUIET)$(VBOX_XSLTPROC) --stringparam mode define -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA)
869
870testvalidsettings: $(VBOX_XML_SCHEMA)
871 xmllint --schema $< --noout $(HOME)/.VirtualBox/VirtualBox.xml
872 xmllint --schema $< --noout $(HOME)/.VirtualBox/Machines/*/*.xml
873 xmllint --schema $< --noout $(HOME)/.VirtualBox/Machines/*/*.vbox
874 xmllint --schema $< --noout $(HOME)/VirtualBox\ VMs/*/*.vbox
875
876OTHER_CLEAN += $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
877
878
879#
880# Generate some event stuff for VBoxSVC and VBoxC.
881#
882
883# Events
884$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_AUTOGEN_EVENT_H).ts)
885$(VBOX_AUTOGEN_EVENT_H).ts +| $(VBOX_AUTOGEN_EVENT_H): $(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 VBoxEventHeader -o "$@" "$(VBOX_PATH_MAIN_SRC)/idl/comimpl.xsl" "$(VBOX_XIDL_FILE)"
889 $(QUIET)$(CP) --changed -fv -- "$@" "$(VBOX_AUTOGEN_EVENT_H)"
890
891$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_AUTOGEN_EVENT_CPP).ts)
892$(VBOX_AUTOGEN_EVENT_CPP).ts +| $(VBOX_AUTOGEN_EVENT_CPP): $(VBOX_PATH_MAIN_SRC)/idl/comimpl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
893 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
894 $(call MSG_TOOL,xsltproc,autogen events,$<,$@)
895 $(QUIET)$(VBOX_XSLTPROC) --stringparam G_kind VBoxEvent -o "$@" "$(VBOX_PATH_MAIN_SRC)/idl/comimpl.xsl" "$(VBOX_XIDL_FILE)"
896 $(QUIET)$(CP) --changed -fv -- "$@" "$(VBOX_AUTOGEN_EVENT_CPP)"
897
898OTHER_CLEAN += $(VBOX_AUTOGEN_EVENT_H).ts $(VBOX_AUTOGEN_EVENT_H) $(VBOX_AUTOGEN_EVENT_CPP).ts $(VBOX_AUTOGEN_EVENT_CPP)
899
900# Enum stringifiers
901$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_AUTOGEN_STRINGIFY_ENUMS_H).ts)
902$(VBOX_AUTOGEN_STRINGIFY_ENUMS_H).ts +| $(VBOX_AUTOGEN_STRINGIFY_ENUMS_H): $(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 header -o "$@" "$(VBOX_PATH_MAIN_SRC)/idl/stringify-enums.xsl" "$(VBOX_XIDL_FILE)"
906 $(QUIET)$(CP) --changed -fv -- "$@" "$(VBOX_AUTOGEN_STRINGIFY_ENUMS_H)"
907
908$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP).ts)
909$(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP).ts +| $(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP): $(VBOX_PATH_MAIN_SRC)/idl/stringify-enums.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
910 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
911 $(call MSG_TOOL,xsltproc,autogen enum stringifiers,$<,$@)
912 $(QUIET)$(VBOX_XSLTPROC) --stringparam G_kind source -o "$@" "$(VBOX_PATH_MAIN_SRC)/idl/stringify-enums.xsl" "$(VBOX_XIDL_FILE)"
913 $(QUIET)$(CP) --changed -fv -- "$@" "$(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP)"
914
915OTHER_CLEAN += $(VBOX_AUTOGEN_STRINGIFY_ENUMS_H).ts $(VBOX_AUTOGEN_STRINGIFY_ENUMS_H) $(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP).ts $(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP)
916
917ifdef VBOX_WITH_XPCOM
918#
919# VBoxSVCM - VBoxSVC wrapper module
920#
921DLLS += VBoxSVCM
922VBoxSVCM_TEMPLATE = VBOXMAINCOMP
923VBoxSVCM_DEFS = IN_RING3 $(VBOX_MAIN_DEFS)
924 ifdef VBOX_WITH_HARDENING
925VBoxSVCM_DEFS += VBOX_WITH_HARDENING
926 endif
927VBoxSVCM_INCS = \
928 include \
929 $(VBoxC_0_OUTDIR) \
930 .
931VBoxSVCM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
932VBoxSVCM_SOURCES = \
933 src-server/xpcom/server_module.cpp
934VBoxSVCM_LDFLAGS.darwin = \
935 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxSVCM.dylib \
936 -exported_symbols_list $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
937 ifeq ($(KBUILD_TARGET),darwin)
938VBoxSVCM_ORDERDEPS += $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
939VBoxSVCM_CLEAN += $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
940$$(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def:
941 $(RM) -f $@
942 $(APPEND) $@ _NSGetModule
943 endif
944VBoxSVCM_INTERMEDIATES += $(VBOX_IDL_HEADER.XPCOM)
945
946 # 32-bit version of the module.
947 ifdef VBOX_WITH_32_ON_64_MAIN_API
948DLLS += VBoxSVCM-x86
949VBoxSVCM-x86_TEMPLATE = VBoxMainComp-x86
950VBoxSVCM-x86_EXTENDS = VBoxSVCM
951 endif
952
953endif # VBOX_WITH_XPCOM
954
955
956#
957# VBoxC module
958#
959DLLS += VBoxC
960VBoxC_TEMPLATE = VBOXMAINCOMP
961if defined(VBOX_WITH_PRECOMPILED_HEADERS) && "$(KBUILD_TARGET)" == "win"
962 VBoxC_USES = vccprecomp
963 VBoxC_PCH_HDR := $(PATH_SUB_CURRENT)/src-client/win/precomp_vcc.h
964else if $(KBUILD_KMK_REVISION) >= 3256 && "$(KBUILD_TARGET)" != "darwin" && !defined(VBOX_WITHOUT_PRECOMPILED_HEADERS)
965 if $(VBOX_GCC_VERSION_CXX) >= 50000 # GCC 4.x runs into trouble compiling the header.
966VBoxC_USES += gccprecomp
967VBoxC_PCH_HDR := $(PATH_SUB_CURRENT)/src-client/xpcom/precomp_gcc.h
968 endif
969endif
970VBoxC_DEFS = \
971 IN_RING3 \
972 $(VBOX_MAIN_DEFS) \
973 VBOX_COM_INPROC \
974 $(if $(VBOX_WITH_EFI),VBOX_WITH_EFI,) \
975 $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
976 $(if $(VBOX_WITH_VIDEOHWACCEL),VBOX_WITH_VIDEOHWACCEL,) \
977 $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP,) \
978 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,) \
979 $(if $(VBOX_WITH_USB),VBOX_WITH_USB,) \
980 $(if $(VBOX_WITH_VRDEAUTH_IN_VBOXSVC),VBOX_WITH_VRDEAUTH_IN_VBOXSVC,) \
981 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
982 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,) \
983 $(if $(VBOX_WITH_TPM),VBOX_WITH_TPM,) \
984 $(if $(VBOX_WITH_FULL_VM_ENCRYPTION),VBOX_WITH_FULL_VM_ENCRYPTION,)
985ifdef VBOX_WITH_NETSHAPER
986 VBoxC_DEFS += VBOX_WITH_NETSHAPER
987endif
988VBoxC_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE
989VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
990VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
991
992if $(KBUILD_TARGET) != "win" && $(VBOX_GCC_VERSION_CXX) >= 40900 # gcc 4.9.x (4.8.x is causing endless RT_ELEMENT trouble)
993# VBoxC_CXXFLAGS = -Wunused -Wconversion
994endif
995
996VBoxC_SDKS = VBOX_LIBPNG VBOX_ZLIB
997
998if defined(VBOX_WITH_RECORDING) && defined(VBOX_WITH_LIBVPX)
999VBoxC_SDKS += VBOX_VPX
1000VBoxC_DEFS += VBOX_WITH_RECORDING VBOX_WITH_LIBVPX
1001VBoxC_SOURCES += \
1002 xml/Settings.cpp \
1003 src-client/EBMLWriter.cpp \
1004 src-client/WebMWriter.cpp \
1005 src-client/Recording.cpp \
1006 src-client/RecordingInternals.cpp \
1007 src-client/RecordingStream.cpp \
1008 src-client/RecordingUtils.cpp
1009
1010 if defined(VBOX_WITH_AUDIO_RECORDING) && defined(VBOX_WITH_LIBOPUS)
1011VBoxC_SDKS += VBOX_OPUS
1012VBoxC_DEFS += VBOX_WITH_AUDIO_RECORDING VBOX_WITH_LIBOPUS
1013VBoxC_SOURCES += src-client/DrvAudioRec.cpp
1014 endif
1015endif # VBOX_WITH_RECORDING && VBOX_WITH_LIBVPX
1016
1017ifdef VBOX_WITH_OPENSSL_FIPS
1018VBoxC_SDKS += VBOX_OPENSSL2
1019endif
1020
1021VBoxC_INCS = \
1022 include \
1023 $(VBoxC_0_OUTDIR) \
1024 $(VBOX_MAIN_APIWRAPPER_INCS) \
1025 $(dir $(VBOX_XML_SCHEMADEFS_H)) \
1026 $(VBOX_MAIN_APIWRAPPER_DIR)/dtrace \
1027 $(VBOX_GRAPHICS_INCS)
1028VBoxC_INCS.win = \
1029 $(VBoxCOM_0_OUTDIR) \
1030 .
1031
1032VBoxC_LDFLAGS.darwin = \
1033 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxC.dylib \
1034 -exported_symbols_list $(VBoxC_0_OUTDIR)/VBoxC.def \
1035 -framework IOKit
1036VBoxC_LDFLAGS.win += /MANIFEST \
1037 /DELAYLOAD:user32.dll
1038
1039
1040VBoxC_LIBS += \
1041 $(PATH_STAGE_LIB)/VBoxAPIWrap$(VBOX_SUFF_LIB)
1042VBoxC_LIBS.win += \
1043 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/psapi.lib \
1044 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
1045ifdef VBOX_WITH_NETFLT
1046 VBoxC_SDKS.win += VBOX_WIN_NEWDEV
1047 VBoxC_LIBS.win += \
1048 $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
1049 $(PATH_STAGE_LIB)/WinNetConfigNonStatic$(VBOX_SUFF_LIB) \
1050 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
1051 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
1052 VBoxC_LDFLAGS.win += \
1053 /DELAYLOAD:newdev.dll \
1054 /DELAYLOAD:setupapi.dll \
1055 /DELAYLOAD:iphlpapi.dll
1056endif
1057
1058ifdef VBOX_WITH_DRAG_AND_DROP
1059 VBoxC_LIBS += $(PATH_STAGE_LIB)/VBoxDnDHostR3Lib$(VBOX_SUFF_LIB)
1060endif
1061
1062VBoxC_INTERMEDIATES = \
1063 $(VBOX_MAIN_PREREQS) \
1064 $(VBOX_XML_SCHEMADEFS_H) \
1065 $(VBOX_AUTOGEN_EVENT_H) \
1066 $(VBOX_AUTOGEN_STRINGIFY_ENUMS_H) \
1067 $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
1068
1069VBoxC_SOURCES += \
1070 $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d \
1071 src-all/CryptoUtils.cpp \
1072 src-all/DisplayPNGUtil.cpp \
1073 src-all/DisplayResampleImage.cpp \
1074 src-all/EventImpl.cpp \
1075 src-all/Global.cpp \
1076 src-all/GlobalStatusConversion.cpp \
1077 src-all/HashedPw.cpp \
1078 src-all/Logging.cpp \
1079 src-all/NvramStoreImpl.cpp \
1080 src-all/PCIDeviceAttachmentImpl.cpp \
1081 src-all/ProgressImpl.cpp \
1082 src-all/SecretKeyStore.cpp \
1083 src-all/SharedFolderImpl.cpp \
1084 src-all/AutoCaller.cpp \
1085 src-all/ThreadTask.cpp \
1086 src-all/VirtualBoxBase.cpp \
1087 src-all/VirtualBoxErrorInfoImpl.cpp \
1088 $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
1089 src-client/UsbWebcamInterface.cpp \
1090 $(if $(VBOX_WITH_USB_CARDREADER),src-client/UsbCardReader.cpp,) \
1091 src-client/AdditionsFacilityImpl.cpp \
1092 src-client/BusAssignmentManager.cpp \
1093 $(if $(VBOX_WITH_PCI_PASSTHROUGH),src-client/PCIRawDevImpl.cpp,) \
1094 src-client/ClientTokenHolder.cpp \
1095 src-client/ConsoleImpl.cpp \
1096 src-client/ConsoleImpl2.cpp \
1097 src-client/ConsoleImplTeleporter.cpp \
1098 src-client/ConsoleVRDPServer.cpp \
1099 src-client/DisplayImpl.cpp \
1100 src-client/DisplayImplLegacy.cpp \
1101 src-client/DisplaySourceBitmapImpl.cpp \
1102 src-client/EmulatedUSBImpl.cpp \
1103 src-client/GuestImpl.cpp \
1104 src-client/GuestCtrlImpl.cpp \
1105 src-client/KeyboardImpl.cpp \
1106 src-client/MachineDebuggerImpl.cpp \
1107 src-client/MouseImpl.cpp \
1108 src-client/RemoteUSBDeviceImpl.cpp \
1109 src-client/SessionImpl.cpp \
1110 src-client/USBDeviceImpl.cpp \
1111 src-client/VBoxDriversRegister.cpp \
1112 src-client/VirtualBoxClientImpl.cpp \
1113 src-client/VMMDevInterface.cpp \
1114 $(VBOX_AUTOGEN_EVENT_CPP) \
1115 $(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP) \
1116 $(VBOX_XML_SCHEMADEFS_CPP)
1117
1118ifdef VBOX_WITH_MAIN_NLS
1119VBoxC_SOURCES += \
1120 src-all/VirtualBoxTranslator.cpp \
1121 src-all/QMTranslatorImpl.cpp
1122endif
1123
1124# Experimental cloud support
1125if defined(VBOX_WITH_CLOUD_NET)
1126 if defined(VBOX_WITH_LIBSSH)
1127 VBoxC_SDKS += VBOX_SSH VBOX_OPENSSL
1128 VBoxC_DEFS += LIBSSH_STATIC VBOX_WITH_LIBSSH
1129 endif
1130 VBoxC_SOURCES += src-client/CloudGateway.cpp
1131endif
1132
1133# Audio bits.
1134VBoxC_SOURCES += \
1135 src-client/AudioDriver.cpp \
1136 $(if $(VBOX_WITH_AUDIO_VRDE),src-client/DrvAudioVRDE.cpp,)
1137
1138VBoxC_SOURCES.win = \
1139 src-client/win/dllmain.cpp \
1140 src-client/win/VBoxC.def \
1141 src-client/win/VBoxC.rc
1142ifdef VBOX_WITH_GUEST_CONTROL
1143 VBoxC_SOURCES += \
1144 src-client/GuestSessionImplTasks.cpp \
1145 src-client/GuestCtrlPrivate.cpp \
1146 src-client/GuestDirectoryImpl.cpp \
1147 src-client/GuestFileImpl.cpp \
1148 src-client/GuestFsObjInfoImpl.cpp \
1149 src-client/GuestProcessImpl.cpp \
1150 src-client/GuestSessionImpl.cpp
1151endif
1152ifdef VBOX_WITH_DRAG_AND_DROP
1153 VBoxC_SOURCES += \
1154 src-client/GuestDnDPrivate.cpp \
1155 src-client/GuestDnDSourceImpl.cpp \
1156 src-client/GuestDnDTargetImpl.cpp
1157endif
1158ifdef VBOX_WITH_XPCOM
1159 VBoxC_SOURCES += \
1160 src-client/xpcom/module.cpp
1161endif
1162ifdef VBOX_WITH_HGCM
1163 VBoxC_SOURCES += \
1164 src-client/HGCMObjects.cpp \
1165 src-client/HGCMThread.cpp \
1166 src-client/HGCM.cpp
1167endif
1168ifdef VBOX_WITH_USB
1169 VBoxC_SOURCES += \
1170 src-client/RemoteUSBBackend.cpp
1171endif
1172ifndef VBOX_WITH_VRDEAUTH_IN_VBOXSVC
1173 VBoxC_SOURCES += \
1174 src-all/AuthLibrary.cpp
1175endif
1176
1177$(call KB_FN_DO_PASS0_ON_TARGET,VBoxC) # Sets VBoxC_0_OUTDIR
1178
1179ifeq ($(KBUILD_TARGET),darwin)
1180 VBoxC_ORDERDEPS += $(VBoxC_0_OUTDIR)/VBoxC.def
1181 VBoxC_CLEAN += $(VBoxC_0_OUTDIR)/VBoxC.def
1182 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxC_0_OUTDIR)/VBoxC.def)
1183 $(VBoxC_0_OUTDIR)/VBoxC.def:
1184 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1185 $(RM) -f $@
1186 $(APPEND) $@ _NSGetModule
1187 $(APPEND) $@ _VBoxDriversRegister
1188endif
1189
1190src-client/ConsoleImpl.cpp_DEFS = \
1191 $(if $(VBOX_WITH_OPENSSL_FIPS), VBOX_OPENSSL_FIPS,)
1192
1193
1194src-client/win/VBoxC.rc_DEPS = $(VBoxC_0_OUTDIR)/VBoxC.rgs $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
1195VBoxC_CLEAN.win += $(VBoxC_0_OUTDIR)/VBoxC.rgs
1196$(call KB_FN_AUTO_CMD_DEPS,$(VBoxC_0_OUTDIR)/VBoxC.rgs)
1197$(VBoxC_0_OUTDIR)/VBoxC.rgs: $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
1198 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1199 $(VBOX_XSLTPROC) \
1200 --stringparam Application VirtualBox \
1201 --stringparam Module VBoxC \
1202 -o $@ \
1203 $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl \
1204 $(VBOX_XIDL_FILE)
1205
1206ifdef VBOX_WITH_32_ON_64_MAIN_API
1207 #
1208 # 32-bit VBox API Client In-Process module.
1209 #
1210 # This is currently just a 32-bit version of VBoxC. It might be desirable to
1211 # split up VBoxC into a simple client and a VM client part later, in which
1212 # case this module will be a simple client.
1213 #
1214 # Note! One important thing is that the typelib for this DLL must be build
1215 # with the /env win32 switch and the VBoxC typelib with /env amd64, if
1216 # not they will overwrite each others typelib module entry.
1217 #
1218 DLLS += VBoxClient-x86
1219 VBoxClient-x86_TEMPLATE = VBoxMainComp-x86
1220 VBoxClient-x86_EXTENDS = VBoxC
1221if defined(VBOX_WITH_PRECOMPILED_HEADERS) && "$(KBUILD_TARGET)" == "win" ## @todo fix inheritance (fixed in r3253)
1222 VBoxClient-x86_USES = vccprecomp
1223 VBoxClient-x86_PCH_HDR := $(PATH_SUB_CURRENT)/src-client/win/precomp_vcc.h
1224endif
1225 VBoxClient-x86_SDKS = $(filter-out VBOX_OPUS VBOX_VPX,$(VBoxC_SDKS))
1226 VBoxClient-x86_DEFS = VBOX_COM_INPROC_API_CLIENT \
1227 $(filter-out VBOX_WITH_RECORDING VBOX_WITH_LIBVPX VBOX_WITH_AUDIO_RECORDING VBOX_WITH_LIBOPUS,$(VBoxC_DEFS))
1228 VBoxClient-x86_INCS.win = \
1229 $(VBoxClient-x86_0_OUTDIR) \
1230 $(VBoxCOM-x86_0_OUTDIR) \
1231 $(VBoxC_INCS.win)
1232 VBoxClient-x86_SOURCES = \
1233 src-all/EventImpl.cpp \
1234 src-all/Global.cpp \
1235 src-all/GlobalStatusConversion.cpp \
1236 src-all/AutoCaller.cpp \
1237 src-all/ThreadTask.cpp \
1238 src-all/VirtualBoxBase.cpp \
1239 src-all/VirtualBoxErrorInfoImpl.cpp \
1240 src-client/ClientTokenHolder.cpp \
1241 src-client/SessionImpl.cpp \
1242 src-client/VirtualBoxClientImpl.cpp \
1243 $(VBOX_AUTOGEN_EVENT_CPP) \
1244 $(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP) \
1245 $(VBOX_XML_SCHEMADEFS_CPP)
1246 ifdef VBOX_WITH_MAIN_NLS
1247 VBoxClient-x86_SOURCES += \
1248 src-all/VirtualBoxTranslator.cpp \
1249 src-all/QMTranslatorImpl.cpp
1250 endif
1251 VBoxClient-x86_SOURCES.win = \
1252 src-client/win/dllmain.cpp \
1253 src-client/win/VBoxClient-x86.def \
1254 src-client/win/VBoxClient-x86.rc
1255 ifdef VBOX_WITH_XPCOM
1256 VBoxClient-x86_SOURCES += \
1257 src-client/xpcom/module.cpp
1258 endif
1259 VBoxClient-x86_LIBS = \
1260 $(PATH_STAGE_LIB)/VBoxAPIWrap-x86$(VBOX_SUFF_LIB)
1261 VBoxClient-x86_LIBS.win = $(NO_SUCH_VARIABLE)
1262 VBoxClient-x86_LIBS.win.x86 += \
1263 $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/delayimp.lib \
1264 $(PATH_SDK_$(VBOX_WINPSDK)_LIB.x86)/WbemUuid.Lib
1265 VBoxClient-x86_CLEAN.win += $(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs
1266 $(call KB_FN_DO_PASS0_ON_TARGET,VBoxClient-x86) # Sets VBoxClient-x86_0_OUTDIR
1267
1268 src-client/win/VBoxClient-x86.rc_DEPS = \
1269 $(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs \
1270 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb
1271
1272 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs)
1273 $(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs: \
1274 $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl \
1275 $(VBOX_XIDL_FILE) | $$(dir $$@)
1276 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1277 $(VBOX_XSLTPROC) \
1278 --stringparam Application VirtualBox \
1279 --stringparam Module VBoxC \
1280 -o $@ \
1281 $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl \
1282 $(VBOX_XIDL_FILE)
1283endif
1284
1285#
1286# The VBoxExtPackHelperApp.
1287#
1288ifdef VBOX_WITH_EXTPACK
1289 PROGRAMS += VBoxExtPackHelperApp
1290 VBoxExtPackHelperApp_TEMPLATE = VBoxR3SetUidToRoot
1291 VBoxExtPackHelperApp_LDFLAGS.darwin = -framework Security
1292 VBoxExtPackHelperApp_LDFLAGS.win = /SUBSYSTEM:windows
1293 VBoxExtPackHelperApp_SOURCES = \
1294 src-helper-apps/VBoxExtPackHelperApp.cpp \
1295 src-all/ExtPackUtil.cpp
1296 VBoxExtPackHelperApp_SOURCES.win = \
1297 src-helper-apps/VBoxExtPackHelperApp.rc
1298 VBoxExtPackHelperApp_LIBS = \
1299 $(LIB_RUNTIME)
1300endif # VBOX_WITH_EXTPACK
1301
1302#
1303# VolInfo
1304#
1305ifdef VBOX_WITH_DEVMAPPER
1306 PROGRAMS.linux += VBoxVolInfo
1307 VBoxVolInfo_TEMPLATE = VBoxR3SetUidToRoot
1308 VBoxVolInfo_SOURCES = src-helper-apps/VBoxVolInfo.cpp
1309 VBoxVolInfo_LIBS = devmapper
1310endif
1311
1312
1313endif # !defined(VBOX_ONLY_SDK) && !defined(VBOX_ONLY_EXTPACKS) (the ifndef is far above)
1314ifndef VBOX_ONLY_SDK
1315
1316
1317#
1318# VBoxCOM - COM Abstraction Layer library
1319#
1320LIBRARIES += VBoxCOM
1321VBoxCOM_TEMPLATE = VBoxMainLib
1322VBoxCOM_INTERMEDIATES = $(VBOX_MAIN_PREREQS) \
1323 $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
1324VBoxCOM_SOURCES = \
1325 glue/com.cpp \
1326 glue/VBoxLogRelCreate.cpp \
1327 glue/GetVBoxUserHomeDirectory.cpp \
1328 glue/initterm.cpp \
1329 glue/string.cpp \
1330 glue/string-base64.cpp \
1331 glue/AutoLock.cpp \
1332 glue/EventQueue.cpp \
1333 glue/NativeEventQueue.cpp \
1334 glue/ErrorInfo.cpp \
1335 glue/errorprint.cpp
1336VBoxCOM_INCS += $(VBOX_MAIN_APIWRAPPER_INCS) \
1337 include
1338ifeq ($(KBUILD_TARGET),win)
1339 ifdef VBOX_WITH_MIDL_PROXY_STUB
1340 VBoxCOM_DEFS.win = VBOX_WITH_AUTO_COM_REG_UPDATE
1341 endif
1342 ifdef VBOX_WITH_SDS
1343 VBoxCOM_DEFS.win += VBOX_WITH_SDS
1344 endif
1345 VBoxCOM_DEFS.x86 = _WIN32_WINNT=0x0500
1346 VBoxCOM_DEFS.amd64 = _WIN32_WINNT=0x0510
1347 VBoxCOM_SOURCES += \
1348 $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c
1349 VBoxCOM_CLEAN = \
1350 $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
1351 $(VBoxCOM_0_OUTDIR)/VirtualBox_p.c \
1352 $(VBoxCOM_0_OUTDIR)/dlldata.c \
1353 $(VBoxCOM_0_OUTDIR)/VirtualBox.h \
1354 $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
1355 VBoxCOM_CLEAN += \
1356 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c \
1357 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c \
1358 $(VBoxCOM_0_OUTDIR)/legacy/dlldata.c \
1359 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.h \
1360 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.tlb
1361 VBoxCOM_BLDDIRS = $(VBoxCOM_0_OUTDIR)/legacy/
1362else # !win
1363 VBoxCOM_SOURCES += \
1364 $(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c \
1365 glue/xpcom/helpers.cpp
1366endif # !win
1367
1368ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
1369glue/VBoxLogRelCreate.cpp_DEFS = KBUILD_TYPE="$(KBUILD_TYPE)"
1370else
1371glue/VBoxLogRelCreate.cpp_DEFS = KBUILD_TYPE=\"$(KBUILD_TYPE)\"
1372endif
1373
1374# 32-bit version of VBoxCOM.
1375if defined(VBOX_WITH_32_ON_64_MAIN_API) && !defined(VBOX_ONLY_EXTPACKS)
1376 LIBRARIES += VBoxCOM-x86
1377 VBoxCOM-x86_TEMPLATE = VBoxMainLib-x86
1378 VBoxCOM-x86_EXTENDS = VBoxCOM
1379 ifeq ($(KBUILD_TARGET),win)
1380 VBoxCOM-x86_CLEAN = \
1381 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c \
1382 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c \
1383 $(VBoxCOM-x86_0_OUTDIR)/dlldata.c \
1384 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox.h \
1385 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb
1386 endif
1387endif
1388
1389# -MD version for the GUI in -MDd builds.
1390ifeq ($(KBUILD_TARGET).$(VBOX_VCC_CRT_TYPE),win.d)
1391 ifndef VBOX_ONLY_EXTPACKS
1392 LIBRARIES += VBoxCOM-GUI
1393 USES += qt5
1394 VBoxCOM-GUI_TEMPLATE = VBOXQTGUI$(if-expr defined(VBOX_WITH_HARDENING),,EXE)
1395 VBoxCOM-GUI_EXTENDS = VBoxCOM
1396 endif
1397endif
1398
1399# define qt5 tools for translation even if VBOX_ONLY_EXTPACKS is enabled
1400ifdef VBOX_WITH_NLS
1401 USES += qt5
1402endif
1403
1404
1405endif # !VBOX_ONLY_SDK
1406
1407
1408#
1409# Installs com related thing(s) to bin.
1410#
1411INSTALLS.win += VBoxMain-com-inst
1412VBoxMain-com-inst_INST = $(INST_BIN)
1413VBoxMain-com-inst_MODE = a+r,u+w
1414VBoxMain-com-inst_SOURCES = src-all/win/comregister.cmd
1415
1416
1417if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "linux" && !defined(VBOX_ONLY_EXTPACKS)
1418 #
1419 # Installs linux/hardening related things to components.
1420 #
1421 INSTALLS.linux += VBoxMain-hardening-inst
1422 VBoxMain-hardening-inst_INST = $(INST_BIN)components/
1423 VBoxMain-hardening-inst_SYMLINKS = \
1424 VBoxDDU.so=>../VBoxDDU.so \
1425 VBoxRT.so=>../VBoxRT.so \
1426 VBoxVMM.so=>../VBoxVMM.so \
1427 VBoxXPCOM.so=>../VBoxXPCOM.so
1428endif
1429
1430
1431if defined(VBOX_WITH_MIDL_PROXY_STUB) && "$(KBUILD_TARGET)" == "win" && !defined(VBOX_ONLY_EXTPACKS)
1432 #
1433 # Experimental COM proxy + stub DLL w/ automatic registration updating.
1434 #
1435 # The Legacy stub is for older 64-bit windows versions (pre Windows 7) as we
1436 # were having various problems on windows server 2003 and 2008 with the code
1437 # MIDL generated. Also, in windows 7 there are some potentially interesting
1438 # changes in the generated code where it uses new helpers from OLE32.
1439 #
1440 DLLS += VBoxProxyStub
1441 VBoxProxyStub_TEMPLATE = VBOXMAINCOMP
1442 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
1443 VBoxProxyStub_DEFS := REGISTER_PROXY_DLL PROXY_CLSID_IS=$(quote $(VBOX_MIDL_PROXY_CLSID_IS))
1444 else
1445 VBoxProxyStub_DEFS := REGISTER_PROXY_DLL PROXY_CLSID_IS="$(VBOX_MIDL_PROXY_CLSID_IS)"
1446 endif
1447 ifdef VBOX_WITH_SDS
1448 VBoxProxyStub_DEFS += VBOX_WITH_SDS
1449 endif
1450 ifdef VBOX_WITH_SDS_CLIENT_WATCHER
1451 VBoxProxyStub_DEFS += VBOX_WITH_SDS_CLIENT_WATCHER,)
1452 endif
1453 VBoxProxyStub_DEFS.win.x86 = WIN32
1454 VBoxProxyStub_SDKS = VBOX_NTDLL
1455 VBoxProxyStub_DEFPATH = $(VBoxCOM_0_OUTDIR)/# Hack to workaround drive letter in $(VBoxCOM_0_OUTDIR)/ for CFLAGS hack below.
1456 VBoxProxyStub_INCS = $(VBoxCOM_0_OUTDIR)/
1457 VBoxProxyStub_SOURCES := \
1458 VirtualBox_p.c \
1459 VirtualBox_i.c \
1460 $(PATH_SUB_CURRENT)/src-all/win/VBoxProxyStub.def \
1461 $(PATH_SUB_CURRENT)/src-all/win/VBoxProxyStub.rc \
1462 $(PATH_SUB_CURRENT)/src-all/win/VBoxProxyStub.c
1463 src-all/win/VBoxProxyStub.rc_DEPS = $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
1464 VBoxProxyStub_VirtualBox_p.c_CFLAGS.x86 = /Gz # Workaround for incorrect ObjectStublessClient* prototypes in SDK v7.1.
1465
1466 DLLS += VBoxProxyStubLegacy
1467 VBoxProxyStubLegacy_TEMPLATE = VBOXMAINCOMP
1468 VBoxProxyStubLegacy_EXTENDS = VBoxProxyStub
1469 VBoxProxyStubLegacy_DEFS = $(VBoxProxyStub_DEFS) VBOX_IN_PROXY_STUB_LEGACY
1470 VBoxProxyStubLegacy_INCS = $(VBoxCOM_0_OUTDIR)/legacy/
1471 VBoxProxyStubLegacy_SOURCES = \
1472 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c \
1473 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c \
1474 src-all/win/VBoxProxyStub.def \
1475 src-all/win/VBoxProxyStubLegacy.rc \
1476 src-all/win/VBoxProxyStub.c
1477 src-all/win/VBoxProxyStubLegacy.rc_DEPS = $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.tlb
1478
1479 ifdef VBOX_WITH_32_ON_64_MAIN_API
1480 DLLS += VBoxProxyStub-x86
1481 VBoxProxyStub-x86_TEMPLATE = VBoxMainComp-x86
1482 VBoxProxyStub-x86_SDKS = VBOX_NTDLL
1483 VBoxProxyStub-x86_DEFS = $(VBoxProxyStub_DEFS) VBOX_PROXY_STUB_32_ON_64 WIN32
1484 VBoxProxyStub-x86_INCS = $(VBoxCOM-x86_0_OUTDIR)/
1485 VBoxProxyStub-x86_SOURCES = \
1486 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c \
1487 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c \
1488 src-all/win/VBoxProxyStub.c \
1489 src-all/win/VBoxProxyStub-x86.rc \
1490 src-all/win/VBoxProxyStub.def
1491 src-all/win/VBoxProxyStub-x86.rc_DEPS = $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb
1492 endif
1493endif
1494
1495
1496ifdef VBOX_WITH_MAIN_NLS
1497#
1498# NLS stuff.
1499#
1500include $(PATH_SUB_CURRENT)/nls/ApprovedLanguages.kmk
1501
1502PROGRAMS += VirtualBoxAPI
1503VirtualBoxAPI_TEMPLATE = VBoxNLS
1504VirtualBoxAPI_QT_TRANSLATIONS = $(addsuffix .ts,$(addprefix $(VBOX_PATH_MAIN_SRC)/nls/VirtualBoxAPI_,$(VBOX_APPROVED_MAIN_LANGUAGES)))
1505VirtualBoxAPI_VBOX_ALL_NLS_SOURCES = $(wildcard \
1506 $(VBOX_PATH_MAIN_SRC)/include/*.h\
1507 $(VBOX_PATH_MAIN_SRC)/src-all/*.cpp \
1508 $(VBOX_PATH_MAIN_SRC)/src-all/*.h \
1509 $(VBOX_PATH_MAIN_SRC)/src-server/*.cpp \
1510 $(VBOX_PATH_MAIN_SRC)/src-server/*.h \
1511 $(VBOX_PATH_MAIN_SRC)/src-client/*.cpp \
1512 $(VBOX_PATH_MAIN_SRC)/src-client/*.h )
1513
1514updatenls:: makeallnls $(VBOX_PATH_MAIN_SRC)/nls/VirtualBoxAPI_en.ts
1515
1516makeallnls:: $(VirtualBoxAPI_VBOX_ALL_NLS_SOURCES)
1517 $(call MSG_L1,lupdate all languages (nls/*.ts))
1518 $(QUIET)$(TOOL_QT5_LUPDATE) \
1519 $^ \
1520 -ts \
1521 $(filter-out nls/VirtualBoxAPI_en.ts, $(VirtualBoxAPI_QT_TRANSLATIONS)) \
1522 $(VBOX_PATH_MAIN_SRC)/nls/VirtualBoxAPI_xx_YY.ts
1523
1524#fake-main-nls:
1525# $(foreach file, $(VirtualBoxAPI_QT_TRANSLATIONS) \
1526# ,$(NLTAB)$(SED) -i \
1527# -e '/<source>.*<\/source>/h' \
1528# -e '/<source>.*<\/source>/p' \
1529# -e '/<translation type="unfinished"><\/translation>/{' \
1530# -e 'x' \
1531# -e 's/<source>\(.*\)<\/source>/<translation type="unfinished">$(notdir $(file)): \1<\/translation>/' \
1532# -e '}' \
1533# $(file) )
1534
1535
1536# Create the English translation file. This is something special cause it will
1537# contain the plural forms only.
1538$(VBOX_PATH_MAIN_SRC)/nls/VirtualBoxAPI_en.ts: $(VirtualBoxAPI_VBOX_ALL_NLS_SOURCES)
1539 $(call MSG_L1,lupdate $@)
1540 $(QUIET)$(TOOL_QT5_LUPDATE) \
1541 $^ \
1542 -ts \
1543 "$@"
1544 $(QUIET)$(SED) -n -i \
1545 -e '/<context>/,/<\/context>/!p' \
1546 -e '/<context>/h' \
1547 -e '/<name>/H' \
1548 -e '/<message numerus="yes">/,/<\/message>/H' \
1549 -e '/<\/context>/{H;x;/<message/p}' \
1550 "$@"
1551
1552endif # VBOX_WITH_MAIN_NLS
1553
1554
1555# generate rules
1556include $(FILE_KBUILD_SUB_FOOTER)
1557
1558
1559
1560#
1561# Additions rules.
1562#
1563
1564## @todo this hack ain't cutting it any longer. (the file name is abspath'ed since ages now.)
1565glue/xpcom/helpers.cpp: $(VBOX_IDL_TYPELIB.XPCOM)
1566
1567$(call KB_FN_AUTO_CMD_DEPS_EX,$(VBOX_IDL_FILE.XPCOM),$(PATH_OUT)/VBOX_IDL_FILE.XPCOM.vbox-dep)
1568$(VBOX_IDL_FILE.XPCOM): $(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
1569 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS_EX,$(PATH_OUT)/VBOX_IDL_FILE.XPCOM.vbox-dep)
1570 $(call MSG_TOOL,xsltproc,VBoxSVC,$(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl,$@)
1571 $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl $(VBOX_XIDL_FILE)
1572
1573$(call KB_FN_AUTO_CMD_DEPS_EX,$(VBOX_IDL_TYPELIB.XPCOM),$(PATH_OUT)/VBOX_IDL_TYPELIB.XPCOM.vbox-dep)
1574$(VBOX_IDL_TYPELIB.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
1575 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS_EX,$(PATH_OUT)/VBOX_IDL_TYPELIB.XPCOM.vbox-dep)
1576 $(call MSG_TOOL,xpidl,VBoxSVC,$(VBOX_IDL_FILE.XPCOM),$@)
1577 $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m typelib -I $(VBOX_PATH_XPCOM_IDL) -e $@ $(VBOX_IDL_FILE.XPCOM)
1578 $(CHMOD) 0644 $@
1579## @todo ^^^^^^^^^^^^ fix horrible hack
1580
1581$(call KB_FN_AUTO_CMD_DEPS_EX,$(VBOX_IDL_HEADER.XPCOM),$(PATH_OUT)/VBOX_IDL_HEADER.XPCOM.vbox-dep)
1582$(VBOX_IDL_HEADER.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
1583 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS_EX,$(PATH_OUT)/VBOX_IDL_HEADER.XPCOM.vbox-dep)
1584 $(call MSG_TOOL,xpidl,VBoxSVC,$(VBOX_IDL_FILE.XPCOM),$@)
1585 $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m header -I $(VBOX_PATH_XPCOM_IDL) -e $@ $(VBOX_IDL_FILE.XPCOM)
1586
1587$(call KB_FN_AUTO_CMD_DEPS_EX,$(VBOX_IDL_FILE.MSCOM),$(PATH_OUT)/VBOX_IDL_FILE.MSCOM.vbox-dep)
1588$(VBOX_IDL_FILE.MSCOM): $(VBOX_PATH_MAIN_SRC)/idl/midl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
1589 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS_EX,$(PATH_OUT)/VBOX_IDL_FILE.MSCOM.vbox-dep)
1590 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
1591 $(QUIET)$(VBOX_XSLTPROC) -o $@ \
1592 $(if $(VBOX_WITH_MIDL_PROXY_STUB),-stringparam g_fGenProxy yes,) \
1593 $(if $(VBOX_WITH_SDS),-stringparam g_fVBoxWithSDS yes,) \
1594 $(VBOX_PATH_MAIN_SRC)/idl/midl.xsl $(VBOX_XIDL_FILE)
1595
1596
1597# Aliases for testing purposes.
1598ifdef VBOX_WITH_XPCOM
1599testidl: $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM) $(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c
1600testidlhdr: $(VBOX_IDL_HEADER.XPCOM)
1601else
1602testidl: $(VBOX_IDL_FILE.MSCOM) $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
1603 $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c,)
1604endif
1605
1606
1607$(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c: $(VBOX_PATH_MAIN_SRC)/idl/xpidl_iid.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
1608 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
1609 $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
1610
1611if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" == "win"
1612
1613 # Note! Because we've got a different proxy stub DLL for pre windows 7 64-bit hosts, we target windows 7 for AMD64.
1614 # The output is different and hopefully more efficient, at least memory wise (using more helpers in OLE32).
1615 # Note! We're checking for win.amd64 below when setting the target because of the SDK build which happens on linux.amd64
1616 # but with a 32-bit Wine.
1617 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxCOM_0_OUTDIR)/VirtualBox_i.c)
1618 $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
1619 $(if $(VBOX_WITH_MIDL_PROXY_STUB), + $(VBoxCOM_0_OUTDIR)/VirtualBox_p.c + $(VBoxCOM_0_OUTDIR)/dlldata.c,) \
1620 + $(VBoxCOM_0_OUTDIR)/VirtualBox.h \
1621 + $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
1622 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1623 $(VBOX_MIDL_REDIRECT) $(VBOX_WIN_MIDL) /nologo /W4 \
1624 /env $(if-expr "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.amd64" ,amd64,win32) \
1625 /robust /protocol all /target $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),NT61,NT51) \
1626 /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM_0_OUTDIR)) \
1627 /cpp_cmd $(VBOX_MIDL_CPP_CMD) \
1628 $(foreachfile dir,$(SDK_$(VBOX_WINPSDK)_INCS),/I $(call VBOX_FN_MAKE_WIN_PATH,$(dir))) \
1629 /I idl \
1630 $(call VBOX_FN_MAKE_WIN_PATH,$(VBOX_IDL_FILE.MSCOM))
1631 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox.h)
1632 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox_i.c)
1633 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox_p.c)
1634
1635 if defined(VBOX_WITH_MIDL_PROXY_STUB)
1636 # -Windows Server 2003 AMD64 SP1 does not like the result when using '/protocol all' and '/target NT51'.
1637 # -Vista AMD64 SP1 and Windows Server 2008 AMD64 seems to have some objections as well, but it seemed
1638 # that using an older MIDL compiler (v7.00.0499 instead of v7.00.0555) helps. But the W2K3 fix also works.
1639 # To avoid 32-bit vs. 64-bit differences, we do the same for 32-bit windows versions.
1640 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c)
1641 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c \
1642 + $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c\
1643 + $(VBoxCOM_0_OUTDIR)/legacy/dlldata.c \
1644 + $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.h \
1645 + $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
1646 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1647 $(VBOX_MIDL_REDIRECT) $(VBOX_WIN_MIDL) /nologo /W4 \
1648 $(if-expr "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.amd64" \
1649 ,/env amd64 /x64 /target NT50 /robust \
1650 ,/env win32 /target NT51 /robust /protocol all ) \
1651 /out $(call VBOX_FN_MAKE_WIN_PATH,$(dir $@)) \
1652 /cpp_cmd $(VBOX_MIDL_CPP_CMD) \
1653 $(foreachfile dir,$(SDK_$(VBOX_WINPSDK)_INCS),/I $(call VBOX_FN_MAKE_WIN_PATH,$(dir))) \
1654 /I idl \
1655 $(call VBOX_FN_MAKE_WIN_PATH,$(VBOX_IDL_FILE.MSCOM))
1656 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.h)
1657 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c)
1658 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c)
1659 endif
1660
1661 if defined(VBOX_WITH_32_ON_64_MAIN_API) && !defined(VBOX_ONLY_EXTPACKS)
1662 # The XP targetted 32-bit proxy stub works with all versions of windows (the
1663 # issues leading to the VBoxProxyStubLegacy.dll are only on 64-bit windows).
1664 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c)
1665 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c \
1666 $(if $(VBOX_WITH_MIDL_PROXY_STUB), + $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c + $(VBoxCOM-x86_0_OUTDIR)/dlldata.c,) \
1667 + $(VBoxCOM-x86_0_OUTDIR)/VirtualBox.h \
1668 + $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
1669 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1670 $(VBOX_MIDL_REDIRECT_X86) $(VBOX_WIN_MIDL) /nologo /W4 \
1671 /env win32 /target NT51 /robust /protocol all \
1672 /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM-x86_0_OUTDIR)) \
1673 /tlb $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb) \
1674 /cpp_cmd $(VBOX_MIDL_CPP_CMD_X86) \
1675 $(foreachfile dir,$(SDK_$(VBOX_WINPSDK)_INCS),/I $(call VBOX_FN_MAKE_WIN_PATH,$(dir))) \
1676 /I idl \
1677 $(call VBOX_FN_MAKE_WIN_PATH,$(VBOX_IDL_FILE.MSCOM))
1678 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox.h)
1679 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c)
1680 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c)
1681 endif
1682
1683endif # defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" == "win"
1684
1685#
1686# Translation stuff
1687#
1688VBoxSVC_VBOX_HEADERS = \
1689 include/collection.h \
1690 include/MachineImpl.h
1691VBoxSVC_VBOX_TRANSLATIONS = \
1692 nls/VBoxSVC_de.ts
1693
1694VBoxC_VBOX_HEADERS = \
1695 include/ConsoleImpl.h
1696
1697VBoxC_VBOX_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
1698VBoxC_VBOX_HEADERS += $(VBOX_MAIN_APIWRAPPER_INCS)
1699
1700VBoxC_VBOX_TRANSLATIONS = \
1701 nls/VBoxC_de.ts
1702
1703ifdef VBOX_WITH_JMSCOM
1704
1705 #
1706 # Java glue JAR files
1707 #
1708 VBOX_JMSCOM_JAR = $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar
1709 VBOX_JMSCOM_TARGET := $(PATH_TARGET)/vboxjmscom-gen
1710 VBOX_JMSCOM_GEN = $(VBOX_JMSCOM_TARGET)/jmscomgen
1711 VBOX_JMSCOM_JDEST := $(VBOX_JMSCOM_TARGET)/jdest
1712 VBOX_GLUE_XSLT_DIR := $(PATH_ROOT)/src/VBox/Main/glue
1713 VBOX_JACOB_DIR := $(PATH_ROOT)/src/libs/jacob-1.17
1714
1715 INSTALLS += VBoxJMscom-inst-jar
1716 VBoxJMscom-inst-jar_INST = $(INST_SDK)bindings/mscom/java/
1717 VBoxJMscom-inst-jar_MODE = a+r,u+w
1718 VBoxJMscom-inst-jar_SOURCES = \
1719 $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar
1720 VBoxJMscom-inst-jar_CLEAN = \
1721 $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar \
1722 $(VBOX_JMSCOM_GEN)/jmscomglue.list \
1723 $(wildcard \
1724 $(VBOX_JMSCOM_GEN)/java/*.java \
1725 $(VBOX_JMSCOM_JDEST)/*.class \
1726 $(VBOX_JMSCOM_JDEST)/*/*.class \
1727 $(VBOX_JMSCOM_JDEST)/*/*/*.class \
1728 $(VBOX_JMSCOM_JDEST)/*/*/*/*.class \
1729 )
1730 VBoxJMscom-inst-jar_BLDDIRS += $(VBOX_JMSCOM_GEN)/java
1731 $(call KB_FN_DO_PASS0_ON_TARGET,VBoxJMscom-inst-jar) # Sets VBoxJMscom-inst-jar_0_OUTDIR
1732
1733 $(call KB_FN_AUTO_CMD_DEPS,$(VBOX_JMSCOM_GEN)/jmscomglue.list)
1734 $(VBOX_JMSCOM_GEN)/jmscomglue.list: \
1735 $(VBOX_XIDL_FILE) \
1736 $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl \
1737 $(VBOX_FILESPLIT) \
1738 | $(VBOX_JMSCOM_GEN)/java/
1739 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1740 $(call MSG_L1,Generating Java MSCOM glue files from XIDL)
1741 $(QUIET)$(RM) -f $(wildcard $(VBOX_JMSCOM_GEN)/java/*.java)
1742 $(QUIET)$(VBOX_XSLTPROC) \
1743 --stringparam filelistonly "" \
1744 --stringparam G_vboxApiSuffix $(VBOX_API_SUFFIX) \
1745 --stringparam G_vboxGlueStyle mscom \
1746 --stringparam G_vboxDirPrefix "" \
1747 -o $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl $(VBOX_XIDL_FILE)
1748 $(QUIET)$(VBOX_FILESPLIT) $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_JMSCOM_GEN)/java
1749 $(QUIET)echo $(VBOX_JMSCOM_GEN)/java/*.java > $@
1750
1751 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar)
1752 $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar: $(VBOX_JMSCOM_GEN)/jmscomglue.list | $$(dir $$@)
1753 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1754 $(call MSG_TOOL,javac,$(notdir $@),jmscomglue.list,)
1755 $(QUIET)$(RM) -Rf $(VBOX_JMSCOM_JDEST)
1756 $(QUIET)$(MKDIR) -p $(VBOX_JMSCOM_JDEST)
1757 $(call MSG_TOOL,javac,$(notdir $@),...,)
1758 $(QUIET)$(VBOX_JAVAC) $(VBOX_JAVAC_OPTS) @$(VBOX_JMSCOM_GEN)/jmscomglue.list \
1759 -d $(VBOX_JMSCOM_JDEST) -classpath "$(VBOX_JMSCOM_JDEST)$(VBOX_SEP)$(VBOX_JACOB_DIR)/jacob.jar"
1760 $(call MSG_LINK,$(notdir $@),$@)
1761 $(QUIET)$(VBOX_JAR) cf $@ -C $(VBOX_JMSCOM_JDEST) .
1762
1763 ## @todo compile TestVBox.java (see below) to have sanity checking
1764endif # VBOX_WITH_JMSCOM
1765
1766#
1767# Install Java glue sample code.
1768#
1769INSTALLS += javagluesample
1770javagluesample_INST = $(INST_SDK)bindings/glue/java/
1771javagluesample_MODE = a+r,u+w
1772javagluesample_SOURCES = \
1773 $(VBOX_PATH_MAIN_SRC)/glue/tests/TestVBox.java=>TestVBox.java \
1774 $(VBOX_PATH_MAIN_SRC)/glue/tests/Makefile=>Makefile
1775
1776#
1777# Rules associated with VBoxAPIWrap (in typical invocation order).
1778# We keep them down here to simplify the use of VBoxAPIWrap_0_OUTDIR.
1779#
1780
1781# Generate a make include file which lists the wrapper header and source files.
1782$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_VBOX_KMK_FILE).ts)
1783$(VBoxAPIWrap_VBOX_KMK_FILE).ts \
1784+| $(VBoxAPIWrap_VBOX_KMK_FILE): \
1785 $(VBOX_XIDL_FILE) \
1786 $(VBOX_PATH_MAIN_SRC)/idl/apiwrap-server-filelist.xsl \
1787 $(VBOX_PATH_MAIN_SRC)/Makefile.kmk
1788 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1789 $(call MSG_GENERATE,,$(VBoxAPIWrap_VBOX_KMK_FILE))
1790 $(QUIET)$(RM) -f $@
1791 $(QUIET)$(MKDIR) -p $(@D)
1792 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1793 $(if $(VBOX_WITH_SDS),-stringparam g_fVBoxWithSDS yes,) \
1794 -o $@ $(VBOX_PATH_MAIN_SRC)/idl/apiwrap-server-filelist.xsl $(VBOX_XIDL_FILE)
1795 $(QUIET)$(CP) --changed -fv $@ $(VBoxAPIWrap_VBOX_KMK_FILE)
1796
1797# Generate the header files for the wrappers.
1798$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-headers)
1799$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-headers \
1800+| $(VBOX_MAIN_APIWRAPPER_GEN_HDRS): \
1801 $(VBOX_XIDL_FILE) \
1802 $(VBOX_PATH_MAIN_SRC)/idl/typemap-shared.inc.xsl \
1803 $(VBoxAPIWrap_VBOX_XSLT) \
1804 $(VBOX_FILESPLIT) \
1805 | $$(dir $$@)
1806 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1807 $(call MSG_L1,Generating C++ Server API wrapper header files from XIDL)
1808 $(QUIET)$(RM) -f -- $(filter-out $(VBOX_MAIN_APIWRAPPER_GEN_HDRS), $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.h))
1809 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1810 --stringparam generating "headers" \
1811 -o $@ $(VBoxAPIWrap_VBOX_XSLT) $(VBOX_XIDL_FILE)
1812 $(QUIET)$(VBOX_FILESPLIT) $@ $(VBoxAPIWrap_0_OUTDIR)
1813
1814# Generate the DTrace probes for the wrappers and combine them with handcoded probes.
1815$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d.ts)
1816$(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d.ts \
1817+| $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d: \
1818 $(VBOX_XIDL_FILE) \
1819 $(VBOX_PATH_MAIN_SRC)/idl/typemap-shared.inc.xsl \
1820 $(VBoxAPIWrap_VBOX_XSLT) \
1821 $(VBOX_FILESPLIT) \
1822 | $$(dir $$@)
1823 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1824 $(call MSG_L1,Generating DTrace Provider for the VBox API (from XIDL))
1825 $(QUIET)$(RM) -f -- "$@" "$@.tmp"
1826 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1827 --stringparam generating "dtrace-probes" \
1828 -o "$@" $(VBoxAPIWrap_VBOX_XSLT) $(VBOX_XIDL_FILE)
1829 $(QUIET)$(SED) -e '' -o "$@.tmp" \
1830 "$(VBOX_PATH_MAIN_SRC)/src-all/VBoxAPI-start$(if-expr "$(VBOX_HOST_DTRACE_VERSION)" == "dtrace: Sun D 1.6.2",-alternative,).d" \
1831 "$@" \
1832 "$(VBOX_PATH_MAIN_SRC)/src-all/VBoxAPI-end$(if-expr "$(VBOX_HOST_DTRACE_VERSION)" == "dtrace: Sun D 1.6.2",-alternative,).d"
1833 $(QUIET)$(MV) -- "$@.tmp" "$@"
1834 $(QUIET)$(CP) --changed -fv -- "$@" "$(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d"
1835
1836# Generate the wrapper source files - split in two due to long processing time
1837$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-even)
1838$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-even \
1839+| $(VBOX_MAIN_APIWRAPPER_GEN_SRCS_EVEN): \
1840 $(VBOX_XIDL_FILE) \
1841 $(VBOX_PATH_MAIN_SRC)/idl/typemap-shared.inc.xsl \
1842 $(VBoxAPIWrap_VBOX_XSLT) \
1843 $(VBOX_FILESPLIT) \
1844 | $$(dir $$@)
1845 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1846 $(call MSG_L1,Generating C++ Server API wrapper files from XIDL - part 1)
1847 $(QUIET)$(RM) -f -- $(filter-out $(VBOX_MAIN_APIWRAPPER_GEN_SRCS), $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.cpp))
1848 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1849 --stringparam generating "sources" \
1850 --param reminder 0 \
1851 -o $@ $(VBoxAPIWrap_VBOX_XSLT) $(VBOX_XIDL_FILE)
1852 $(QUIET)$(VBOX_FILESPLIT) $@ $(VBoxAPIWrap_0_OUTDIR)
1853
1854$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-odd)
1855$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-odd \
1856+| $(VBOX_MAIN_APIWRAPPER_GEN_SRCS_ODD): \
1857 $(VBOX_XIDL_FILE) \
1858 $(VBOX_PATH_MAIN_SRC)/idl/typemap-shared.inc.xsl \
1859 $(VBoxAPIWrap_VBOX_XSLT) \
1860 $(VBOX_FILESPLIT) \
1861 | $$(dir $$@)
1862 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1863 $(call MSG_L1,Generating C++ Server API wrapper files from XIDL - part 2)
1864 $(QUIET)$(RM) -f -- $(filter-out $(VBOX_MAIN_APIWRAPPER_GEN_SRCS), $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.cpp))
1865 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1866 --stringparam generating "sources" \
1867 --param reminder 1 \
1868 -o $@ $(VBoxAPIWrap_VBOX_XSLT) $(VBOX_XIDL_FILE)
1869 $(QUIET)$(VBOX_FILESPLIT) $@ $(VBoxAPIWrap_0_OUTDIR)
1870
1871testapiwrappers:: \
1872 $(VBoxAPIWrap_0_OUTDIR)/apiwrappers-headers \
1873 $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d.ts \
1874 $(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-odd \
1875 $(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