VirtualBox

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

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

libs/libssh,Main,FE/VBoxManage,Devices/Network/DrvCloudTunnel|ai: Add support for proxies, bugref:9469

  • 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 94521 2022-04-07 15:18:48Z 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_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
972 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,) \
973 $(if $(VBOX_WITH_TPM),VBOX_WITH_TPM,)
974ifdef VBOX_WITH_NETSHAPER
975 VBoxC_DEFS += VBOX_WITH_NETSHAPER
976endif
977VBoxC_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE
978VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
979VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
980
981if $(KBUILD_TARGET) != "win" && $(VBOX_GCC_VERSION_CXX) >= 40900 # gcc 4.9.x (4.8.x is causing endless RT_ELEMENT trouble)
982# VBoxC_CXXFLAGS = -Wunused -Wconversion
983endif
984
985VBoxC_SDKS = VBOX_LIBPNG VBOX_ZLIB
986
987if defined(VBOX_WITH_RECORDING) && defined(VBOX_WITH_LIBVPX)
988VBoxC_SDKS += VBOX_VPX
989VBoxC_DEFS += VBOX_WITH_RECORDING VBOX_WITH_LIBVPX
990VBoxC_SOURCES += \
991 xml/Settings.cpp \
992 src-client/EBMLWriter.cpp \
993 src-client/WebMWriter.cpp \
994 src-client/Recording.cpp \
995 src-client/RecordingInternals.cpp \
996 src-client/RecordingStream.cpp \
997 src-client/RecordingUtils.cpp
998
999 if defined(VBOX_WITH_AUDIO_RECORDING) && defined(VBOX_WITH_LIBOPUS)
1000VBoxC_SDKS += VBOX_OPUS
1001VBoxC_DEFS += VBOX_WITH_AUDIO_RECORDING VBOX_WITH_LIBOPUS
1002VBoxC_SOURCES += src-client/DrvAudioRec.cpp
1003 endif
1004endif # VBOX_WITH_RECORDING && VBOX_WITH_LIBVPX
1005
1006ifdef VBOX_WITH_OPENSSL_FIPS
1007VBoxC_SDKS += VBOX_OPENSSL2
1008endif
1009
1010VBoxC_INCS = \
1011 include \
1012 $(VBoxC_0_OUTDIR) \
1013 $(VBOX_MAIN_APIWRAPPER_INCS) \
1014 $(dir $(VBOX_XML_SCHEMADEFS_H)) \
1015 $(VBOX_MAIN_APIWRAPPER_DIR)/dtrace \
1016 $(VBOX_GRAPHICS_INCS)
1017VBoxC_INCS.win = \
1018 $(VBoxCOM_0_OUTDIR) \
1019 .
1020
1021VBoxC_LDFLAGS.darwin = \
1022 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxC.dylib \
1023 -exported_symbols_list $(VBoxC_0_OUTDIR)/VBoxC.def \
1024 -framework IOKit
1025VBoxC_LDFLAGS.win += /MANIFEST \
1026 /DELAYLOAD:user32.dll
1027
1028
1029VBoxC_LIBS += \
1030 $(PATH_STAGE_LIB)/VBoxAPIWrap$(VBOX_SUFF_LIB)
1031VBoxC_LIBS.win += \
1032 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/psapi.lib \
1033 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
1034ifdef VBOX_WITH_NETFLT
1035 VBoxC_SDKS.win += VBOX_WIN_NEWDEV
1036 VBoxC_LIBS.win += \
1037 $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
1038 $(PATH_STAGE_LIB)/WinNetConfigNonStatic$(VBOX_SUFF_LIB) \
1039 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
1040 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
1041 VBoxC_LDFLAGS.win += \
1042 /DELAYLOAD:newdev.dll \
1043 /DELAYLOAD:setupapi.dll \
1044 /DELAYLOAD:iphlpapi.dll
1045endif
1046
1047ifdef VBOX_WITH_DRAG_AND_DROP
1048 VBoxC_LIBS += $(PATH_STAGE_LIB)/VBoxDnDHostR3Lib$(VBOX_SUFF_LIB)
1049endif
1050
1051VBoxC_INTERMEDIATES = \
1052 $(VBOX_MAIN_PREREQS) \
1053 $(VBOX_XML_SCHEMADEFS_H) \
1054 $(VBOX_AUTOGEN_EVENT_H) \
1055 $(VBOX_AUTOGEN_STRINGIFY_ENUMS_H) \
1056 $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
1057
1058VBoxC_SOURCES += \
1059 $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d \
1060 src-all/DisplayPNGUtil.cpp \
1061 src-all/DisplayResampleImage.cpp \
1062 src-all/EventImpl.cpp \
1063 src-all/Global.cpp \
1064 src-all/GlobalStatusConversion.cpp \
1065 src-all/HashedPw.cpp \
1066 src-all/Logging.cpp \
1067 src-all/NvramStoreImpl.cpp \
1068 src-all/PCIDeviceAttachmentImpl.cpp \
1069 src-all/ProgressImpl.cpp \
1070 src-all/SecretKeyStore.cpp \
1071 src-all/SharedFolderImpl.cpp \
1072 src-all/AutoCaller.cpp \
1073 src-all/ThreadTask.cpp \
1074 src-all/VirtualBoxBase.cpp \
1075 src-all/VirtualBoxErrorInfoImpl.cpp \
1076 $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
1077 src-client/UsbWebcamInterface.cpp \
1078 $(if $(VBOX_WITH_USB_CARDREADER),src-client/UsbCardReader.cpp,) \
1079 src-client/AdditionsFacilityImpl.cpp \
1080 src-client/BusAssignmentManager.cpp \
1081 $(if $(VBOX_WITH_PCI_PASSTHROUGH),src-client/PCIRawDevImpl.cpp,) \
1082 src-client/ClientTokenHolder.cpp \
1083 src-client/ConsoleImpl.cpp \
1084 src-client/ConsoleImpl2.cpp \
1085 src-client/ConsoleImplTeleporter.cpp \
1086 src-client/ConsoleVRDPServer.cpp \
1087 src-client/DisplayImpl.cpp \
1088 src-client/DisplayImplLegacy.cpp \
1089 src-client/DisplaySourceBitmapImpl.cpp \
1090 src-client/EmulatedUSBImpl.cpp \
1091 src-client/GuestImpl.cpp \
1092 src-client/GuestCtrlImpl.cpp \
1093 src-client/KeyboardImpl.cpp \
1094 src-client/MachineDebuggerImpl.cpp \
1095 src-client/MouseImpl.cpp \
1096 src-client/RemoteUSBDeviceImpl.cpp \
1097 src-client/SessionImpl.cpp \
1098 src-client/USBDeviceImpl.cpp \
1099 src-client/VBoxDriversRegister.cpp \
1100 src-client/VirtualBoxClientImpl.cpp \
1101 src-client/VMMDevInterface.cpp \
1102 $(VBOX_AUTOGEN_EVENT_CPP) \
1103 $(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP) \
1104 $(VBOX_XML_SCHEMADEFS_CPP)
1105
1106ifdef VBOX_WITH_MAIN_NLS
1107VBoxC_SOURCES += \
1108 src-all/VirtualBoxTranslator.cpp \
1109 src-all/QMTranslatorImpl.cpp
1110endif
1111
1112# Experimental cloud support
1113if defined(VBOX_WITH_CLOUD_NET)
1114 if defined(VBOX_WITH_LIBSSH)
1115 VBoxC_SDKS += VBOX_SSH VBOX_OPENSSL
1116 VBoxC_DEFS += LIBSSH_STATIC VBOX_WITH_LIBSSH
1117 endif
1118 VBoxC_SOURCES += src-client/CloudGateway.cpp
1119endif
1120
1121# Audio bits.
1122VBoxC_SOURCES += \
1123 src-client/AudioDriver.cpp \
1124 $(if $(VBOX_WITH_AUDIO_VRDE),src-client/DrvAudioVRDE.cpp,)
1125
1126VBoxC_SOURCES.win = \
1127 src-client/win/dllmain.cpp \
1128 src-client/win/VBoxC.def \
1129 src-client/win/VBoxC.rc
1130ifdef VBOX_WITH_GUEST_CONTROL
1131 VBoxC_SOURCES += \
1132 src-client/GuestSessionImplTasks.cpp \
1133 src-client/GuestCtrlPrivate.cpp \
1134 src-client/GuestDirectoryImpl.cpp \
1135 src-client/GuestFileImpl.cpp \
1136 src-client/GuestFsObjInfoImpl.cpp \
1137 src-client/GuestProcessImpl.cpp \
1138 src-client/GuestSessionImpl.cpp
1139endif
1140ifdef VBOX_WITH_DRAG_AND_DROP
1141 VBoxC_SOURCES += \
1142 src-client/GuestDnDPrivate.cpp \
1143 src-client/GuestDnDSourceImpl.cpp \
1144 src-client/GuestDnDTargetImpl.cpp
1145endif
1146ifdef VBOX_WITH_XPCOM
1147 VBoxC_SOURCES += \
1148 src-client/xpcom/module.cpp
1149endif
1150ifdef VBOX_WITH_HGCM
1151 VBoxC_SOURCES += \
1152 src-client/HGCMObjects.cpp \
1153 src-client/HGCMThread.cpp \
1154 src-client/HGCM.cpp
1155endif
1156ifdef VBOX_WITH_USB
1157 VBoxC_SOURCES += \
1158 src-client/RemoteUSBBackend.cpp
1159endif
1160ifndef VBOX_WITH_VRDEAUTH_IN_VBOXSVC
1161 VBoxC_SOURCES += \
1162 src-all/AuthLibrary.cpp
1163endif
1164
1165$(call KB_FN_DO_PASS0_ON_TARGET,VBoxC) # Sets VBoxC_0_OUTDIR
1166
1167ifeq ($(KBUILD_TARGET),darwin)
1168 VBoxC_ORDERDEPS += $(VBoxC_0_OUTDIR)/VBoxC.def
1169 VBoxC_CLEAN += $(VBoxC_0_OUTDIR)/VBoxC.def
1170 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxC_0_OUTDIR)/VBoxC.def)
1171 $(VBoxC_0_OUTDIR)/VBoxC.def:
1172 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1173 $(RM) -f $@
1174 $(APPEND) $@ _NSGetModule
1175 $(APPEND) $@ _VBoxDriversRegister
1176endif
1177
1178src-client/ConsoleImpl.cpp_DEFS = \
1179 $(if $(VBOX_WITH_OPENSSL_FIPS), VBOX_OPENSSL_FIPS,)
1180
1181
1182src-client/win/VBoxC.rc_DEPS = $(VBoxC_0_OUTDIR)/VBoxC.rgs $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
1183VBoxC_CLEAN.win += $(VBoxC_0_OUTDIR)/VBoxC.rgs
1184$(call KB_FN_AUTO_CMD_DEPS,$(VBoxC_0_OUTDIR)/VBoxC.rgs)
1185$(VBoxC_0_OUTDIR)/VBoxC.rgs: $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
1186 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1187 $(VBOX_XSLTPROC) \
1188 --stringparam Application VirtualBox \
1189 --stringparam Module VBoxC \
1190 -o $@ \
1191 $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl \
1192 $(VBOX_XIDL_FILE)
1193
1194ifdef VBOX_WITH_32_ON_64_MAIN_API
1195 #
1196 # 32-bit VBox API Client In-Process module.
1197 #
1198 # This is currently just a 32-bit version of VBoxC. It might be desirable to
1199 # split up VBoxC into a simple client and a VM client part later, in which
1200 # case this module will be a simple client.
1201 #
1202 # Note! One important thing is that the typelib for this DLL must be build
1203 # with the /env win32 switch and the VBoxC typelib with /env amd64, if
1204 # not they will overwrite each others typelib module entry.
1205 #
1206 DLLS += VBoxClient-x86
1207 VBoxClient-x86_TEMPLATE = VBoxMainComp-x86
1208 VBoxClient-x86_EXTENDS = VBoxC
1209if defined(VBOX_WITH_PRECOMPILED_HEADERS) && "$(KBUILD_TARGET)" == "win" ## @todo fix inheritance (fixed in r3253)
1210 VBoxClient-x86_USES = vccprecomp
1211 VBoxClient-x86_PCH_HDR := $(PATH_SUB_CURRENT)/src-client/win/precomp_vcc.h
1212endif
1213 VBoxClient-x86_SDKS = $(filter-out VBOX_OPUS VBOX_VPX,$(VBoxC_SDKS))
1214 VBoxClient-x86_DEFS = VBOX_COM_INPROC_API_CLIENT \
1215 $(filter-out VBOX_WITH_RECORDING VBOX_WITH_LIBVPX VBOX_WITH_AUDIO_RECORDING VBOX_WITH_LIBOPUS,$(VBoxC_DEFS))
1216 VBoxClient-x86_INCS.win = \
1217 $(VBoxClient-x86_0_OUTDIR) \
1218 $(VBoxCOM-x86_0_OUTDIR) \
1219 $(VBoxC_INCS.win)
1220 VBoxClient-x86_SOURCES = \
1221 src-all/EventImpl.cpp \
1222 src-all/Global.cpp \
1223 src-all/GlobalStatusConversion.cpp \
1224 src-all/AutoCaller.cpp \
1225 src-all/ThreadTask.cpp \
1226 src-all/VirtualBoxBase.cpp \
1227 src-all/VirtualBoxErrorInfoImpl.cpp \
1228 src-client/ClientTokenHolder.cpp \
1229 src-client/SessionImpl.cpp \
1230 src-client/VirtualBoxClientImpl.cpp \
1231 $(VBOX_AUTOGEN_EVENT_CPP) \
1232 $(VBOX_AUTOGEN_STRINGIFY_ENUMS_CPP) \
1233 $(VBOX_XML_SCHEMADEFS_CPP)
1234 ifdef VBOX_WITH_MAIN_NLS
1235 VBoxClient-x86_SOURCES += \
1236 src-all/VirtualBoxTranslator.cpp \
1237 src-all/QMTranslatorImpl.cpp
1238 endif
1239 VBoxClient-x86_SOURCES.win = \
1240 src-client/win/dllmain.cpp \
1241 src-client/win/VBoxClient-x86.def \
1242 src-client/win/VBoxClient-x86.rc
1243 ifdef VBOX_WITH_XPCOM
1244 VBoxClient-x86_SOURCES += \
1245 src-client/xpcom/module.cpp
1246 endif
1247 VBoxClient-x86_LIBS = \
1248 $(PATH_STAGE_LIB)/VBoxAPIWrap-x86$(VBOX_SUFF_LIB)
1249 VBoxClient-x86_LIBS.win = $(NO_SUCH_VARIABLE)
1250 VBoxClient-x86_LIBS.win.x86 += \
1251 $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/delayimp.lib \
1252 $(PATH_SDK_$(VBOX_WINPSDK)_LIB.x86)/WbemUuid.Lib
1253 VBoxClient-x86_CLEAN.win += $(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs
1254 $(call KB_FN_DO_PASS0_ON_TARGET,VBoxClient-x86) # Sets VBoxClient-x86_0_OUTDIR
1255
1256 src-client/win/VBoxClient-x86.rc_DEPS = \
1257 $(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs \
1258 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb
1259
1260 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs)
1261 $(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs: \
1262 $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl \
1263 $(VBOX_XIDL_FILE) | $$(dir $$@)
1264 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1265 $(VBOX_XSLTPROC) \
1266 --stringparam Application VirtualBox \
1267 --stringparam Module VBoxC \
1268 -o $@ \
1269 $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl \
1270 $(VBOX_XIDL_FILE)
1271endif
1272
1273#
1274# The VBoxExtPackHelperApp.
1275#
1276ifdef VBOX_WITH_EXTPACK
1277 PROGRAMS += VBoxExtPackHelperApp
1278 VBoxExtPackHelperApp_TEMPLATE = VBoxR3SetUidToRoot
1279 VBoxExtPackHelperApp_LDFLAGS.darwin = -framework Security
1280 VBoxExtPackHelperApp_LDFLAGS.win = /SUBSYSTEM:windows
1281 VBoxExtPackHelperApp_SOURCES = \
1282 src-helper-apps/VBoxExtPackHelperApp.cpp \
1283 src-all/ExtPackUtil.cpp
1284 VBoxExtPackHelperApp_SOURCES.win = \
1285 src-helper-apps/VBoxExtPackHelperApp.rc
1286 VBoxExtPackHelperApp_LIBS = \
1287 $(LIB_RUNTIME)
1288endif # VBOX_WITH_EXTPACK
1289
1290#
1291# VolInfo
1292#
1293ifdef VBOX_WITH_DEVMAPPER
1294 PROGRAMS.linux += VBoxVolInfo
1295 VBoxVolInfo_TEMPLATE = VBoxR3SetUidToRoot
1296 VBoxVolInfo_SOURCES = src-helper-apps/VBoxVolInfo.cpp
1297 VBoxVolInfo_LIBS = devmapper
1298endif
1299
1300
1301endif # !defined(VBOX_ONLY_SDK) && !defined(VBOX_ONLY_EXTPACKS) (the ifndef is far above)
1302ifndef VBOX_ONLY_SDK
1303
1304
1305#
1306# VBoxCOM - COM Abstraction Layer library
1307#
1308LIBRARIES += VBoxCOM
1309VBoxCOM_TEMPLATE = VBoxMainLib
1310VBoxCOM_INTERMEDIATES = $(VBOX_MAIN_PREREQS) \
1311 $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
1312VBoxCOM_SOURCES = \
1313 glue/com.cpp \
1314 glue/VBoxLogRelCreate.cpp \
1315 glue/GetVBoxUserHomeDirectory.cpp \
1316 glue/initterm.cpp \
1317 glue/string.cpp \
1318 glue/string-base64.cpp \
1319 glue/AutoLock.cpp \
1320 glue/EventQueue.cpp \
1321 glue/NativeEventQueue.cpp \
1322 glue/ErrorInfo.cpp \
1323 glue/errorprint.cpp
1324VBoxCOM_INCS += $(VBOX_MAIN_APIWRAPPER_INCS) \
1325 include
1326ifeq ($(KBUILD_TARGET),win)
1327 ifdef VBOX_WITH_MIDL_PROXY_STUB
1328 VBoxCOM_DEFS.win = VBOX_WITH_AUTO_COM_REG_UPDATE
1329 endif
1330 ifdef VBOX_WITH_SDS
1331 VBoxCOM_DEFS.win += VBOX_WITH_SDS
1332 endif
1333 VBoxCOM_DEFS.x86 = _WIN32_WINNT=0x0500
1334 VBoxCOM_DEFS.amd64 = _WIN32_WINNT=0x0510
1335 VBoxCOM_SOURCES += \
1336 $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c
1337 VBoxCOM_CLEAN = \
1338 $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
1339 $(VBoxCOM_0_OUTDIR)/VirtualBox_p.c \
1340 $(VBoxCOM_0_OUTDIR)/dlldata.c \
1341 $(VBoxCOM_0_OUTDIR)/VirtualBox.h \
1342 $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
1343 VBoxCOM_CLEAN += \
1344 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c \
1345 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c \
1346 $(VBoxCOM_0_OUTDIR)/legacy/dlldata.c \
1347 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.h \
1348 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.tlb
1349 VBoxCOM_BLDDIRS = $(VBoxCOM_0_OUTDIR)/legacy/
1350else # !win
1351 VBoxCOM_SOURCES += \
1352 $(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c \
1353 glue/xpcom/helpers.cpp
1354endif # !win
1355
1356ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
1357glue/VBoxLogRelCreate.cpp_DEFS = KBUILD_TYPE="$(KBUILD_TYPE)"
1358else
1359glue/VBoxLogRelCreate.cpp_DEFS = KBUILD_TYPE=\"$(KBUILD_TYPE)\"
1360endif
1361
1362# 32-bit version of VBoxCOM.
1363if defined(VBOX_WITH_32_ON_64_MAIN_API) && !defined(VBOX_ONLY_EXTPACKS)
1364 LIBRARIES += VBoxCOM-x86
1365 VBoxCOM-x86_TEMPLATE = VBoxMainLib-x86
1366 VBoxCOM-x86_EXTENDS = VBoxCOM
1367 ifeq ($(KBUILD_TARGET),win)
1368 VBoxCOM-x86_CLEAN = \
1369 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c \
1370 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c \
1371 $(VBoxCOM-x86_0_OUTDIR)/dlldata.c \
1372 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox.h \
1373 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb
1374 endif
1375endif
1376
1377# -MD version for the GUI in -MDd builds.
1378ifeq ($(KBUILD_TARGET).$(VBOX_VCC_CRT_TYPE),win.d)
1379 ifndef VBOX_ONLY_EXTPACKS
1380 LIBRARIES += VBoxCOM-GUI
1381 USES += qt5
1382 VBoxCOM-GUI_TEMPLATE = VBOXQTGUI$(if-expr defined(VBOX_WITH_HARDENING),,EXE)
1383 VBoxCOM-GUI_EXTENDS = VBoxCOM
1384 endif
1385endif
1386
1387# define qt5 tools for translation even if VBOX_ONLY_EXTPACKS is enabled
1388ifdef VBOX_WITH_NLS
1389 USES += qt5
1390endif
1391
1392
1393endif # !VBOX_ONLY_SDK
1394
1395
1396#
1397# Installs com related thing(s) to bin.
1398#
1399INSTALLS.win += VBoxMain-com-inst
1400VBoxMain-com-inst_INST = $(INST_BIN)
1401VBoxMain-com-inst_MODE = a+r,u+w
1402VBoxMain-com-inst_SOURCES = src-all/win/comregister.cmd
1403
1404
1405if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "linux" && !defined(VBOX_ONLY_EXTPACKS)
1406 #
1407 # Installs linux/hardening related things to components.
1408 #
1409 INSTALLS.linux += VBoxMain-hardening-inst
1410 VBoxMain-hardening-inst_INST = $(INST_BIN)components/
1411 VBoxMain-hardening-inst_SYMLINKS = \
1412 VBoxDDU.so=>../VBoxDDU.so \
1413 VBoxRT.so=>../VBoxRT.so \
1414 VBoxVMM.so=>../VBoxVMM.so \
1415 VBoxXPCOM.so=>../VBoxXPCOM.so
1416endif
1417
1418
1419if defined(VBOX_WITH_MIDL_PROXY_STUB) && "$(KBUILD_TARGET)" == "win" && !defined(VBOX_ONLY_EXTPACKS)
1420 #
1421 # Experimental COM proxy + stub DLL w/ automatic registration updating.
1422 #
1423 # The Legacy stub is for older 64-bit windows versions (pre Windows 7) as we
1424 # were having various problems on windows server 2003 and 2008 with the code
1425 # MIDL generated. Also, in windows 7 there are some potentially interesting
1426 # changes in the generated code where it uses new helpers from OLE32.
1427 #
1428 DLLS += VBoxProxyStub
1429 VBoxProxyStub_TEMPLATE = VBOXMAINCOMP
1430 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
1431 VBoxProxyStub_DEFS := REGISTER_PROXY_DLL PROXY_CLSID_IS=$(quote $(VBOX_MIDL_PROXY_CLSID_IS))
1432 else
1433 VBoxProxyStub_DEFS := REGISTER_PROXY_DLL PROXY_CLSID_IS="$(VBOX_MIDL_PROXY_CLSID_IS)"
1434 endif
1435 ifdef VBOX_WITH_SDS
1436 VBoxProxyStub_DEFS += VBOX_WITH_SDS
1437 endif
1438 ifdef VBOX_WITH_SDS_CLIENT_WATCHER
1439 VBoxProxyStub_DEFS += VBOX_WITH_SDS_CLIENT_WATCHER,)
1440 endif
1441 VBoxProxyStub_DEFS.win.x86 = WIN32
1442 VBoxProxyStub_SDKS = VBOX_NTDLL
1443 VBoxProxyStub_DEFPATH = $(VBoxCOM_0_OUTDIR)/# Hack to workaround drive letter in $(VBoxCOM_0_OUTDIR)/ for CFLAGS hack below.
1444 VBoxProxyStub_INCS = $(VBoxCOM_0_OUTDIR)/
1445 VBoxProxyStub_SOURCES := \
1446 VirtualBox_p.c \
1447 VirtualBox_i.c \
1448 $(PATH_SUB_CURRENT)/src-all/win/VBoxProxyStub.def \
1449 $(PATH_SUB_CURRENT)/src-all/win/VBoxProxyStub.rc \
1450 $(PATH_SUB_CURRENT)/src-all/win/VBoxProxyStub.c
1451 src-all/win/VBoxProxyStub.rc_DEPS = $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
1452 VBoxProxyStub_VirtualBox_p.c_CFLAGS.x86 = /Gz # Workaround for incorrect ObjectStublessClient* prototypes in SDK v7.1.
1453
1454 DLLS += VBoxProxyStubLegacy
1455 VBoxProxyStubLegacy_TEMPLATE = VBOXMAINCOMP
1456 VBoxProxyStubLegacy_EXTENDS = VBoxProxyStub
1457 VBoxProxyStubLegacy_DEFS = $(VBoxProxyStub_DEFS) VBOX_IN_PROXY_STUB_LEGACY
1458 VBoxProxyStubLegacy_INCS = $(VBoxCOM_0_OUTDIR)/legacy/
1459 VBoxProxyStubLegacy_SOURCES = \
1460 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c \
1461 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c \
1462 src-all/win/VBoxProxyStub.def \
1463 src-all/win/VBoxProxyStubLegacy.rc \
1464 src-all/win/VBoxProxyStub.c
1465 src-all/win/VBoxProxyStubLegacy.rc_DEPS = $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.tlb
1466
1467 ifdef VBOX_WITH_32_ON_64_MAIN_API
1468 DLLS += VBoxProxyStub-x86
1469 VBoxProxyStub-x86_TEMPLATE = VBoxMainComp-x86
1470 VBoxProxyStub-x86_SDKS = VBOX_NTDLL
1471 VBoxProxyStub-x86_DEFS = $(VBoxProxyStub_DEFS) VBOX_PROXY_STUB_32_ON_64 WIN32
1472 VBoxProxyStub-x86_INCS = $(VBoxCOM-x86_0_OUTDIR)/
1473 VBoxProxyStub-x86_SOURCES = \
1474 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c \
1475 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c \
1476 src-all/win/VBoxProxyStub.c \
1477 src-all/win/VBoxProxyStub-x86.rc \
1478 src-all/win/VBoxProxyStub.def
1479 src-all/win/VBoxProxyStub-x86.rc_DEPS = $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb
1480 endif
1481endif
1482
1483
1484ifdef VBOX_WITH_MAIN_NLS
1485#
1486# NLS stuff.
1487#
1488include $(PATH_SUB_CURRENT)/nls/ApprovedLanguages.kmk
1489
1490PROGRAMS += VirtualBoxAPI
1491VirtualBoxAPI_TEMPLATE = VBoxNLS
1492VirtualBoxAPI_QT_TRANSLATIONS = $(addsuffix .ts,$(addprefix $(VBOX_PATH_MAIN_SRC)/nls/VirtualBoxAPI_,$(VBOX_APPROVED_MAIN_LANGUAGES)))
1493VirtualBoxAPI_VBOX_ALL_NLS_SOURCES = $(wildcard \
1494 $(VBOX_PATH_MAIN_SRC)/include/*.h\
1495 $(VBOX_PATH_MAIN_SRC)/src-all/*.cpp \
1496 $(VBOX_PATH_MAIN_SRC)/src-all/*.h \
1497 $(VBOX_PATH_MAIN_SRC)/src-server/*.cpp \
1498 $(VBOX_PATH_MAIN_SRC)/src-server/*.h \
1499 $(VBOX_PATH_MAIN_SRC)/src-client/*.cpp \
1500 $(VBOX_PATH_MAIN_SRC)/src-client/*.h )
1501
1502updatenls:: makeallnls $(VBOX_PATH_MAIN_SRC)/nls/VirtualBoxAPI_en.ts
1503
1504makeallnls:: $(VirtualBoxAPI_VBOX_ALL_NLS_SOURCES)
1505 $(call MSG_L1,lupdate all languages (nls/*.ts))
1506 $(QUIET)$(TOOL_QT5_LUPDATE) \
1507 $^ \
1508 -ts \
1509 $(filter-out nls/VirtualBoxAPI_en.ts, $(VirtualBoxAPI_QT_TRANSLATIONS)) \
1510 $(VBOX_PATH_MAIN_SRC)/nls/VirtualBoxAPI_xx_YY.ts
1511
1512#fake-main-nls:
1513# $(foreach file, $(VirtualBoxAPI_QT_TRANSLATIONS) \
1514# ,$(NLTAB)$(SED) -i \
1515# -e '/<source>.*<\/source>/h' \
1516# -e '/<source>.*<\/source>/p' \
1517# -e '/<translation type="unfinished"><\/translation>/{' \
1518# -e 'x' \
1519# -e 's/<source>\(.*\)<\/source>/<translation type="unfinished">$(notdir $(file)): \1<\/translation>/' \
1520# -e '}' \
1521# $(file) )
1522
1523
1524# Create the English translation file. This is something special cause it will
1525# contain the plural forms only.
1526$(VBOX_PATH_MAIN_SRC)/nls/VirtualBoxAPI_en.ts: $(VirtualBoxAPI_VBOX_ALL_NLS_SOURCES)
1527 $(call MSG_L1,lupdate $@)
1528 $(QUIET)$(TOOL_QT5_LUPDATE) \
1529 $^ \
1530 -ts \
1531 "$@"
1532 $(QUIET)$(SED) -n -i \
1533 -e '/<context>/,/<\/context>/!p' \
1534 -e '/<context>/h' \
1535 -e '/<name>/H' \
1536 -e '/<message numerus="yes">/,/<\/message>/H' \
1537 -e '/<\/context>/{H;x;/<message/p}' \
1538 "$@"
1539
1540endif # VBOX_WITH_MAIN_NLS
1541
1542
1543# generate rules
1544include $(FILE_KBUILD_SUB_FOOTER)
1545
1546
1547
1548#
1549# Additions rules.
1550#
1551
1552## @todo this hack ain't cutting it any longer. (the file name is abspath'ed since ages now.)
1553glue/xpcom/helpers.cpp: $(VBOX_IDL_TYPELIB.XPCOM)
1554
1555$(call KB_FN_AUTO_CMD_DEPS_EX,$(VBOX_IDL_FILE.XPCOM),$(PATH_OUT)/VBOX_IDL_FILE.XPCOM.vbox-dep)
1556$(VBOX_IDL_FILE.XPCOM): $(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
1557 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS_EX,$(PATH_OUT)/VBOX_IDL_FILE.XPCOM.vbox-dep)
1558 $(call MSG_TOOL,xsltproc,VBoxSVC,$(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl,$@)
1559 $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl $(VBOX_XIDL_FILE)
1560
1561$(call KB_FN_AUTO_CMD_DEPS_EX,$(VBOX_IDL_TYPELIB.XPCOM),$(PATH_OUT)/VBOX_IDL_TYPELIB.XPCOM.vbox-dep)
1562$(VBOX_IDL_TYPELIB.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
1563 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS_EX,$(PATH_OUT)/VBOX_IDL_TYPELIB.XPCOM.vbox-dep)
1564 $(call MSG_TOOL,xpidl,VBoxSVC,$(VBOX_IDL_FILE.XPCOM),$@)
1565 $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m typelib -I $(VBOX_PATH_XPCOM_IDL) -e $@ $(VBOX_IDL_FILE.XPCOM)
1566 $(CHMOD) 0644 $@
1567## @todo ^^^^^^^^^^^^ fix horrible hack
1568
1569$(call KB_FN_AUTO_CMD_DEPS_EX,$(VBOX_IDL_HEADER.XPCOM),$(PATH_OUT)/VBOX_IDL_HEADER.XPCOM.vbox-dep)
1570$(VBOX_IDL_HEADER.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
1571 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS_EX,$(PATH_OUT)/VBOX_IDL_HEADER.XPCOM.vbox-dep)
1572 $(call MSG_TOOL,xpidl,VBoxSVC,$(VBOX_IDL_FILE.XPCOM),$@)
1573 $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m header -I $(VBOX_PATH_XPCOM_IDL) -e $@ $(VBOX_IDL_FILE.XPCOM)
1574
1575$(call KB_FN_AUTO_CMD_DEPS_EX,$(VBOX_IDL_FILE.MSCOM),$(PATH_OUT)/VBOX_IDL_FILE.MSCOM.vbox-dep)
1576$(VBOX_IDL_FILE.MSCOM): $(VBOX_PATH_MAIN_SRC)/idl/midl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
1577 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS_EX,$(PATH_OUT)/VBOX_IDL_FILE.MSCOM.vbox-dep)
1578 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
1579 $(QUIET)$(VBOX_XSLTPROC) -o $@ \
1580 $(if $(VBOX_WITH_MIDL_PROXY_STUB),-stringparam g_fGenProxy yes,) \
1581 $(if $(VBOX_WITH_SDS),-stringparam g_fVBoxWithSDS yes,) \
1582 $(VBOX_PATH_MAIN_SRC)/idl/midl.xsl $(VBOX_XIDL_FILE)
1583
1584
1585# Aliases for testing purposes.
1586ifdef VBOX_WITH_XPCOM
1587testidl: $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM) $(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c
1588testidlhdr: $(VBOX_IDL_HEADER.XPCOM)
1589else
1590testidl: $(VBOX_IDL_FILE.MSCOM) $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
1591 $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c,)
1592endif
1593
1594
1595$(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c: $(VBOX_PATH_MAIN_SRC)/idl/xpidl_iid.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
1596 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
1597 $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
1598
1599if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" == "win"
1600
1601 # Note! Because we've got a different proxy stub DLL for pre windows 7 64-bit hosts, we target windows 7 for AMD64.
1602 # The output is different and hopefully more efficient, at least memory wise (using more helpers in OLE32).
1603 # Note! We're checking for win.amd64 below when setting the target because of the SDK build which happens on linux.amd64
1604 # but with a 32-bit Wine.
1605 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxCOM_0_OUTDIR)/VirtualBox_i.c)
1606 $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
1607 $(if $(VBOX_WITH_MIDL_PROXY_STUB), + $(VBoxCOM_0_OUTDIR)/VirtualBox_p.c + $(VBoxCOM_0_OUTDIR)/dlldata.c,) \
1608 + $(VBoxCOM_0_OUTDIR)/VirtualBox.h \
1609 + $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
1610 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1611 $(VBOX_MIDL_REDIRECT) $(VBOX_WIN_MIDL) /nologo /W4 \
1612 /env $(if-expr "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.amd64" ,amd64,win32) \
1613 /robust /protocol all /target $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),NT61,NT51) \
1614 /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM_0_OUTDIR)) \
1615 /cpp_cmd $(VBOX_MIDL_CPP_CMD) \
1616 $(foreachfile dir,$(SDK_$(VBOX_WINPSDK)_INCS),/I $(call VBOX_FN_MAKE_WIN_PATH,$(dir))) \
1617 /I idl \
1618 $(call VBOX_FN_MAKE_WIN_PATH,$(VBOX_IDL_FILE.MSCOM))
1619 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox.h)
1620 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox_i.c)
1621 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox_p.c)
1622
1623 if defined(VBOX_WITH_MIDL_PROXY_STUB)
1624 # -Windows Server 2003 AMD64 SP1 does not like the result when using '/protocol all' and '/target NT51'.
1625 # -Vista AMD64 SP1 and Windows Server 2008 AMD64 seems to have some objections as well, but it seemed
1626 # that using an older MIDL compiler (v7.00.0499 instead of v7.00.0555) helps. But the W2K3 fix also works.
1627 # To avoid 32-bit vs. 64-bit differences, we do the same for 32-bit windows versions.
1628 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c)
1629 $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c \
1630 + $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c\
1631 + $(VBoxCOM_0_OUTDIR)/legacy/dlldata.c \
1632 + $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.h \
1633 + $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
1634 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1635 $(VBOX_MIDL_REDIRECT) $(VBOX_WIN_MIDL) /nologo /W4 \
1636 $(if-expr "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.amd64" \
1637 ,/env amd64 /x64 /target NT50 /robust \
1638 ,/env win32 /target NT51 /robust /protocol all ) \
1639 /out $(call VBOX_FN_MAKE_WIN_PATH,$(dir $@)) \
1640 /cpp_cmd $(VBOX_MIDL_CPP_CMD) \
1641 $(foreachfile dir,$(SDK_$(VBOX_WINPSDK)_INCS),/I $(call VBOX_FN_MAKE_WIN_PATH,$(dir))) \
1642 /I idl \
1643 $(call VBOX_FN_MAKE_WIN_PATH,$(VBOX_IDL_FILE.MSCOM))
1644 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.h)
1645 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c)
1646 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c)
1647 endif
1648
1649 if defined(VBOX_WITH_32_ON_64_MAIN_API) && !defined(VBOX_ONLY_EXTPACKS)
1650 # The XP targetted 32-bit proxy stub works with all versions of windows (the
1651 # issues leading to the VBoxProxyStubLegacy.dll are only on 64-bit windows).
1652 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c)
1653 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c \
1654 $(if $(VBOX_WITH_MIDL_PROXY_STUB), + $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c + $(VBoxCOM-x86_0_OUTDIR)/dlldata.c,) \
1655 + $(VBoxCOM-x86_0_OUTDIR)/VirtualBox.h \
1656 + $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
1657 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1658 $(VBOX_MIDL_REDIRECT_X86) $(VBOX_WIN_MIDL) /nologo /W4 \
1659 /env win32 /target NT51 /robust /protocol all \
1660 /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM-x86_0_OUTDIR)) \
1661 /tlb $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb) \
1662 /cpp_cmd $(VBOX_MIDL_CPP_CMD_X86) \
1663 $(foreachfile dir,$(SDK_$(VBOX_WINPSDK)_INCS),/I $(call VBOX_FN_MAKE_WIN_PATH,$(dir))) \
1664 /I idl \
1665 $(call VBOX_FN_MAKE_WIN_PATH,$(VBOX_IDL_FILE.MSCOM))
1666 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox.h)
1667 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c)
1668 $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c)
1669 endif
1670
1671endif # defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" == "win"
1672
1673#
1674# Translation stuff
1675#
1676VBoxSVC_VBOX_HEADERS = \
1677 include/collection.h \
1678 include/MachineImpl.h
1679VBoxSVC_VBOX_TRANSLATIONS = \
1680 nls/VBoxSVC_de.ts
1681
1682VBoxC_VBOX_HEADERS = \
1683 include/ConsoleImpl.h
1684
1685VBoxC_VBOX_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
1686VBoxC_VBOX_HEADERS += $(VBOX_MAIN_APIWRAPPER_INCS)
1687
1688VBoxC_VBOX_TRANSLATIONS = \
1689 nls/VBoxC_de.ts
1690
1691ifdef VBOX_WITH_JMSCOM
1692
1693 #
1694 # Java glue JAR files
1695 #
1696 VBOX_JMSCOM_JAR = $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar
1697 VBOX_JMSCOM_TARGET := $(PATH_TARGET)/vboxjmscom-gen
1698 VBOX_JMSCOM_GEN = $(VBOX_JMSCOM_TARGET)/jmscomgen
1699 VBOX_JMSCOM_JDEST := $(VBOX_JMSCOM_TARGET)/jdest
1700 VBOX_GLUE_XSLT_DIR := $(PATH_ROOT)/src/VBox/Main/glue
1701 VBOX_JACOB_DIR := $(PATH_ROOT)/src/libs/jacob-1.17
1702
1703 INSTALLS += VBoxJMscom-inst-jar
1704 VBoxJMscom-inst-jar_INST = $(INST_SDK)bindings/mscom/java/
1705 VBoxJMscom-inst-jar_MODE = a+r,u+w
1706 VBoxJMscom-inst-jar_SOURCES = \
1707 $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar
1708 VBoxJMscom-inst-jar_CLEAN = \
1709 $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar \
1710 $(VBOX_JMSCOM_GEN)/jmscomglue.list \
1711 $(wildcard \
1712 $(VBOX_JMSCOM_GEN)/java/*.java \
1713 $(VBOX_JMSCOM_JDEST)/*.class \
1714 $(VBOX_JMSCOM_JDEST)/*/*.class \
1715 $(VBOX_JMSCOM_JDEST)/*/*/*.class \
1716 $(VBOX_JMSCOM_JDEST)/*/*/*/*.class \
1717 )
1718 VBoxJMscom-inst-jar_BLDDIRS += $(VBOX_JMSCOM_GEN)/java
1719 $(call KB_FN_DO_PASS0_ON_TARGET,VBoxJMscom-inst-jar) # Sets VBoxJMscom-inst-jar_0_OUTDIR
1720
1721 $(call KB_FN_AUTO_CMD_DEPS,$(VBOX_JMSCOM_GEN)/jmscomglue.list)
1722 $(VBOX_JMSCOM_GEN)/jmscomglue.list: \
1723 $(VBOX_XIDL_FILE) \
1724 $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl \
1725 $(VBOX_FILESPLIT) \
1726 | $(VBOX_JMSCOM_GEN)/java/
1727 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1728 $(call MSG_L1,Generating Java MSCOM glue files from XIDL)
1729 $(QUIET)$(RM) -f $(wildcard $(VBOX_JMSCOM_GEN)/java/*.java)
1730 $(QUIET)$(VBOX_XSLTPROC) \
1731 --stringparam filelistonly "" \
1732 --stringparam G_vboxApiSuffix $(VBOX_API_SUFFIX) \
1733 --stringparam G_vboxGlueStyle mscom \
1734 --stringparam G_vboxDirPrefix "" \
1735 -o $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl $(VBOX_XIDL_FILE)
1736 $(QUIET)$(VBOX_FILESPLIT) $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_JMSCOM_GEN)/java
1737 $(QUIET)echo $(VBOX_JMSCOM_GEN)/java/*.java > $@
1738
1739 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar)
1740 $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar: $(VBOX_JMSCOM_GEN)/jmscomglue.list | $$(dir $$@)
1741 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1742 $(call MSG_TOOL,javac,$(notdir $@),jmscomglue.list,)
1743 $(QUIET)$(RM) -Rf $(VBOX_JMSCOM_JDEST)
1744 $(QUIET)$(MKDIR) -p $(VBOX_JMSCOM_JDEST)
1745 $(call MSG_TOOL,javac,$(notdir $@),...,)
1746 $(QUIET)$(VBOX_JAVAC) $(VBOX_JAVAC_OPTS) @$(VBOX_JMSCOM_GEN)/jmscomglue.list \
1747 -d $(VBOX_JMSCOM_JDEST) -classpath "$(VBOX_JMSCOM_JDEST)$(VBOX_SEP)$(VBOX_JACOB_DIR)/jacob.jar"
1748 $(call MSG_LINK,$(notdir $@),$@)
1749 $(QUIET)$(VBOX_JAR) cf $@ -C $(VBOX_JMSCOM_JDEST) .
1750
1751 ## @todo compile TestVBox.java (see below) to have sanity checking
1752endif # VBOX_WITH_JMSCOM
1753
1754#
1755# Install Java glue sample code.
1756#
1757INSTALLS += javagluesample
1758javagluesample_INST = $(INST_SDK)bindings/glue/java/
1759javagluesample_MODE = a+r,u+w
1760javagluesample_SOURCES = \
1761 $(VBOX_PATH_MAIN_SRC)/glue/tests/TestVBox.java=>TestVBox.java \
1762 $(VBOX_PATH_MAIN_SRC)/glue/tests/Makefile=>Makefile
1763
1764#
1765# Rules associated with VBoxAPIWrap (in typical invocation order).
1766# We keep them down here to simplify the use of VBoxAPIWrap_0_OUTDIR.
1767#
1768
1769# Generate a make include file which lists the wrapper header and source files.
1770$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_VBOX_KMK_FILE).ts)
1771$(VBoxAPIWrap_VBOX_KMK_FILE).ts \
1772+| $(VBoxAPIWrap_VBOX_KMK_FILE): \
1773 $(VBOX_XIDL_FILE) \
1774 $(VBOX_PATH_MAIN_SRC)/idl/apiwrap-server-filelist.xsl \
1775 $(VBOX_PATH_MAIN_SRC)/Makefile.kmk
1776 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1777 $(call MSG_GENERATE,,$(VBoxAPIWrap_VBOX_KMK_FILE))
1778 $(QUIET)$(RM) -f $@
1779 $(QUIET)$(MKDIR) -p $(@D)
1780 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1781 $(if $(VBOX_WITH_SDS),-stringparam g_fVBoxWithSDS yes,) \
1782 -o $@ $(VBOX_PATH_MAIN_SRC)/idl/apiwrap-server-filelist.xsl $(VBOX_XIDL_FILE)
1783 $(QUIET)$(CP) --changed -fv $@ $(VBoxAPIWrap_VBOX_KMK_FILE)
1784
1785# Generate the header files for the wrappers.
1786$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-headers)
1787$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-headers \
1788+| $(VBOX_MAIN_APIWRAPPER_GEN_HDRS): \
1789 $(VBOX_XIDL_FILE) \
1790 $(VBOX_PATH_MAIN_SRC)/idl/typemap-shared.inc.xsl \
1791 $(VBoxAPIWrap_VBOX_XSLT) \
1792 $(VBOX_FILESPLIT) \
1793 | $$(dir $$@)
1794 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1795 $(call MSG_L1,Generating C++ Server API wrapper header files from XIDL)
1796 $(QUIET)$(RM) -f -- $(filter-out $(VBOX_MAIN_APIWRAPPER_GEN_HDRS), $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.h))
1797 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1798 --stringparam generating "headers" \
1799 -o $@ $(VBoxAPIWrap_VBOX_XSLT) $(VBOX_XIDL_FILE)
1800 $(QUIET)$(VBOX_FILESPLIT) $@ $(VBoxAPIWrap_0_OUTDIR)
1801
1802# Generate the DTrace probes for the wrappers and combine them with handcoded probes.
1803$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d.ts)
1804$(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d.ts \
1805+| $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d: \
1806 $(VBOX_XIDL_FILE) \
1807 $(VBOX_PATH_MAIN_SRC)/idl/typemap-shared.inc.xsl \
1808 $(VBoxAPIWrap_VBOX_XSLT) \
1809 $(VBOX_FILESPLIT) \
1810 | $$(dir $$@)
1811 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1812 $(call MSG_L1,Generating DTrace Provider for the VBox API (from XIDL))
1813 $(QUIET)$(RM) -f -- "$@" "[email protected]"
1814 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1815 --stringparam generating "dtrace-probes" \
1816 -o "$@" $(VBoxAPIWrap_VBOX_XSLT) $(VBOX_XIDL_FILE)
1817 $(QUIET)$(SED) -e '' -o "[email protected]" \
1818 "$(VBOX_PATH_MAIN_SRC)/src-all/VBoxAPI-start$(if-expr "$(VBOX_HOST_DTRACE_VERSION)" == "dtrace: Sun D 1.6.2",-alternative,).d" \
1819 "$@" \
1820 "$(VBOX_PATH_MAIN_SRC)/src-all/VBoxAPI-end$(if-expr "$(VBOX_HOST_DTRACE_VERSION)" == "dtrace: Sun D 1.6.2",-alternative,).d"
1821 $(QUIET)$(MV) -- "[email protected]" "$@"
1822 $(QUIET)$(CP) --changed -fv -- "$@" "$(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d"
1823
1824# Generate the wrapper source files - split in two due to long processing time
1825$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-even)
1826$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-even \
1827+| $(VBOX_MAIN_APIWRAPPER_GEN_SRCS_EVEN): \
1828 $(VBOX_XIDL_FILE) \
1829 $(VBOX_PATH_MAIN_SRC)/idl/typemap-shared.inc.xsl \
1830 $(VBoxAPIWrap_VBOX_XSLT) \
1831 $(VBOX_FILESPLIT) \
1832 | $$(dir $$@)
1833 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1834 $(call MSG_L1,Generating C++ Server API wrapper files from XIDL - part 1)
1835 $(QUIET)$(RM) -f -- $(filter-out $(VBOX_MAIN_APIWRAPPER_GEN_SRCS), $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.cpp))
1836 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1837 --stringparam generating "sources" \
1838 --param reminder 0 \
1839 -o $@ $(VBoxAPIWrap_VBOX_XSLT) $(VBOX_XIDL_FILE)
1840 $(QUIET)$(VBOX_FILESPLIT) $@ $(VBoxAPIWrap_0_OUTDIR)
1841
1842$(call KB_FN_AUTO_CMD_DEPS,$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-odd)
1843$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-odd \
1844+| $(VBOX_MAIN_APIWRAPPER_GEN_SRCS_ODD): \
1845 $(VBOX_XIDL_FILE) \
1846 $(VBOX_PATH_MAIN_SRC)/idl/typemap-shared.inc.xsl \
1847 $(VBoxAPIWrap_VBOX_XSLT) \
1848 $(VBOX_FILESPLIT) \
1849 | $$(dir $$@)
1850 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
1851 $(call MSG_L1,Generating C++ Server API wrapper files from XIDL - part 2)
1852 $(QUIET)$(RM) -f -- $(filter-out $(VBOX_MAIN_APIWRAPPER_GEN_SRCS), $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.cpp))
1853 $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \
1854 --stringparam generating "sources" \
1855 --param reminder 1 \
1856 -o $@ $(VBoxAPIWrap_VBOX_XSLT) $(VBOX_XIDL_FILE)
1857 $(QUIET)$(VBOX_FILESPLIT) $@ $(VBoxAPIWrap_0_OUTDIR)
1858
1859testapiwrappers:: \
1860 $(VBoxAPIWrap_0_OUTDIR)/apiwrappers-headers \
1861 $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d.ts \
1862 $(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-odd \
1863 $(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-even
1864
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