VirtualBox

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

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

Main,ExtPacks: Don't like with the VMM anymore, use the function table. bugref:10074

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