VirtualBox

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

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

Main: Fix for OSE builds (VBOX_WITH_RECORDING is not defined there, but we need xml/Settings.cpp) for using MachineConfigFile::getHostDefaultAudioDriver() and friends). bugref:​10051

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