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