1 | # $Id: Makefile.kmk 51476 2014-05-30 14:58:02Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the VBox Main module.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2004-2014 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_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP,) \
|
---|
69 | $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,) \
|
---|
70 | $(if $(VBOX_WITH_CROGL),VBOX_WITH_CROGL,) \
|
---|
71 | $(if $(VBOX_WITH_CRHGSMI),VBOX_WITH_CRHGSMI,) \
|
---|
72 | $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
|
---|
73 | $(if $(VBOX_WITH_GUEST_PROPS_RDONLY_GUEST),VBOX_WITH_GUEST_PROPS_RDONLY_GUEST,) \
|
---|
74 | $(if $(VBOX_WITH_GUEST_CONTROL),VBOX_WITH_GUEST_CONTROL,) \
|
---|
75 | $(if $(VBOX_WITH_USB_CARDREADER),VBOX_WITH_USB_CARDREADER,) \
|
---|
76 | $(if $(VBOX_WITH_USB_CARDREADER_TEST),VBOX_WITH_USB_CARDREADER_TEST,) \
|
---|
77 | $(if $(VBOX_WITH_HOSTNETIF_API),VBOX_WITH_HOSTNETIF_API,) \
|
---|
78 |
|
---|
79 | # Unconditionally enable the new semaphore key generation code
|
---|
80 | VBOX_MAIN_DEFS += VBOX_WITH_NEW_SYS_V_KEYGEN
|
---|
81 |
|
---|
82 | VBOX_IDL_FILE.MSCOM = $(VBOX_PATH_SDK)/bindings/mscom/idl/VirtualBox.idl
|
---|
83 | VBOX_IDL_FILE.XPCOM = $(VBOX_PATH_SDK)/bindings/xpcom/idl/VirtualBox_XPCOM.idl
|
---|
84 |
|
---|
85 | VBOX_IDL_TYPELIB.XPCOM = $(PATH_STAGE_BIN)/components/VirtualBox_XPCOM.xpt
|
---|
86 | VBOX_IDL_HEADER.XPCOM = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
87 |
|
---|
88 | # The MS COM specific stuff.
|
---|
89 | if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" == "win"
|
---|
90 | OTHERS += \
|
---|
91 | $(VBOX_IDL_FILE.MSCOM)
|
---|
92 | OTHER_CLEAN += \
|
---|
93 | $(VBOX_IDL_FILE.MSCOM)
|
---|
94 |
|
---|
95 | INSTALLS += VBox-mscom-bindings-include VBox-mscom-bindings-lib
|
---|
96 | VBox-mscom-bindings-include_INST = $(INST_SDK)bindings/mscom/include/
|
---|
97 | VBox-mscom-bindings-include_MODE = a+r,u+w
|
---|
98 | VBox-mscom-bindings-include_SOURCES = $(VBoxCOM_0_OUTDIR)/VirtualBox.h
|
---|
99 | VBox-mscom-bindings-include_CLEAN = $(VBoxCOM_0_OUTDIR)/VirtualBox.h
|
---|
100 | VBox-mscom-bindings-lib_INST = $(INST_SDK)bindings/mscom/lib/
|
---|
101 | VBox-mscom-bindings-lib_MODE = a+r,u+w
|
---|
102 | VBox-mscom-bindings-lib_SOURCES = $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
|
---|
103 | $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
|
---|
104 | VBox-mscom-bindings-lib_CLEAN = $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
|
---|
105 | $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
|
---|
106 |
|
---|
107 | BLDDIRS += $(VBOX_PATH_SDK)/bindings/mscom/idl
|
---|
108 | endif
|
---|
109 |
|
---|
110 | # The XPCOM specific stuff.
|
---|
111 | # if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" != "win" -- does not build on Windows
|
---|
112 | if "$(KBUILD_TARGET)" != "win"
|
---|
113 | OTHERS += $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM) $(VBOX_IDL_HEADER.XPCOM)
|
---|
114 | OTHER_CLEAN += \
|
---|
115 | $(VBOX_IDL_FILE.XPCOM) \
|
---|
116 | $(VBOX_IDL_HEADER.XPCOM) \
|
---|
117 | $(VBOX_IDL_TYPELIB.XPCOM)
|
---|
118 |
|
---|
119 | INSTALLS += VBox-xpcom-bindings-lib
|
---|
120 | VBox-xpcom-bindings-lib_INST = $(INST_SDK)bindings/xpcom/lib/
|
---|
121 | VBox-xpcom-bindings-lib_MODE = a+r,u+w
|
---|
122 | VBox-xpcom-bindings-lib_SOURCES = $(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c=>VirtualBox_i.c
|
---|
123 | VBox-xpcom-bindings-lib_CLEAN = $(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c
|
---|
124 |
|
---|
125 | VBOX_MAIN_PREREQS += $(VBOX_IDL_TYPELIB.XPCOM) $(VBOX_IDL_HEADER.XPCOM)
|
---|
126 | BLDDIRS += \
|
---|
127 | $(VBOX_PATH_SDK)/bindings/xpcom/idl \
|
---|
128 | $(VBOX_PATH_SDK)/bindings/xpcom/include
|
---|
129 | endif # xpcom
|
---|
130 |
|
---|
131 |
|
---|
132 | #
|
---|
133 | # Strip documentation from source XIDL so that we don't get a full
|
---|
134 | # recompile every time a comma in the documentation is changed.
|
---|
135 | #
|
---|
136 | $(VBOX_XIDL_FILE).ts +| $(VBOX_XIDL_FILE): \
|
---|
137 | $(VBOX_XIDL_FILE_SRC) \
|
---|
138 | $(VBOX_PATH_MAIN_SRC)/idl/docstrip.xsl \
|
---|
139 | | $$(dir $$@)
|
---|
140 | # $(CP) -fv $< $(VBOX_XIDL_FILE).ts
|
---|
141 | $(QUIET)$(VBOX_XSLTPROC) -o $(VBOX_XIDL_FILE).ts $(VBOX_PATH_MAIN_SRC)/idl/docstrip.xsl $<
|
---|
142 | $(QUIET)$(CP) --changed -fv $(VBOX_XIDL_FILE).ts $(VBOX_XIDL_FILE)
|
---|
143 |
|
---|
144 | OTHER_CLEAN += $(VBOX_XIDL_FILE) $(VBOX_XIDL_FILE).ts
|
---|
145 |
|
---|
146 | #
|
---|
147 | # The Main API documentation
|
---|
148 | #
|
---|
149 | VBOX_MAIN_DOC_DIR = $(VBOX_PATH_SDK)/docs
|
---|
150 | BLDDIRS += $(VBOX_MAIN_DOC_DIR)
|
---|
151 |
|
---|
152 | $(PATH_TARGET)/docs.Main: \
|
---|
153 | $(VBOX_PATH_MAIN_SRC)/Doxyfile.Main \
|
---|
154 | $(VBOX_PATH_MAIN_SRC)/idl/doxygen.xsl \
|
---|
155 | $(VBOX_XIDL_FILE_SRC) \
|
---|
156 | | $(PATH_TARGET)/ \
|
---|
157 | $(VBOX_MAIN_DOC_DIR)/
|
---|
158 | $(call MSG_TOOL,xsltproc,doxygen input,$<,$@)
|
---|
159 | $(QUIET)$(RM) -f $(wildcard $(VBOX_MAIN_DOC_DIR)/html/*) $(PATH_TARGET)/docs.Main
|
---|
160 | $(QUIET)$(VBOX_XSLTPROC) -o $(PATH_TARGET)/VirtualBox.idl $(VBOX_PATH_MAIN_SRC)/idl/doxygen.xsl $(VBOX_XIDL_FILE_SRC)
|
---|
161 | $(QUIET)$(REDIRECT) -E 'DOCDIR=$(VBOX_MAIN_DOC_DIR)' -E 'PATH_TARGET=$(PATH_TARGET)' -E 'PATH_CHM=$(subst /,\,$(VBOX_MAIN_DOC_DIR)/VirtualBoxAPI.chm)' \
|
---|
162 | -- doxygen $(VBOX_PATH_MAIN_SRC)/Doxyfile.Main
|
---|
163 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) ">>>>>>>>>>>>>>>>>>>> Main.err: >>>>>>>>>>>>>>>>>>>>>>>>"
|
---|
164 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(CAT) "$(PATH_TARGET)/Main.err"
|
---|
165 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "<<<<<<<<<<<<<<<<<<<< Main.err <<<<<<<<<<<<<<<<<<<<<<<<<"
|
---|
166 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> **************************************************"
|
---|
167 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> Please fix above doxygen errors/warnings listed in"
|
---|
168 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> $(PATH_TARGET)/Main.err"
|
---|
169 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> **************************************************"
|
---|
170 | -$(EXEC_X86_WIN32) $(VBOX_PATH_HTML_HELP_WORKSHOP)/hhc.exe $(subst /,\\,$(VBOX_MAIN_DOC_DIR)/html/index.hhp)
|
---|
171 | $(APPEND) $(PATH_TARGET)/docs.Main
|
---|
172 | # aliases
|
---|
173 | docs.main docs.Main: $(PATH_TARGET)/docs.Main
|
---|
174 | if !defined(VBOX_ONLY_DOCS) && defined(VBOX_WITH_ALL_DOXYGEN_TARGETS)
|
---|
175 | docs: $(PATH_TARGET)/docs.Main
|
---|
176 | else
|
---|
177 | docs:
|
---|
178 | endif
|
---|
179 |
|
---|
180 |
|
---|
181 | ifndef VBOX_ONLY_SDK
|
---|
182 | #
|
---|
183 | # Generate library with API class wrappers from the XIDL file.
|
---|
184 | #
|
---|
185 | LIBRARIES += VBoxAPIWrap
|
---|
186 | VBoxAPIWrap_TEMPLATE = VBoxMainLib
|
---|
187 | VBoxAPIWrap_SOURCES = $(filter %.cpp,$(VBOX_MAIN_APIWRAPPER_GEN_FILES))
|
---|
188 | VBoxAPIWrap_DEFS.win.x86 += _WIN32_WINNT=0x0500
|
---|
189 | VBoxAPIWrap_DEFS.win.amd64 += _WIN32_WINNT=0x0510
|
---|
190 | VBoxAPIWrap_INCS += \
|
---|
191 | include
|
---|
192 | VBoxAPIWrap_CLEAN = \
|
---|
193 | $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.cpp) \
|
---|
194 | $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.h) \
|
---|
195 | $(VBoxAPIWrap_VBOX_RAWSRC)
|
---|
196 |
|
---|
197 | # Two VBox variables used here and/or in the rules generating wrappers.
|
---|
198 | VBoxAPIWrap_VBOX_RAWSRC = \
|
---|
199 | $(VBoxAPIWrap_0_OUTDIR)/apiwrappers
|
---|
200 | VBoxAPIWrap_VBOX_XSLT = \
|
---|
201 | $(VBOX_PATH_MAIN_SRC)/idl/apiwrap-server.xsl
|
---|
202 |
|
---|
203 | # This include file (generated at the bottom of this file), defines
|
---|
204 | # VBOX_MAIN_APIWRAPPER_GEN_FILES and VBOX_MAIN_APIWRAPPER_GEN_HDRS.
|
---|
205 | VBoxAPIWrap_VBOX_KMK_FILE = $(PATH_OUT)/vboxapiwrap.kmk
|
---|
206 | include $(VBoxAPIWrap_VBOX_KMK_FILE)
|
---|
207 |
|
---|
208 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
209 | LIBRARIES += VBoxAPIWrap-x86
|
---|
210 | VBoxAPIWrap-x86_TEMPLATE = VBoxMainLib-x86
|
---|
211 | VBoxAPIWrap-x86_EXTENDS = VBoxAPIWrap
|
---|
212 | endif
|
---|
213 |
|
---|
214 | endif # !VBOX_ONLY_SDK
|
---|
215 |
|
---|
216 | #
|
---|
217 | # Some SDK bit.
|
---|
218 | #
|
---|
219 | INSTALLS += VBox-main-xidl
|
---|
220 | VBox-main-xidl_INST = $(INST_SDK)bindings/
|
---|
221 | VBox-main-xidl_MODE = a+r,u+w
|
---|
222 | VBox-main-xidl_SOURCES = $(VBOX_XIDL_FILE_SRC)
|
---|
223 |
|
---|
224 | ifdef VBOX_WITH_PYTHON
|
---|
225 | INSTALLS += VBox-python-glue
|
---|
226 | VBox-python-glue_INST = $(INST_SDK)installer/vboxapi/
|
---|
227 | VBox-python-glue_MODE = a+r,u+w
|
---|
228 | VBox-python-glue_SOURCES = \
|
---|
229 | glue/vboxapi.py=>__init__.py \
|
---|
230 | $(VBox-python-glue_0_OUTDIR)/VirtualBox_constants.py
|
---|
231 | VBox-python-glue_CLEAN = \
|
---|
232 | $(VBox-python-glue_0_OUTDIR)/VirtualBox_constants.py
|
---|
233 |
|
---|
234 | $$(VBox-python-glue_0_OUTDIR)/VirtualBox_constants.py: \
|
---|
235 | $(VBOX_PATH_MAIN_SRC)/glue/constants-python.xsl \
|
---|
236 | $(VBOX_XIDL_FILE) \
|
---|
237 | | $$(dir $$@)
|
---|
238 | $(call MSG_TOOL,xsltproc,Python constants,$<,$@)
|
---|
239 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
|
---|
240 |
|
---|
241 | endif # VBOX_WITH_PYTHON
|
---|
242 |
|
---|
243 | ifndef VBOX_ONLY_SDK # Note this goes on for *very* long
|
---|
244 |
|
---|
245 | #
|
---|
246 | # Generate SchemaDefs.h and SchemaDefs.cpp from XML Schema
|
---|
247 | # These two files are used by both VBoxC and VBoxSVC.
|
---|
248 | #
|
---|
249 | BLDDIRS += $(PATH_TARGET)/Main
|
---|
250 |
|
---|
251 | testschemadefs: $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
252 |
|
---|
253 |
|
---|
254 | #
|
---|
255 | # VBoxSVC executable
|
---|
256 | #
|
---|
257 | PROGRAMS += VBoxSVC
|
---|
258 | VBoxSVC_TEMPLATE = VBOXMAINEXE
|
---|
259 | VBoxSVC_DEFS = \
|
---|
260 | VBOX_MAIN_SETTINGS_ADDONS \
|
---|
261 | IN_VMM_STATIC \
|
---|
262 | $(VBOX_MAIN_DEFS) \
|
---|
263 | $(if $(VBOX_WITH_VBOXSDL),VBOX_WITH_VBOXSDL,) \
|
---|
264 | $(if $(VBOX_WITH_HEADLESS),VBOX_WITH_HEADLESS,) \
|
---|
265 | $(if $(VBOX_WITH_QTGUI),VBOX_WITH_QTGUI,) \
|
---|
266 | $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
|
---|
267 | $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
|
---|
268 | $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
|
---|
269 | $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
|
---|
270 | $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS,) \
|
---|
271 | $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
|
---|
272 | $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
|
---|
273 | $(if $(VBOX_WITH_AHCI),VBOX_WITH_AHCI,) \
|
---|
274 | $(if $(VBOX_WITH_LSILOGIC),VBOX_WITH_LSILOGIC,) \
|
---|
275 | $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
|
---|
276 | $(if $(VBOX_WITH_RESOURCE_USAGE_API),VBOX_WITH_RESOURCE_USAGE_API,) \
|
---|
277 | $(if $(VBOX_WITH_PDM_ASYNC_COMPLETION),VBOX_WITH_PDM_ASYNC_COMPLETION,) \
|
---|
278 | $(if $(VBOX_WITH_DBUS),$(if $(VBOX_USB_WITH_DBUS),VBOX_USB_WITH_DBUS,),) \
|
---|
279 | $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,) \
|
---|
280 | $(if $(VBOX_USB_WITH_INOTIFY),VBOX_USB_WITH_INOTIFY,) \
|
---|
281 | $(if $(VBOX_WITH_LIVE_MIGRATION),VBOX_WITH_LIVE_MIGRATION,) \
|
---|
282 | $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK,) \
|
---|
283 | $(if $(VBOX_WITH_VUSB),VBOX_WITH_VUSB,) \
|
---|
284 | $(if $(VBOX_WITH_S3),VBOX_WITH_S3,) \
|
---|
285 | $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH,) \
|
---|
286 | $(if $(VBOX_WITH_PDM_AUDIO_DRIVER),VBOX_WITH_PDM_AUDIO_DRIVER,) \
|
---|
287 | $(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE,) \
|
---|
288 | $(if $(VBOX_WITH_CROGL),VBOX_WITH_CROGL,) \
|
---|
289 | $(if $(VBOX_WITH_CRHGSMI),VBOX_WITH_CRHGSMI,)
|
---|
290 | ifdef VBOX_WITH_USB
|
---|
291 | VBoxSVC_DEFS += \
|
---|
292 | VBOX_WITH_USB \
|
---|
293 | $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI,) \
|
---|
294 | $(if $(VBOX_WITH_NEW_USB_CODE_ON_DARWIN),VBOX_WITH_NEW_USB_CODE_ON_DARWIN,)
|
---|
295 | endif
|
---|
296 | VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
|
---|
297 | VBoxSVC_DEFS.win += _WIN32_WINNT=0x0510
|
---|
298 | # Try to load and use libhal at runtime for probing removable media
|
---|
299 | # VBoxSVC_DEFS.linux += VBOX_USE_LIBHAL
|
---|
300 | VBoxSVC_DEFS.solaris += VBOX_USE_LIBHAL
|
---|
301 | VBoxSVC_DEFS.freebsd += VBOX_USE_LIBHAL
|
---|
302 |
|
---|
303 | VBoxSVC_CXXFLAGS = $(filter-out -Wno-unused,$(TEMPLATE_VBOXMAINEXE_CXXFLAGS))
|
---|
304 |
|
---|
305 | VBoxSVC_INCS = \
|
---|
306 | include \
|
---|
307 | $(VBoxSVC_0_OUTDIR) \
|
---|
308 | $(dir $(VBOX_XML_SCHEMADEFS_H)) \
|
---|
309 | $(VBOX_MAIN_APIWRAPPER_INCS) \
|
---|
310 | .
|
---|
311 | VBoxSVC_INCS.win = \
|
---|
312 | $(VBoxCOM_0_OUTDIR)
|
---|
313 | ifdef VBOX_WITH_USB
|
---|
314 | VBoxSVC_INCS.os2 = \
|
---|
315 | $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
|
---|
316 | endif
|
---|
317 |
|
---|
318 | VBoxSVC_LIBS += \
|
---|
319 | $(PATH_STAGE_LIB)/VBoxAPIWrap$(VBOX_SUFF_LIB) \
|
---|
320 | $(PATH_STAGE_LIB)/SSMStandalone$(VBOX_SUFF_LIB) \
|
---|
321 | $(LIB_DDU)
|
---|
322 |
|
---|
323 | VBoxSVC_SDKS = VBOX_LIBPNG VBOX_ZLIB VBOX_OPENSSL
|
---|
324 | VBoxSVC_LIBS.solaris = \
|
---|
325 | adm \
|
---|
326 | nsl \
|
---|
327 | devinfo \
|
---|
328 | socket \
|
---|
329 | $(LIB_VMM)
|
---|
330 |
|
---|
331 | VBoxSVC_INTERMEDIATES = \
|
---|
332 | $(VBOX_MAIN_PREREQS) \
|
---|
333 | $(VBOX_XML_SCHEMADEFS_H) \
|
---|
334 | $(VBOX_AUTOGEN_EVENT_H) \
|
---|
335 | $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
|
---|
336 |
|
---|
337 | VBoxSVC_SOURCES = \
|
---|
338 | src-all/DisplayPNGUtil.cpp \
|
---|
339 | src-all/DisplayResampleImage.cpp \
|
---|
340 | src-all/DisplayUtils.cpp \
|
---|
341 | src-all/EventImpl.cpp \
|
---|
342 | src-all/Global.cpp \
|
---|
343 | src-all/HashedPw.cpp \
|
---|
344 | src-all/Logging.cpp \
|
---|
345 | src-all/PCIDeviceAttachmentImpl.cpp \
|
---|
346 | src-all/ProgressImpl.cpp \
|
---|
347 | src-all/SharedFolderImpl.cpp \
|
---|
348 | src-all/VirtualBoxBase.cpp \
|
---|
349 | src-all/VirtualBoxErrorInfoImpl.cpp \
|
---|
350 | $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
|
---|
351 | src-server/ApplianceImpl.cpp \
|
---|
352 | src-server/ApplianceImplExport.cpp \
|
---|
353 | src-server/ApplianceImplImport.cpp \
|
---|
354 | src-server/ApplianceImplIO.cpp \
|
---|
355 | src-server/AudioAdapterImpl.cpp \
|
---|
356 | src-server/BandwidthControlImpl.cpp \
|
---|
357 | src-server/BandwidthGroupImpl.cpp \
|
---|
358 | src-server/BIOSSettingsImpl.cpp \
|
---|
359 | src-server/ClientWatcher.cpp \
|
---|
360 | src-server/ClientToken.cpp \
|
---|
361 | src-server/DHCPServerImpl.cpp \
|
---|
362 | src-server/NetworkServiceRunner.cpp \
|
---|
363 | src-server/NATNetworkImpl.cpp \
|
---|
364 | src-server/GuestOSTypeImpl.cpp \
|
---|
365 | src-server/HostDnsService.cpp \
|
---|
366 | src-server/HostImpl.cpp \
|
---|
367 | src-server/HostNetworkInterfaceImpl.cpp \
|
---|
368 | src-server/HostPower.cpp \
|
---|
369 | src-server/HostVideoInputDeviceImpl.cpp \
|
---|
370 | src-server/MachineImpl.cpp \
|
---|
371 | src-server/MachineImplCloneVM.cpp \
|
---|
372 | src-server/Matching.cpp \
|
---|
373 | src-server/MediumAttachmentImpl.cpp \
|
---|
374 | src-server/MediumFormatImpl.cpp \
|
---|
375 | src-server/MediumImpl.cpp \
|
---|
376 | src-server/MediumLock.cpp \
|
---|
377 | src-server/NATEngineImpl.cpp \
|
---|
378 | src-server/NetworkAdapterImpl.cpp \
|
---|
379 | src-server/ParallelPortImpl.cpp \
|
---|
380 | src-server/ProgressProxyImpl.cpp \
|
---|
381 | src-server/SerialPortImpl.cpp \
|
---|
382 | src-server/SnapshotImpl.cpp \
|
---|
383 | src-server/StorageControllerImpl.cpp \
|
---|
384 | src-server/SystemPropertiesImpl.cpp \
|
---|
385 | src-server/TokenImpl.cpp \
|
---|
386 | src-server/USBControllerImpl.cpp \
|
---|
387 | src-server/USBDeviceFiltersImpl.cpp \
|
---|
388 | src-server/VFSExplorerImpl.cpp \
|
---|
389 | src-server/VirtualBoxImpl.cpp \
|
---|
390 | src-server/VRDEServerImpl.cpp \
|
---|
391 | src-server/generic/AutostartDb-generic.cpp \
|
---|
392 | xml/ovfreader.cpp \
|
---|
393 | xml/Settings.cpp \
|
---|
394 | $(VBOX_XML_SCHEMADEFS_CPP) \
|
---|
395 | $(VBOX_AUTOGEN_EVENT_CPP) \
|
---|
396 | $(if $(VBOX_WITH_XPCOM),src-server/xpcom/server.cpp,)
|
---|
397 |
|
---|
398 | ifn1of ($(KBUILD_TARGET), win darwin)
|
---|
399 | VBoxSVC_SOURCES += $(PATH_ROOT)/src/VBox/Devices/Network/slirp/resolv_conf_parser.c
|
---|
400 | endif
|
---|
401 |
|
---|
402 | VBoxSVC_SOURCES.darwin = \
|
---|
403 | src-server/darwin/iokit.cpp \
|
---|
404 | src-server/darwin/HostPowerDarwin.cpp \
|
---|
405 | src-server/darwin/HostDnsServiceDarwin.cpp
|
---|
406 |
|
---|
407 | VBoxSVC_SOURCES.win = \
|
---|
408 | src-server/win/svcmain.cpp \
|
---|
409 | src-server/win/svchlp.cpp \
|
---|
410 | src-server/win/HostPowerWin.cpp \
|
---|
411 | src-server/win/VBoxSVC.rc \
|
---|
412 | src-server/win/VBoxComEvents.cpp \
|
---|
413 | src-server/win/HostDnsServiceWin.cpp
|
---|
414 |
|
---|
415 | VBoxSVC_SOURCES.linux = \
|
---|
416 | src-server/linux/HostHardwareLinux.cpp \
|
---|
417 | src-server/linux/HostDnsServiceLinux.cpp \
|
---|
418 | src-server/HostDnsServiceResolvConf.cpp
|
---|
419 |
|
---|
420 | VBoxSVC_SOURCES.solaris = \
|
---|
421 | src-server/linux/vbox-libhal.cpp \
|
---|
422 | src-server/solaris/DynLoadLibSolaris.cpp \
|
---|
423 | src-server/HostDnsServiceResolvConf.cpp
|
---|
424 |
|
---|
425 | VBoxSVC_SOURCES.os2 = \
|
---|
426 | src-server/HostDnsServiceResolvConf.cpp
|
---|
427 |
|
---|
428 | VBoxSVC_SOURCES.freebsd = \
|
---|
429 | src-server/freebsd/HostHardwareFreeBSD.cpp
|
---|
430 |
|
---|
431 |
|
---|
432 | ifdef VBOX_WITH_USB
|
---|
433 | ifdef VBOX_WITH_SYSFS_BY_DEFAULT
|
---|
434 | src-server/linux/USBProxyServiceLinux.cpp_DEFS += VBOX_WITH_SYSFS_BY_DEFAULT
|
---|
435 | endif
|
---|
436 | VBoxSVC_SOURCES += \
|
---|
437 | src-server/USBDeviceFilterImpl.cpp \
|
---|
438 | src-server/USBProxyService.cpp \
|
---|
439 | src-server/HostUSBDeviceImpl.cpp
|
---|
440 | VBoxSVC_SOURCES.darwin += src-server/darwin/USBProxyServiceDarwin.cpp
|
---|
441 | VBoxSVC_SOURCES.linux += src-server/linux/USBProxyServiceLinux.cpp
|
---|
442 | VBoxSVC_SOURCES.linux += src-server/linux/USBGetDevices.cpp
|
---|
443 | VBoxSVC_SOURCES.os2 += src-server/os2/USBProxyServiceOs2.cpp
|
---|
444 | VBoxSVC_SOURCES.solaris += src-server/solaris/USBProxyServiceSolaris.cpp
|
---|
445 | VBoxSVC_SOURCES.win += src-server/win/USBProxyServiceWindows.cpp
|
---|
446 | VBoxSVC_SOURCES.freebsd += src-server/freebsd/USBProxyServiceFreeBSD.cpp
|
---|
447 | endif
|
---|
448 |
|
---|
449 | ifdef VBOX_WITH_NETFLT
|
---|
450 | VBoxSVC_LIBS.win += \
|
---|
451 | $(PATH_STAGE_LIB)/WinNetConfig$(VBOX_SUFF_LIB) \
|
---|
452 | $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
|
---|
453 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
|
---|
454 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
455 | $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
|
---|
456 | endif
|
---|
457 | VBoxSVC_LDFLAGS.darwin = -framework IOKit -framework SystemConfiguration
|
---|
458 |
|
---|
459 | ifdef VBOX_WITH_CROGL
|
---|
460 | VBoxSVC_LIBS += $(PATH_STAGE_LIB)/VBoxOGLTest$(VBOX_SUFF_LIB)
|
---|
461 | VBoxSVC_LDFLAGS.darwin += -framework OpenGL
|
---|
462 | endif
|
---|
463 |
|
---|
464 | ifeq ($(KBUILD_TYPE),debug)
|
---|
465 | VBoxSVC_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
|
---|
466 | endif
|
---|
467 |
|
---|
468 | ifdef VBOX_WITH_RESOURCE_USAGE_API
|
---|
469 | VBoxSVC_SOURCES += \
|
---|
470 | src-server/PerformanceImpl.cpp \
|
---|
471 | src-server/Performance.cpp
|
---|
472 | VBoxSVC_SOURCES.darwin += src-server/darwin/PerformanceDarwin.cpp
|
---|
473 | VBoxSVC_SOURCES.freebsd += src-server/freebsd/PerformanceFreeBSD.cpp
|
---|
474 | VBoxSVC_SOURCES.linux += src-server/linux/PerformanceLinux.cpp
|
---|
475 | VBoxSVC_SOURCES.os2 += src-server/os2/PerformanceOs2.cpp
|
---|
476 | VBoxSVC_SOURCES.solaris += src-server/solaris/PerformanceSolaris.cpp
|
---|
477 | VBoxSVC_SOURCES.win += src-server/win/PerformanceWin.cpp
|
---|
478 | VBoxSVC_LDFLAGS.darwin += -lproc
|
---|
479 | VBoxSVC_LDFLAGS.solaris += -lkstat -lnvpair
|
---|
480 | VBoxSVC_LDFLAGS.win += psapi.lib powrprof.lib
|
---|
481 | endif
|
---|
482 |
|
---|
483 | ifdef VBOX_WITH_HOSTNETIF_API
|
---|
484 | VBoxSVC_SOURCES.win += src-server/win/NetIf-win.cpp
|
---|
485 | VBoxSVC_SOURCES.linux += src-server/linux/NetIf-linux.cpp
|
---|
486 | VBoxSVC_SOURCES.os2 += src-server/os2/NetIf-os2.cpp
|
---|
487 | VBoxSVC_SOURCES.darwin += src-server/darwin/NetIf-darwin.cpp
|
---|
488 | VBoxSVC_SOURCES.solaris += src-server/solaris/NetIf-solaris.cpp
|
---|
489 | VBoxSVC_SOURCES.freebsd += src-server/freebsd/NetIf-freebsd.cpp
|
---|
490 | VBoxSVC_DEFS += VBOX_WITH_HOSTNETIF_API
|
---|
491 | if1of ($(KBUILD_TARGET), linux darwin solaris freebsd)
|
---|
492 | VBoxSVC_SOURCES += src-server/generic/NetIf-generic.cpp
|
---|
493 | endif
|
---|
494 | endif
|
---|
495 |
|
---|
496 | src-server/win/VBoxSVC.rc_INCS = $(VBoxSVC_0_OUTDIR)
|
---|
497 | src-server/win/VBoxSVC.rc_DEPS = $(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs $(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc
|
---|
498 | src-server/win/VBoxSVC.rc_CLEAN = $(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs $(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc
|
---|
499 |
|
---|
500 | $$(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$(@D))
|
---|
501 | $(APPEND) -t $@ '1 ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
|
---|
502 |
|
---|
503 | $$(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs: $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$(@D))
|
---|
504 | $(VBOX_XSLTPROC) --stringparam Module VBoxSVC -o $@ $< $(VBOX_XIDL_FILE)
|
---|
505 |
|
---|
506 | ## @todo r=klaus unfortunately we don't have xmllint everywhere, would be
|
---|
507 | # good to check the validity for every VirtualBox.xidl change.
|
---|
508 | #$(VBOX_XIDL_FILE).validated.ts: $(VBOX_XIDL_FILE_SRC)
|
---|
509 | # xmllint --dtdvalid $(VBOX_PATH_MAIN_SRC)/idl/VirtualBox.dtd --noout $<
|
---|
510 | # $(QUIET)$(CP) --changed -fv $< $(VBOX_XIDL_FILE).validated.ts
|
---|
511 | #
|
---|
512 | #OTHERS += $(VBOX_XIDL_FILE).validated.ts
|
---|
513 | #OTHER_CLEAN += $(VBOX_XIDL_FILE).validated.ts
|
---|
514 |
|
---|
515 | testvalidxidl: $(VBOX_XIDL_FILE_SRC)
|
---|
516 | xmllint --dtdvalid $(VBOX_PATH_MAIN_SRC)/idl/VirtualBox.dtd --noout $<
|
---|
517 |
|
---|
518 |
|
---|
519 | #
|
---|
520 | # Embed some constraints from XML Schema file into VBoxSVC
|
---|
521 | #
|
---|
522 | VBOX_XML_SCHEMA = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings.xsd
|
---|
523 |
|
---|
524 | $(VBOX_XML_SCHEMADEFS_H): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA) | $$(dir $$@)
|
---|
525 | $(call MSG_GENERATE,SchemaDefs,$@,$<)
|
---|
526 | $(QUIET)$(VBOX_XSLTPROC) --stringparam mode declare -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA)
|
---|
527 |
|
---|
528 | $(VBOX_XML_SCHEMADEFS_CPP): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA) | $$(dir $$@)
|
---|
529 | $(call MSG_GENERATE,SchemaDefs,$@,$<)
|
---|
530 | $(QUIET)$(VBOX_XSLTPROC) --stringparam mode define -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA)
|
---|
531 |
|
---|
532 | testvalidsettings: $(VBOX_XML_SCHEMA)
|
---|
533 | xmllint --schema $< --noout $(HOME)/.VirtualBox/VirtualBox.xml
|
---|
534 | xmllint --schema $< --noout $(HOME)/.VirtualBox/Machines/*/*.xml
|
---|
535 | xmllint --schema $< --noout $(HOME)/.VirtualBox/Machines/*/*.vbox
|
---|
536 | xmllint --schema $< --noout $(HOME)/VirtualBox\ VMs/*/*.vbox
|
---|
537 |
|
---|
538 | OTHER_CLEAN += $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
539 |
|
---|
540 |
|
---|
541 | #
|
---|
542 | # Generate some event stuff for VBoxSVC and VBoxC.
|
---|
543 | #
|
---|
544 | $(VBOX_AUTOGEN_EVENT_H): $(VBOX_PATH_MAIN_SRC)/idl/comimpl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
545 | $(call MSG_TOOL,xsltproc,autogen events,$<,$@)
|
---|
546 | $(QUIET)$(VBOX_XSLTPROC) --stringparam G_kind VBoxEventHeader -o $@ $< $(VBOX_XIDL_FILE)
|
---|
547 |
|
---|
548 | $(VBOX_AUTOGEN_EVENT_CPP): $(VBOX_PATH_MAIN_SRC)/idl/comimpl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
549 | $(call MSG_TOOL,xsltproc,autogen events,$<,$@)
|
---|
550 | $(QUIET)$(VBOX_XSLTPROC) --stringparam G_kind VBoxEvent -o $@ $< $(VBOX_XIDL_FILE)
|
---|
551 |
|
---|
552 | OTHER_CLEAN += $(VBOX_AUTOGEN_EVENT_H) $(VBOX_AUTOGEN_EVENT_CPP)
|
---|
553 |
|
---|
554 | ifdef VBOX_WITH_XPCOM
|
---|
555 | #
|
---|
556 | # VBoxSVCM - VBoxSVC wrapper module
|
---|
557 | #
|
---|
558 | DLLS += VBoxSVCM
|
---|
559 | VBoxSVCM_TEMPLATE = VBOXMAINCOMP
|
---|
560 | VBoxSVCM_DEFS = IN_RING3 $(VBOX_MAIN_DEFS)
|
---|
561 | ifdef VBOX_WITH_HARDENING
|
---|
562 | VBoxSVCM_DEFS += VBOX_WITH_HARDENING
|
---|
563 | endif
|
---|
564 | VBoxSVCM_INCS = \
|
---|
565 | include \
|
---|
566 | $(VBoxC_0_OUTDIR) \
|
---|
567 | .
|
---|
568 | VBoxSVCM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
|
---|
569 | VBoxSVCM_SOURCES = \
|
---|
570 | src-server/xpcom/server_module.cpp
|
---|
571 | VBoxSVCM_LDFLAGS.darwin = \
|
---|
572 | -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxSVCM.dylib \
|
---|
573 | -exported_symbols_list $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
|
---|
574 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
575 | VBoxSVCM_ORDERDEPS += $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
|
---|
576 | VBoxSVCM_CLEAN += $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
|
---|
577 | $$(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def:
|
---|
578 | $(RM) -f $@
|
---|
579 | $(APPEND) $@ _NSGetModule
|
---|
580 | endif
|
---|
581 | VBoxSVCM_INTERMEDIATES += $(VBOX_IDL_HEADER.XPCOM)
|
---|
582 |
|
---|
583 | # 32-bit version of the module.
|
---|
584 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
585 | DLLS += VBoxSVCM-x86
|
---|
586 | VBoxSVCM-x86_TEMPLATE = VBoxMainComp-x86
|
---|
587 | VBoxSVCM-x86_EXTENDS = VBoxSVCM
|
---|
588 | endif
|
---|
589 |
|
---|
590 | endif # VBOX_WITH_XPCOM
|
---|
591 |
|
---|
592 |
|
---|
593 | #
|
---|
594 | # VBoxC module
|
---|
595 | #
|
---|
596 | DLLS += VBoxC
|
---|
597 | VBoxC_TEMPLATE = VBOXMAINCOMP
|
---|
598 | VBoxC_DEFS = \
|
---|
599 | IN_RING3 \
|
---|
600 | $(VBOX_MAIN_DEFS) \
|
---|
601 | VBOX_COM_INPROC \
|
---|
602 | $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
|
---|
603 | $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
|
---|
604 | $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
|
---|
605 | $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
|
---|
606 | $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS,) \
|
---|
607 | $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
|
---|
608 | $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
|
---|
609 | $(if $(VBOX_WITH_EFI),VBOX_WITH_EFI,) \
|
---|
610 | $(if $(VBOX_WITH_PDM_ASYNC_COMPLETION),VBOX_WITH_PDM_ASYNC_COMPLETION,) \
|
---|
611 | $(if $(VBOX_WITH_LIVE_MIGRATION),VBOX_WITH_LIVE_MIGRATION,) \
|
---|
612 | $(if $(VBOX_WITH_VUSB),VBOX_WITH_VUSB,) \
|
---|
613 | $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
|
---|
614 | $(if $(VBOX_WITH_VIDEOHWACCEL),VBOX_WITH_VIDEOHWACCEL,) \
|
---|
615 | $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP,) \
|
---|
616 | $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,) \
|
---|
617 | $(if $(VBOX_WITH_USB),VBOX_WITH_USB,) \
|
---|
618 | $(if-expr defined(VBOX_WITH_EHCI) && defined(VBOX_WITH_USB),VBOX_WITH_EHCI,) \
|
---|
619 | $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK,) \
|
---|
620 | $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH,) \
|
---|
621 | $(if $(VBOX_WITH_VPX),VBOX_WITH_VPX,) \
|
---|
622 | $(if $(VBOX_WITH_PDM_AUDIO_DRIVER),VBOX_WITH_PDM_AUDIO_DRIVER,)
|
---|
623 | ifdef VBOX_WITH_CRHGSMI
|
---|
624 | VBoxC_DEFS += VBOX_WITH_CRHGSMI
|
---|
625 | endif
|
---|
626 | ifdef VBOX_WITH_NETSHAPER
|
---|
627 | VBoxC_DEFS += VBOX_WITH_NETSHAPER
|
---|
628 | endif
|
---|
629 | VBoxC_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE
|
---|
630 | VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
|
---|
631 | VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
|
---|
632 |
|
---|
633 | VBoxC_SDKS = VBOX_LIBPNG VBOX_ZLIB
|
---|
634 | ifdef VBOX_WITH_VPX
|
---|
635 | VBoxC_SDKS += VBOX_VPX
|
---|
636 | endif
|
---|
637 | ifdef VBOX_WITH_OPENSSL_FIPS
|
---|
638 | VBoxC_SDKS += VBOX_OPENSSL2
|
---|
639 | endif
|
---|
640 |
|
---|
641 | VBoxC_INCS = \
|
---|
642 | include \
|
---|
643 | $(VBoxC_0_OUTDIR) \
|
---|
644 | $(VBOX_MAIN_APIWRAPPER_INCS) \
|
---|
645 | $(dir $(VBOX_XML_SCHEMADEFS_H))
|
---|
646 | VBoxC_INCS.win = \
|
---|
647 | $(VBoxCOM_0_OUTDIR) \
|
---|
648 | .
|
---|
649 |
|
---|
650 | VBoxC_LDFLAGS.darwin = \
|
---|
651 | -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxC.dylib \
|
---|
652 | -exported_symbols_list $(VBoxC_0_OUTDIR)/VBoxC.def \
|
---|
653 | -framework IOKit
|
---|
654 | VBoxC_LDFLAGS.win += /MANIFEST
|
---|
655 |
|
---|
656 | VBoxC_LIBS += \
|
---|
657 | $(PATH_STAGE_LIB)/VBoxAPIWrap$(VBOX_SUFF_LIB) \
|
---|
658 | $(if-expr "$(LIB_VMM)" == "$(VBOX_LIB_VMM_LAZY)",$(LIB_REM),) \
|
---|
659 | $(VBOX_LIB_VMM_LAZY)
|
---|
660 | ifdef VBOX_WITH_NETFLT
|
---|
661 | VBoxC_LIBS.win += \
|
---|
662 | $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
|
---|
663 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
|
---|
664 | $(PATH_STAGE_LIB)/WinNetConfig$(VBOX_SUFF_LIB) \
|
---|
665 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
666 | $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib \
|
---|
667 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
|
---|
668 | endif
|
---|
669 |
|
---|
670 | ifdef VBOX_WITH_CROGL
|
---|
671 | VBoxC_LIBS += $(PATH_STAGE_LIB)/VBoxOGLTest$(VBOX_SUFF_LIB)
|
---|
672 | VBoxC_LDFLAGS.darwin += -framework OpenGL
|
---|
673 | endif
|
---|
674 |
|
---|
675 | ifdef VBOX_WITH_DRAG_AND_DROP
|
---|
676 | VBoxC_LIBS += $(PATH_STAGE_LIB)/VBoxDnDHostR3Lib$(VBOX_SUFF_LIB)
|
---|
677 | endif
|
---|
678 |
|
---|
679 | VBoxC_INTERMEDIATES = \
|
---|
680 | $(VBOX_MAIN_PREREQS) \
|
---|
681 | $(VBOX_XML_SCHEMADEFS_H) \
|
---|
682 | $(VBOX_AUTOGEN_EVENT_H) \
|
---|
683 | $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
|
---|
684 |
|
---|
685 | VBoxC_SOURCES = \
|
---|
686 | src-all/DisplayPNGUtil.cpp \
|
---|
687 | src-all/DisplayResampleImage.cpp \
|
---|
688 | src-all/DisplayUtils.cpp \
|
---|
689 | src-all/EventImpl.cpp \
|
---|
690 | src-all/Global.cpp \
|
---|
691 | src-all/HashedPw.cpp \
|
---|
692 | src-all/Logging.cpp \
|
---|
693 | src-all/PCIDeviceAttachmentImpl.cpp \
|
---|
694 | src-all/ProgressImpl.cpp \
|
---|
695 | src-all/SharedFolderImpl.cpp \
|
---|
696 | src-all/VirtualBoxBase.cpp \
|
---|
697 | src-all/VirtualBoxErrorInfoImpl.cpp \
|
---|
698 | $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
|
---|
699 | src-client/UsbWebcamInterface.cpp \
|
---|
700 | $(if $(VBOX_WITH_USB_CARDREADER),src-client/UsbCardReader.cpp,) \
|
---|
701 | src-client/Nvram.cpp \
|
---|
702 | src-client/AdditionsFacilityImpl.cpp \
|
---|
703 | src-client/BusAssignmentManager.cpp \
|
---|
704 | $(if $(VBOX_WITH_PCI_PASSTHROUGH),src-client/PCIRawDevImpl.cpp,) \
|
---|
705 | src-client/ClientTokenHolder.cpp \
|
---|
706 | src-client/ConsoleImpl.cpp \
|
---|
707 | src-client/ConsoleImpl2.cpp \
|
---|
708 | src-client/ConsoleImplTeleporter.cpp \
|
---|
709 | src-client/ConsoleVRDPServer.cpp \
|
---|
710 | src-client/DisplayImpl.cpp \
|
---|
711 | src-client/DisplaySourceBitmapImpl.cpp \
|
---|
712 | src-client/EmulatedUSBImpl.cpp \
|
---|
713 | src-client/GuestImpl.cpp \
|
---|
714 | src-client/GuestDirectoryImpl.cpp \
|
---|
715 | src-client/GuestFileImpl.cpp \
|
---|
716 | src-client/GuestFsObjInfoImpl.cpp \
|
---|
717 | src-client/GuestProcessImpl.cpp \
|
---|
718 | src-client/GuestSessionImpl.cpp \
|
---|
719 | src-client/GuestCtrlImpl.cpp \
|
---|
720 | src-client/KeyboardImpl.cpp \
|
---|
721 | src-client/MachineDebuggerImpl.cpp \
|
---|
722 | src-client/MouseImpl.cpp \
|
---|
723 | src-client/RemoteUSBDeviceImpl.cpp \
|
---|
724 | src-client/SessionImpl.cpp \
|
---|
725 | src-client/USBDeviceImpl.cpp \
|
---|
726 | src-client/VBoxDriversRegister.cpp \
|
---|
727 | src-client/VirtualBoxClientImpl.cpp \
|
---|
728 | src-client/VMMDevInterface.cpp \
|
---|
729 | $(VBOX_AUTOGEN_EVENT_CPP) \
|
---|
730 | $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
731 | ifdef VBOX_WITH_PDM_AUDIO_DRIVER
|
---|
732 | VBoxC_SOURCES += \
|
---|
733 | src-client/DrvAudioVRDE.cpp
|
---|
734 | else
|
---|
735 | VBoxC_SOURCES += \
|
---|
736 | src-client/AudioSnifferInterface.cpp
|
---|
737 | endif
|
---|
738 | VBoxC_SOURCES.win = \
|
---|
739 | src-client/win/dllmain.cpp \
|
---|
740 | src-client/win/VBoxC.def \
|
---|
741 | src-client/win/VBoxC.rc
|
---|
742 | ifdef VBOX_WITH_GUEST_CONTROL
|
---|
743 | VBoxC_SOURCES += \
|
---|
744 | src-client/GuestSessionImplTasks.cpp \
|
---|
745 | src-client/GuestCtrlPrivate.cpp
|
---|
746 | endif
|
---|
747 | ifdef VBOX_WITH_DRAG_AND_DROP
|
---|
748 | VBoxC_SOURCES += \
|
---|
749 | src-client/GuestDnDPrivate.cpp \
|
---|
750 | src-client/GuestDnDSourceImpl.cpp \
|
---|
751 | src-client/GuestDnDTargetImpl.cpp
|
---|
752 | endif
|
---|
753 | ifdef VBOX_WITH_XPCOM
|
---|
754 | VBoxC_SOURCES += \
|
---|
755 | src-client/xpcom/module.cpp
|
---|
756 | endif
|
---|
757 | ifdef VBOX_WITH_HGCM
|
---|
758 | VBoxC_SOURCES += \
|
---|
759 | src-client/HGCMObjects.cpp \
|
---|
760 | src-client/HGCMThread.cpp \
|
---|
761 | src-client/HGCM.cpp
|
---|
762 | endif
|
---|
763 | ifdef VBOX_WITH_USB
|
---|
764 | VBoxC_SOURCES += \
|
---|
765 | src-client/RemoteUSBBackend.cpp
|
---|
766 | endif
|
---|
767 | ifdef VBOX_WITH_VPX
|
---|
768 | VBoxC_SOURCES += \
|
---|
769 | src-client/EbmlWriter.cpp \
|
---|
770 | src-client/VideoRec.cpp
|
---|
771 | endif
|
---|
772 |
|
---|
773 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
774 | VBoxC_ORDERDEPS += $(VBoxC_0_OUTDIR)/VBoxC.def
|
---|
775 | VBoxC_CLEAN += $(VBoxC_0_OUTDIR)/VBoxC.def
|
---|
776 | $$(VBoxC_0_OUTDIR)/VBoxC.def: $(MAKEFILE_CURRENT)
|
---|
777 | $(RM) -f $@
|
---|
778 | $(APPEND) $@ _NSGetModule
|
---|
779 | $(APPEND) $@ _VBoxDriversRegister
|
---|
780 | endif
|
---|
781 |
|
---|
782 | src-client/ConsoleImpl.cpp_DEFS = \
|
---|
783 | $(if $(VBOX_BLEEDING_EDGE),VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\",) \
|
---|
784 | $(if $(VBOX_WITH_OPENSSL_FIPS), VBOX_OPENSSL_FIPS,)
|
---|
785 |
|
---|
786 |
|
---|
787 | src-client/win/VBoxC.rc_DEPS = $(VBoxC_0_OUTDIR)/VBoxC.rgs $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
|
---|
788 | VBoxC_CLEAN.win += $(VBoxC_0_OUTDIR)/VBoxC.rgs
|
---|
789 |
|
---|
790 | $$(VBoxC_0_OUTDIR)/VBoxC.rgs: $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
791 | $(VBOX_XSLTPROC) --stringparam Module VBoxC -o $@ $< $(VBOX_XIDL_FILE)
|
---|
792 |
|
---|
793 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
794 | #
|
---|
795 | # 32-bit VBox API Client In-Process module.
|
---|
796 | #
|
---|
797 | # This is currently just a 32-bit version of VBoxC. It might be desirable to
|
---|
798 | # split up VBoxC into a simple client and a VM client part later, in which
|
---|
799 | # case this module will be a simple client.
|
---|
800 | #
|
---|
801 | # Note! One important thing is that the typelib for this DLL must be build
|
---|
802 | # with the /env win32 switch and the VBoxC typelib with /env amd64, if
|
---|
803 | # not they will overwrite each others typelib module entry.
|
---|
804 | #
|
---|
805 | DLLS += VBoxClient-x86
|
---|
806 | VBoxClient-x86_TEMPLATE = VBoxMainComp-x86
|
---|
807 | VBoxClient-x86_EXTENDS = VBoxC
|
---|
808 | VBoxClient-x86_DEFS = VBOX_COM_INPROC_API_CLIENT $(VBoxC_DEFS)
|
---|
809 | VBoxClient-x86_INST.win = $(INST_DLL)x86/
|
---|
810 | VBoxClient-x86_INCS.win = \
|
---|
811 | $(VBoxClient-x86_0_OUTDIR) \
|
---|
812 | $(VBoxCOM-x86_0_OUTDIR) \
|
---|
813 | $(VBoxC_INCS.win)
|
---|
814 | VBoxClient-x86_SOURCES = \
|
---|
815 | src-all/EventImpl.cpp \
|
---|
816 | src-all/Global.cpp \
|
---|
817 | src-all/VirtualBoxBase.cpp \
|
---|
818 | src-all/VirtualBoxErrorInfoImpl.cpp \
|
---|
819 | src-client/ClientTokenHolder.cpp \
|
---|
820 | src-client/SessionImpl.cpp \
|
---|
821 | src-client/VirtualBoxClientImpl.cpp \
|
---|
822 | $(VBOX_AUTOGEN_EVENT_CPP) \
|
---|
823 | $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
824 | VBoxClient-x86_SOURCES.win = \
|
---|
825 | src-client/win/dllmain.cpp \
|
---|
826 | src-client/win/VBoxClient-x86.def \
|
---|
827 | src-client/win/VBoxClient-x86.rc
|
---|
828 | ifdef VBOX_WITH_XPCOM
|
---|
829 | VBoxClient-x86_SOURCES += \
|
---|
830 | src-client/xpcom/module.cpp
|
---|
831 | endif
|
---|
832 | VBoxClient-x86_LIBS = $(NO_SUCH_VARIABLE)
|
---|
833 | VBoxClient-x86_LIBS.win = $(NO_SUCH_VARIABLE)
|
---|
834 | VBoxClient-x86_CLEAN.win += $(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs
|
---|
835 | src-client/win/VBoxClient-x86.rc_DEPS = \
|
---|
836 | $(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs \
|
---|
837 | $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb
|
---|
838 |
|
---|
839 | $$(VBoxClient-x86_0_OUTDIR)/VBoxClient-x86.rgs: \
|
---|
840 | $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl \
|
---|
841 | $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
842 | $(VBOX_XSLTPROC) --stringparam Module VBoxC -o $@ $< $(VBOX_XIDL_FILE)
|
---|
843 |
|
---|
844 | endif
|
---|
845 |
|
---|
846 |
|
---|
847 | #
|
---|
848 | # VBoxCOM - COM Abstraction Layer library
|
---|
849 | #
|
---|
850 | LIBRARIES += VBoxCOM
|
---|
851 | VBoxCOM_TEMPLATE = VBoxMainLib
|
---|
852 | VBoxCOM_INTERMEDIATES = $(VBOX_MAIN_PREREQS) \
|
---|
853 | $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
|
---|
854 | VBoxCOM_SOURCES = \
|
---|
855 | glue/com.cpp \
|
---|
856 | glue/initterm.cpp \
|
---|
857 | glue/string.cpp \
|
---|
858 | glue/AutoLock.cpp \
|
---|
859 | glue/EventQueue.cpp \
|
---|
860 | glue/NativeEventQueue.cpp \
|
---|
861 | glue/ErrorInfo.cpp \
|
---|
862 | glue/errorprint.cpp
|
---|
863 | VBoxCOM_INCS += $(VBOX_MAIN_APIWRAPPER_INCS) \
|
---|
864 | include
|
---|
865 | ifeq ($(KBUILD_TARGET),win)
|
---|
866 | VBoxCOM_DEFS.x86 = _WIN32_WINNT=0x0500
|
---|
867 | VBoxCOM_DEFS.amd64 = _WIN32_WINNT=0x0510
|
---|
868 | VBoxCOM_SOURCES += \
|
---|
869 | $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c
|
---|
870 | else # !win
|
---|
871 | VBoxCOM_SOURCES += \
|
---|
872 | $(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c \
|
---|
873 | glue/xpcom/helpers.cpp
|
---|
874 | endif # !win
|
---|
875 |
|
---|
876 | glue/com.cpp_DEFS = \
|
---|
877 | $(if $(VBOX_BLEEDING_EDGE),VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\",) \
|
---|
878 | KBUILD_TYPE=\"$(KBUILD_TYPE)\"
|
---|
879 |
|
---|
880 | # 32-bit version of VBoxCOM.
|
---|
881 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
882 | LIBRARIES += VBoxCOM-x86
|
---|
883 | VBoxCOM-x86_TEMPLATE = VBoxMainLib-x86
|
---|
884 | VBoxCOM-x86_EXTENDS = VBoxCOM
|
---|
885 | endif
|
---|
886 |
|
---|
887 |
|
---|
888 |
|
---|
889 | #
|
---|
890 | # The VBoxExtPackHelperApp.
|
---|
891 | #
|
---|
892 | ifdef VBOX_WITH_EXTPACK
|
---|
893 | PROGRAMS += VBoxExtPackHelperApp
|
---|
894 | VBoxExtPackHelperApp_TEMPLATE = VBoxR3SetUidToRoot
|
---|
895 | VBoxExtPackHelperApp_LDFLAGS.darwin = -framework Security
|
---|
896 | VBoxExtPackHelperApp_LDFLAGS.win = /SUBSYSTEM:windows
|
---|
897 | VBoxExtPackHelperApp_SOURCES = \
|
---|
898 | src-helper-apps/VBoxExtPackHelperApp.cpp \
|
---|
899 | src-all/ExtPackUtil.cpp
|
---|
900 | VBoxExtPackHelperApp_LIBS = \
|
---|
901 | $(LIB_RUNTIME)
|
---|
902 | endif # VBOX_WITH_EXTPACK
|
---|
903 |
|
---|
904 | #
|
---|
905 | # VolInfo
|
---|
906 | #
|
---|
907 | ifdef VBOX_WITH_DEVMAPPER
|
---|
908 | PROGRAMS.linux += VBoxVolInfo
|
---|
909 | VBoxVolInfo_TEMPLATE = VBoxR3SetUidToRoot
|
---|
910 | VBoxVolInfo_SOURCES = src-helper-apps/VBoxVolInfo.cpp
|
---|
911 | VBoxVolInfo_LIBS = devmapper
|
---|
912 | endif
|
---|
913 |
|
---|
914 | endif # !VBOX_ONLY_SDK (the ifndef is far above)
|
---|
915 |
|
---|
916 |
|
---|
917 | #
|
---|
918 | # Installs com related thing(s) to bin.
|
---|
919 | #
|
---|
920 | INSTALLS.win += VBoxMain-com-inst
|
---|
921 | VBoxMain-com-inst_INST = $(INST_BIN)
|
---|
922 | VBoxMain-com-inst_MODE = a+r,u+w
|
---|
923 | VBoxMain-com-inst_SOURCES = src-all/win/comregister.cmd
|
---|
924 |
|
---|
925 |
|
---|
926 | if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "linux"
|
---|
927 | #
|
---|
928 | # Installs linux/hardening related things to components.
|
---|
929 | #
|
---|
930 | INSTALLS.linux += VBoxMain-hardening-inst
|
---|
931 | VBoxMain-hardening-inst_INST = $(INST_BIN)components/
|
---|
932 | VBoxMain-hardening-inst_SYMLINKS = \
|
---|
933 | VBoxDDU.so=>../VBoxDDU.so \
|
---|
934 | VBoxREM.so=>../VBoxREM.so \
|
---|
935 | VBoxRT.so=>../VBoxRT.so \
|
---|
936 | VBoxVMM.so=>../VBoxVMM.so \
|
---|
937 | VBoxXPCOM.so=>../VBoxXPCOM.so
|
---|
938 | endif
|
---|
939 |
|
---|
940 |
|
---|
941 | if defined(VBOX_WITH_MIDL_PROXY_STUB) && "$(KBUILD_TARGET)" == "win"
|
---|
942 | #
|
---|
943 | # Experimental COM proxy + stub DLL.
|
---|
944 | #
|
---|
945 | DLLS += VBoxProxyStub
|
---|
946 | VBoxProxyStub_TEMPLATE = VBOXMAINCOMP
|
---|
947 | VBoxProxyStub_DEFS = REGISTER_PROXY_DLL
|
---|
948 | VBoxProxyStub_DEFS.win.x86 = WIN32
|
---|
949 | VBoxProxyStub_SOURCES = \
|
---|
950 | $(VBoxCOM_0_OUTDIR)/dlldata.c \
|
---|
951 | $(VBoxCOM_0_OUTDIR)/VirtualBox_p.c \
|
---|
952 | $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
|
---|
953 | src-all/win/VBoxProxyStub.def
|
---|
954 |
|
---|
955 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
956 | DLLS += VBoxProxyStub-x86
|
---|
957 | VBoxProxyStub-x86_TEMPLATE = VBoxMainComp-x86
|
---|
958 | VBoxProxyStub-x86_DEFS = REGISTER_PROXY_DLL
|
---|
959 | VBoxProxyStub-x86_DEFS.win.x86 = WIN32
|
---|
960 | VBoxProxyStub-x86_SOURCES = \
|
---|
961 | $(VBoxCOM-x86_0_OUTDIR)/dlldata.c \
|
---|
962 | $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c \
|
---|
963 | $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c \
|
---|
964 | src-all/win/VBoxProxyStub.def
|
---|
965 | endif
|
---|
966 | endif
|
---|
967 |
|
---|
968 |
|
---|
969 |
|
---|
970 | # generate rules
|
---|
971 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
972 |
|
---|
973 |
|
---|
974 |
|
---|
975 | #
|
---|
976 | # Additions rules.
|
---|
977 | #
|
---|
978 |
|
---|
979 | ## @todo this hack ain't cutting it any longer. (the file name is abspath'ed since ages now.)
|
---|
980 | glue/xpcom/helpers.cpp: $(VBOX_IDL_TYPELIB.XPCOM)
|
---|
981 |
|
---|
982 | $(VBOX_IDL_FILE.XPCOM): $(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
983 | $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
|
---|
984 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
|
---|
985 |
|
---|
986 | $(VBOX_IDL_TYPELIB.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
|
---|
987 | $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
|
---|
988 | $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m typelib -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
|
---|
989 | $(CHMOD) 0644 $@
|
---|
990 | ## @todo ^^^^^^^^^^^^ fix horrible hack
|
---|
991 |
|
---|
992 | $(VBOX_IDL_HEADER.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
|
---|
993 | $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
|
---|
994 | $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m header -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
|
---|
995 |
|
---|
996 | $(VBOX_IDL_FILE.MSCOM): $(VBOX_PATH_MAIN_SRC)/idl/midl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
997 | $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
|
---|
998 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $(if $(VBOX_WITH_MIDL_PROXY_STUB),-stringparam g_fGenProxy yes,) $< $(VBOX_XIDL_FILE)
|
---|
999 |
|
---|
1000 | # Aliases for testing purposes.
|
---|
1001 | ifdef VBOX_WITH_XPCOM
|
---|
1002 | testidl: $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM) $(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c
|
---|
1003 | testidlhdr: $(VBOX_IDL_HEADER.XPCOM)
|
---|
1004 | else
|
---|
1005 | testidl: $(VBOX_IDL_FILE.MSCOM) $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
|
---|
1006 | $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c,)
|
---|
1007 | endif
|
---|
1008 |
|
---|
1009 |
|
---|
1010 | $(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c: $(VBOX_PATH_MAIN_SRC)/idl/xpidl_iid.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
1011 | $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
|
---|
1012 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
|
---|
1013 |
|
---|
1014 | $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
|
---|
1015 | + $(VBoxCOM_0_OUTDIR)/VirtualBox.h \
|
---|
1016 | $(if $(VBOX_WITH_MIDL_PROXY_STUB),+ $(VBoxCOM_0_OUTDIR)/VirtualBox_p.c + $(VBoxCOM_0_OUTDIR)/dlldata.c,) \
|
---|
1017 | + $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
|
---|
1018 | $(VBOX_WIN_MIDL) /nologo \
|
---|
1019 | $(if-expr "$(KBUILD_TARGET_ARCH)" == "amd64" && "$(KBUILD_HOST)" == "win",/env amd64,/env win32) \
|
---|
1020 | /robust /protocol all /target NT51 \
|
---|
1021 | /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM_0_OUTDIR)) \
|
---|
1022 | /cpp_cmd $(subst $(EXEC_X86_WIN32),,$(call VBOX_FN_MAKE_WIN_PATH,$(TOOL_$(VBOX_VCC_TOOL)_CC))) \
|
---|
1023 | /I $(call VBOX_FN_MAKE_WIN_PATH,$(PATH_SDK_$(VBOX_WINPSDK)_INC)) \
|
---|
1024 | /I idl \
|
---|
1025 | $(call VBOX_FN_MAKE_WIN_PATH,$<)
|
---|
1026 |
|
---|
1027 | $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c \
|
---|
1028 | + $(VBoxCOM-x86_0_OUTDIR)/VirtualBox.h \
|
---|
1029 | $(if $(VBOX_WITH_MIDL_PROXY_STUB),+ $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c + $(VBoxCOM-x86_0_OUTDIR)/dlldata.c,) \
|
---|
1030 | + $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
|
---|
1031 | $(VBOX_WIN_MIDL) /nologo /env win32 /target NT51 \
|
---|
1032 | /robust /protocol all \
|
---|
1033 | /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM-x86_0_OUTDIR)) \
|
---|
1034 | /tlb $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb) \
|
---|
1035 | /cpp_cmd $(subst $(EXEC_X86_WIN32),,$(call VBOX_FN_MAKE_WIN_PATH,$(TOOL_$(VBOX_VCC_TOOL_STEM)X86_CC))) \
|
---|
1036 | /I $(call VBOX_FN_MAKE_WIN_PATH,$(PATH_SDK_$(VBOX_WINPSDK)_INC)) \
|
---|
1037 | /I idl \
|
---|
1038 | $(call VBOX_FN_MAKE_WIN_PATH,$<)
|
---|
1039 |
|
---|
1040 | #
|
---|
1041 | # Translation stuff
|
---|
1042 | #
|
---|
1043 | VBoxSVC_VBOX_HEADERS = \
|
---|
1044 | include/collection.h \
|
---|
1045 | include/MachineImpl.h
|
---|
1046 | VBoxSVC_VBOX_TRANSLATIONS = \
|
---|
1047 | nls/VBoxSVC_de.ts
|
---|
1048 |
|
---|
1049 | VBoxC_VBOX_HEADERS = \
|
---|
1050 | include/ConsoleImpl.h
|
---|
1051 |
|
---|
1052 | VBoxC_VBOX_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
|
---|
1053 | VBoxC_VBOX_HEADERS += $(VBOX_MAIN_APIWRAPPER_INCS)
|
---|
1054 |
|
---|
1055 | VBoxC_VBOX_TRANSLATIONS = \
|
---|
1056 | nls/VBoxC_de.ts
|
---|
1057 |
|
---|
1058 | ifdef VBOX_WITH_JMSCOM
|
---|
1059 |
|
---|
1060 | #
|
---|
1061 | # Java glue JAR files
|
---|
1062 | #
|
---|
1063 | VBOX_JMSCOM_JAR = $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar
|
---|
1064 | VBOX_JMSCOM_TARGET := $(PATH_TARGET)/vboxjmscom-gen
|
---|
1065 | VBOX_JMSCOM_GEN = $(VBOX_JMSCOM_TARGET)/jmscomgen
|
---|
1066 | VBOX_JMSCOM_JDEST := $(VBOX_JMSCOM_TARGET)/jdest
|
---|
1067 | VBOX_GLUE_XSLT_DIR := $(PATH_ROOT)/src/VBox/Main/glue
|
---|
1068 | VBOX_JACOB_DIR := $(PATH_ROOT)/src/libs/jacob-1.17
|
---|
1069 |
|
---|
1070 | INSTALLS += VBoxJMscom-inst-jar
|
---|
1071 | VBoxJMscom-inst-jar_INST = $(INST_SDK)bindings/mscom/java/
|
---|
1072 | VBoxJMscom-inst-jar_MODE = a+r,u+w
|
---|
1073 | VBoxJMscom-inst-jar_SOURCES = \
|
---|
1074 | $(VBOX_JMSCOM_JAR)
|
---|
1075 | VBoxJMscom-inst-jar_CLEAN = \
|
---|
1076 | $(VBOX_JMSCOM_JAR) \
|
---|
1077 | $(VBOX_JMSCOM_GEN)/jmscomglue.list \
|
---|
1078 | $(wildcard \
|
---|
1079 | $(VBOX_JMSCOM_GEN)/java/*.java \
|
---|
1080 | $(VBOX_JMSCOM_JDEST)/*.class \
|
---|
1081 | $(VBOX_JMSCOM_JDEST)/*/*.class \
|
---|
1082 | $(VBOX_JMSCOM_JDEST)/*/*/*.class \
|
---|
1083 | $(VBOX_JMSCOM_JDEST)/*/*/*/*.class \
|
---|
1084 | )
|
---|
1085 | VBoxJMscom-inst-jar_BLDDIRS += $(VBOX_JMSCOM_GEN)/java
|
---|
1086 |
|
---|
1087 | $(VBOX_JMSCOM_GEN)/jmscomglue.list: \
|
---|
1088 | $(VBOX_XIDL_FILE) \
|
---|
1089 | $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl \
|
---|
1090 | $(VBOX_FILESPLIT) \
|
---|
1091 | | $(VBOX_JMSCOM_GEN)/java/
|
---|
1092 | $(call MSG_L1,Generating Java MSCOM glue files from XIDL)
|
---|
1093 | $(QUIET)$(RM) -f $(wildcard $(VBOX_JMSCOM_GEN)/java/*.java)
|
---|
1094 | $(QUIET)$(VBOX_XSLTPROC) \
|
---|
1095 | --stringparam filelistonly "" \
|
---|
1096 | --stringparam G_vboxApiSuffix $(VBOX_API_SUFFIX) \
|
---|
1097 | --stringparam G_vboxGlueStyle mscom \
|
---|
1098 | --stringparam G_vboxDirPrefix "" \
|
---|
1099 | -o $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl $<
|
---|
1100 | $(QUIET)$(VBOX_FILESPLIT) $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_JMSCOM_GEN)/java
|
---|
1101 | $(QUIET)echo $(VBOX_JMSCOM_GEN)/java/*.java > $@
|
---|
1102 |
|
---|
1103 | $$(VBOX_JMSCOM_JAR): $(VBOX_JMSCOM_GEN)/jmscomglue.list | $$(dir $$@)
|
---|
1104 | $(call MSG_TOOL,javac,$(notdir $@),jmscomglue.list,)
|
---|
1105 | $(QUIET)$(RM) -Rf $(VBOX_JMSCOM_JDEST)
|
---|
1106 | $(QUIET)$(MKDIR) -p $(VBOX_JMSCOM_JDEST)
|
---|
1107 | $(call MSG_TOOL,javac,$(notdir $@),...,)
|
---|
1108 | $(QUIET)$(VBOX_JAVAC) $(VBOX_JAVAC_OPTS) @$(VBOX_JMSCOM_GEN)/jmscomglue.list \
|
---|
1109 | -d $(VBOX_JMSCOM_JDEST) -classpath "$(VBOX_JMSCOM_JDEST)$(VBOX_SEP)$(VBOX_JACOB_DIR)/jacob.jar"
|
---|
1110 | $(call MSG_LINK,$(notdir $@),$@)
|
---|
1111 | $(QUIET)$(VBOX_JAR) cf $@ -C $(VBOX_JMSCOM_JDEST) .
|
---|
1112 |
|
---|
1113 | ## @todo compile TestVBox.java (see below) to have sanity checking
|
---|
1114 |
|
---|
1115 | endif # VBOX_WITH_JMSCOM
|
---|
1116 |
|
---|
1117 | #
|
---|
1118 | # Install Java glue sample code.
|
---|
1119 | #
|
---|
1120 | INSTALLS += javagluesample
|
---|
1121 | javagluesample_INST = $(INST_SDK)bindings/glue/java/
|
---|
1122 | javagluesample_MODE = a+r,u+w
|
---|
1123 | javagluesample_SOURCES = \
|
---|
1124 | $(VBOX_PATH_MAIN_SRC)/glue/tests/TestVBox.java=>TestVBox.java \
|
---|
1125 | $(VBOX_PATH_MAIN_SRC)/glue/tests/Makefile=>Makefile
|
---|
1126 |
|
---|
1127 | # Moved those rules to the end so that VBoxAPIWrap_0_OUTDIR can be expanded without $$ trickery.
|
---|
1128 | $(VBoxAPIWrap_VBOX_RAWSRC) \
|
---|
1129 | +| $(VBOX_MAIN_APIWRAPPER_GEN_FILES): \
|
---|
1130 | $(VBOX_XIDL_FILE) \
|
---|
1131 | $(VBoxAPIWrap_VBOX_XSLT) \
|
---|
1132 | $(VBOX_FILESPLIT) \
|
---|
1133 | | $$(dir $$@)
|
---|
1134 | $(call MSG_L1,Generating C++ Server API wrapper files from XIDL)
|
---|
1135 | $(QUIET)$(RM) -f $(filter-out $(VBOX_MAIN_APIWRAPPER_GEN_FILES),$(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.cpp) $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.h))
|
---|
1136 | $(QUIET)$(VBOX_XSLTPROC) --stringparam filelistonly "" -o $@ $(VBoxAPIWrap_VBOX_XSLT) $<
|
---|
1137 | $(QUIET)$(VBOX_FILESPLIT) $@ $(VBoxAPIWrap_0_OUTDIR)
|
---|
1138 |
|
---|
1139 | $(VBoxAPIWrap_VBOX_KMK_FILE).ts +| $(VBoxAPIWrap_VBOX_KMK_FILE): $(VBOX_XIDL_FILE) $(VBoxAPIWrap_VBOX_XSLT) $(VBOX_PATH_MAIN_SRC)/Makefile.kmk
|
---|
1140 | $(call MSG_GENERATE,,$(VBoxAPIWrap_VBOX_KMK_FILE))
|
---|
1141 | $(QUIET)$(RM) -f $@
|
---|
1142 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
1143 | $(QUIET)$(VBOX_XSLTPROC) --stringparam filelistonly VBOX_MAIN_APIWRAPPER_GEN_FILES -o $@ $(VBoxAPIWrap_VBOX_XSLT) $<
|
---|
1144 | $(QUIET)$(APPEND) -n "$@" "" "" \
|
---|
1145 | 'VBOX_MAIN_APIWRAPPER_GEN_FILES := $$(addprefix $$(VBOX_MAIN_APIWRAPPER_DIR)/,$$(VBOX_MAIN_APIWRAPPER_GEN_FILES))' \
|
---|
1146 | 'VBOX_MAIN_APIWRAPPER_GEN_HDRS = $$(filter %.h,$$(VBOX_MAIN_APIWRAPPER_GEN_FILES))'
|
---|
1147 | $(QUIET)$(CP) --changed -fv $@ $(VBoxAPIWrap_VBOX_KMK_FILE)
|
---|
1148 |
|
---|
1149 | updatenls::
|
---|
1150 | $(VBOX_LUPDATE) $(VBoxSVC_SOURCES) $(VBoxSVC_VBOX_HEADERS) -ts $(VBoxSVC_VBOX_TRANSLATIONS)
|
---|
1151 | $(VBOX_LUPDATE) $(VBoxC_SOURCES) $(VBoxC_VBOX_HEADERS) -ts $(VBoxC_VBOX_TRANSLATIONS)
|
---|
1152 |
|
---|
1153 | testconverter:: $(VBOX_USER_HOME)/VirtualBox.xml
|
---|
1154 | $(call MSG_TOOL,xsltproc,Test Settings Converter,$<,$(VBOX_USER_HOME)/VirtualBox.xml.test)
|
---|
1155 | $(QUIET)$(VBOX_XSLTPROC) -o $(VBOX_USER_HOME)/VirtualBox.xml.test xml/SettingsConverter.xsl $<
|
---|
1156 |
|
---|
1157 | testconverter2:: $(VBOX_USER_HOME)/Machines/dos/dos.xml
|
---|
1158 | $(call MSG_TOOL,xsltproc,Test Settings Converter,$<,$<.test)
|
---|
1159 | $(QUIET)$(VBOX_XSLTPROC) -o $<.test xml/SettingsConverter.xsl $<
|
---|
1160 |
|
---|