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