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