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