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