VirtualBox

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

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

VMM,Main,HostServices: Use a function table for accessing the VBoxVMM.dll/so/dylib functionality, and load it dynamically when the Console object is initialized. Also converted a few drivers in Main to use device helpers to get config values and such. bugref:10074

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