1 | # $Id: Makefile.kmk 44948 2013-03-07 10:36:42Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the VBox Main module.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2004-2013 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 | # Include sub-makefile(s).
|
---|
23 | #
|
---|
24 | ifdef VBOX_WITH_WEBSERVICES
|
---|
25 | include $(PATH_SUB_CURRENT)/webservice/Makefile.kmk
|
---|
26 | endif
|
---|
27 | include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
|
---|
28 | include $(PATH_SUB_CURRENT)/cbinding/Makefile.kmk
|
---|
29 |
|
---|
30 |
|
---|
31 | #
|
---|
32 | # Targets and globals (bit of a mess...)
|
---|
33 | #
|
---|
34 | VBOX_PATH_MAIN_SRC := $(PATH_SUB_CURRENT)
|
---|
35 |
|
---|
36 | ifdef VBOX_ONLY_SDK
|
---|
37 | # I'm Evil! Dr. Evil.
|
---|
38 | VBoxCOM_0_OUTDIR = $(PATH_TARGET)/VBoxCOM
|
---|
39 | BLDDIRS += $(VBoxCOM_0_OUTDIR) $(PATH_STAGE_BIN)/components
|
---|
40 | include $(KBUILD_PATH)/tools/$(VBOX_VCC_TOOL).kmk # For the idl /cpp statement.
|
---|
41 | include $(KBUILD_PATH)/sdks/$(VBOX_WINPSDK).kmk
|
---|
42 | endif # !VBOX_ONLY_SDK
|
---|
43 |
|
---|
44 |
|
---|
45 | # Construct VBOX_MAIN_DEFS
|
---|
46 | ## @todo eliminate or expand VBOX_MAIN_DEFS.
|
---|
47 | VBOX_MAIN_DEFS =
|
---|
48 | ifneq ($(KBUILD_TARGET),win)
|
---|
49 | ifndef VBOX_WITH_XPCOM
|
---|
50 | $(error "VBox: VBOX_WITH_XPCOM isn't defined")
|
---|
51 | endif
|
---|
52 | ifneq ($(KBUILD_TARGET),os2)
|
---|
53 | VBOX_MAIN_DEFS += VBOX_WITH_SYS_V_IPC_SESSION_WATCHER
|
---|
54 | endif
|
---|
55 | endif
|
---|
56 | VBOX_MAIN_DEFS += \
|
---|
57 | $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,) \
|
---|
58 | $(if $(VBOX_WITH_NETFLT),VBOX_WITH_NETFLT,) \
|
---|
59 | $(if $(VBOX_WITH_COPYTOGUEST),VBOX_WITH_COPYTOGUEST,) \
|
---|
60 | $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP,) \
|
---|
61 | $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,) \
|
---|
62 | $(if $(VBOX_WITH_CROGL),VBOX_WITH_CROGL,) \
|
---|
63 | $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
|
---|
64 | $(if $(VBOX_WITH_GUEST_PROPS_RDONLY_GUEST),VBOX_WITH_GUEST_PROPS_RDONLY_GUEST,) \
|
---|
65 | $(if $(VBOX_WITH_GUEST_CONTROL),VBOX_WITH_GUEST_CONTROL,) \
|
---|
66 | $(if $(VBOX_WITH_USB_VIDEO),VBOX_WITH_USB_VIDEO,) \
|
---|
67 | $(if $(VBOX_WITH_USB_CARDREADER),VBOX_WITH_USB_CARDREADER,) \
|
---|
68 | $(if $(VBOX_WITH_USB_CARDREADER_TEST),VBOX_WITH_USB_CARDREADER_TEST,) \
|
---|
69 | $(if $(VBOX_WITH_HOSTNETIF_API),VBOX_WITH_HOSTNETIF_API,) \
|
---|
70 |
|
---|
71 | # Unconditionally enable the new semaphore key generation code
|
---|
72 | VBOX_MAIN_DEFS += VBOX_WITH_NEW_SYS_V_KEYGEN
|
---|
73 |
|
---|
74 | VBOX_IDL_FILE.MSCOM = $(VBOX_PATH_SDK)/bindings/mscom/idl/VirtualBox.idl
|
---|
75 | VBOX_IDL_FILE.XPCOM = $(VBOX_PATH_SDK)/bindings/xpcom/idl/VirtualBox_XPCOM.idl
|
---|
76 |
|
---|
77 | VBOX_IDL_TYPELIB.XPCOM = $(PATH_STAGE_BIN)/components/VirtualBox_XPCOM.xpt
|
---|
78 | VBOX_IDL_HEADER.XPCOM = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
79 |
|
---|
80 | # The MS COM specific stuff.
|
---|
81 | if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" == "win"
|
---|
82 | OTHERS += \
|
---|
83 | $(VBOX_IDL_FILE.MSCOM)
|
---|
84 | OTHER_CLEAN += \
|
---|
85 | $(VBOX_IDL_FILE.MSCOM)
|
---|
86 |
|
---|
87 | INSTALLS += VBox-mscom-bindings-include VBox-mscom-bindings-lib
|
---|
88 | VBox-mscom-bindings-include_INST = $(INST_SDK)bindings/mscom/include/
|
---|
89 | VBox-mscom-bindings-include_MODE = a+r,u+w
|
---|
90 | VBox-mscom-bindings-include_SOURCES = $(VBoxCOM_0_OUTDIR)/VirtualBox.h
|
---|
91 | VBox-mscom-bindings-include_CLEAN = $(VBoxCOM_0_OUTDIR)/VirtualBox.h
|
---|
92 | VBox-mscom-bindings-lib_INST = $(INST_SDK)bindings/mscom/lib/
|
---|
93 | VBox-mscom-bindings-lib_MODE = a+r,u+w
|
---|
94 | VBox-mscom-bindings-lib_SOURCES = $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
|
---|
95 | $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
|
---|
96 | VBox-mscom-bindings-lib_CLEAN = $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
|
---|
97 | $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
|
---|
98 |
|
---|
99 | BLDDIRS += $(VBOX_PATH_SDK)/bindings/mscom/idl
|
---|
100 | endif
|
---|
101 |
|
---|
102 | # The XPCOM specific stuff.
|
---|
103 | if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" != "win"
|
---|
104 | OTHERS += $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM) $(VBOX_IDL_HEADER.XPCOM)
|
---|
105 | OTHER_CLEAN += \
|
---|
106 | $(VBOX_IDL_FILE.XPCOM) \
|
---|
107 | $(VBOX_IDL_HEADER.XPCOM) \
|
---|
108 | $(VBOX_IDL_TYPELIB.XPCOM)
|
---|
109 |
|
---|
110 | VBOX_MAIN_PREREQS += $(VBOX_IDL_TYPELIB.XPCOM) $(VBOX_IDL_HEADER.XPCOM)
|
---|
111 | BLDDIRS += \
|
---|
112 | $(VBOX_PATH_SDK)/bindings/xpcom/idl \
|
---|
113 | $(VBOX_PATH_SDK)/bindings/xpcom/include
|
---|
114 | endif # xpcom
|
---|
115 |
|
---|
116 |
|
---|
117 | #
|
---|
118 | # Strip documentation from source XIDL so that we don't get a full
|
---|
119 | # recompile every time a comma in the documentation is changed.
|
---|
120 | #
|
---|
121 | $(VBOX_XIDL_FILE).ts +| $(VBOX_XIDL_FILE): \
|
---|
122 | $(VBOX_XIDL_FILE_SRC) \
|
---|
123 | $(VBOX_PATH_MAIN_SRC)/idl/docstrip.xsl \
|
---|
124 | | $$(dir $$@)
|
---|
125 | # $(CP) -fv $< $(VBOX_XIDL_FILE).ts
|
---|
126 | $(QUIET)$(VBOX_XSLTPROC) -o $(VBOX_XIDL_FILE).ts $(VBOX_PATH_MAIN_SRC)/idl/docstrip.xsl $<
|
---|
127 | $(QUIET)$(CP) --changed -fv $(VBOX_XIDL_FILE).ts $(VBOX_XIDL_FILE)
|
---|
128 |
|
---|
129 | OTHER_CLEAN += $(VBOX_XIDL_FILE) $(VBOX_XIDL_FILE).ts
|
---|
130 |
|
---|
131 | #
|
---|
132 | # The Main API documentation
|
---|
133 | #
|
---|
134 | VBOX_MAIN_DOC_DIR = $(VBOX_PATH_SDK)/docs
|
---|
135 | BLDDIRS += $(VBOX_MAIN_DOC_DIR)
|
---|
136 |
|
---|
137 | $(PATH_TARGET)/docs.Main: \
|
---|
138 | $(VBOX_PATH_MAIN_SRC)/Doxyfile.Main \
|
---|
139 | $(VBOX_PATH_MAIN_SRC)/idl/doxygen.xsl \
|
---|
140 | $(VBOX_XIDL_FILE_SRC) \
|
---|
141 | | $(PATH_TARGET)/ \
|
---|
142 | $(VBOX_MAIN_DOC_DIR)/
|
---|
143 | $(call MSG_TOOL,xsltproc,doxygen input,$<,$@)
|
---|
144 | $(QUIET)$(RM) -f $(wildcard $(VBOX_MAIN_DOC_DIR)/html/*) $(PATH_TARGET)/docs.Main
|
---|
145 | $(QUIET)$(VBOX_XSLTPROC) -o $(PATH_TARGET)/VirtualBox.idl $(VBOX_PATH_MAIN_SRC)/idl/doxygen.xsl $(VBOX_XIDL_FILE_SRC)
|
---|
146 | $(QUIET)$(REDIRECT) -E 'DOCDIR=$(VBOX_MAIN_DOC_DIR)' -E 'PATH_TARGET=$(PATH_TARGET)' -E 'PATH_CHM=$(subst /,\,$(VBOX_MAIN_DOC_DIR)/VirtualBoxAPI.chm)' \
|
---|
147 | -- doxygen $(VBOX_PATH_MAIN_SRC)/Doxyfile.Main
|
---|
148 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) ">>>>>>>>>>>>>>>>>>>> Main.err: >>>>>>>>>>>>>>>>>>>>>>>>"
|
---|
149 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(CAT) "$(PATH_TARGET)/Main.err"
|
---|
150 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "<<<<<<<<<<<<<<<<<<<< Main.err <<<<<<<<<<<<<<<<<<<<<<<<<"
|
---|
151 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> **************************************************"
|
---|
152 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> Please fix above doxygen errors/warnings listed in"
|
---|
153 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> $(PATH_TARGET)/Main.err"
|
---|
154 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> **************************************************"
|
---|
155 | -$(EXEC_X86_WIN32) $(VBOX_PATH_HTML_HELP_WORKSHOP)/hhc.exe $(subst /,\\,$(VBOX_MAIN_DOC_DIR)/html/index.hhp)
|
---|
156 | $(APPEND) $(PATH_TARGET)/docs.Main
|
---|
157 | # aliases
|
---|
158 | docs.main docs.Main: $(PATH_TARGET)/docs.Main
|
---|
159 | if !defined(VBOX_ONLY_DOCS)
|
---|
160 | docs: $(PATH_TARGET)/docs.Main
|
---|
161 | endif
|
---|
162 |
|
---|
163 |
|
---|
164 | #
|
---|
165 | # Some SDK bit.
|
---|
166 | #
|
---|
167 | INSTALLS += VBox-main-xidl
|
---|
168 | VBox-main-xidl_INST = $(INST_SDK)bindings/
|
---|
169 | VBox-main-xidl_MODE = a+r,u+w
|
---|
170 | VBox-main-xidl_SOURCES = $(VBOX_XIDL_FILE_SRC)
|
---|
171 |
|
---|
172 | ifdef VBOX_WITH_PYTHON
|
---|
173 | INSTALLS += VBox-python-glue
|
---|
174 | VBox-python-glue_INST = $(INST_SDK)installer/vboxapi/
|
---|
175 | VBox-python-glue_MODE = a+r,u+w
|
---|
176 | VBox-python-glue_SOURCES = \
|
---|
177 | glue/vboxapi.py=>__init__.py \
|
---|
178 | $(VBox-python-glue_0_OUTDIR)/VirtualBox_constants.py
|
---|
179 | VBox-python-glue_CLEAN = \
|
---|
180 | $(VBox-python-glue_0_OUTDIR)/VirtualBox_constants.py
|
---|
181 |
|
---|
182 | $$(VBox-python-glue_0_OUTDIR)/VirtualBox_constants.py: \
|
---|
183 | $(VBOX_PATH_MAIN_SRC)/glue/constants-python.xsl \
|
---|
184 | $(VBOX_XIDL_FILE) \
|
---|
185 | | $$(dir $$@)
|
---|
186 | $(call MSG_TOOL,xsltproc,Python constants,$<,$@)
|
---|
187 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
|
---|
188 |
|
---|
189 | endif # VBOX_WITH_PYTHON
|
---|
190 |
|
---|
191 | ifndef VBOX_ONLY_SDK # Note this goes on for *very* long
|
---|
192 |
|
---|
193 | #
|
---|
194 | # Generate SchemaDefs.h and SchemaDefs.cpp from XML Schema
|
---|
195 | # These two files are used by both VBoxC and VBoxSVC.
|
---|
196 | #
|
---|
197 | BLDDIRS += $(PATH_TARGET)/Main
|
---|
198 | VBOX_XML_SCHEMADEFS_H = $(PATH_TARGET)/Main/SchemaDefs.h
|
---|
199 | VBOX_XML_SCHEMADEFS_CPP = $(PATH_TARGET)/Main/SchemaDefs.cpp
|
---|
200 | VBOX_XML_SCHEMADEFS_XSL = $(VBOX_PATH_MAIN_SRC)/xml/SchemaDefs.xsl
|
---|
201 |
|
---|
202 | VBOX_AUTOGEN_EVENT_H = $(PATH_TARGET)/Main/VBoxEvents.h
|
---|
203 | VBOX_AUTOGEN_EVENT_CPP = $(PATH_TARGET)/Main/VBoxEvents.cpp
|
---|
204 |
|
---|
205 | testschemadefs: $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
206 |
|
---|
207 |
|
---|
208 | #
|
---|
209 | # VBoxSVC executable
|
---|
210 | #
|
---|
211 | PROGRAMS += VBoxSVC
|
---|
212 | VBoxSVC_TEMPLATE = VBOXMAINEXE
|
---|
213 | VBoxSVC_DEFS = \
|
---|
214 | VBOX_MAIN_SETTINGS_ADDONS \
|
---|
215 | IN_VMM_STATIC \
|
---|
216 | $(VBOX_MAIN_DEFS) \
|
---|
217 | $(if $(VBOX_WITH_VBOXSDL),VBOX_WITH_VBOXSDL,) \
|
---|
218 | $(if $(VBOX_WITH_HEADLESS),VBOX_WITH_HEADLESS,) \
|
---|
219 | $(if $(VBOX_WITH_QTGUI),VBOX_WITH_QTGUI,) \
|
---|
220 | $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
|
---|
221 | $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
|
---|
222 | $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
|
---|
223 | $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
|
---|
224 | $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS,) \
|
---|
225 | $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
|
---|
226 | $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
|
---|
227 | $(if $(VBOX_WITH_AHCI),VBOX_WITH_AHCI,) \
|
---|
228 | $(if $(VBOX_WITH_LSILOGIC),VBOX_WITH_LSILOGIC,) \
|
---|
229 | $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
|
---|
230 | $(if $(VBOX_WITH_RESOURCE_USAGE_API),VBOX_WITH_RESOURCE_USAGE_API,) \
|
---|
231 | $(if $(VBOX_WITH_PDM_ASYNC_COMPLETION),VBOX_WITH_PDM_ASYNC_COMPLETION,) \
|
---|
232 | $(if $(VBOX_WITH_DBUS),$(if $(VBOX_USB_WITH_DBUS),VBOX_USB_WITH_DBUS,),) \
|
---|
233 | $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,) \
|
---|
234 | $(if $(VBOX_USB_WITH_INOTIFY),VBOX_USB_WITH_INOTIFY,) \
|
---|
235 | $(if $(VBOX_WITH_LIVE_MIGRATION),VBOX_WITH_LIVE_MIGRATION,) \
|
---|
236 | $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK,) \
|
---|
237 | $(if $(VBOX_WITH_VUSB),VBOX_WITH_VUSB,) \
|
---|
238 | $(if $(VBOX_WITH_S3),VBOX_WITH_S3,) \
|
---|
239 | $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH,)
|
---|
240 | ifdef VBOX_WITH_USB
|
---|
241 | VBoxSVC_DEFS += \
|
---|
242 | VBOX_WITH_USB \
|
---|
243 | $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI,) \
|
---|
244 | $(if $(VBOX_WITH_NEW_USB_CODE_ON_DARWIN),VBOX_WITH_NEW_USB_CODE_ON_DARWIN,)
|
---|
245 | endif
|
---|
246 | VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
|
---|
247 | VBoxSVC_DEFS.win += _WIN32_WINNT=0x0510
|
---|
248 | # Try to load and use libhal at runtime for probing removable media
|
---|
249 | # VBoxSVC_DEFS.linux += VBOX_USE_LIBHAL
|
---|
250 | VBoxSVC_DEFS.solaris += VBOX_USE_LIBHAL
|
---|
251 | VBoxSVC_DEFS.freebsd += VBOX_USE_LIBHAL
|
---|
252 |
|
---|
253 | VBoxSVC_CXXFLAGS = $(filter-out -Wno-unused,$(TEMPLATE_VBOXMAINEXE_CXXFLAGS))
|
---|
254 |
|
---|
255 | VBoxSVC_INCS = \
|
---|
256 | include \
|
---|
257 | $(VBoxSVC_0_OUTDIR) \
|
---|
258 | $(dir $(VBOX_XML_SCHEMADEFS_H)) \
|
---|
259 | .
|
---|
260 | VBoxSVC_INCS.win = \
|
---|
261 | $(VBoxCOM_0_OUTDIR)
|
---|
262 | ifdef VBOX_WITH_USB
|
---|
263 | VBoxSVC_INCS.os2 = \
|
---|
264 | $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
|
---|
265 | endif
|
---|
266 |
|
---|
267 | VBoxSVC_LIBS += \
|
---|
268 | $(PATH_STAGE_LIB)/SSMStandalone$(VBOX_SUFF_LIB) \
|
---|
269 | $(LIB_DDU)
|
---|
270 | VBoxSVC_SDKS = VBOX_LIBPNG VBOX_ZLIB
|
---|
271 | VBoxSVC_LIBS.solaris = \
|
---|
272 | adm \
|
---|
273 | nsl \
|
---|
274 | devinfo \
|
---|
275 | socket \
|
---|
276 | $(LIB_VMM)
|
---|
277 |
|
---|
278 | VBoxSVC_INTERMEDIATES = \
|
---|
279 | $(VBOX_MAIN_PREREQS) \
|
---|
280 | $(VBOX_XML_SCHEMADEFS_H) \
|
---|
281 | $(VBOX_AUTOGEN_EVENT_H)
|
---|
282 |
|
---|
283 | VBoxSVC_SOURCES = \
|
---|
284 | src-all/DisplayPNGUtil.cpp \
|
---|
285 | src-all/DisplayResampleImage.cpp \
|
---|
286 | src-all/DisplayUtils.cpp \
|
---|
287 | src-all/EventImpl.cpp \
|
---|
288 | src-all/Global.cpp \
|
---|
289 | src-all/HashedPw.cpp \
|
---|
290 | src-all/Logging.cpp \
|
---|
291 | src-all/PCIDeviceAttachmentImpl.cpp \
|
---|
292 | src-all/ProgressImpl.cpp \
|
---|
293 | src-all/SharedFolderImpl.cpp \
|
---|
294 | src-all/VirtualBoxBase.cpp \
|
---|
295 | src-all/VirtualBoxErrorInfoImpl.cpp \
|
---|
296 | $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
|
---|
297 | src-server/ApplianceImpl.cpp \
|
---|
298 | src-server/ApplianceImplExport.cpp \
|
---|
299 | src-server/ApplianceImplImport.cpp \
|
---|
300 | src-server/ApplianceImplIO.cpp \
|
---|
301 | src-server/AudioAdapterImpl.cpp \
|
---|
302 | src-server/BandwidthControlImpl.cpp \
|
---|
303 | src-server/BandwidthGroupImpl.cpp \
|
---|
304 | src-server/BIOSSettingsImpl.cpp \
|
---|
305 | src-server/DHCPServerImpl.cpp \
|
---|
306 | src-server/DHCPServerRunner.cpp \
|
---|
307 | src-server/GuestOSTypeImpl.cpp \
|
---|
308 | src-server/HostImpl.cpp \
|
---|
309 | src-server/HostNetworkInterfaceImpl.cpp \
|
---|
310 | src-server/HostPower.cpp \
|
---|
311 | src-server/MachineImpl.cpp \
|
---|
312 | src-server/MachineImplCloneVM.cpp \
|
---|
313 | src-server/Matching.cpp \
|
---|
314 | src-server/MediumAttachmentImpl.cpp \
|
---|
315 | src-server/MediumFormatImpl.cpp \
|
---|
316 | src-server/MediumImpl.cpp \
|
---|
317 | src-server/MediumLock.cpp \
|
---|
318 | src-server/NATEngineImpl.cpp \
|
---|
319 | src-server/NetworkAdapterImpl.cpp \
|
---|
320 | src-server/ParallelPortImpl.cpp \
|
---|
321 | src-server/ProgressProxyImpl.cpp \
|
---|
322 | src-server/SerialPortImpl.cpp \
|
---|
323 | src-server/SnapshotImpl.cpp \
|
---|
324 | src-server/StorageControllerImpl.cpp \
|
---|
325 | src-server/SystemPropertiesImpl.cpp \
|
---|
326 | src-server/USBControllerImpl.cpp \
|
---|
327 | src-server/VFSExplorerImpl.cpp \
|
---|
328 | src-server/VirtualBoxImpl.cpp \
|
---|
329 | src-server/VRDEServerImpl.cpp \
|
---|
330 | src-server/generic/AutostartDb-generic.cpp \
|
---|
331 | xml/ovfreader.cpp \
|
---|
332 | xml/Settings.cpp \
|
---|
333 | $(VBOX_XML_SCHEMADEFS_CPP) \
|
---|
334 | $(VBOX_AUTOGEN_EVENT_CPP) \
|
---|
335 | $(if $(VBOX_WITH_XPCOM),src-server/xpcom/server.cpp,)
|
---|
336 |
|
---|
337 | VBoxSVC_SOURCES.darwin = \
|
---|
338 | src-server/darwin/iokit.cpp \
|
---|
339 | src-server/darwin/HostPowerDarwin.cpp
|
---|
340 |
|
---|
341 | VBoxSVC_SOURCES.win = \
|
---|
342 | src-server/win/svcmain.cpp \
|
---|
343 | src-server/win/svchlp.cpp \
|
---|
344 | src-server/win/HostPowerWin.cpp \
|
---|
345 | src-server/win/VBoxSVC.rc \
|
---|
346 | src-server/win/VBoxComEvents.cpp
|
---|
347 |
|
---|
348 | VBoxSVC_SOURCES.linux = \
|
---|
349 | src-server/linux/HostHardwareLinux.cpp
|
---|
350 |
|
---|
351 | VBoxSVC_SOURCES.solaris = \
|
---|
352 | src-server/linux/vbox-libhal.cpp \
|
---|
353 | src-server/solaris/DynLoadLibSolaris.cpp
|
---|
354 |
|
---|
355 | VBoxSVC_SOURCES.freebsd = \
|
---|
356 | src-server/freebsd/HostHardwareFreeBSD.cpp
|
---|
357 |
|
---|
358 |
|
---|
359 | ifdef VBOX_WITH_USB
|
---|
360 | ifdef VBOX_WITH_SYSFS_BY_DEFAULT
|
---|
361 | src-server/linux/USBProxyServiceLinux.cpp_DEFS += VBOX_WITH_SYSFS_BY_DEFAULT
|
---|
362 | endif
|
---|
363 | VBoxSVC_SOURCES += \
|
---|
364 | src-server/USBDeviceFilterImpl.cpp \
|
---|
365 | src-server/USBProxyService.cpp \
|
---|
366 | src-server/HostUSBDeviceImpl.cpp
|
---|
367 | VBoxSVC_SOURCES.darwin += src-server/darwin/USBProxyServiceDarwin.cpp
|
---|
368 | VBoxSVC_SOURCES.linux += src-server/linux/USBProxyServiceLinux.cpp
|
---|
369 | VBoxSVC_SOURCES.linux += src-server/linux/USBGetDevices.cpp
|
---|
370 | VBoxSVC_SOURCES.os2 += src-server/os2/USBProxyServiceOs2.cpp
|
---|
371 | VBoxSVC_SOURCES.solaris += src-server/solaris/USBProxyServiceSolaris.cpp
|
---|
372 | VBoxSVC_SOURCES.win += src-server/win/USBProxyServiceWindows.cpp
|
---|
373 | VBoxSVC_SOURCES.freebsd += src-server/freebsd/USBProxyServiceFreeBSD.cpp
|
---|
374 | endif
|
---|
375 |
|
---|
376 | ifdef VBOX_WITH_NETFLT
|
---|
377 | VBoxSVC_LIBS.win += \
|
---|
378 | $(PATH_STAGE_LIB)/WinNetConfig$(VBOX_SUFF_LIB) \
|
---|
379 | $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
|
---|
380 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
|
---|
381 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
382 | $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
|
---|
383 | endif
|
---|
384 | VBoxSVC_LDFLAGS.darwin = -framework IOKit -framework SystemConfiguration
|
---|
385 |
|
---|
386 | ifdef VBOX_WITH_CROGL
|
---|
387 | VBoxSVC_LIBS += $(PATH_STAGE_LIB)/VBoxOGLTest$(VBOX_SUFF_LIB)
|
---|
388 | VBoxSVC_LDFLAGS.darwin += -framework OpenGL
|
---|
389 | endif
|
---|
390 |
|
---|
391 | ifeq ($(KBUILD_TYPE),debug)
|
---|
392 | VBoxSVC_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
|
---|
393 | endif
|
---|
394 |
|
---|
395 | ifdef VBOX_WITH_RESOURCE_USAGE_API
|
---|
396 | VBoxSVC_SOURCES += \
|
---|
397 | src-server/PerformanceImpl.cpp \
|
---|
398 | src-server/Performance.cpp
|
---|
399 | VBoxSVC_SOURCES.darwin += src-server/darwin/PerformanceDarwin.cpp
|
---|
400 | VBoxSVC_SOURCES.freebsd += src-server/freebsd/PerformanceFreeBSD.cpp
|
---|
401 | VBoxSVC_SOURCES.linux += src-server/linux/PerformanceLinux.cpp
|
---|
402 | VBoxSVC_SOURCES.os2 += src-server/os2/PerformanceOs2.cpp
|
---|
403 | VBoxSVC_SOURCES.solaris += src-server/solaris/PerformanceSolaris.cpp
|
---|
404 | VBoxSVC_SOURCES.win += src-server/win/PerformanceWin.cpp
|
---|
405 | VBoxSVC_LDFLAGS.darwin += -lproc
|
---|
406 | VBoxSVC_LDFLAGS.solaris += -lkstat -lnvpair
|
---|
407 | VBoxSVC_LDFLAGS.win += psapi.lib powrprof.lib
|
---|
408 | endif
|
---|
409 |
|
---|
410 | ifdef VBOX_WITH_HOSTNETIF_API
|
---|
411 | VBoxSVC_SOURCES.win += src-server/win/NetIf-win.cpp
|
---|
412 | VBoxSVC_SOURCES.linux += src-server/linux/NetIf-linux.cpp
|
---|
413 | VBoxSVC_SOURCES.os2 += src-server/os2/NetIf-os2.cpp
|
---|
414 | VBoxSVC_SOURCES.darwin += src-server/darwin/NetIf-darwin.cpp
|
---|
415 | VBoxSVC_SOURCES.solaris += src-server/solaris/NetIf-solaris.cpp
|
---|
416 | VBoxSVC_SOURCES.freebsd += src-server/freebsd/NetIf-freebsd.cpp
|
---|
417 | VBoxSVC_DEFS += VBOX_WITH_HOSTNETIF_API
|
---|
418 | if1of ($(KBUILD_TARGET), linux darwin solaris freebsd)
|
---|
419 | VBoxSVC_SOURCES += src-server/generic/NetIf-generic.cpp
|
---|
420 | endif
|
---|
421 | endif
|
---|
422 |
|
---|
423 | src-server/win/VBoxSVC.rc_INCS = $(VBoxSVC_0_OUTDIR)
|
---|
424 | src-server/win/VBoxSVC.rc_DEPS = $(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs $(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc
|
---|
425 | src-server/win/VBoxSVC.rc_CLEAN = $(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs $(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc
|
---|
426 |
|
---|
427 | $$(VBoxSVC_0_OUTDIR)/VBoxSVC-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$(@D))
|
---|
428 | $(APPEND) -t $@ '1 ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
|
---|
429 |
|
---|
430 | $$(VBoxSVC_0_OUTDIR)/VBoxSVC.rgs: $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$(@D))
|
---|
431 | $(VBOX_XSLTPROC) --stringparam Module VBoxSVC -o $@ $< $(VBOX_XIDL_FILE)
|
---|
432 |
|
---|
433 |
|
---|
434 | #
|
---|
435 | # Embed some constraints from XML Schema file into VBoxSVC
|
---|
436 | #
|
---|
437 | VBOX_XML_SCHEMA = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings.xsd
|
---|
438 |
|
---|
439 | $(VBOX_XML_SCHEMADEFS_H): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA) | $$(dir $$@)
|
---|
440 | $(call MSG_GENERATE,SchemaDefs,$@,$<)
|
---|
441 | $(QUIET)$(VBOX_XSLTPROC) --stringparam mode declare -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA)
|
---|
442 |
|
---|
443 | $(VBOX_XML_SCHEMADEFS_CPP): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA) | $$(dir $$@)
|
---|
444 | $(call MSG_GENERATE,SchemaDefs,$@,$<)
|
---|
445 | $(QUIET)$(VBOX_XSLTPROC) --stringparam mode define -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA)
|
---|
446 |
|
---|
447 | testvalidsettings: $(VBOX_XML_SCHEMA)
|
---|
448 | xmllint --schema $< --noout $(HOME)/.VirtualBox/VirtualBox.xml
|
---|
449 | xmllint --schema $< --noout $(HOME)/.VirtualBox/Machines/*/*.xml
|
---|
450 | xmllint --schema $< --noout $(HOME)/.VirtualBox/Machines/*/*.vbox
|
---|
451 | xmllint --schema $< --noout $(HOME)/VirtualBox\ VMs/*/*.vbox
|
---|
452 |
|
---|
453 | OTHER_CLEAN += $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
454 |
|
---|
455 |
|
---|
456 | #
|
---|
457 | # Generate some event stuff for VBoxSVC and VBoxC.
|
---|
458 | #
|
---|
459 | $(VBOX_AUTOGEN_EVENT_H): $(VBOX_PATH_MAIN_SRC)/idl/comimpl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
460 | $(call MSG_TOOL,xsltproc,autogen events,$<,$@)
|
---|
461 | $(QUIET)$(VBOX_XSLTPROC) --stringparam G_kind VBoxEventHeader -o $@ $< $(VBOX_XIDL_FILE)
|
---|
462 |
|
---|
463 | $(VBOX_AUTOGEN_EVENT_CPP): $(VBOX_PATH_MAIN_SRC)/idl/comimpl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
464 | $(call MSG_TOOL,xsltproc,autogen events,$<,$@)
|
---|
465 | $(QUIET)$(VBOX_XSLTPROC) --stringparam G_kind VBoxEvent -o $@ $< $(VBOX_XIDL_FILE)
|
---|
466 |
|
---|
467 | OTHER_CLEAN += $(VBOX_AUTOGEN_EVENT_H) $(VBOX_AUTOGEN_EVENT_CPP)
|
---|
468 |
|
---|
469 | ifdef VBOX_WITH_XPCOM
|
---|
470 | #
|
---|
471 | # VBoxSVCM - VBoxSVC wrapper module
|
---|
472 | #
|
---|
473 | DLLS += VBoxSVCM
|
---|
474 | VBoxSVCM_TEMPLATE = VBOXMAINCOMP
|
---|
475 | VBoxSVCM_DEFS = IN_RING3 $(VBOX_MAIN_DEFS)
|
---|
476 | ifdef VBOX_WITH_HARDENING
|
---|
477 | VBoxSVCM_DEFS += VBOX_WITH_HARDENING
|
---|
478 | endif
|
---|
479 | VBoxSVCM_INCS = \
|
---|
480 | include \
|
---|
481 | $(VBoxC_0_OUTDIR) \
|
---|
482 | .
|
---|
483 | VBoxSVCM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
|
---|
484 | VBoxSVCM_SOURCES = \
|
---|
485 | src-server/xpcom/server_module.cpp
|
---|
486 | VBoxSVCM_LDFLAGS.darwin = \
|
---|
487 | -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxSVCM.dylib \
|
---|
488 | -exported_symbols_list $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
|
---|
489 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
490 | VBoxSVCM_ORDERDEPS += $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
|
---|
491 | VBoxSVCM_CLEAN += $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
|
---|
492 | $$(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def:
|
---|
493 | $(RM) -f $@
|
---|
494 | $(APPEND) $@ _NSGetModule
|
---|
495 | endif
|
---|
496 | VBoxSVCM_INTERMEDIATES += $(VBOX_IDL_HEADER.XPCOM)
|
---|
497 | endif # VBOX_WITH_XPCOM
|
---|
498 |
|
---|
499 |
|
---|
500 | #
|
---|
501 | # VBoxC module
|
---|
502 | #
|
---|
503 | DLLS += VBoxC
|
---|
504 | VBoxC_TEMPLATE = VBOXMAINCOMP
|
---|
505 | VBoxC_DEFS = \
|
---|
506 | IN_RING3 \
|
---|
507 | $(VBOX_MAIN_DEFS) \
|
---|
508 | VBOX_COM_INPROC \
|
---|
509 | $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
|
---|
510 | $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
|
---|
511 | $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
|
---|
512 | $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
|
---|
513 | $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS,) \
|
---|
514 | $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
|
---|
515 | $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
|
---|
516 | $(if $(VBOX_WITH_EFI),VBOX_WITH_EFI,) \
|
---|
517 | $(if $(VBOX_WITH_PDM_ASYNC_COMPLETION),VBOX_WITH_PDM_ASYNC_COMPLETION,) \
|
---|
518 | $(if $(VBOX_WITH_LIVE_MIGRATION),VBOX_WITH_LIVE_MIGRATION,) \
|
---|
519 | $(if $(VBOX_WITH_VUSB),VBOX_WITH_VUSB,) \
|
---|
520 | $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
|
---|
521 | $(if $(VBOX_WITH_VIDEOHWACCEL),VBOX_WITH_VIDEOHWACCEL,) \
|
---|
522 | $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP,) \
|
---|
523 | $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,) \
|
---|
524 | $(if $(VBOX_WITH_USB),VBOX_WITH_USB,) \
|
---|
525 | $(if-expr defined(VBOX_WITH_EHCI) && defined(VBOX_WITH_USB),VBOX_WITH_EHCI,) \
|
---|
526 | $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK,) \
|
---|
527 | $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH,) \
|
---|
528 | $(if $(VBOX_WITH_VPX),VBOX_WITH_VPX,)
|
---|
529 |
|
---|
530 | VBoxC_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE
|
---|
531 | VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
|
---|
532 | VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
|
---|
533 |
|
---|
534 | ifdef VBOX_WITH_VPX
|
---|
535 | VBoxC_SDKS = VBOX_LIBPNG VBOX_ZLIB VBOX_VPX
|
---|
536 | else
|
---|
537 | VBoxC_SDKS = VBOX_LIBPNG VBOX_ZLIB
|
---|
538 | endif
|
---|
539 |
|
---|
540 | VBoxC_INCS = \
|
---|
541 | include \
|
---|
542 | $(VBoxC_0_OUTDIR) \
|
---|
543 | $(dir $(VBOX_XML_SCHEMADEFS_H))
|
---|
544 | VBoxC_INCS.win = \
|
---|
545 | $(VBoxCOM_0_OUTDIR) \
|
---|
546 | .
|
---|
547 |
|
---|
548 | VBoxC_LDFLAGS.darwin = \
|
---|
549 | -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxC.dylib \
|
---|
550 | -exported_symbols_list $(VBoxC_0_OUTDIR)/VBoxC.def \
|
---|
551 | -framework IOKit
|
---|
552 | VBoxC_LDFLAGS.win += /DELAYLOAD:VBoxVMM.dll /MANIFEST
|
---|
553 |
|
---|
554 | VBoxC_LIBS += \
|
---|
555 | $(LIB_VMM) \
|
---|
556 | $(LIB_REM)
|
---|
557 |
|
---|
558 | ifdef VBOX_WITH_NETFLT
|
---|
559 | VBoxC_LIBS.win += \
|
---|
560 | $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
|
---|
561 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
|
---|
562 | $(PATH_STAGE_LIB)/WinNetConfig$(VBOX_SUFF_LIB) \
|
---|
563 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
564 | $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib \
|
---|
565 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
|
---|
566 | endif
|
---|
567 |
|
---|
568 | ifdef VBOX_WITH_CROGL
|
---|
569 | VBoxC_LIBS += $(PATH_STAGE_LIB)/VBoxOGLTest$(VBOX_SUFF_LIB)
|
---|
570 | VBoxC_LDFLAGS.darwin += -framework OpenGL
|
---|
571 | endif
|
---|
572 |
|
---|
573 |
|
---|
574 | VBoxC_INTERMEDIATES = \
|
---|
575 | $(VBOX_MAIN_PREREQS) \
|
---|
576 | $(VBOX_XML_SCHEMADEFS_H) \
|
---|
577 | $(VBOX_AUTOGEN_EVENT_H)
|
---|
578 |
|
---|
579 | VBoxC_SOURCES = \
|
---|
580 | src-all/DisplayPNGUtil.cpp \
|
---|
581 | src-all/DisplayResampleImage.cpp \
|
---|
582 | src-all/DisplayUtils.cpp \
|
---|
583 | src-all/EventImpl.cpp \
|
---|
584 | src-all/Global.cpp \
|
---|
585 | src-all/HashedPw.cpp \
|
---|
586 | src-all/Logging.cpp \
|
---|
587 | src-all/PCIDeviceAttachmentImpl.cpp \
|
---|
588 | src-all/ProgressImpl.cpp \
|
---|
589 | src-all/SharedFolderImpl.cpp \
|
---|
590 | src-all/VirtualBoxBase.cpp \
|
---|
591 | src-all/VirtualBoxErrorInfoImpl.cpp \
|
---|
592 | $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
|
---|
593 | $(if $(VBOX_WITH_USB_VIDEO),src-client/UsbWebcamInterface.cpp,) \
|
---|
594 | $(if $(VBOX_WITH_USB_CARDREADER),src-client/UsbCardReader.cpp,) \
|
---|
595 | src-client/Nvram.cpp \
|
---|
596 | src-client/AdditionsFacilityImpl.cpp \
|
---|
597 | src-client/AudioSnifferInterface.cpp \
|
---|
598 | src-client/BusAssignmentManager.cpp \
|
---|
599 | $(if $(VBOX_WITH_PCI_PASSTHROUGH),src-client/PCIRawDevImpl.cpp,) \
|
---|
600 | src-client/ConsoleImpl.cpp \
|
---|
601 | src-client/ConsoleImpl2.cpp \
|
---|
602 | src-client/ConsoleImplTeleporter.cpp \
|
---|
603 | src-client/ConsoleVRDPServer.cpp \
|
---|
604 | src-client/DisplayImpl.cpp \
|
---|
605 | src-client/GuestImpl.cpp \
|
---|
606 | src-client/GuestDirectoryImpl.cpp \
|
---|
607 | src-client/GuestFileImpl.cpp \
|
---|
608 | src-client/GuestFsObjInfoImpl.cpp \
|
---|
609 | src-client/GuestProcessImpl.cpp \
|
---|
610 | src-client/GuestSessionImpl.cpp \
|
---|
611 | src-client/GuestCtrlImpl.cpp \
|
---|
612 | src-client/KeyboardImpl.cpp \
|
---|
613 | src-client/MachineDebuggerImpl.cpp \
|
---|
614 | src-client/MouseImpl.cpp \
|
---|
615 | src-client/RemoteUSBDeviceImpl.cpp \
|
---|
616 | src-client/SessionImpl.cpp \
|
---|
617 | src-client/USBDeviceImpl.cpp \
|
---|
618 | src-client/VBoxDriversRegister.cpp \
|
---|
619 | src-client/VirtualBoxClientImpl.cpp \
|
---|
620 | src-client/VMMDevInterface.cpp \
|
---|
621 | $(VBOX_AUTOGEN_EVENT_CPP) \
|
---|
622 | $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
623 | VBoxC_SOURCES.win = \
|
---|
624 | src-client/win/dllmain.cpp \
|
---|
625 | src-client/win/VBoxC.def \
|
---|
626 | src-client/win/VBoxC.rc
|
---|
627 |
|
---|
628 | ifdef VBOX_WITH_GUEST_CONTROL
|
---|
629 | VBoxC_SOURCES += \
|
---|
630 | src-client/GuestSessionImplTasks.cpp \
|
---|
631 | src-client/GuestCtrlPrivate.cpp
|
---|
632 | endif
|
---|
633 |
|
---|
634 | ifdef VBOX_WITH_DRAG_AND_DROP
|
---|
635 | VBoxC_SOURCES += \
|
---|
636 | src-client/GuestDnDImpl.cpp
|
---|
637 | endif
|
---|
638 |
|
---|
639 | ifdef VBOX_WITH_XPCOM
|
---|
640 | VBoxC_SOURCES += \
|
---|
641 | src-client/xpcom/module.cpp
|
---|
642 | endif
|
---|
643 |
|
---|
644 | ifdef VBOX_WITH_HGCM
|
---|
645 | VBoxC_SOURCES += \
|
---|
646 | src-client/HGCMObjects.cpp \
|
---|
647 | src-client/HGCMThread.cpp \
|
---|
648 | src-client/HGCM.cpp
|
---|
649 | endif
|
---|
650 |
|
---|
651 | ifdef VBOX_WITH_CRHGSMI
|
---|
652 | VBoxC_DEFS += VBOX_WITH_CRHGSMI
|
---|
653 | endif
|
---|
654 |
|
---|
655 | ifdef VBOX_WITH_USB
|
---|
656 | VBoxC_SOURCES += \
|
---|
657 | src-client/RemoteUSBBackend.cpp
|
---|
658 | endif
|
---|
659 |
|
---|
660 | ifdef VBOX_WITH_VPX
|
---|
661 | VBoxC_SOURCES += \
|
---|
662 | src-client/EbmlWriter.cpp \
|
---|
663 | src-client/VideoRec.cpp
|
---|
664 | endif
|
---|
665 |
|
---|
666 | ifdef VBOX_WITH_NETSHAPER
|
---|
667 | VBoxC_DEFS += VBOX_WITH_NETSHAPER
|
---|
668 | endif
|
---|
669 |
|
---|
670 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
671 | VBoxC_ORDERDEPS += $(VBoxC_0_OUTDIR)/VBoxC.def
|
---|
672 | VBoxC_CLEAN += $(VBoxC_0_OUTDIR)/VBoxC.def
|
---|
673 | $$(VBoxC_0_OUTDIR)/VBoxC.def: $(MAKEFILE_CURRENT)
|
---|
674 | $(RM) -f $@
|
---|
675 | $(APPEND) $@ _NSGetModule
|
---|
676 | $(APPEND) $@ _VBoxDriversRegister
|
---|
677 | endif
|
---|
678 |
|
---|
679 | src-client/ConsoleImpl.cpp_DEFS = \
|
---|
680 | $(if $(VBOX_BLEEDING_EDGE),VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\",)
|
---|
681 |
|
---|
682 |
|
---|
683 | src-client/win/VBoxC.rc_DEPS = $(VBoxC_0_OUTDIR)/VBoxC.rgs $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb
|
---|
684 | VBoxC_CLEAN.win += $(VBoxC_0_OUTDIR)/VBoxC.rgs
|
---|
685 |
|
---|
686 | $$(VBoxC_0_OUTDIR)/VBoxC.rgs: $(VBOX_PATH_MAIN_SRC)/src-all/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
687 | $(VBOX_XSLTPROC) --stringparam Module VBoxC -o $@ $< $(VBOX_XIDL_FILE)
|
---|
688 |
|
---|
689 |
|
---|
690 | #
|
---|
691 | # VBoxCOM - COM Abstraction Layer library
|
---|
692 | #
|
---|
693 | LIBRARIES += VBoxCOM
|
---|
694 | VBoxCOM_TEMPLATE = VBOXMAINLIB
|
---|
695 | VBoxCOM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
|
---|
696 | VBoxCOM_SOURCES = \
|
---|
697 | glue/com.cpp \
|
---|
698 | glue/initterm.cpp \
|
---|
699 | glue/string.cpp \
|
---|
700 | glue/AutoLock.cpp \
|
---|
701 | glue/EventQueue.cpp \
|
---|
702 | glue/ErrorInfo.cpp \
|
---|
703 | glue/errorprint.cpp
|
---|
704 | VBoxCOM_INCS += \
|
---|
705 | include
|
---|
706 | ifeq ($(KBUILD_TARGET),win)
|
---|
707 | VBoxCOM_DEFS.x86 += _WIN32_WINNT=0x0500
|
---|
708 | VBoxCOM_DEFS.amd64 += _WIN32_WINNT=0x0510
|
---|
709 | VBoxCOM_SOURCES += \
|
---|
710 | $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c
|
---|
711 | else # !win
|
---|
712 | VBoxCOM_SOURCES += \
|
---|
713 | glue/xpcom/helpers.cpp
|
---|
714 | endif # !win
|
---|
715 |
|
---|
716 | glue/com.cpp_DEFS = \
|
---|
717 | $(if $(VBOX_BLEEDING_EDGE),VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\",)
|
---|
718 |
|
---|
719 |
|
---|
720 | #
|
---|
721 | # The VBoxExtPackHelperApp.
|
---|
722 | #
|
---|
723 | ifdef VBOX_WITH_EXTPACK
|
---|
724 | PROGRAMS += VBoxExtPackHelperApp
|
---|
725 | VBoxExtPackHelperApp_TEMPLATE = VBoxR3SetUidToRoot
|
---|
726 | VBoxExtPackHelperApp_LDFLAGS.darwin = -framework Security
|
---|
727 | VBoxExtPackHelperApp_LDFLAGS.win = /SUBSYSTEM:windows
|
---|
728 | VBoxExtPackHelperApp_SOURCES = \
|
---|
729 | src-helper-apps/VBoxExtPackHelperApp.cpp \
|
---|
730 | src-all/ExtPackUtil.cpp
|
---|
731 | VBoxExtPackHelperApp_LIBS = \
|
---|
732 | $(LIB_RUNTIME)
|
---|
733 | endif # VBOX_WITH_EXTPACK
|
---|
734 |
|
---|
735 |
|
---|
736 | endif # !VBOX_ONLY_SDK (the ifndef is far above)
|
---|
737 |
|
---|
738 |
|
---|
739 | #
|
---|
740 | # Installs com related thing(s) to bin.
|
---|
741 | #
|
---|
742 | INSTALLS.win += VBoxMain-com-inst
|
---|
743 | VBoxMain-com-inst_INST = $(INST_BIN)
|
---|
744 | VBoxMain-com-inst_MODE = a+r,u+w
|
---|
745 | VBoxMain-com-inst_SOURCES = src-all/win/comregister.cmd
|
---|
746 |
|
---|
747 |
|
---|
748 | if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "linux"
|
---|
749 | #
|
---|
750 | # Installs linux/hardening related things to components.
|
---|
751 | #
|
---|
752 | INSTALLS.linux += VBoxMain-hardening-inst
|
---|
753 | VBoxMain-hardening-inst_INST = $(INST_BIN)components/
|
---|
754 | VBoxMain-hardening-inst_SYMLINKS = \
|
---|
755 | VBoxDDU.so=>../VBoxDDU.so \
|
---|
756 | VBoxREM.so=>../VBoxREM.so \
|
---|
757 | VBoxRT.so=>../VBoxRT.so \
|
---|
758 | VBoxVMM.so=>../VBoxVMM.so \
|
---|
759 | VBoxXPCOM.so=>../VBoxXPCOM.so
|
---|
760 | endif
|
---|
761 |
|
---|
762 |
|
---|
763 | # generate rules
|
---|
764 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
765 |
|
---|
766 |
|
---|
767 |
|
---|
768 | #
|
---|
769 | # Additions rules.
|
---|
770 | #
|
---|
771 |
|
---|
772 | ## @todo this hack ain't cutting it any longer. (the file name is abspath'ed since ages now.)
|
---|
773 | glue/xpcom/helpers.cpp: $(VBOX_IDL_TYPELIB.XPCOM)
|
---|
774 |
|
---|
775 | $(VBOX_IDL_FILE.XPCOM): $(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
776 | $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
|
---|
777 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
|
---|
778 |
|
---|
779 | $(VBOX_IDL_TYPELIB.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
|
---|
780 | $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
|
---|
781 | $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m typelib -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
|
---|
782 | $(CHMOD) 0644 $@
|
---|
783 | ## @todo ^^^^^^^^^^^^ fix horrible hack
|
---|
784 |
|
---|
785 | $(VBOX_IDL_HEADER.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
|
---|
786 | $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
|
---|
787 | $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m header -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
|
---|
788 |
|
---|
789 | $(VBOX_IDL_FILE.MSCOM): $(VBOX_PATH_MAIN_SRC)/idl/midl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
790 | $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
|
---|
791 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
|
---|
792 |
|
---|
793 | # Aliases for testing purposes.
|
---|
794 | ifdef VBOX_WITH_XPCOM
|
---|
795 | testidl: $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM)
|
---|
796 | testidlhdr: $(VBOX_IDL_HEADER.XPCOM)
|
---|
797 | else
|
---|
798 | testidl: $(VBOX_IDL_FILE.MSCOM) $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c
|
---|
799 | endif
|
---|
800 |
|
---|
801 |
|
---|
802 | $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
|
---|
803 | + $(VBoxCOM_0_OUTDIR)/VirtualBox.h \
|
---|
804 | + $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
|
---|
805 | $(VBOX_WIN_MIDL) /nologo \
|
---|
806 | /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM_0_OUTDIR)) \
|
---|
807 | /cpp_cmd $(subst $(EXEC_X86_WIN32),,$(call VBOX_FN_MAKE_WIN_PATH,$(TOOL_$(VBOX_VCC_TOOL)_CC))) \
|
---|
808 | /I $(call VBOX_FN_MAKE_WIN_PATH,$(PATH_SDK_$(VBOX_WINPSDK)_INC)) \
|
---|
809 | /I idl \
|
---|
810 | $(call VBOX_FN_MAKE_WIN_PATH,$<)
|
---|
811 |
|
---|
812 | #
|
---|
813 | # Translation stuff
|
---|
814 | #
|
---|
815 | VBoxSVC_VBOX_HEADERS = \
|
---|
816 | include/collection.h \
|
---|
817 | include/MachineImpl.h
|
---|
818 | VBoxSVC_VBOX_TRANSLATIONS = \
|
---|
819 | nls/VBoxSVC_de.ts
|
---|
820 |
|
---|
821 | VBoxC_VBOX_HEADERS = \
|
---|
822 | include/ConsoleImpl.h
|
---|
823 | VBoxC_VBOX_TRANSLATIONS = \
|
---|
824 | nls/VBoxC_de.ts
|
---|
825 |
|
---|
826 | ifdef VBOX_WITH_JMSCOM
|
---|
827 |
|
---|
828 | #
|
---|
829 | # Java glue JAR files
|
---|
830 | #
|
---|
831 | VBOX_JMSCOM_JAR = $(VBoxJMscom-inst-jar_0_OUTDIR)/vboxjmscom.jar
|
---|
832 | VBOX_JMSCOM_TARGET := $(PATH_TARGET)/vboxjmscom-gen
|
---|
833 | VBOX_JMSCOM_GEN = $(VBOX_JMSCOM_TARGET)/jmscomgen
|
---|
834 | VBOX_JMSCOM_JDEST := $(VBOX_JMSCOM_TARGET)/jdest
|
---|
835 | VBOX_GLUE_XSLT_DIR := $(PATH_ROOT)/src/VBox/Main/glue
|
---|
836 | VBOX_JACOB_DIR := $(PATH_ROOT)/src/libs/jacob-1.15-M3
|
---|
837 |
|
---|
838 | INSTALLS += VBoxJMscom-inst-jar
|
---|
839 | VBoxJMscom-inst-jar_INST = $(INST_SDK)bindings/mscom/java/
|
---|
840 | VBoxJMscom-inst-jar_MODE = a+r,u+w
|
---|
841 | VBoxJMscom-inst-jar_SOURCES = \
|
---|
842 | $(VBOX_JMSCOM_JAR)
|
---|
843 | VBoxJMscom-inst-jar_CLEAN = \
|
---|
844 | $(VBOX_JMSCOM_JAR) \
|
---|
845 | $(VBOX_JMSCOM_GEN)/jmscomglue.list \
|
---|
846 | $(wildcard \
|
---|
847 | $(VBOX_JMSCOM_GEN)/java/*.java \
|
---|
848 | $(VBOX_JMSCOM_JDEST)/*.class \
|
---|
849 | $(VBOX_JMSCOM_JDEST)/*/*.class \
|
---|
850 | $(VBOX_JMSCOM_JDEST)/*/*/*.class \
|
---|
851 | $(VBOX_JMSCOM_JDEST)/*/*/*/*.class \
|
---|
852 | )
|
---|
853 | VBoxJMscom-inst-jar_BLDDIRS += $(VBOX_JMSCOM_GEN)/java
|
---|
854 |
|
---|
855 | $(VBOX_JMSCOM_GEN)/jmscomglue.list: \
|
---|
856 | $(VBOX_XIDL_FILE) \
|
---|
857 | $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl \
|
---|
858 | $(VBOX_FILESPLIT) \
|
---|
859 | | $(VBOX_JMSCOM_GEN)/java/
|
---|
860 | $(call MSG_L1,Generating Java MSCOM glue files from XIDL)
|
---|
861 | $(QUIET)$(RM) -f $(wildcard $(VBOX_JMSCOM_GEN)/java/*.java)
|
---|
862 | $(QUIET)$(VBOX_XSLTPROC) \
|
---|
863 | --stringparam G_vboxApiSuffix $(VBOX_API_SUFFIX) \
|
---|
864 | --stringparam G_vboxGlueStyle mscom \
|
---|
865 | --stringparam G_vboxDirPrefix "" \
|
---|
866 | -o $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl $<
|
---|
867 | $(QUIET)$(VBOX_FILESPLIT) $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_JMSCOM_GEN)/java
|
---|
868 | $(QUIET)echo $(VBOX_JMSCOM_GEN)/java/*.java > $@
|
---|
869 |
|
---|
870 | $$(VBOX_JMSCOM_JAR): $(VBOX_JMSCOM_GEN)/jmscomglue.list | $$(dir $$@)
|
---|
871 | $(call MSG_TOOL,javac,$(notdir $@),jmscomgen.list,)
|
---|
872 | $(QUIET)$(RM) -Rf $(VBOX_JMSCOM_JDEST)
|
---|
873 | $(QUIET)$(MKDIR) -p $(VBOX_JMSCOM_JDEST)
|
---|
874 | $(call MSG_TOOL,javac,$(notdir $@),...,)
|
---|
875 | $(VBOX_JAVAC) $(VBOX_JAVAC_OPTS) \
|
---|
876 | @$(VBOX_JMSCOM_GEN)/jmscomglue.list \
|
---|
877 | -d $(VBOX_JMSCOM_JDEST) -classpath $(VBOX_JMSCOM_JDEST)$(VBOX_SEP)$(VBOX_JACOB_DIR)/jacob.jar
|
---|
878 | $(call MSG_LINK,$(notdir $@),$@)
|
---|
879 | $(VBOX_JAR) cf $@ -C $(VBOX_JMSCOM_JDEST) .
|
---|
880 |
|
---|
881 | ## @todo compile TestVBox.java (see below) to have sanity checking
|
---|
882 |
|
---|
883 | endif # VBOX_WITH_JMSCOM
|
---|
884 |
|
---|
885 | #
|
---|
886 | # Install Java glue sample code.
|
---|
887 | #
|
---|
888 | INSTALLS += javagluesample
|
---|
889 | javagluesample_INST = $(INST_SDK)bindings/glue/java/
|
---|
890 | javagluesample_MODE = a+r,u+w
|
---|
891 | javagluesample_SOURCES = \
|
---|
892 | $(VBOX_PATH_MAIN_SRC)/glue/tests/TestVBox.java=>TestVBox.java \
|
---|
893 | $(VBOX_PATH_MAIN_SRC)/glue/tests/Makefile=>Makefile
|
---|
894 |
|
---|
895 | updatenls::
|
---|
896 | $(VBOX_LUPDATE) $(VBoxSVC_SOURCES) $(VBoxSVC_VBOX_HEADERS) -ts $(VBoxSVC_VBOX_TRANSLATIONS)
|
---|
897 | $(VBOX_LUPDATE) $(VBoxC_SOURCES) $(VBoxC_VBOX_HEADERS) -ts $(VBoxC_VBOX_TRANSLATIONS)
|
---|
898 |
|
---|
899 | testconverter:: $(VBOX_USER_HOME)/VirtualBox.xml
|
---|
900 | $(call MSG_TOOL,xsltproc,Test Settings Converter,$<,$(VBOX_USER_HOME)/VirtualBox.xml.test)
|
---|
901 | $(QUIET)$(VBOX_XSLTPROC) -o $(VBOX_USER_HOME)/VirtualBox.xml.test xml/SettingsConverter.xsl $<
|
---|
902 |
|
---|
903 | testconverter2:: $(VBOX_USER_HOME)/Machines/dos/dos.xml
|
---|
904 | $(call MSG_TOOL,xsltproc,Test Settings Converter,$<,$<.test)
|
---|
905 | $(QUIET)$(VBOX_XSLTPROC) -o $<.test xml/SettingsConverter.xsl $<
|
---|
906 |
|
---|