VirtualBox

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

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

Main: Don't known why we didn't enable the Host::getAcceleration3DAvailable functionality, forgot/lost passing on the VBOX_WITH_3D_ACCELERATION define in the Makefile.kmk perhaps, let's see what happens when we define it now.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 67.4 KB
Line 
1# $Id: Makefile.kmk 94143 2022-03-08 23:12:27Z 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
570VBoxSVC_LIBS.win += \
571 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/dnsapi.lib
572
573VBoxSVC_INTERMEDIATES = \
574 $(VBOX_MAIN_PREREQS) \
575 $(VBOX_XML_SCHEMADEFS_H) \
576 $(VBOX_AUTOGEN_EVENT_H) \
577 $(VBOX_AUTOGEN_STRINGIFY_ENUMS_H) \
578 $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
579
580VBoxSVC_SOURCES = \
581 $(VBOX_SVC_CERTS_FILE) \
582 $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d \
583 src-all/AuthLibrary.cpp \
584 src-all/DisplayPNGUtil.cpp \
585 src-all/DisplayResampleImage.cpp \
586 src-all/DisplayUtils.cpp \
587 src-all/EventImpl.cpp \
588 src-all/Global.cpp \
589 src-all/GlobalStatusConversion.cpp \
590 src-all/HashedPw.cpp \
591 src-all/Logging.cpp \
592 src-all/NvramStoreImpl.cpp \
593 src-all/PCIDeviceAttachmentImpl.cpp \
594 src-all/ProgressImpl.cpp \
595 src-all/SecretKeyStore.cpp \
596 src-all/SharedFolderImpl.cpp \
597 src-all/AutoCaller.cpp \
598 src-all/ThreadTask.cpp \
599 src-all/VirtualBoxBase.cpp \
600 src-all/VirtualBoxErrorInfoImpl.cpp \
601 $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
602 src-server/CertificateImpl.cpp \
603 src-server/ApplianceImpl.cpp \
604 src-server/ApplianceImplExport.cpp \
605 src-server/ApplianceImplImport.cpp \
606 src-server/AudioAdapterImpl.cpp \
607 src-server/BandwidthControlImpl.cpp \
608 src-server/BandwidthGroupImpl.cpp \
609 src-server/BIOSSettingsImpl.cpp \
610 src-server/RecordingSettingsImpl.cpp \
611 src-server/RecordingScreenSettingsImpl.cpp \
612 src-server/GraphicsAdapterImpl.cpp \
613 src-server/ClientWatcher.cpp \
614 src-server/ClientToken.cpp \
615 src-server/CloudProviderManagerImpl.cpp \
616 src-server/CPUProfileImpl.cpp \
617 src-server/DataStreamImpl.cpp \
618 src-server/DHCPServerImpl.cpp \
619 src-server/DHCPConfigImpl.cpp \
620 ../NetworkServices/Dhcpd/DhcpOptions.cpp \
621 src-server/NetworkServiceRunner.cpp \
622 src-server/NATNetworkImpl.cpp \
623 $(if $(VBOX_WITH_CLOUD_NET), \
624 src-server/CloudNetworkImpl.cpp \
625 ,) \
626 src-server/GuestOSTypeImpl.cpp \
627 src-server/HostDnsService.cpp \
628 src-server/HostImpl.cpp \
629 src-server/HostNetworkInterfaceImpl.cpp \
630 src-server/HostPower.cpp \
631 src-server/HostUpdateImpl.cpp \
632 src-server/HostVideoInputDeviceImpl.cpp \
633 src-server/HostDrivePartitionImpl.cpp \
634 src-server/HostDriveImpl.cpp \
635 src-server/MachineImpl.cpp \
636 src-all/MachineLaunchVMCommonWorker.cpp \
637 src-server/MachineImplCloneVM.cpp \
638 src-server/MachineImplMoveVM.cpp \
639 src-server/Matching.cpp \
640 src-server/MediumAttachmentImpl.cpp \
641 src-server/MediumFormatImpl.cpp \
642 src-server/MediumImpl.cpp \
643 src-server/MediumLock.cpp \
644 src-server/MediumIOImpl.cpp \
645 src-server/NATEngineImpl.cpp \
646 src-server/NetworkAdapterImpl.cpp \
647 src-server/ParallelPortImpl.cpp \
648 src-server/ProgressProxyImpl.cpp \
649 src-server/SerialPortImpl.cpp \
650 src-server/SnapshotImpl.cpp \
651 src-server/StorageControllerImpl.cpp \
652 src-server/SystemPropertiesImpl.cpp \
653 src-server/TokenImpl.cpp \
654 src-server/TrustedPlatformModuleImpl.cpp \
655 src-server/UefiVariableStoreImpl.cpp \
656 $(if $(VBOX_WITH_UNATTENDED), \
657 src-server/UnattendedImpl.cpp \
658 src-server/UnattendedInstaller.cpp \
659 src-server/UnattendedOs2Installer.cpp \
660 src-server/UnattendedScript.cpp \
661 src-all/TextScript.cpp \
662 ,) \
663 src-server/USBControllerImpl.cpp \
664 src-server/USBDeviceFiltersImpl.cpp \
665 src-server/VFSExplorerImpl.cpp \
666 src-server/VirtualBoxImpl.cpp \
667 src-server/VRDEServerImpl.cpp \
668 src-server/generic/AutostartDb-generic.cpp \
669 xml/ovfreader.cpp \
670 xml/Settings.cpp \
671 $(VBOX_XML_SCHEMADEFS_CPP) \
672 $(VBOX_AUTOGEN_EVENT_CPP) \
673 $(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP) \
674 $(if $(VBOX_WITH_XPCOM),src-server/xpcom/server.cpp,)
675
676ifdef VBOX_WITH_MAIN_NLS
677VBoxSVC_SOURCES += \
678 src-all/VirtualBoxTranslator.cpp \
679 src-all/QMTranslatorImpl.cpp
680endif
681
682ifn1of ($(KBUILD_TARGET), win darwin)
683VBoxSVC_SOURCES += $(PATH_ROOT)/src/VBox/Devices/Network/slirp/resolv_conf_parser.c
684#$(PATH_ROOT)/src/VBox/Devices/Network/slirp/resolv_conf_parser.c_DEFS += LOG_GROUP=LOG_GROUP_MAIN
685endif
686
687VBoxSVC_SOURCES.darwin = \
688 src-server/darwin/iokit.cpp \
689 src-server/darwin/HostPowerDarwin.cpp \
690 src-server/darwin/HostDnsServiceDarwin.cpp
691ifdef VBOX_WITH_VMNET
692 VBoxSVC_SOURCES.darwin += \
693 src-server/HostOnlyNetworkImpl.cpp
694endif
695
696VBoxSVC_SOURCES.win = \
697 src-server/win/svcmain.cpp \
698 src-server/win/svchlp.cpp \
699 src-server/win/HostPowerWin.cpp \
700 src-server/win/VBoxSVC.rc \
701 src-server/win/HostDnsServiceWin.cpp
702
703VBoxSVC_SOURCES.linux = \
704 src-server/linux/HostHardwareLinux.cpp \
705 src-server/linux/HostDnsServiceLinux.cpp \
706 $(if $(VBOX_WITH_DBUS),src-server/linux/HostPowerLinux.cpp) \
707 src-server/HostDnsServiceResolvConf.cpp
708
709VBoxSVC_SOURCES.solaris = \
710 src-server/linux/vbox-libhal.cpp \
711 src-server/solaris/DynLoadLibSolaris.cpp \
712 src-server/HostDnsServiceResolvConf.cpp
713
714VBoxSVC_SOURCES.os2 = \
715 src-server/HostDnsServiceResolvConf.cpp
716
717VBoxSVC_SOURCES.freebsd = \
718 src-server/freebsd/HostHardwareFreeBSD.cpp \
719 src-server/HostDnsServiceResolvConf.cpp
720
721VBoxSVC_LDFLAGS.freebsd += -lcam
722
723
724ifdef VBOX_WITH_USB
725 ifdef VBOX_WITH_SYSFS_BY_DEFAULT
726 src-server/linux/USBProxyBackendLinux.cpp_DEFS += VBOX_WITH_SYSFS_BY_DEFAULT
727 endif
728 VBoxSVC_SOURCES += \
729 src-server/USBDeviceFilterImpl.cpp \
730 src-server/USBProxyService.cpp \
731 src-server/USBProxyBackend.cpp \
732 src-server/generic/USBProxyBackendUsbIp.cpp \
733 src-server/HostUSBDeviceImpl.cpp
734 VBoxSVC_SOURCES.darwin += src-server/darwin/USBProxyBackendDarwin.cpp
735 VBoxSVC_SOURCES.linux += src-server/linux/USBProxyBackendLinux.cpp
736 VBoxSVC_SOURCES.linux += src-server/linux/USBGetDevices.cpp
737 VBoxSVC_SOURCES.os2 += src-server/os2/USBProxyBackendOs2.cpp
738 VBoxSVC_SOURCES.solaris += src-server/solaris/USBProxyBackendSolaris.cpp
739 VBoxSVC_SOURCES.win += src-server/win/USBProxyBackendWindows.cpp
740 VBoxSVC_SOURCES.freebsd += src-server/freebsd/USBProxyBackendFreeBSD.cpp
741endif
742
743ifdef VBOX_WITH_NETFLT
744 VBoxSVC_SDKS.win += VBOX_WIN_NEWDEV
745 VBoxSVC_LIBS.win += \
746 $(PATH_STAGE_LIB)/WinNetConfigNonStatic$(VBOX_SUFF_LIB) \
747 $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
748 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
749 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
750endif
751VBoxSVC_LDFLAGS.darwin = -framework IOKit -framework SystemConfiguration
752
753ifdef VBOX_WITH_3D_ACCELERATION
754 VBoxSVC_DEFS += 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_DRAG_AND_DROP
1049 VBoxC_LIBS += $(PATH_STAGE_LIB)/VBoxDnDHostR3Lib$(VBOX_SUFF_LIB)
1050endif
1051
1052VBoxC_INTERMEDIATES = \
1053 $(VBOX_MAIN_PREREQS) \
1054 $(VBOX_XML_SCHEMADEFS_H) \
1055 $(VBOX_AUTOGEN_EVENT_H) \
1056 $(VBOX_AUTOGEN_STRINGIFY_ENUMS_H) \
1057 $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
1058
1059VBoxC_SOURCES += \
1060 $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d \
1061 src-all/DisplayPNGUtil.cpp \
1062 src-all/DisplayResampleImage.cpp \
1063 src-all/EventImpl.cpp \
1064 src-all/Global.cpp \
1065 src-all/GlobalStatusConversion.cpp \
1066 src-all/HashedPw.cpp \
1067 src-all/Logging.cpp \
1068 src-all/NvramStoreImpl.cpp \
1069 src-all/PCIDeviceAttachmentImpl.cpp \
1070 src-all/ProgressImpl.cpp \
1071 src-all/SecretKeyStore.cpp \
1072 src-all/SharedFolderImpl.cpp \
1073 src-all/AutoCaller.cpp \
1074 src-all/ThreadTask.cpp \
1075 src-all/VirtualBoxBase.cpp \
1076 src-all/VirtualBoxErrorInfoImpl.cpp \
1077 $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
1078 src-client/UsbWebcamInterface.cpp \
1079 $(if $(VBOX_WITH_USB_CARDREADER),src-client/UsbCardReader.cpp,) \
1080 src-client/AdditionsFacilityImpl.cpp \
1081 src-client/BusAssignmentManager.cpp \
1082 $(if $(VBOX_WITH_PCI_PASSTHROUGH),src-client/PCIRawDevImpl.cpp,) \
1083 src-client/ClientTokenHolder.cpp \
1084 src-client/ConsoleImpl.cpp \
1085 src-client/ConsoleImpl2.cpp \
1086 src-client/ConsoleImplTeleporter.cpp \
1087 src-client/ConsoleVRDPServer.cpp \
1088 src-client/DisplayImpl.cpp \
1089 src-client/DisplayImplLegacy.cpp \
1090 src-client/DisplaySourceBitmapImpl.cpp \
1091 src-client/EmulatedUSBImpl.cpp \
1092 src-client/GuestImpl.cpp \
1093 src-client/GuestCtrlImpl.cpp \
1094 src-client/KeyboardImpl.cpp \
1095 src-client/MachineDebuggerImpl.cpp \
1096 src-client/MouseImpl.cpp \
1097 src-client/RemoteUSBDeviceImpl.cpp \
1098 src-client/SessionImpl.cpp \
1099 src-client/USBDeviceImpl.cpp \
1100 src-client/VBoxDriversRegister.cpp \
1101 src-client/VirtualBoxClientImpl.cpp \
1102 src-client/VMMDevInterface.cpp \
1103 $(VBOX_AUTOGEN_EVENT_CPP) \
1104 $(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP) \
1105 $(VBOX_XML_SCHEMADEFS_CPP)
1106
1107ifdef VBOX_WITH_MAIN_NLS
1108VBoxC_SOURCES += \
1109 src-all/VirtualBoxTranslator.cpp \
1110 src-all/QMTranslatorImpl.cpp
1111endif
1112
1113# Experimental cloud support
1114if defined(VBOX_WITH_CLOUD_NET)
1115 if defined(VBOX_WITH_LIBSSH)
1116 VBoxC_SDKS += VBOX_SSH VBOX_OPENSSL
1117 VBoxC_DEFS += LIBSSH_STATIC VBOX_WITH_LIBSSH
1118 endif
1119 VBoxC_SOURCES += src-client/CloudGateway.cpp
1120endif
1121
1122# Audio bits.
1123VBoxC_SOURCES += \
1124 src-client/AudioDriver.cpp \
1125 $(if $(VBOX_WITH_AUDIO_VRDE),src-client/DrvAudioVRDE.cpp,)
1126
1127VBoxC_SOURCES.win = \
1128 src-client/win/dllmain.cpp \
1129 src-client/win/VBoxC.def \
1130 src-client/win/VBoxC.rc
1131ifdef VBOX_WITH_GUEST_CONTROL
1132 VBoxC_SOURCES += \
1133 src-client/GuestSessionImplTasks.cpp \
1134 src-client/GuestCtrlPrivate.cpp \
1135 src-client/GuestDirectoryImpl.cpp \
1136 src-client/GuestFileImpl.cpp \
1137 src-client/GuestFsObjInfoImpl.cpp \
1138 src-client/GuestProcessImpl.cpp \
1139 src-client/GuestSessionImpl.cpp
1140endif
1141ifdef VBOX_WITH_DRAG_AND_DROP
1142 VBoxC_SOURCES += \
1143 src-client/GuestDnDPrivate.cpp \
1144 src-client/GuestDnDSourceImpl.cpp \
1145 src-client/GuestDnDTargetImpl.cpp
1146endif
1147ifdef VBOX_WITH_XPCOM
1148 VBoxC_SOURCES += \
1149 src-client/xpcom/module.cpp
1150endif
1151ifdef VBOX_WITH_HGCM
1152 VBoxC_SOURCES += \
1153 src-client/HGCMObjects.cpp \
1154 src-client/HGCMThread.cpp \
1155 src-client/HGCM.cpp
1156endif
1157ifdef VBOX_WITH_USB
1158 VBoxC_SOURCES += \
1159 src-client/RemoteUSBBackend.cpp
1160endif
1161ifndef VBOX_WITH_VRDEAUTH_IN_VBOXSVC
1162 VBoxC_SOURCES += \
1163 src-all/AuthLibrary.cpp
1164endif
1165
1166$(call KB_FN_DO_PASS0_ON_TARGET,VBoxC) # Sets VBoxC_0_OUTDIR
1167
1168ifeq ($(KBUILD_TARGET),darwin)
1169 VBoxC_ORDERDEPS += $(VBoxC_0_OUTDIR)/VBoxC.def
1170 VBoxC_CLEAN += $(VBoxC_0_OUTDIR)/VBoxC.def
1171 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxC_0_OUTDIR)/VBoxC.def)
1172 $(VBoxC_0_OUTDIR)/VBoxC.def:
1173 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1174 $(RM) -f $@
1175 $(APPEND) $@ _NSGetModule
1176 $(APPEND) $@ _VBoxDriversRegister
1177endif
1178
1179src-client/ConsoleImpl.cpp_DEFS = \
1180 $(if $(VBOX_WITH_OPENSSL_FIPS), VBOX_OPENSSL_FIPS,)
1181
1182
1183src-client/win/VBoxC.rc_DEPS = $(VBoxC_0_OUTDIR)/VBoxC.rgs $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
1184VBoxC_CLEAN.win += $(VBoxC_0_OUTDIR)/VBoxC.rgs
1185$(call KB_FN_AUTO_CMD_DEPS,$(VBoxC_0_OUTDIR)/VBoxC.rgs)
1186$(VBoxC_0_OUTDIR)/VBoxC.rgs: $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
1187 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1188 $(VBOX_XSLTPROC) \
1189 --stringparam Application VirtualBox \
1190 --stringparam Module VBoxC \
1191 -o $@ \
1192 $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl \
1193 $(VBOX_XIDL_FILE)
1194
1195ifdef VBOX_WITH_32_ON_64_MAIN_API
1196 #
1197 # 32-bit VBox API Client In-Process module.
1198 #
1199 # This is currently just a 32-bit version of VBoxC. It might be desirable to
1200 # split up VBoxC into a simple client and a VM client part later, in which
1201 # case this module will be a simple client.
1202 #
1203 # Note! One important thing is that the typelib for this DLL must be build
1204 # with the /env win32 switch and the VBoxC typelib with /env amd64, if
1205 # not they will overwrite each others typelib module entry.
1206 #
1207 DLLS += VBoxClient-x86
1208 VBoxClient-x86_TEMPLATE = VBoxMainComp-x86
1209 VBoxClient-x86_EXTENDS = VBoxC
1210if defined(VBOX_WITH_PRECOMPILED_HEADERS) && "$(KBUILD_TARGET)" == "win" ## @todo fix inheritance (fixed in r3253)
1211 VBoxClient-x86_USES = vccprecomp
1212 VBoxClient-x86_PCH_HDR := $(PATH_SUB_CURRENT)/src-client/win/precomp_vcc.h
1213endif
1214 VBoxClient-x86_SDKS = $(filter-out VBOX_OPUS VBOX_VPX,$(VBoxC_SDKS))
1215 VBoxClient-x86_DEFS = VBOX_COM_INPROC_API_CLIENT \
1216 $(filter-out VBOX_WITH_RECORDING VBOX_WITH_LIBVPX VBOX_WITH_AUDIO_RECORDING VBOX_WITH_LIBOPUS,$(VBoxC_DEFS))
1217 VBoxClient-x86_INCS.win = \
1218 $(VBoxClient-x86_0_OUTDIR) \
1219 $(VBoxCOM-x86_0_OUTDIR) \
1220 $(VBoxC_INCS.win)
1221 VBoxClient-x86_SOURCES = \
1222 src-all/EventImpl.cpp \
1223 src-all/Global.cpp \
1224 src-all/GlobalStatusConversion.cpp \
1225 src-all/AutoCaller.cpp \
1226 src-all/ThreadTask.cpp \
1227 src-all/VirtualBoxBase.cpp \
1228 src-all/VirtualBoxErrorInfoImpl.cpp \
1229 src-client/ClientTokenHolder.cpp \
1230 src-client/SessionImpl.cpp \
1231 src-client/VirtualBoxClientImpl.cpp \
1232 $(VBOX_AUTOGEN_EVENT_CPP) \
1233 $(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP) \
1234 $(VBOX_XML_SCHEMADEFS_CPP)
1235 ifdef VBOX_WITH_MAIN_NLS
1236 VBoxClient-x86_SOURCES += \
1237 src-all/VirtualBoxTranslator.cpp \
1238 src-all/QMTranslatorImpl.cpp
1239 endif
1240 VBoxClient-x86_SOURCES.win = \
1241 src-client/win/dllmain.cpp \
1242 src-client/win/VBoxClient-x86.def \
1243 src-client/win/VBoxClient-x86.rc
1244 ifdef VBOX_WITH_XPCOM
1245 VBoxClient-x86_SOURCES += \
1246 src-client/xpcom/module.cpp
1247 endif
1248 VBoxClient-x86_LIBS = \
1249 $(PATH_STAGE_LIB)/VBoxAPIWrap-x86$(VBOX_SUFF_LIB)
1250 VBoxClient-x86_LIBS.win = $(NO_SUCH_VARIABLE)
1251 VBoxClient-x86_LIBS.win.x86 += \
1252 $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/delayimp.lib \
1253 $(PATH_SDK_$(VBOX_WINPSDK)_LIB.x86)/WbemUuid.Lib
1254 VBoxClient-x86_CLEAN.win += $(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs
1255 $(call KB_FN_DO_PASS0_ON_TARGET,VBoxClient-x86) # Sets VBoxClient-x86_0_OUTDIR
1256
1257 src-client/win/VBoxClient-x86.rc_DEPS = \
1258 $(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs \
1259 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb
1260
1261 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs)
1262 $(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs: \
1263 $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl \
1264 $(VBOX_XIDL_FILE) | $$(dir $$@)
1265 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1266 $(VBOX_XSLTPROC) \
1267 --stringparam Application VirtualBox \
1268 --stringparam Module VBoxC \
1269 -o $@ \
1270 $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl \
1271 $(VBOX_XIDL_FILE)
1272endif
1273
1274#
1275# The VBoxExtPackHelperApp.
1276#
1277ifdef VBOX_WITH_EXTPACK
1278 PROGRAMS += VBoxExtPackHelperApp
1279 VBoxExtPackHelperApp_TEMPLATE = VBoxR3SetUidToRoot
1280 VBoxExtPackHelperApp_LDFLAGS.darwin = -framework Security
1281 VBoxExtPackHelperApp_LDFLAGS.win = /SUBSYSTEM:windows
1282 VBoxExtPackHelperApp_SOURCES = \
1283 src-helper-apps/VBoxExtPackHelperApp.cpp \
1284 src-all/ExtPackUtil.cpp
1285 VBoxExtPackHelperApp_SOURCES.win = \
1286 src-helper-apps/VBoxExtPackHelperApp.rc
1287 VBoxExtPackHelperApp_LIBS = \
1288 $(LIB_RUNTIME)
1289endif # VBOX_WITH_EXTPACK
1290
1291#
1292# VolInfo
1293#
1294ifdef VBOX_WITH_DEVMAPPER
1295 PROGRAMS.linux += VBoxVolInfo
1296 VBoxVolInfo_TEMPLATE = VBoxR3SetUidToRoot
1297 VBoxVolInfo_SOURCES = src-helper-apps/VBoxVolInfo.cpp
1298 VBoxVolInfo_LIBS = devmapper
1299endif
1300
1301
1302endif # !defined(VBOX_ONLY_SDK) && !defined(VBOX_ONLY_EXTPACKS) (the ifndef is far above)
1303ifndef VBOX_ONLY_SDK
1304
1305
1306#
1307# VBoxCOM - COM Abstraction Layer library
1308#
1309LIBRARIES += VBoxCOM
1310VBoxCOM_TEMPLATE = VBoxMainLib
1311VBoxCOM_INTERMEDIATES = $(VBOX_MAIN_PREREQS) \
1312 $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
1313VBoxCOM_SOURCES = \
1314 glue/com.cpp \
1315 glue/VBoxLogRelCreate.cpp \
1316 glue/GetVBoxUserHomeDirectory.cpp \
1317 glue/initterm.cpp \
1318 glue/string.cpp \
1319 glue/string-base64.cpp \
1320 glue/AutoLock.cpp \
1321 glue/EventQueue.cpp \
1322 glue/NativeEventQueue.cpp \
1323 glue/ErrorInfo.cpp \
1324 glue/errorprint.cpp
1325VBoxCOM_INCS += $(VBOX_MAIN_APIWRAPPER_INCS) \
1326 include
1327ifeq ($(KBUILD_TARGET),win)
1328 ifdef VBOX_WITH_MIDL_PROXY_STUB
1329 VBoxCOM_DEFS.win = VBOX_WITH_AUTO_COM_REG_UPDATE
1330 endif
1331 ifdef VBOX_WITH_SDS
1332 VBoxCOM_DEFS.win += VBOX_WITH_SDS
1333 endif
1334 VBoxCOM_DEFS.x86 = _WIN32_WINNT=0x0500
1335 VBoxCOM_DEFS.amd64 = _WIN32_WINNT=0x0510
1336 VBoxCOM_SOURCES += \
1337 $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c
1338 VBoxCOM_CLEAN = \
1339 $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
1340 $(VBoxCOM_0_OUTDIR)/VirtualBox_p.c \
1341 $(VBoxCOM_0_OUTDIR)/dlldata.c \
1342 $(VBoxCOM_0_OUTDIR)/VirtualBox.h \
1343 $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
1344 VBoxCOM_CLEAN += \
1345 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c \
1346 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c \
1347 $(VBoxCOM_0_OUTDIR)/legacy/dlldata.c \
1348 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.h \
1349 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.tlb
1350 VBoxCOM_BLDDIRS = $(VBoxCOM_0_OUTDIR)/legacy/
1351else # !win
1352 VBoxCOM_SOURCES += \
1353 $(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c \
1354 glue/xpcom/helpers.cpp
1355endif # !win
1356
1357ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
1358glue/VBoxLogRelCreate.cpp_DEFS = KBUILD_TYPE="$(KBUILD_TYPE)"
1359else
1360glue/VBoxLogRelCreate.cpp_DEFS = KBUILD_TYPE=\"$(KBUILD_TYPE)\"
1361endif
1362
1363# 32-bit version of VBoxCOM.
1364if defined(VBOX_WITH_32_ON_64_MAIN_API) && !defined(VBOX_ONLY_EXTPACKS)
1365 LIBRARIES += VBoxCOM-x86
1366 VBoxCOM-x86_TEMPLATE = VBoxMainLib-x86
1367 VBoxCOM-x86_EXTENDS = VBoxCOM
1368 ifeq ($(KBUILD_TARGET),win)
1369 VBoxCOM-x86_CLEAN = \
1370 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c \
1371 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c \
1372 $(VBoxCOM-x86_0_OUTDIR)/dlldata.c \
1373 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox.h \
1374 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb
1375 endif
1376endif
1377
1378# -MD version for the GUI in -MDd builds.
1379ifeq ($(KBUILD_TARGET).$(VBOX_VCC_CRT_TYPE),win.d)
1380 ifndef VBOX_ONLY_EXTPACKS
1381 LIBRARIES += VBoxCOM-GUI
1382 USES += qt5
1383 VBoxCOM-GUI_TEMPLATE = VBOXQTGUI$(if-expr defined(VBOX_WITH_HARDENING),,EXE)
1384 VBoxCOM-GUI_EXTENDS = VBoxCOM
1385 endif
1386endif
1387
1388# define qt5 tools for translation even if VBOX_ONLY_EXTPACKS is enabled
1389ifdef VBOX_WITH_NLS
1390 USES += qt5
1391endif
1392
1393
1394endif # !VBOX_ONLY_SDK
1395
1396
1397#
1398# Installs com related thing(s) to bin.
1399#
1400INSTALLS.win += VBoxMain-com-inst
1401VBoxMain-com-inst_INST = $(INST_BIN)
1402VBoxMain-com-inst_MODE = a+r,u+w
1403VBoxMain-com-inst_SOURCES = src-all/win/comregister.cmd
1404
1405
1406if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "linux" && !defined(VBOX_ONLY_EXTPACKS)
1407 #
1408 # Installs linux/hardening related things to components.
1409 #
1410 INSTALLS.linux += VBoxMain-hardening-inst
1411 VBoxMain-hardening-inst_INST = $(INST_BIN)components/
1412 VBoxMain-hardening-inst_SYMLINKS = \
1413 VBoxDDU.so=>../VBoxDDU.so \
1414 VBoxRT.so=>../VBoxRT.so \
1415 VBoxVMM.so=>../VBoxVMM.so \
1416 VBoxXPCOM.so=>../VBoxXPCOM.so
1417endif
1418
1419
1420if defined(VBOX_WITH_MIDL_PROXY_STUB) && "$(KBUILD_TARGET)" == "win" && !defined(VBOX_ONLY_EXTPACKS)
1421 #
1422 # Experimental COM proxy + stub DLL w/ automatic registration updating.
1423 #
1424 # The Legacy stub is for older 64-bit windows versions (pre Windows 7) as we
1425 # were having various problems on windows server 2003 and 2008 with the code
1426 # MIDL generated. Also, in windows 7 there are some potentially interesting
1427 # changes in the generated code where it uses new helpers from OLE32.
1428 #
1429 DLLS += VBoxProxyStub
1430 VBoxProxyStub_TEMPLATE = VBOXMAINCOMP
1431 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
1432 VBoxProxyStub_DEFS := REGISTER_PROXY_DLL PROXY_CLSID_IS=$(quote $(VBOX_MIDL_PROXY_CLSID_IS))
1433 else
1434 VBoxProxyStub_DEFS := REGISTER_PROXY_DLL PROXY_CLSID_IS="$(VBOX_MIDL_PROXY_CLSID_IS)"
1435 endif
1436 ifdef VBOX_WITH_SDS
1437 VBoxProxyStub_DEFS += VBOX_WITH_SDS
1438 endif
1439 ifdef VBOX_WITH_SDS_CLIENT_WATCHER
1440 VBoxProxyStub_DEFS += VBOX_WITH_SDS_CLIENT_WATCHER,)
1441 endif
1442 VBoxProxyStub_DEFS.win.x86 = WIN32
1443 VBoxProxyStub_SDKS = VBOX_NTDLL
1444 VBoxProxyStub_DEFPATH = $(VBoxCOM_0_OUTDIR)/# Hack to workaround drive letter in $(VBoxCOM_0_OUTDIR)/ for CFLAGS hack below.
1445 VBoxProxyStub_INCS = $(VBoxCOM_0_OUTDIR)/
1446 VBoxProxyStub_SOURCES := \
1447 VirtualBox_p.c \
1448 VirtualBox_i.c \
1449 $(PATH_SUB_CURRENT)/src-all/win/VBoxProxyStub.def \
1450 $(PATH_SUB_CURRENT)/src-all/win/VBoxProxyStub.rc \
1451 $(PATH_SUB_CURRENT)/src-all/win/VBoxProxyStub.c
1452 src-all/win/VBoxProxyStub.rc_DEPS = $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
1453 VBoxProxyStub_VirtualBox_p.c_CFLAGS.x86 = /Gz # Workaround for incorrect ObjectStublessClient* prototypes in SDK v7.1.
1454
1455 DLLS += VBoxProxyStubLegacy
1456 VBoxProxyStubLegacy_TEMPLATE = VBOXMAINCOMP
1457 VBoxProxyStubLegacy_EXTENDS = VBoxProxyStub
1458 VBoxProxyStubLegacy_DEFS = $(VBoxProxyStub_DEFS) VBOX_IN_PROXY_STUB_LEGACY
1459 VBoxProxyStubLegacy_INCS = $(VBoxCOM_0_OUTDIR)/legacy/
1460 VBoxProxyStubLegacy_SOURCES = \
1461 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c \
1462 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c \
1463 src-all/win/VBoxProxyStub.def \
1464 src-all/win/VBoxProxyStubLegacy.rc \
1465 src-all/win/VBoxProxyStub.c
1466 src-all/win/VBoxProxyStubLegacy.rc_DEPS = $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.tlb
1467
1468 ifdef VBOX_WITH_32_ON_64_MAIN_API
1469 DLLS += VBoxProxyStub-x86
1470 VBoxProxyStub-x86_TEMPLATE = VBoxMainComp-x86
1471 VBoxProxyStub-x86_SDKS = VBOX_NTDLL
1472 VBoxProxyStub-x86_DEFS = $(VBoxProxyStub_DEFS) VBOX_PROXY_STUB_32_ON_64 WIN32
1473 VBoxProxyStub-x86_INCS = $(VBoxCOM-x86_0_OUTDIR)/
1474 VBoxProxyStub-x86_SOURCES = \
1475 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c \
1476 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c \
1477 src-all/win/VBoxProxyStub.c \
1478 src-all/win/VBoxProxyStub-x86.rc \
1479 src-all/win/VBoxProxyStub.def
1480 src-all/win/VBoxProxyStub-x86.rc_DEPS = $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb
1481 endif
1482endif
1483
1484
1485ifdef VBOX_WITH_MAIN_NLS
1486#
1487# NLS stuff.
1488#
1489include $(PATH_SUB_CURRENT)/nls/ApprovedLanguages.kmk
1490
1491PROGRAMS += VirtualBoxAPI
1492VirtualBoxAPI_TEMPLATE = VBoxNLS
1493VirtualBoxAPI_QT_TRANSLATIONS = $(addsuffix .ts,$(addprefix $(VBOX_PATH_MAIN_SRC)/nls/VirtualBoxAPI_,$(VBOX_APPROVED_MAIN_LANGUAGES)))
1494VirtualBoxAPI_VBOX_ALL_NLS_SOURCES = $(wildcard \
1495 $(VBOX_PATH_MAIN_SRC)/include/*.h\
1496 $(VBOX_PATH_MAIN_SRC)/src-all/*.cpp \
1497 $(VBOX_PATH_MAIN_SRC)/src-all/*.h \
1498 $(VBOX_PATH_MAIN_SRC)/src-server/*.cpp \
1499 $(VBOX_PATH_MAIN_SRC)/src-server/*.h \
1500 $(VBOX_PATH_MAIN_SRC)/src-client/*.cpp \
1501 $(VBOX_PATH_MAIN_SRC)/src-client/*.h )
1502
1503updatenls:: makeallnls $(VBOX_PATH_MAIN_SRC)/nls/VirtualBoxAPI_en.ts
1504
1505makeallnls:: $(VirtualBoxAPI_VBOX_ALL_NLS_SOURCES)
1506 $(call MSG_L1,lupdate all languages (nls/*.ts))
1507 $(QUIET)$(TOOL_QT5_LUPDATE) \
1508 $^ \
1509 -ts \
1510 $(filter-out nls/VirtualBoxAPI_en.ts, $(VirtualBoxAPI_QT_TRANSLATIONS)) \
1511 $(VBOX_PATH_MAIN_SRC)/nls/VirtualBoxAPI_xx_YY.ts
1512
1513#fake-main-nls:
1514# $(foreach file, $(VirtualBoxAPI_QT_TRANSLATIONS) \
1515# ,$(NLTAB)$(SED) -i \
1516# -e '/<source>.*<\/source>/h' \
1517# -e '/<source>.*<\/source>/p' \
1518# -e '/<translation type="unfinished"><\/translation>/{' \
1519# -e 'x' \
1520# -e 's/<source>\(.*\)<\/source>/<translation type="unfinished">$(notdir $(file)): \1<\/translation>/' \
1521# -e '}' \
1522# $(file) )
1523
1524
1525# Create the English translation file. This is something special cause it will
1526# contain the plural forms only.
1527$(VBOX_PATH_MAIN_SRC)/nls/VirtualBoxAPI_en.ts: $(VirtualBoxAPI_VBOX_ALL_NLS_SOURCES)
1528 $(call MSG_L1,lupdate $@)
1529 $(QUIET)$(TOOL_QT5_LUPDATE) \
1530 $^ \
1531 -ts \
1532 "$@"
1533 $(QUIET)$(SED) -n -i \
1534 -e '/<context>/,/<\/context>/!p' \
1535 -e '/<context>/h' \
1536 -e '/<name>/H' \
1537 -e '/<message numerus="yes">/,/<\/message>/H' \
1538 -e '/<\/context>/{H;x;/<message/p}' \
1539 "$@"
1540
1541endif # VBOX_WITH_MAIN_NLS
1542
1543
1544# generate rules
1545include $(FILE_KBUILD_SUB_FOOTER)
1546
1547
1548
1549#
1550# Additions rules.
1551#
1552
1553## @todo this hack ain't cutting it any longer. (the file name is abspath'ed since ages now.)
1554glue/xpcom/helpers.cpp: $(VBOX_IDL_TYPELIB.XPCOM)
1555
1556$(call KB_FN_AUTO_CMD_DEPS_EX,$(VBOX_IDL_FILE.XPCOM),$(PATH_OUT)/VBOX_IDL_FILE.XPCOM.vbox-dep)
1557$(VBOX_IDL_FILE.XPCOM): $(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
1558 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS_EX,$(PATH_OUT)/VBOX_IDL_FILE.XPCOM.vbox-dep)
1559 $(call MSG_TOOL,xsltproc,VBoxSVC,$(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl,$@)
1560 $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl $(VBOX_XIDL_FILE)
1561
1562$(call KB_FN_AUTO_CMD_DEPS_EX,$(VBOX_IDL_TYPELIB.XPCOM),$(PATH_OUT)/VBOX_IDL_TYPELIB.XPCOM.vbox-dep)
1563$(VBOX_IDL_TYPELIB.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
1564 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS_EX,$(PATH_OUT)/VBOX_IDL_TYPELIB.XPCOM.vbox-dep)
1565 $(call MSG_TOOL,xpidl,VBoxSVC,$(VBOX_IDL_FILE.XPCOM),$@)
1566 $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m typelib -I $(VBOX_PATH_XPCOM_IDL) -e $@ $(VBOX_IDL_FILE.XPCOM)
1567 $(CHMOD) 0644 $@
1568## @todo ^^^^^^^^^^^^ fix horrible hack
1569
1570$(call KB_FN_AUTO_CMD_DEPS_EX,$(VBOX_IDL_HEADER.XPCOM),$(PATH_OUT)/VBOX_IDL_HEADER.XPCOM.vbox-dep)
1571$(VBOX_IDL_HEADER.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
1572 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS_EX,$(PATH_OUT)/VBOX_IDL_HEADER.XPCOM.vbox-dep)
1573 $(call MSG_TOOL,xpidl,VBoxSVC,$(VBOX_IDL_FILE.XPCOM),$@)
1574 $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m header -I $(VBOX_PATH_XPCOM_IDL) -e $@ $(VBOX_IDL_FILE.XPCOM)
1575
1576$(call KB_FN_AUTO_CMD_DEPS_EX,$(VBOX_IDL_FILE.MSCOM),$(PATH_OUT)/VBOX_IDL_FILE.MSCOM.vbox-dep)
1577$(VBOX_IDL_FILE.MSCOM): $(VBOX_PATH_MAIN_SRC)/idl/midl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
1578 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS_EX,$(PATH_OUT)/VBOX_IDL_FILE.MSCOM.vbox-dep)
1579 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
1580 $(QUIET)$(VBOX_XSLTPROC) -o $@ \
1581 $(if $(VBOX_WITH_MIDL_PROXY_STUB),-stringparam g_fGenProxy yes,) \
1582 $(if $(VBOX_WITH_SDS),-stringparam g_fVBoxWithSDS yes,) \
1583 $(VBOX_PATH_MAIN_SRC)/idl/midl.xsl $(VBOX_XIDL_FILE)
1584
1585
1586# Aliases for testing purposes.
1587ifdef VBOX_WITH_XPCOM
1588testidl: $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM) $(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c
1589testidlhdr: $(VBOX_IDL_HEADER.XPCOM)
1590else
1591testidl: $(VBOX_IDL_FILE.MSCOM) $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
1592 $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c,)
1593endif
1594
1595
1596$(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c: $(VBOX_PATH_MAIN_SRC)/idl/xpidl_iid.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
1597 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
1598 $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
1599
1600if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" == "win"
1601
1602 # Note! Because we've got a different proxy stub DLL for pre windows 7 64-bit hosts, we target windows 7 for AMD64.
1603 # The output is different and hopefully more efficient, at least memory wise (using more helpers in OLE32).
1604 # Note! We're checking for win.amd64 below when setting the target because of the SDK build which happens on linux.amd64
1605 # but with a 32-bit Wine.
1606 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxCOM_0_OUTDIR)/VirtualBox_i.c)
1607 $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
1608 $(if $(VBOX_WITH_MIDL_PROXY_STUB), + $(VBoxCOM_0_OUTDIR)/VirtualBox_p.c + $(VBoxCOM_0_OUTDIR)/dlldata.c,) \
1609 + $(VBoxCOM_0_OUTDIR)/VirtualBox.h \
1610 + $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
1611 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1612 $(VBOX_MIDL_REDIRECT) $(VBOX_WIN_MIDL) /nologo /W4 \
1613 /env $(if-expr "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.amd64" ,amd64,win32) \
1614 /robust /protocol all /target $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),NT61,NT51) \
1615 /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM_0_OUTDIR)) \
1616 /cpp_cmd $(VBOX_MIDL_CPP_CMD) \
1617 $(foreachfile dir,$(SDK_$(VBOX_WINPSDK)_INCS),/I $(call VBOX_FN_MAKE_WIN_PATH,$(dir))) \
1618 /I idl \
1619 $(call VBOX_FN_MAKE_WIN_PATH,$(VBOX_IDL_FILE.MSCOM))
1620 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox.h)
1621 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox_i.c)
1622 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox_p.c)
1623
1624 if defined(VBOX_WITH_MIDL_PROXY_STUB)
1625 # -Windows Server 2003 AMD64 SP1 does not like the result when using '/protocol all' and '/target NT51'.
1626 # -Vista AMD64 SP1 and Windows Server 2008 AMD64 seems to have some objections as well, but it seemed
1627 # that using an older MIDL compiler (v7.00.0499 instead of v7.00.0555) helps. But the W2K3 fix also works.
1628 # To avoid 32-bit vs. 64-bit differences, we do the same for 32-bit windows versions.
1629 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c)
1630 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c \
1631 + $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c\
1632 + $(VBoxCOM_0_OUTDIR)/legacy/dlldata.c \
1633 + $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.h \
1634 + $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
1635 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1636 $(VBOX_MIDL_REDIRECT) $(VBOX_WIN_MIDL) /nologo /W4 \
1637 $(if-expr "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.amd64" \
1638 ,/env amd64 /x64 /target NT50 /robust \
1639 ,/env win32 /target NT51 /robust /protocol all ) \
1640 /out $(call VBOX_FN_MAKE_WIN_PATH,$(dir $@)) \
1641 /cpp_cmd $(VBOX_MIDL_CPP_CMD) \
1642 $(foreachfile dir,$(SDK_$(VBOX_WINPSDK)_INCS),/I $(call VBOX_FN_MAKE_WIN_PATH,$(dir))) \
1643 /I idl \
1644 $(call VBOX_FN_MAKE_WIN_PATH,$(VBOX_IDL_FILE.MSCOM))
1645 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.h)
1646 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c)
1647 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c)
1648 endif
1649
1650 if defined(VBOX_WITH_32_ON_64_MAIN_API) && !defined(VBOX_ONLY_EXTPACKS)
1651 # The XP targetted 32-bit proxy stub works with all versions of windows (the
1652 # issues leading to the VBoxProxyStubLegacy.dll are only on 64-bit windows).
1653 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c)
1654 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c \
1655 $(if $(VBOX_WITH_MIDL_PROXY_STUB), + $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c + $(VBoxCOM-x86_0_OUTDIR)/dlldata.c,) \
1656 + $(VBoxCOM-x86_0_OUTDIR)/VirtualBox.h \
1657 + $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
1658 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1659 $(VBOX_MIDL_REDIRECT_X86) $(VBOX_WIN_MIDL) /nologo /W4 \
1660 /env win32 /target NT51 /robust /protocol all \
1661 /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM-x86_0_OUTDIR)) \
1662 /tlb $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb) \
1663 /cpp_cmd $(VBOX_MIDL_CPP_CMD_X86) \
1664 $(foreachfile dir,$(SDK_$(VBOX_WINPSDK)_INCS),/I $(call VBOX_FN_MAKE_WIN_PATH,$(dir))) \
1665 /I idl \
1666 $(call VBOX_FN_MAKE_WIN_PATH,$(VBOX_IDL_FILE.MSCOM))
1667 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox.h)
1668 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c)
1669 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c)
1670 endif
1671
1672endif # defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" == "win"
1673
1674#
1675# Translation stuff
1676#
1677VBoxSVC_VBOX_HEADERS = \
1678 include/collection.h \
1679 include/MachineImpl.h
1680VBoxSVC_VBOX_TRANSLATIONS = \
1681 nls/VBoxSVC_de.ts
1682
1683VBoxC_VBOX_HEADERS = \
1684 include/ConsoleImpl.h
1685
1686VBoxC_VBOX_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
1687VBoxC_VBOX_HEADERS += $(VBOX_MAIN_APIWRAPPER_INCS)
1688
1689VBoxC_VBOX_TRANSLATIONS = \
1690 nls/VBoxC_de.ts
1691
1692ifdef VBOX_WITH_JMSCOM
1693
1694 #
1695 # Java glue JAR files
1696 #
1697 VBOX_JMSCOM_JAR = $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar
1698 VBOX_JMSCOM_TARGET := $(PATH_TARGET)/vboxjmscom-gen
1699 VBOX_JMSCOM_GEN = $(VBOX_JMSCOM_TARGET)/jmscomgen
1700 VBOX_JMSCOM_JDEST := $(VBOX_JMSCOM_TARGET)/jdest
1701 VBOX_GLUE_XSLT_DIR := $(PATH_ROOT)/src/VBox/Main/glue
1702 VBOX_JACOB_DIR := $(PATH_ROOT)/src/libs/jacob-1.17
1703
1704 INSTALLS += VBoxJMscom-inst-jar
1705 VBoxJMscom-inst-jar_INST = $(INST_SDK)bindings/mscom/java/
1706 VBoxJMscom-inst-jar_MODE = a+r,u+w
1707 VBoxJMscom-inst-jar_SOURCES = \
1708 $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar
1709 VBoxJMscom-inst-jar_CLEAN = \
1710 $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar \
1711 $(VBOX_JMSCOM_GEN)/jmscomglue.list \
1712 $(wildcard \
1713 $(VBOX_JMSCOM_GEN)/java/*.java \
1714 $(VBOX_JMSCOM_JDEST)/*.class \
1715 $(VBOX_JMSCOM_JDEST)/*/*.class \
1716 $(VBOX_JMSCOM_JDEST)/*/*/*.class \
1717 $(VBOX_JMSCOM_JDEST)/*/*/*/*.class \
1718 )
1719 VBoxJMscom-inst-jar_BLDDIRS += $(VBOX_JMSCOM_GEN)/java
1720 $(call KB_FN_DO_PASS0_ON_TARGET,VBoxJMscom-inst-jar) # Sets VBoxJMscom-inst-jar_0_OUTDIR
1721
1722 $(call KB_FN_AUTO_CMD_DEPS,$(VBOX_JMSCOM_GEN)/jmscomglue.list)
1723 $(VBOX_JMSCOM_GEN)/jmscomglue.list: \
1724 $(VBOX_XIDL_FILE) \
1725 $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl \
1726 $(VBOX_FILESPLIT) \
1727 | $(VBOX_JMSCOM_GEN)/java/
1728 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1729 $(call MSG_L1,Generating Java MSCOM glue files from XIDL)
1730 $(QUIET)$(RM) -f $(wildcard $(VBOX_JMSCOM_GEN)/java/*.java)
1731 $(QUIET)$(VBOX_XSLTPROC) \
1732 --stringparam filelistonly "" \
1733 --stringparam G_vboxApiSuffix $(VBOX_API_SUFFIX) \
1734 --stringparam G_vboxGlueStyle mscom \
1735 --stringparam G_vboxDirPrefix "" \
1736 -o $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl $(VBOX_XIDL_FILE)
1737 $(QUIET)$(VBOX_FILESPLIT) $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_JMSCOM_GEN)/java
1738 $(QUIET)echo $(VBOX_JMSCOM_GEN)/java/*.java > $@
1739
1740 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar)
1741 $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar: $(VBOX_JMSCOM_GEN)/jmscomglue.list | $$(dir $$@)
1742 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1743 $(call MSG_TOOL,javac,$(notdir $@),jmscomglue.list,)
1744 $(QUIET)$(RM) -Rf $(VBOX_JMSCOM_JDEST)
1745 $(QUIET)$(MKDIR) -p $(VBOX_JMSCOM_JDEST)
1746 $(call MSG_TOOL,javac,$(notdir $@),...,)
1747 $(QUIET)$(VBOX_JAVAC) $(VBOX_JAVAC_OPTS) @$(VBOX_JMSCOM_GEN)/jmscomglue.list \
1748 -d $(VBOX_JMSCOM_JDEST) -classpath "$(VBOX_JMSCOM_JDEST)$(VBOX_SEP)$(VBOX_JACOB_DIR)/jacob.jar"
1749 $(call MSG_LINK,$(notdir $@),$@)
1750 $(QUIET)$(VBOX_JAR) cf $@ -C $(VBOX_JMSCOM_JDEST) .
1751
1752 ## @todo compile TestVBox.java (see below) to have sanity checking
1753endif # VBOX_WITH_JMSCOM
1754
1755#
1756# Install Java glue sample code.
1757#
1758INSTALLS += javagluesample
1759javagluesample_INST = $(INST_SDK)bindings/glue/java/
1760javagluesample_MODE = a+r,u+w
1761javagluesample_SOURCES = \
1762 $(VBOX_PATH_MAIN_SRC)/glue/tests/TestVBox.java=>TestVBox.java \
1763 $(VBOX_PATH_MAIN_SRC)/glue/tests/Makefile=>Makefile
1764
1765#
1766# Rules associated with VBoxAPIWrap (in typical invocation order).
1767# We keep them down here to simplify the use of VBoxAPIWrap_0_OUTDIR.
1768#
1769
1770# Generate a make include file which lists the wrapper header and source files.
1771$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_VBOX_KMK_FILE).ts)
1772$(VBoxAPIWrap_VBOX_KMK_FILE).ts \
1773+| $(VBoxAPIWrap_VBOX_KMK_FILE): \
1774 $(VBOX_XIDL_FILE) \
1775 $(VBOX_PATH_MAIN_SRC)/idl/apiwrap-server-filelist.xsl \
1776 $(VBOX_PATH_MAIN_SRC)/Makefile.kmk
1777 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1778 $(call MSG_GENERATE,,$(VBoxAPIWrap_VBOX_KMK_FILE))
1779 $(QUIET)$(RM) -f $@
1780 $(QUIET)$(MKDIR) -p $(@D)
1781 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1782 $(if $(VBOX_WITH_SDS),-stringparam g_fVBoxWithSDS yes,) \
1783 -o $@ $(VBOX_PATH_MAIN_SRC)/idl/apiwrap-server-filelist.xsl $(VBOX_XIDL_FILE)
1784 $(QUIET)$(CP) --changed -fv $@ $(VBoxAPIWrap_VBOX_KMK_FILE)
1785
1786# Generate the header files for the wrappers.
1787$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-headers)
1788$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-headers \
1789+| $(VBOX_MAIN_APIWRAPPER_GEN_HDRS): \
1790 $(VBOX_XIDL_FILE) \
1791 $(VBOX_PATH_MAIN_SRC)/idl/typemap-shared.inc.xsl \
1792 $(VBoxAPIWrap_VBOX_XSLT) \
1793 $(VBOX_FILESPLIT) \
1794 | $$(dir $$@)
1795 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1796 $(call MSG_L1,Generating C++ Server API wrapper header files from XIDL)
1797 $(QUIET)$(RM) -f -- $(filter-out $(VBOX_MAIN_APIWRAPPER_GEN_HDRS), $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.h))
1798 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1799 --stringparam generating "headers" \
1800 -o $@ $(VBoxAPIWrap_VBOX_XSLT) $(VBOX_XIDL_FILE)
1801 $(QUIET)$(VBOX_FILESPLIT) $@ $(VBoxAPIWrap_0_OUTDIR)
1802
1803# Generate the DTrace probes for the wrappers and combine them with handcoded probes.
1804$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d.ts)
1805$(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d.ts \
1806+| $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d: \
1807 $(VBOX_XIDL_FILE) \
1808 $(VBOX_PATH_MAIN_SRC)/idl/typemap-shared.inc.xsl \
1809 $(VBoxAPIWrap_VBOX_XSLT) \
1810 $(VBOX_FILESPLIT) \
1811 | $$(dir $$@)
1812 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1813 $(call MSG_L1,Generating DTrace Provider for the VBox API (from XIDL))
1814 $(QUIET)$(RM) -f -- "$@" "$@.tmp"
1815 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1816 --stringparam generating "dtrace-probes" \
1817 -o "$@" $(VBoxAPIWrap_VBOX_XSLT) $(VBOX_XIDL_FILE)
1818 $(QUIET)$(SED) -e '' -o "$@.tmp" \
1819 "$(VBOX_PATH_MAIN_SRC)/src-all/VBoxAPI-start$(if-expr "$(VBOX_HOST_DTRACE_VERSION)" == "dtrace: Sun D 1.6.2",-alternative,).d" \
1820 "$@" \
1821 "$(VBOX_PATH_MAIN_SRC)/src-all/VBoxAPI-end$(if-expr "$(VBOX_HOST_DTRACE_VERSION)" == "dtrace: Sun D 1.6.2",-alternative,).d"
1822 $(QUIET)$(MV) -- "$@.tmp" "$@"
1823 $(QUIET)$(CP) --changed -fv -- "$@" "$(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d"
1824
1825# Generate the wrapper source files - split in two due to long processing time
1826$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-even)
1827$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-even \
1828+| $(VBOX_MAIN_APIWRAPPER_GEN_SRCS_EVEN): \
1829 $(VBOX_XIDL_FILE) \
1830 $(VBOX_PATH_MAIN_SRC)/idl/typemap-shared.inc.xsl \
1831 $(VBoxAPIWrap_VBOX_XSLT) \
1832 $(VBOX_FILESPLIT) \
1833 | $$(dir $$@)
1834 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1835 $(call MSG_L1,Generating C++ Server API wrapper files from XIDL - part 1)
1836 $(QUIET)$(RM) -f -- $(filter-out $(VBOX_MAIN_APIWRAPPER_GEN_SRCS), $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.cpp))
1837 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1838 --stringparam generating "sources" \
1839 --param reminder 0 \
1840 -o $@ $(VBoxAPIWrap_VBOX_XSLT) $(VBOX_XIDL_FILE)
1841 $(QUIET)$(VBOX_FILESPLIT) $@ $(VBoxAPIWrap_0_OUTDIR)
1842
1843$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-odd)
1844$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-odd \
1845+| $(VBOX_MAIN_APIWRAPPER_GEN_SRCS_ODD): \
1846 $(VBOX_XIDL_FILE) \
1847 $(VBOX_PATH_MAIN_SRC)/idl/typemap-shared.inc.xsl \
1848 $(VBoxAPIWrap_VBOX_XSLT) \
1849 $(VBOX_FILESPLIT) \
1850 | $$(dir $$@)
1851 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1852 $(call MSG_L1,Generating C++ Server API wrapper files from XIDL - part 2)
1853 $(QUIET)$(RM) -f -- $(filter-out $(VBOX_MAIN_APIWRAPPER_GEN_SRCS), $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.cpp))
1854 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1855 --stringparam generating "sources" \
1856 --param reminder 1 \
1857 -o $@ $(VBoxAPIWrap_VBOX_XSLT) $(VBOX_XIDL_FILE)
1858 $(QUIET)$(VBOX_FILESPLIT) $@ $(VBoxAPIWrap_0_OUTDIR)
1859
1860testapiwrappers:: \
1861 $(VBoxAPIWrap_0_OUTDIR)/apiwrappers-headers \
1862 $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d.ts \
1863 $(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-odd \
1864 $(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-even
1865
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