1 | # $Id: Makefile.kmk 22213 2009-08-12 17:00:56Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the VBox Main module.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2009 Sun Microsystems, Inc.
|
---|
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 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
18 | # Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
19 | # additional information or have any questions.
|
---|
20 | #
|
---|
21 |
|
---|
22 | SUB_DEPTH = ../../..
|
---|
23 | include $(KBUILD_PATH)/subheader.kmk
|
---|
24 |
|
---|
25 | #
|
---|
26 | # Include sub-makefile(s).
|
---|
27 | #
|
---|
28 | ifdef VBOX_WITH_WEBSERVICES
|
---|
29 | include $(PATH_SUB_CURRENT)/webservice/Makefile.kmk
|
---|
30 | endif
|
---|
31 | include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
|
---|
32 | include $(PATH_SUB_CURRENT)/cbinding/Makefile.kmk
|
---|
33 |
|
---|
34 |
|
---|
35 | #
|
---|
36 | # Targets and globals (bit of a mess...)
|
---|
37 | #
|
---|
38 | VBOX_PATH_MAIN_SRC := $(PATH_SUB_CURRENT)
|
---|
39 |
|
---|
40 | ifdef VBOX_ONLY_SDK
|
---|
41 | # used by some rules
|
---|
42 | PATH_VBoxCOM = $(PATH_TARGET)/VBoxCOM
|
---|
43 | BLDDIRS += $(PATH_VBoxCOM) $(PATH_BIN)/components
|
---|
44 | # I'm Evil! Dr. Evil.
|
---|
45 | include $(KBUILD_PATH)/tools/VCC70.kmk
|
---|
46 | include $(KBUILD_PATH)/sdks/WINPSDK.kmk
|
---|
47 | endif #!VBOX_ONLY_SDK
|
---|
48 |
|
---|
49 |
|
---|
50 | # Construct VBOX_MAIN_DEFS
|
---|
51 | ## @todo eliminate or expand VBOX_MAIN_DEFS.
|
---|
52 | VBOX_MAIN_DEFS =
|
---|
53 | ifneq ($(KBUILD_TARGET),win)
|
---|
54 | ifndef VBOX_WITH_XPCOM
|
---|
55 | $(error "VBox: VBOX_WITH_XPCOM isn't defined")
|
---|
56 | endif
|
---|
57 | ifneq ($(KBUILD_TARGET),os2)
|
---|
58 | VBOX_MAIN_DEFS+= VBOX_WITH_SYS_V_IPC_SESSION_WATCHER
|
---|
59 | endif
|
---|
60 | endif
|
---|
61 | VBOX_MAIN_DEFS += \
|
---|
62 | $(if $(VBOX_WITH_NETFLT),VBOX_WITH_NETFLT,) \
|
---|
63 | $(if $(VBOX_WITH_CROGL),VBOX_WITH_CROGL,) \
|
---|
64 | $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
|
---|
65 | $(if $(VBOX_WITH_HOSTNETIF_API),VBOX_WITH_HOSTNETIF_API,)
|
---|
66 |
|
---|
67 | # Unconditionally enable the new semaphore key generation code
|
---|
68 | VBOX_MAIN_DEFS += VBOX_WITH_NEW_SYS_V_KEYGEN
|
---|
69 |
|
---|
70 | VBOX_IDL_FILE.MSCOM = $(VBOX_PATH_SDK)/bindings/mscom/idl/VirtualBox.idl
|
---|
71 | VBOX_IDL_FILE.XPCOM = $(VBOX_PATH_SDK)/bindings/xpcom/idl/VirtualBox_XPCOM.idl
|
---|
72 |
|
---|
73 | VBOX_IDL_TYPELIB.XPCOM = $(PATH_BIN)/components/VirtualBox_XPCOM.xpt
|
---|
74 | VBOX_IDL_HEADER.XPCOM = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
75 |
|
---|
76 | # The MS COM specific stuff.
|
---|
77 | if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" == "win"
|
---|
78 | OTHERS += \
|
---|
79 | $(VBOX_IDL_FILE.MSCOM) \
|
---|
80 | $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h \
|
---|
81 | $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox.tlb \
|
---|
82 | $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
|
---|
83 | OTHER_CLEAN += \
|
---|
84 | $(VBOX_IDL_FILE.MSCOM) \
|
---|
85 | $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h \
|
---|
86 | $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox.tlb \
|
---|
87 | $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c \
|
---|
88 | $(PATH_VBoxCOM)/VirtualBox.h \
|
---|
89 | $(PATH_VBoxCOM)/VirtualBox_i.c \
|
---|
90 | $(PATH_VBoxCOM)/VirtualBox.tlb
|
---|
91 |
|
---|
92 | VBOX_MAIN_PREREQS += $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
93 | BLDDIRS += $(VBOX_PATH_SDK)/bindings/mscom/idl
|
---|
94 | endif
|
---|
95 |
|
---|
96 | # The XPCOM specific stuff.
|
---|
97 | if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" != "win"
|
---|
98 | OTHERS += $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM) $(VBOX_IDL_HEADER.XPCOM)
|
---|
99 | OTHER_CLEAN += \
|
---|
100 | $(VBOX_IDL_FILE.XPCOM) \
|
---|
101 | $(VBOX_IDL_HEADER.XPCOM) \
|
---|
102 | $(VBOX_IDL_TYPELIB.XPCOM)
|
---|
103 |
|
---|
104 | VBOX_MAIN_PREREQS += $(VBOX_IDL_TYPELIB.XPCOM) $(VBOX_IDL_HEADER.XPCOM)
|
---|
105 | BLDDIRS += \
|
---|
106 | $(VBOX_PATH_SDK)/bindings/xpcom/idl \
|
---|
107 | $(VBOX_PATH_SDK)/bindings/xpcom/include
|
---|
108 | endif # xpcom
|
---|
109 |
|
---|
110 |
|
---|
111 | #
|
---|
112 | # Strip documentation from source XIDL so that we don't get a full
|
---|
113 | # recompile every time a comma in the documentation is changed.
|
---|
114 | #
|
---|
115 | $(VBOX_XIDL_FILE).ts +| $(VBOX_XIDL_FILE): \
|
---|
116 | $(VBOX_XIDL_FILE_SRC) \
|
---|
117 | $(VBOX_PATH_MAIN_SRC)/idl/docstrip.xsl \
|
---|
118 | | $$(dir $$@)
|
---|
119 | # $(CP) -fv $< $(VBOX_XIDL_FILE).ts
|
---|
120 | $(VBOX_XSLTPROC) -o $(VBOX_XIDL_FILE).ts $(VBOX_PATH_MAIN_SRC)/idl/docstrip.xsl $<
|
---|
121 | $(CP) --changed -fv $(VBOX_XIDL_FILE).ts $(VBOX_XIDL_FILE)
|
---|
122 |
|
---|
123 |
|
---|
124 | #
|
---|
125 | # The Main API documentation
|
---|
126 | #
|
---|
127 | VBOX_MAIN_DOC_DIR = $(VBOX_PATH_SDK)/docs
|
---|
128 | BLDDIRS += $(VBOX_MAIN_DOC_DIR)
|
---|
129 |
|
---|
130 | $(PATH_TARGET)/docs.Main: \
|
---|
131 | $(VBOX_PATH_MAIN_SRC)/Doxyfile.Main \
|
---|
132 | $(VBOX_PATH_MAIN_SRC)/idl/doxygen.xsl \
|
---|
133 | $(VBOX_XIDL_FILE_SRC) \
|
---|
134 | | $(PATH_TARGET)/ \
|
---|
135 | $(VBOX_MAIN_DOC_DIR)/
|
---|
136 | $(RM) -f $(wildcard $(VBOX_MAIN_DOC_DIR)/html/*) $(PATH_TARGET)/docs.Main
|
---|
137 | $(VBOX_XSLTPROC) -o $(PATH_TARGET)/VirtualBox.idl $(VBOX_PATH_MAIN_SRC)/idl/doxygen.xsl $(VBOX_XIDL_FILE_SRC)
|
---|
138 | $(REDIRECT) -E 'DOCDIR=$(VBOX_MAIN_DOC_DIR)' -E 'PATH_TARGET=$(PATH_TARGET)' -E 'PATH_CHM=$(subst /,\,$(VBOX_MAIN_DOC_DIR)/VirtualBoxAPI.chm)' \
|
---|
139 | -- doxygen $(VBOX_PATH_MAIN_SRC)/Doxyfile.Main
|
---|
140 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) ">>>>>>>>>>>>>>>>>>>> Main.err: >>>>>>>>>>>>>>>>>>>>>>>>"
|
---|
141 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(CAT) "$(PATH_TARGET)/Main.err"
|
---|
142 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "<<<<<<<<<<<<<<<<<<<< Main.err <<<<<<<<<<<<<<<<<<<<<<<<<"
|
---|
143 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> **************************************************"
|
---|
144 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> Please fix above doxygen errors/warnings listed in"
|
---|
145 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> $(PATH_TARGET)/Main.err"
|
---|
146 | $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> **************************************************"
|
---|
147 | -$(EXEC_X86_WIN32) $(VBOX_PATH_HTML_HELP_WORKSHOP)/hhc.exe $(subst /,\\,$(VBOX_MAIN_DOC_DIR)/html/index.hhp)
|
---|
148 | $(APPEND) $(PATH_TARGET)/docs.Main
|
---|
149 | # aliases
|
---|
150 | docs.main docs.Main: $(PATH_TARGET)/docs.Main
|
---|
151 | if !defined(VBOX_ONLY_DOCS)
|
---|
152 | docs: $(PATH_TARGET)/docs.Main
|
---|
153 | endif
|
---|
154 |
|
---|
155 |
|
---|
156 | #
|
---|
157 | # Some SDK bit.
|
---|
158 | #
|
---|
159 | INSTALLS += VBox-main-xidl
|
---|
160 | VBox-main-xidl_INST = $(INST_SDK)bindings/
|
---|
161 | VBox-main-xidl_SOURCES = $(VBOX_XIDL_FILE_SRC)
|
---|
162 |
|
---|
163 | ifdef VBOX_WITH_PYTHON
|
---|
164 |
|
---|
165 | # or to some subdir?
|
---|
166 | VBOX_PYTHON_CONSTANTS = $(PATH_TARGET)/VirtualBox_constants.py
|
---|
167 |
|
---|
168 | INSTALLS += VBox-python-glue
|
---|
169 | VBox-python-glue_INST = $(INST_SDK)installer
|
---|
170 | VBox-python-glue_SOURCES = glue/vboxapi.py=>vboxapi/__init__.py \
|
---|
171 | $(VBOX_PYTHON_CONSTANTS)=>vboxapi/VirtualBox_constants.py
|
---|
172 |
|
---|
173 | $(VBOX_PYTHON_CONSTANTS): $(VBOX_PATH_MAIN_SRC)/glue/constants-python.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
174 | $(call MSG_TOOL,xsltproc,Python constants,$<,$@)
|
---|
175 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
|
---|
176 |
|
---|
177 | endif # VBOX_WITH_PYTHON
|
---|
178 |
|
---|
179 | ifndef VBOX_ONLY_SDK # Note this goes on for *very* long
|
---|
180 |
|
---|
181 | #
|
---|
182 | # Generate SchemaDefs.h and SchemaDefs.cpp from XML Schema
|
---|
183 | # These two files are used by both VBoxC and VBoxSVC.
|
---|
184 | #
|
---|
185 | BLDDIRS += $(PATH_TARGET)/Main
|
---|
186 | VBOX_XML_SCHEMADEFS_H = $(PATH_TARGET)/Main/SchemaDefs.h
|
---|
187 | VBOX_XML_SCHEMADEFS_CPP = $(PATH_TARGET)/Main/SchemaDefs.cpp
|
---|
188 | VBOX_XML_SCHEMADEFS_XSL = $(VBOX_PATH_MAIN_SRC)/xml/SchemaDefs.xsl
|
---|
189 |
|
---|
190 | testschemadefs: $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
191 |
|
---|
192 |
|
---|
193 | #
|
---|
194 | # VBoxSVC executable
|
---|
195 | #
|
---|
196 | PROGRAMS += VBoxSVC
|
---|
197 | VBoxSVC_TEMPLATE = VBOXMAINEXE
|
---|
198 | VBoxSVC_DEFS = \
|
---|
199 | VBOX_MAIN_SETTINGS_ADDONS \
|
---|
200 | $(VBOX_MAIN_DEFS) \
|
---|
201 | $(if $(VBOX_WITH_VBOXSDL),VBOX_WITH_VBOXSDL,) \
|
---|
202 | $(if $(VBOX_WITH_VRDP),VBOX_WITH_VRDP,) \
|
---|
203 | $(if $(VBOX_WITH_HEADLESS),VBOX_WITH_HEADLESS,) \
|
---|
204 | $(if $(VBOX_WITH_QTGUI),VBOX_WITH_QTGUI,) \
|
---|
205 | $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
|
---|
206 | $(if $(VBOX_MAIN_RELEASE_LOG),VBOX_MAIN_RELEASE_LOG LOG_ENABLED,) \
|
---|
207 | $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
|
---|
208 | $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
|
---|
209 | $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
|
---|
210 | $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS,) \
|
---|
211 | $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
|
---|
212 | $(if $(VBOX_WITH_AHCI),VBOX_WITH_AHCI,) \
|
---|
213 | $(if $(VBOX_WITH_LSILOGIC),VBOX_WITH_LSILOGIC,) \
|
---|
214 | $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
|
---|
215 | $(if $(VBOX_WITH_RESOURCE_USAGE_API),VBOX_WITH_RESOURCE_USAGE_API,) \
|
---|
216 | $(if $(VBOX_WITH_PDM_ASYNC_COMPLETION),VBOX_WITH_PDM_ASYNC_COMPLETION,) \
|
---|
217 | $(if $(VBOX_WITH_DBUS),VBOX_WITH_DBUS,) \
|
---|
218 | $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,)
|
---|
219 | ifdef VBOX_WITH_USB
|
---|
220 | VBoxSVC_DEFS += \
|
---|
221 | VBOX_WITH_USB \
|
---|
222 | $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI,) \
|
---|
223 | $(if $(VBOX_WITH_NEW_USB_CODE_ON_DARWIN),VBOX_WITH_NEW_USB_CODE_ON_DARWIN,) \
|
---|
224 | $(if $(VBOX_WITH_NEW_USB_CODE_ON_SOLARIS),VBOX_WITH_NEW_USB_CODE_ON_SOLARIS,)
|
---|
225 | endif
|
---|
226 | VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
|
---|
227 | VBoxSVC_DEFS.win.x86 += _WIN32_WINNT=0x0500
|
---|
228 | VBoxSVC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
|
---|
229 | # Try to load and use libhal at runtime for probing removable media
|
---|
230 | # VBoxSVC_DEFS.linux += VBOX_USE_LIBHAL
|
---|
231 | VBoxSVC_DEFS.solaris += VBOX_USE_LIBHAL
|
---|
232 | VBoxSVC_DEFS.freebsd += VBOX_USE_LIBHAL
|
---|
233 | ifdef VBOX_SOLARIS_NSL_RESOLVED
|
---|
234 | VBoxSVC_DEFS.solaris += VBOX_SOLARIS_NSL_RESOLVED
|
---|
235 | endif
|
---|
236 |
|
---|
237 | VBoxSVC_CXXFLAGS = $(filter-out -Wno-unused,$(TEMPLATE_VBOXMAINEXE_CXXFLAGS))
|
---|
238 | ## @todo We're disabling optimizations on FreeBSD to work around strange linker
|
---|
239 | # errors in release builds. Figure out why and how to work around it in a
|
---|
240 | # more optimal fashion.
|
---|
241 | VBoxSVC_CXXFLAGS.freebsd = -O0
|
---|
242 |
|
---|
243 | VBoxSVC_INCS = \
|
---|
244 | include \
|
---|
245 | $(PATH_VBoxSVC) \
|
---|
246 | $(dir $(VBOX_XML_SCHEMADEFS_H)) \
|
---|
247 | .
|
---|
248 | VBoxSVC_INCS.win = \
|
---|
249 | $(PATH_VBoxCOM)
|
---|
250 | ifdef VBOX_WITH_USB
|
---|
251 | VBoxSVC_INCS.os2 = \
|
---|
252 | $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
|
---|
253 | endif
|
---|
254 |
|
---|
255 | VBoxSVC_LIBS += \
|
---|
256 | $(LIB_DDU)
|
---|
257 | VBoxSVC_LIBS.darwin = \
|
---|
258 | $(LIB_VMM) \
|
---|
259 | $(LIB_REM)
|
---|
260 | VBoxSVC_LIBS.solaris = \
|
---|
261 | adm \
|
---|
262 | nsl
|
---|
263 | ifdef VBOX_WITH_NETFLT
|
---|
264 | ifdef VBOX_SOLARIS_NSL_RESOLVED
|
---|
265 | VBoxSVC_LIBS.solaris += devinfo
|
---|
266 | endif
|
---|
267 | VBoxSVC_LIBS.solaris += socket
|
---|
268 | endif
|
---|
269 | ifdef VBOX_WITH_USB
|
---|
270 | VBoxSVC_LIBS.solaris += \
|
---|
271 | devinfo
|
---|
272 | endif
|
---|
273 |
|
---|
274 | VBoxSVC_INTERMEDIATES = \
|
---|
275 | $(VBOX_MAIN_PREREQS) \
|
---|
276 | $(VBOX_XML_SCHEMADEFS_H)
|
---|
277 |
|
---|
278 | VBoxSVC_SOURCES = \
|
---|
279 | Global.cpp \
|
---|
280 | Logging.cpp \
|
---|
281 | AutoLock.cpp \
|
---|
282 | Matching.cpp \
|
---|
283 | xml/Settings.cpp \
|
---|
284 | VirtualBoxBase.cpp \
|
---|
285 | VirtualBoxErrorInfoImpl.cpp \
|
---|
286 | VirtualBoxImpl.cpp \
|
---|
287 | ApplianceImpl.cpp \
|
---|
288 | xml/ovfreader.cpp \
|
---|
289 | VFSExplorerImpl.cpp \
|
---|
290 | MachineImpl.cpp \
|
---|
291 | SnapshotImpl.cpp \
|
---|
292 | MediumImpl.cpp \
|
---|
293 | HardDiskImpl.cpp \
|
---|
294 | HardDiskAttachmentImpl.cpp \
|
---|
295 | HardDiskFormatImpl.cpp \
|
---|
296 | ProgressImpl.cpp \
|
---|
297 | DVDDriveImpl.cpp \
|
---|
298 | FloppyDriveImpl.cpp \
|
---|
299 | HostImpl.cpp \
|
---|
300 | HostDVDDriveImpl.cpp \
|
---|
301 | HostFloppyDriveImpl.cpp \
|
---|
302 | HostNetworkInterfaceImpl.cpp \
|
---|
303 | DHCPServerImpl.cpp \
|
---|
304 | DHCPServerRunner.cpp \
|
---|
305 | GuestOSTypeImpl.cpp \
|
---|
306 | NetworkAdapterImpl.cpp \
|
---|
307 | SerialPortImpl.cpp \
|
---|
308 | ParallelPortImpl.cpp \
|
---|
309 | USBControllerImpl.cpp \
|
---|
310 | StorageControllerImpl.cpp \
|
---|
311 | AudioAdapterImpl.cpp \
|
---|
312 | SharedFolderImpl.cpp \
|
---|
313 | SystemPropertiesImpl.cpp \
|
---|
314 | BIOSSettingsImpl.cpp \
|
---|
315 | Version.cpp \
|
---|
316 | HostPower.cpp \
|
---|
317 | $(if $(VBOX_WITH_VRDP),VRDPServerImpl.cpp,) \
|
---|
318 | $(if $(VBOX_WITH_XPCOM),xpcom/server.cpp,) \
|
---|
319 | $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
320 |
|
---|
321 | VBoxSVC_SOURCES.darwin = \
|
---|
322 | darwin/iokit.cpp \
|
---|
323 | darwin/HostPowerDarwin.cpp
|
---|
324 |
|
---|
325 | ifdef VBOX_WITH_CROGL
|
---|
326 | ifneq ($(KBUILD_TARGET),darwin)
|
---|
327 | VBoxSVC_SOURCES += generic/OpenGLTest.cpp
|
---|
328 | endif
|
---|
329 | VBoxSVC_SOURCES.darwin += darwin/OpenGLTestDarwin.cpp
|
---|
330 | endif
|
---|
331 |
|
---|
332 | VBoxSVC_SOURCES.win = \
|
---|
333 | win/svcmain.cpp \
|
---|
334 | win/svchlp.cpp \
|
---|
335 | win/HostPowerWin.cpp \
|
---|
336 | win/VBoxSVC.rc
|
---|
337 |
|
---|
338 | VBoxSVC_SOURCES.linux = \
|
---|
339 | linux/HostHardwareLinux.cpp
|
---|
340 |
|
---|
341 | ifdef VBOX_WITH_DBUS
|
---|
342 | VBoxSVC_SOURCES.linux += linux/vbox-dbus.cpp
|
---|
343 | endif
|
---|
344 |
|
---|
345 | VBoxSVC_SOURCES.solaris = \
|
---|
346 | linux/vbox-libhal.cpp \
|
---|
347 | solaris/DynLoadLibSolaris.cpp
|
---|
348 |
|
---|
349 | VBoxSVC_SOURCES.freebsd = \
|
---|
350 | linux/vbox-libhal.cpp
|
---|
351 |
|
---|
352 | ifdef VBOX_WITH_USB
|
---|
353 | VBoxSVC_SOURCES += \
|
---|
354 | USBDeviceFilterImpl.cpp \
|
---|
355 | USBProxyService.cpp \
|
---|
356 | HostUSBDeviceImpl.cpp
|
---|
357 | VBoxSVC_SOURCES.darwin += darwin/USBProxyServiceDarwin.cpp
|
---|
358 | VBoxSVC_SOURCES.linux += linux/USBProxyServiceLinux.cpp
|
---|
359 | VBoxSVC_SOURCES.os2 += os2/USBProxyServiceOs2.cpp
|
---|
360 | VBoxSVC_SOURCES.solaris += solaris/USBProxyServiceSolaris.cpp
|
---|
361 | VBoxSVC_SOURCES.win += win/USBProxyServiceWindows.cpp
|
---|
362 | endif
|
---|
363 |
|
---|
364 | ifdef VBOX_WITH_NETFLT
|
---|
365 | # Note! The includes from the TOOL has lower priority than the SDKs,
|
---|
366 | # since comdef.h is in both the DDK and VCC we want to make sure
|
---|
367 | # we're using the VCC since we're not using the DDK compiler/crt.
|
---|
368 | # Since this is potentially risky, restrict it to the source file
|
---|
369 | # needing it.
|
---|
370 | win/NetIf-win.cpp_INCS.win += $(PATH_TOOL_$(VBOX_VCC_TOOL)_INC)
|
---|
371 | VBoxSVC_LIBS.win += \
|
---|
372 | $(PATH_LIB)/WinNetConfig.lib \
|
---|
373 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
374 | $(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
|
---|
375 | ifdef VBOX_NETFLT_ONDEMAND_BIND
|
---|
376 | VBoxSVC_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
|
---|
377 | endif
|
---|
378 | endif
|
---|
379 | VBoxSVC_LDFLAGS.darwin = -framework IOKit -framework SystemConfiguration
|
---|
380 |
|
---|
381 | ifdef VBOX_WITH_CROGL
|
---|
382 | VBoxSVC_LDFLAGS.darwin += -framework OpenGL
|
---|
383 | endif
|
---|
384 |
|
---|
385 | ifeq ($(KBUILD_TYPE),debug)
|
---|
386 | VBoxSVC_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
|
---|
387 | endif
|
---|
388 |
|
---|
389 | ifdef VBOX_WITH_RESOURCE_USAGE_API
|
---|
390 | VBoxSVC_SOURCES += \
|
---|
391 | PerformanceImpl.cpp \
|
---|
392 | Performance.cpp
|
---|
393 | VBoxSVC_SOURCES.darwin += darwin/PerformanceDarwin.cpp
|
---|
394 | VBoxSVC_SOURCES.freebsd += freebsd/PerformanceFreeBSD.cpp
|
---|
395 | VBoxSVC_SOURCES.linux += linux/PerformanceLinux.cpp
|
---|
396 | VBoxSVC_SOURCES.os2 += os2/PerformanceOs2.cpp
|
---|
397 | VBoxSVC_SOURCES.solaris += solaris/PerformanceSolaris.cpp
|
---|
398 | VBoxSVC_SOURCES.win += win/PerformanceWin.cpp
|
---|
399 | VBoxSVC_LDFLAGS.darwin += -lproc
|
---|
400 | VBoxSVC_LDFLAGS.solaris += -lkstat
|
---|
401 | VBoxSVC_LDFLAGS.win += psapi.lib powrprof.lib
|
---|
402 | endif
|
---|
403 |
|
---|
404 | ifdef VBOX_WITH_HOSTNETIF_API
|
---|
405 | VBoxSVC_SOURCES.win += win/NetIf-win.cpp
|
---|
406 | VBoxSVC_SOURCES.linux += linux/NetIf-linux.cpp
|
---|
407 | VBoxSVC_SOURCES.os2 += os2/NetIf-os2.cpp
|
---|
408 | VBoxSVC_SOURCES.darwin += darwin/NetIf-darwin.cpp
|
---|
409 | VBoxSVC_SOURCES.solaris += solaris/NetIf-solaris.cpp
|
---|
410 | VBoxSVC_SOURCES.freebsd += freebsd/NetIf-freebsd.cpp
|
---|
411 | VBoxSVC_DEFS += VBOX_WITH_HOSTNETIF_API
|
---|
412 | if1of ($(KBUILD_TARGET), linux darwin solaris freebsd)
|
---|
413 | VBoxSVC_SOURCES += generic/NetIf-generic.cpp
|
---|
414 | endif
|
---|
415 | endif
|
---|
416 |
|
---|
417 | win/VBoxSVC.rc_INCS = $(PATH_VBoxSVC)
|
---|
418 | win/VBoxSVC.rc_DEPS = $(PATH_VBoxSVC)/VBoxSVC.rgs $(PATH_VBoxSVC)/VBoxSVC-icon.rc
|
---|
419 | win/VBoxSVC.rc_CLEAN = $(PATH_VBoxSVC)/VBoxSVC.rgs $(PATH_VBoxSVC)/VBoxSVC-icon.rc
|
---|
420 |
|
---|
421 | $$(PATH_VBoxSVC)/VBoxSVC-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$(@D))
|
---|
422 | $(APPEND) -t $@ '1 ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
|
---|
423 |
|
---|
424 | $$(PATH_VBoxSVC)/VBoxSVC.rgs: $(VBOX_PATH_MAIN_SRC)/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$(@D))
|
---|
425 | $(VBOX_XSLTPROC) --stringparam Module VBoxSVC -o $@ $< $(VBOX_XIDL_FILE)
|
---|
426 |
|
---|
427 | #
|
---|
428 | # Embed XML Schema files to VBoxSVC
|
---|
429 | #
|
---|
430 | VBOX_XML_SCHEMA_COMMON = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-common.xsd
|
---|
431 | VBOX_XML_SCHEMA.darwin = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-macosx.xsd
|
---|
432 | VBOX_XML_SCHEMA.linux = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-linux.xsd
|
---|
433 | VBOX_XML_SCHEMA.freebsd = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-freebsd.xsd
|
---|
434 | VBOX_XML_SCHEMA.win = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-windows.xsd
|
---|
435 | VBOX_XML_SCHEMA.os2 = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-os2.xsd
|
---|
436 | VBOX_XML_SCHEMA.solaris = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-solaris.xsd
|
---|
437 |
|
---|
438 | VBOX_XML_CONVERTER_TEMPLATE = $(VBOX_PATH_MAIN_SRC)/xml/SettingsConverter.xsl
|
---|
439 |
|
---|
440 | $$(PATH_VBoxSVC)/xml_VirtualBox_settings_xsd.h: $(VBOX_XML_SCHEMA.$(KBUILD_TARGET)) $(VBOX_BIN2C)
|
---|
441 | $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
|
---|
442 | $(QUIET)$(VBOX_BIN2C) _xml_VirtualBox_settings_xsd $< $@
|
---|
443 |
|
---|
444 | $$(PATH_VBoxSVC)/xml_VirtualBox_settings_common_xsd.h: $(VBOX_XML_SCHEMA_COMMON) $(VBOX_BIN2C)
|
---|
445 | $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
|
---|
446 | $(QUIET)$(VBOX_BIN2C) _xml_VirtualBox_settings_common_xsd $< $@
|
---|
447 |
|
---|
448 | $$(PATH_VBoxSVC)/xml_SettingsConverter_xsl.h: $(VBOX_XML_CONVERTER_TEMPLATE) $(VBOX_BIN2C)
|
---|
449 | $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
|
---|
450 | $(QUIET)$(VBOX_BIN2C) _xml_SettingsConverter_xsl $< $@
|
---|
451 |
|
---|
452 | $(VBOX_XML_SCHEMADEFS_H): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET)) $(VBOX_XML_SCHEMA_COMMON) | $$(dir $$@)
|
---|
453 | $(call MSG_GENERATE,SchemaDefs,$@,$<)
|
---|
454 | $(VBOX_XSLTPROC) --stringparam mode declare -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET))
|
---|
455 |
|
---|
456 | $(VBOX_XML_SCHEMADEFS_CPP): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET)) $(VBOX_XML_SCHEMA_COMMON) | $$(dir $$@)
|
---|
457 | $(call MSG_GENERATE,SchemaDefs,$@,$<)
|
---|
458 | $(VBOX_XSLTPROC) --stringparam mode define -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET))
|
---|
459 |
|
---|
460 | OTHER_CLEAN += $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
461 |
|
---|
462 |
|
---|
463 | ifdef VBOX_WITH_CROGL
|
---|
464 | ifneq ($(KBUILD_TARGET),darwin)
|
---|
465 | #
|
---|
466 | # VBoxTestOGL - OpenGL support test app.
|
---|
467 | #
|
---|
468 | PROGRAMS += VBoxTestOGL
|
---|
469 | VBoxTestOGL_TEMPLATE = VBOXMAINEXE
|
---|
470 | VBoxTestOGL_SOURCES = generic/OpenGLTestApp.cpp
|
---|
471 | VBoxTestOGL_LIBS = \
|
---|
472 | $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
|
---|
473 | $(VBOX_LIB_OGL_HOSTCRUTIL) \
|
---|
474 | $(LIB_RUNTIME)
|
---|
475 | endif
|
---|
476 | endif
|
---|
477 |
|
---|
478 |
|
---|
479 | ifdef VBOX_WITH_XPCOM
|
---|
480 | #
|
---|
481 | # VBoxSVCM - VBoxSVC wrapper module
|
---|
482 | #
|
---|
483 | DLLS += VBoxSVCM
|
---|
484 | VBoxSVCM_TEMPLATE = VBOXMAINCOMP
|
---|
485 | VBoxSVCM_DEFS = IN_RING3 $(VBOX_MAIN_DEFS)
|
---|
486 | ifdef VBOX_WITH_HARDENING
|
---|
487 | VBoxSVCM_DEFS += VBOX_WITH_HARDENING
|
---|
488 | endif
|
---|
489 | VBoxSVCM_INCS = \
|
---|
490 | include \
|
---|
491 | $(PATH_VBoxC) \
|
---|
492 | .
|
---|
493 | VBoxSVCM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
|
---|
494 | VBoxSVCM_SOURCES = \
|
---|
495 | xpcom/server_module.cpp
|
---|
496 | VBoxSVCM_LDFLAGS.darwin = \
|
---|
497 | -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxSVCM.dylib \
|
---|
498 | -exported_symbols_list $(PATH_VBoxSVCM)/VBoxSVCM.def
|
---|
499 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
500 | VBoxSVCM_ORDERDEPS += $(PATH_VBoxSVCM)/VBoxSVCM.def
|
---|
501 | VBoxSVCM_CLEAN += $(PATH_VBoxSVCM)/VBoxSVCM.def
|
---|
502 | $$(PATH_VBoxSVCM)/VBoxSVCM.def:
|
---|
503 | $(RM) -f $@
|
---|
504 | $(APPEND) $@ _NSGetModule
|
---|
505 | endif
|
---|
506 | VBoxSVCM_INTERMEDIATES += $(VBOX_IDL_HEADER.XPCOM)
|
---|
507 |
|
---|
508 | endif # VBOX_WITH_XPCOM
|
---|
509 |
|
---|
510 | #
|
---|
511 | # VBoxC module
|
---|
512 | #
|
---|
513 | DLLS += VBoxC
|
---|
514 | VBoxC_TEMPLATE = VBOXMAINCOMP
|
---|
515 | VBoxC_DEFS = \
|
---|
516 | IN_RING3 \
|
---|
517 | $(VBOX_MAIN_DEFS) \
|
---|
518 | VBOX_COM_INPROC \
|
---|
519 | $(if $(VBOX_WITH_VRDP),VBOX_WITH_VRDP,) \
|
---|
520 | $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
|
---|
521 | $(if $(VBOX_MAIN_RELEASE_LOG),VBOX_MAIN_RELEASE_LOG LOG_ENABLED,) \
|
---|
522 | $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
|
---|
523 | $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
|
---|
524 | $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
|
---|
525 | $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS,) \
|
---|
526 | $(if $(VBOX_WITH_CROSSBOW),VBOX_WITH_CROSSBOW,) \
|
---|
527 | $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
|
---|
528 | $(if $(VBOX_WITH_EFI),VBOX_WITH_EFI,) \
|
---|
529 | $(if $(VBOX_WITH_HPET),VBOX_WITH_HPET,) \
|
---|
530 | $(if $(VBOX_WITH_SMC),VBOX_WITH_SMC,) \
|
---|
531 | $(if $(VBOX_WITH_LPC),VBOX_WITH_LPC,) \
|
---|
532 | $(if $(VBOX_WITH_PDM_ASYNC_COMPLETION),VBOX_WITH_PDM_ASYNC_COMPLETION,)
|
---|
533 | ifdef VBOX_WITH_USB
|
---|
534 | VBoxC_DEFS += \
|
---|
535 | VBOX_WITH_USB \
|
---|
536 | $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI,)
|
---|
537 | endif
|
---|
538 | ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
539 | VBoxC_DEFS += VBOX_WITH_VIDEOHWACCEL
|
---|
540 | endif
|
---|
541 |
|
---|
542 | ifdef VBOX_DYNAMIC_NET_ATTACH
|
---|
543 | VBoxC_DEFS += VBOX_DYNAMIC_NET_ATTACH
|
---|
544 | endif
|
---|
545 |
|
---|
546 | VBoxC_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE
|
---|
547 | VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
|
---|
548 | VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
|
---|
549 |
|
---|
550 | VBoxC_INCS = \
|
---|
551 | include \
|
---|
552 | $(PATH_VBoxC) \
|
---|
553 | $(dir $(VBOX_XML_SCHEMADEFS_H))
|
---|
554 | VBoxC_INCS.win = \
|
---|
555 | $(PATH_VBoxCOM) \
|
---|
556 | .
|
---|
557 |
|
---|
558 | VBoxC_LDFLAGS.darwin = \
|
---|
559 | -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxC.dylib \
|
---|
560 | -exported_symbols_list $(PATH_VBoxC)/VBoxC.def
|
---|
561 | ifdef VBOX_USE_VCC80
|
---|
562 | VBoxC_LDFLAGS.win = /MANIFEST
|
---|
563 | endif
|
---|
564 |
|
---|
565 | VBoxC_LIBS += \
|
---|
566 | $(LIB_VMM) \
|
---|
567 | $(LIB_REM)
|
---|
568 |
|
---|
569 | ifdef VBOX_WITH_NETFLT
|
---|
570 | VBoxC_LIBS.win += $(PATH_LIB)/WinNetConfig.lib \
|
---|
571 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
572 | $(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
|
---|
573 | endif
|
---|
574 |
|
---|
575 | VBoxC_INTERMEDIATES = \
|
---|
576 | $(VBOX_MAIN_PREREQS) \
|
---|
577 | $(VBOX_XML_SCHEMADEFS_H)
|
---|
578 |
|
---|
579 | VBoxC_SOURCES = \
|
---|
580 | Global.cpp \
|
---|
581 | Logging.cpp \
|
---|
582 | AutoLock.cpp \
|
---|
583 | VBoxDll.cpp \
|
---|
584 | Version.cpp \
|
---|
585 | USBDeviceImpl.cpp \
|
---|
586 | RemoteUSBDeviceImpl.cpp \
|
---|
587 | VirtualBoxBase.cpp \
|
---|
588 | VirtualBoxErrorInfoImpl.cpp \
|
---|
589 | ProgressImpl.cpp \
|
---|
590 | SharedFolderImpl.cpp \
|
---|
591 | SessionImpl.cpp \
|
---|
592 | ConsoleImpl.cpp \
|
---|
593 | ConsoleImpl2.cpp \
|
---|
594 | ConsoleVRDPServer.cpp \
|
---|
595 | GuestImpl.cpp \
|
---|
596 | KeyboardImpl.cpp \
|
---|
597 | MouseImpl.cpp \
|
---|
598 | DisplayImpl.cpp \
|
---|
599 | MachineDebuggerImpl.cpp \
|
---|
600 | VBoxDriversRegister.cpp \
|
---|
601 | AudioSnifferInterface.cpp \
|
---|
602 | VMMDevInterface.cpp \
|
---|
603 | $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
604 | VBoxC_SOURCES.win = \
|
---|
605 | win/dllmain.cpp \
|
---|
606 | win/VBoxC.def \
|
---|
607 | win/VBoxC.rc
|
---|
608 |
|
---|
609 | ifdef VBOX_WITH_XPCOM
|
---|
610 | VBoxC_SOURCES += \
|
---|
611 | xpcom/module.cpp
|
---|
612 | endif
|
---|
613 |
|
---|
614 | ifdef VBOX_WITH_HGCM
|
---|
615 | VBoxC_SOURCES += \
|
---|
616 | hgcm/HGCMObjects.cpp \
|
---|
617 | hgcm/HGCMThread.cpp \
|
---|
618 | hgcm/HGCM.cpp
|
---|
619 | endif
|
---|
620 |
|
---|
621 | ifdef VBOX_WITH_USB
|
---|
622 | VBoxC_SOURCES += \
|
---|
623 | RemoteUSBBackend.cpp
|
---|
624 | endif
|
---|
625 |
|
---|
626 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
627 | VBoxC_ORDERDEPS += $(PATH_VBoxC)/VBoxC.def
|
---|
628 | VBoxC_CLEAN += $(PATH_VBoxC)/VBoxC.def
|
---|
629 | $$(PATH_VBoxC)/VBoxC.def: $(MAKEFILE_CURRENT)
|
---|
630 | $(RM) -f $@
|
---|
631 | $(APPEND) $@ _NSGetModule
|
---|
632 | $(APPEND) $@ _VBoxDriversRegister
|
---|
633 | endif
|
---|
634 |
|
---|
635 | ConsoleImpl.cpp_DEFS = \
|
---|
636 | VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
|
---|
637 |
|
---|
638 |
|
---|
639 | Version.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
640 | Version.cpp_DEPS = $(VBOX_SVN_REV_KMK)
|
---|
641 |
|
---|
642 | win/VBoxC.rc_DEPS = $(PATH_VBoxC)/VBoxC.rgs $(PATH_VBoxCOM)/VirtualBox.tlb
|
---|
643 | VBoxC_CLEAN.win += $(PATH_VBoxC)/VBoxC.rgs
|
---|
644 |
|
---|
645 | $$(PATH_VBoxC)/VBoxC.rgs: $(VBOX_PATH_MAIN_SRC)/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(PATH_VBoxC)/
|
---|
646 | $(VBOX_XSLTPROC) --stringparam Module VBoxC -o $@ $< $(VBOX_XIDL_FILE)
|
---|
647 |
|
---|
648 |
|
---|
649 | #
|
---|
650 | # VBoxCOM - COM Abstraction Layer library
|
---|
651 | #
|
---|
652 | LIBRARIES += VBoxCOM
|
---|
653 | VBoxCOM_TEMPLATE = VBOXMAINLIB
|
---|
654 | VBoxCOM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
|
---|
655 | VBoxCOM_SOURCES = \
|
---|
656 | glue/com.cpp \
|
---|
657 | glue/initterm.cpp \
|
---|
658 | glue/string.cpp \
|
---|
659 | glue/EventQueue.cpp \
|
---|
660 | glue/ErrorInfo.cpp \
|
---|
661 | glue/errorprint.cpp \
|
---|
662 | glue/SupportErrorInfo.cpp \
|
---|
663 | glue/VirtualBoxErrorInfo.cpp
|
---|
664 | ifeq ($(KBUILD_TARGET),win)
|
---|
665 | VBoxCOM_DEFS.x86 += _WIN32_WINNT=0x0500
|
---|
666 | VBoxCOM_DEFS.amd64 += _WIN32_WINNT=0x0510
|
---|
667 | VBoxCOM_SOURCES += \
|
---|
668 | $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
669 | else # !win
|
---|
670 | VBoxCOM_INCS += \
|
---|
671 | include
|
---|
672 | VBoxCOM_SOURCES += \
|
---|
673 | xpcom/helpers.cpp
|
---|
674 | endif # !win
|
---|
675 |
|
---|
676 |
|
---|
677 | endif # !VBOX_ONLY_SDK (the ifndef is far above)
|
---|
678 |
|
---|
679 |
|
---|
680 | #
|
---|
681 | # Installs com related thing(s) to bin.
|
---|
682 | #
|
---|
683 | INSTALLS.win += VBoxMain-com-inst
|
---|
684 | VBoxMain-com-inst_INST = $(INST_BIN)
|
---|
685 | VBoxMain-com-inst_SOURCES = \
|
---|
686 | win/comregister.cmd
|
---|
687 |
|
---|
688 |
|
---|
689 | if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "linux"
|
---|
690 | #
|
---|
691 | # Installs linux/hardening related things to components.
|
---|
692 | #
|
---|
693 | INSTALLS.linux += VBoxMain-hardening-inst
|
---|
694 | VBoxMain-hardening-inst_INST = $(INST_BIN)components/
|
---|
695 | VBoxMain-hardening-inst_SYMLINKS = \
|
---|
696 | VBoxDDU.so=>../VBoxDDU.so \
|
---|
697 | VBoxREM.so=>../VBoxREM.so \
|
---|
698 | VBoxRT.so=>../VBoxRT.so \
|
---|
699 | VBoxVMM.so=>../VBoxVMM.so \
|
---|
700 | VBoxXPCOM.so=>../VBoxXPCOM.so
|
---|
701 | endif
|
---|
702 |
|
---|
703 |
|
---|
704 | # generate rules
|
---|
705 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
706 |
|
---|
707 |
|
---|
708 |
|
---|
709 | #
|
---|
710 | # Additions rules.
|
---|
711 | #
|
---|
712 |
|
---|
713 | ## @todo this hack ain't cutting it any longer. (the file name is abspath'ed since ages now.)
|
---|
714 | xpcom/helpers.cpp: $(VBOX_IDL_TYPELIB.XPCOM)
|
---|
715 |
|
---|
716 | $(VBOX_IDL_FILE.XPCOM): $(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
717 | $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
|
---|
718 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
|
---|
719 |
|
---|
720 | $(VBOX_IDL_TYPELIB.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
|
---|
721 | $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
|
---|
722 | $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m typelib -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
|
---|
723 | $(CHMOD) 0644 $@
|
---|
724 | ## @todo ^^^^^^^^^^^^ fix horrible hack
|
---|
725 |
|
---|
726 | $(VBOX_IDL_HEADER.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
|
---|
727 | $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
|
---|
728 | $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m header -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
|
---|
729 |
|
---|
730 |
|
---|
731 | VBOX_MAIN_IDL ?= $(EXEC_X86_WIN32) $(call VBOX_FN_MAKE_WIN_PATH,$(firstword $(wildcard \
|
---|
732 | $(PATH_SDK_WINPSDK_BIN)/Midl.Exe\
|
---|
733 | $(PATH_SDK_WINPSDK)/Bin/Midl.Exe\
|
---|
734 | $(PATH_DEVTOOLS)/win.x86/bin/midl.exe\
|
---|
735 | ) Sorry_Cannot_Find_The_Midl_Compiler_In_The_PSDK))
|
---|
736 | IDL_DEFS = /nologo
|
---|
737 | ifdef VBOX_WITH_VRDP
|
---|
738 | IDL_DEFS += /D VBOX_WITH_VRDP
|
---|
739 | endif
|
---|
740 |
|
---|
741 | $(VBOX_IDL_FILE.MSCOM): $(VBOX_PATH_MAIN_SRC)/idl/midl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
|
---|
742 | $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
|
---|
743 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
|
---|
744 |
|
---|
745 | # Aliases for testing purposes.
|
---|
746 | ifdef VBOX_WITH_XPCOM
|
---|
747 | testidl: $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM)
|
---|
748 | testidlhdr: $(VBOX_IDL_HEADER.XPCOM)
|
---|
749 | else
|
---|
750 | testidl: $(VBOX_IDL_FILE.MSCOM) $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
751 | endif
|
---|
752 |
|
---|
753 |
|
---|
754 | ## @todo r=bird: last changes to this rule showed incorrect dependencies here as it broke testcase (see testboxwin2).
|
---|
755 | # This is kind of obvious when looking at the rule, because it's (a) not specifying all it output
|
---|
756 | # and (b) generating more stuff *after* the main target has been completed.
|
---|
757 | #
|
---|
758 | # What needs to be done is to not depend on _i.c in the object subdir, but on all the final outputs.
|
---|
759 | $(PATH_VBoxCOM)/VirtualBox_i.c \
|
---|
760 | + $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c \
|
---|
761 | + $(PATH_VBoxCOM)/VirtualBox.h \
|
---|
762 | + $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h \
|
---|
763 | + $(PATH_VBoxCOM)/VirtualBox.tlb \
|
---|
764 | + $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox.tlb: $(VBOX_IDL_FILE.MSCOM) | $(call DIRDEP,$(PATH_VBoxCOM))
|
---|
765 | $(VBOX_MAIN_IDL) $(IDL_DEFS) \
|
---|
766 | /out $(call VBOX_FN_MAKE_WIN_PATH,$(PATH_VBoxCOM)) \
|
---|
767 | /cpp_cmd $(subst $(EXEC_X86_WIN32),,$(call VBOX_FN_MAKE_WIN_PATH,$(TOOL_$(VBOX_VCC_TOOL)_CC))) \
|
---|
768 | /I $(call VBOX_FN_MAKE_WIN_PATH,$(PATH_SDK_WINPSDK_INC)) \
|
---|
769 | /I idl \
|
---|
770 | $(call VBOX_FN_MAKE_WIN_PATH,$<)
|
---|
771 | $(MKDIR) -p $(VBOX_PATH_SDK)/bindings/mscom/include
|
---|
772 | $(CP) $(PATH_VBoxCOM)/VirtualBox.h $(VBOX_PATH_SDK)/bindings/mscom/include
|
---|
773 | $(MKDIR) -p $(VBOX_PATH_SDK)/bindings/mscom/lib
|
---|
774 | $(CP) $(PATH_VBoxCOM)/VirtualBox.tlb $(VBOX_PATH_SDK)/bindings/mscom/lib
|
---|
775 | $(CP) $(PATH_VBoxCOM)/VirtualBox_i.c $(VBOX_PATH_SDK)/bindings/mscom/lib
|
---|
776 |
|
---|
777 | #
|
---|
778 | # Translation stuff
|
---|
779 | #
|
---|
780 | VBoxSVC_VBOX_HEADERS = \
|
---|
781 | include/collection.h \
|
---|
782 | include/MachineImpl.h \
|
---|
783 | include/HostDVDDriveImpl.h \
|
---|
784 | include/HostFloppyDriveImpl.h
|
---|
785 | VBoxSVC_VBOX_TRANSLATIONS = \
|
---|
786 | nls/VBoxSVC_de.ts
|
---|
787 |
|
---|
788 | VBoxC_VBOX_HEADERS = \
|
---|
789 | include/ConsoleImpl.h
|
---|
790 | VBoxC_VBOX_TRANSLATIONS = \
|
---|
791 | nls/VBoxC_de.ts
|
---|
792 |
|
---|
793 | updatenls::
|
---|
794 | $(VBOX_LUPDATE) $(VBoxSVC_SOURCES) $(VBoxSVC_VBOX_HEADERS) -ts $(VBoxSVC_VBOX_TRANSLATIONS)
|
---|
795 | $(VBOX_LUPDATE) $(VBoxC_SOURCES) $(VBoxC_VBOX_HEADERS) -ts $(VBoxC_VBOX_TRANSLATIONS)
|
---|
796 |
|
---|
797 | testconverter:: $(VBOX_USER_HOME)/VirtualBox.xml
|
---|
798 | $(call MSG_TOOL,xsltproc,Test Settings Converter,$<,$(VBOX_USER_HOME)/VirtualBox.xml.test)
|
---|
799 | $(QUIET)$(VBOX_XSLTPROC) -o $(VBOX_USER_HOME)/VirtualBox.xml.test xml/SettingsConverter.xsl $<
|
---|
800 |
|
---|
801 | testconverter2:: $(VBOX_USER_HOME)/Machines/dos/dos.xml
|
---|
802 | $(call MSG_TOOL,xsltproc,Test Settings Converter,$<,$<.test)
|
---|
803 | $(QUIET)$(VBOX_XSLTPROC) -o $<.test xml/SettingsConverter.xsl $<
|
---|