VirtualBox

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

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

Main/Update check: Big overhaul of the API and functionality [build fix]. ​​bugref:7983

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette