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