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