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