1 | # $Id: Makefile.kmk 11820 2008-08-29 14:09:39Z 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 | ifdef VBOX_KBUILD_HACKING
|
---|
23 | SUB_DEPTH = ../../..
|
---|
24 | else
|
---|
25 | DEPTH = ../../..
|
---|
26 | endif
|
---|
27 | include $(KBUILD_PATH)/subheader.kmk
|
---|
28 |
|
---|
29 | # Include sub-makefile(s).
|
---|
30 | ifdef VBOX_WITH_WEBSERVICES
|
---|
31 | include $(PATH_SUB_CURRENT)/webservice/Makefile.kmk
|
---|
32 | endif
|
---|
33 | include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
|
---|
34 |
|
---|
35 | # targets++
|
---|
36 | ifndef VBOX_ONLY_SDK
|
---|
37 | LIBRARIES += VBoxCOM
|
---|
38 | DLLS += VBoxSettings VBoxC
|
---|
39 | PROGRAMS += VBoxSVC
|
---|
40 | else
|
---|
41 | PATH_VBoxCOM = $(PATH_BIN)/sdk/mscom/
|
---|
42 | BLDDIRS += $(PATH_BIN)/sdk/mscom $(PATH_BIN)/components
|
---|
43 | endif #!VBOX_ONLY_SDK
|
---|
44 |
|
---|
45 | OTHERS += $(VBOX_PATH_SDK)/bindings/VirtualBox.xidl
|
---|
46 | VBOX_MAIN_DEFS =
|
---|
47 | ifneq ($(KBUILD_TARGET),win)
|
---|
48 | ifndef VBOX_WITH_XPCOM
|
---|
49 | $(error "VBox: VBOX_WITH_XPCOM isn't defined")
|
---|
50 | endif
|
---|
51 | ifndef VBOX_ONLY_SDK
|
---|
52 | DLLS += VBoxSVCM
|
---|
53 | endif
|
---|
54 | ifneq ($(KBUILD_TARGET),os2)
|
---|
55 | VBOX_MAIN_DEFS+= VBOX_WITH_SYS_V_IPC_SESSION_WATCHER
|
---|
56 | endif
|
---|
57 | ifn1of ($(KBUILD_TARGET), darwin)
|
---|
58 | VBOX_MAIN_DEFS += VBOX_WITH_UNIXY_TAP_NETWORKING
|
---|
59 | endif
|
---|
60 | endif
|
---|
61 | ifdef VBOX_WITH_GUEST_PROPS
|
---|
62 | VBOX_MAIN_DEFS += VBOX_WITH_GUEST_PROPS
|
---|
63 | endif
|
---|
64 | if1of ($(KBUILD_TARGET), linux freebsd solaris)
|
---|
65 | VBOX_MAIN_DEFS += VBOX_MAIN_USE_SEMRW
|
---|
66 | #else
|
---|
67 | # if1of ($(VBOX_VERSION_BUILD),1 3 5 7 9)
|
---|
68 | # VBOX_MAIN_DEFS += VBOX_MAIN_AUTOLOCK_TRAP
|
---|
69 | # endif
|
---|
70 | endif
|
---|
71 |
|
---|
72 | ## @todo eliminate or expand VBOX_MAIN_DEFS.
|
---|
73 |
|
---|
74 | #PROGRAMS += tstCFGLdr
|
---|
75 |
|
---|
76 | ifeq ($(KBUILD_TARGET),win)
|
---|
77 | INSTALLS += VBoxMain-com-inst
|
---|
78 | IDLFILE = $(VBOX_PATH_SDK)/bindings/mscom/idl/VirtualBox.idl
|
---|
79 | OTHER_CLEAN += \
|
---|
80 | $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h \
|
---|
81 | $(IDLFILE) \
|
---|
82 | $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox.tlb \
|
---|
83 | $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c \
|
---|
84 | $(PATH_VBoxCOM)/VirtualBox.h \
|
---|
85 | $(PATH_VBoxCOM)/VirtualBox_i.c \
|
---|
86 | $(PATH_VBoxCOM)/VirtualBox.tlb
|
---|
87 | VBOX_MAIN_PREREQS = $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
88 | BLDDIRS += $(VBOX_PATH_SDK)/bindings/mscom/idl
|
---|
89 | else # xpcom
|
---|
90 | IDLFILE = $(VBOX_PATH_SDK)/bindings/xpcom/idl/VirtualBox_XPCOM.idl
|
---|
91 | IDLTYPELIB = $(PATH_BIN)/components/VirtualBox_XPCOM.xpt
|
---|
92 | IDLHEADER = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
93 | OTHERS += $(IDLTYPELIB)
|
---|
94 | OTHER_CLEAN += \
|
---|
95 | $(IDLFILE) \
|
---|
96 | $(IDLHEADER) \
|
---|
97 | $(IDLTYPELIB)
|
---|
98 |
|
---|
99 | VBOX_MAIN_PREREQS = $(IDLTYPELIB) $(IDLHEADER)
|
---|
100 | BLDDIRS += $(VBOX_PATH_SDK)/bindings/xpcom/idl
|
---|
101 | endif # xpcom
|
---|
102 |
|
---|
103 |
|
---|
104 | VBOX_PATH_MAIN_SRC := $(PATH_SUB_CURRENT)
|
---|
105 |
|
---|
106 | #
|
---|
107 | # The Main API documentation
|
---|
108 | #
|
---|
109 | docs: $(PATH_TARGET)/docs.Main
|
---|
110 |
|
---|
111 | $(PATH_TARGET)/docs.Main: \
|
---|
112 | $(VBOX_PATH_MAIN_SRC)/Doxyfile.Main \
|
---|
113 | $(VBOX_PATH_MAIN_SRC)/idl/doxygen.xsl \
|
---|
114 | $(VBOX_PATH_MAIN_SRC)/idl/VirtualBox.xidl \
|
---|
115 | | $(call DIRDEP, $(PATH_TARGET)) \
|
---|
116 | $(call DIRDEP, $(PATH_OUT)/docs/Main)
|
---|
117 | $(RM) -f $(wildcard $(PATH_OUT)/docs/Main/html/*)
|
---|
118 | $(VBOX_XSLTPROC) -o $(PATH_TARGET)/VirtualBox.idl $(VBOX_PATH_MAIN_SRC)/idl/doxygen.xsl $(VBOX_PATH_MAIN_SRC)/idl/VirtualBox.xidl
|
---|
119 | $(REDIRECT) -E 'PATH_OUT=$(PATH_OUT)' -E 'PATH_TARGET=$(PATH_TARGET)' -E 'PATH_CHM=$(subst /,\,$(PATH_BIN)/VirtualBoxAPI.chm)' \
|
---|
120 | -- doxygen $(VBOX_PATH_MAIN_SRC)/Doxyfile.Main
|
---|
121 | -$(EXEC_X86_WIN32) $(VBOX_PATH_HTML_HELP_WORKSHOP)/hhc.exe $(subst /,\\,$(PATH_OUT)/docs/Main/html/index.hhp)
|
---|
122 | $(APPEND) $(PATH_TARGET)/docs.Main
|
---|
123 |
|
---|
124 | $(call DIRDEP, $(PATH_OUT)/docs/Main):
|
---|
125 | $(MKDIR) -p $@
|
---|
126 |
|
---|
127 | $(VBOX_PATH_SDK)/bindings/VirtualBox.xidl: $(VBOX_PATH_MAIN_SRC)/idl/VirtualBox.xidl
|
---|
128 | $(QUIET)$(MKDIR) -p $(VBOX_PATH_SDK)/bindings
|
---|
129 | $(QUIET)$(CP) $< $@
|
---|
130 |
|
---|
131 | #
|
---|
132 | # VBoxSVC executable
|
---|
133 | #
|
---|
134 | VBoxSVC_TEMPLATE = VBOXMAINEXE
|
---|
135 | VBoxSVC_DEFS = \
|
---|
136 | VBOX_MAIN_SETTINGS_ADDONS \
|
---|
137 | $(VBOX_MAIN_DEFS) \
|
---|
138 | $(if $(VBOX_WITH_VRDP),VBOX_WITH_VRDP,) \
|
---|
139 | $(if $(VBOX_WITH_HEADLESS),VBOX_WITH_HEADLESS,) \
|
---|
140 | $(if $(VBOX_WITH_QTGUI),VBOX_WITH_QTGUI,) \
|
---|
141 | $(if $(VBOX_WITH_QT4GUI),VBOX_WITH_QT4GUI,) \
|
---|
142 | $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
|
---|
143 | $(if $(VBOX_MAIN_RELEASE_LOG),VBOX_MAIN_RELEASE_LOG LOG_ENABLED,) \
|
---|
144 | $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
|
---|
145 | $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
|
---|
146 | $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
|
---|
147 | $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
|
---|
148 | $(if $(VBOX_WITH_AHCI),VBOX_WITH_AHCI,) \
|
---|
149 | $(if $(VBOX_WITHOUT_LINUX_COMPILER_H),VBOX_WITHOUT_LINUX_COMPILER_H,) \
|
---|
150 | $(if $(VBOX_WITH_RESOURCE_USAGE_API),VBOX_WITH_RESOURCE_USAGE_API,)
|
---|
151 |
|
---|
152 | ifdef VBOX_WITH_USB
|
---|
153 | VBoxSVC_DEFS += \
|
---|
154 | VBOX_WITH_USB \
|
---|
155 | $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI,) \
|
---|
156 | $(if $(VBOX_WITH_NEW_USB_CODE_ON_DARWIN),VBOX_WITH_NEW_USB_CODE_ON_DARWIN,)
|
---|
157 | endif
|
---|
158 |
|
---|
159 |
|
---|
160 | VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
|
---|
161 | VBoxSVC_DEFS.win.x86 += _WIN32_WINNT=0x0500
|
---|
162 | VBoxSVC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
|
---|
163 | VBoxSVC_DEFS.linux += VBOX_USE_LIBHAL
|
---|
164 | VBoxSVC_DEFS.solaris += VBOX_USE_LIBHAL
|
---|
165 |
|
---|
166 | VBoxSVC_INCS = \
|
---|
167 | include \
|
---|
168 | $(PATH_VBoxSVC) \
|
---|
169 | .
|
---|
170 | VBoxSVC_INCS.win = \
|
---|
171 | $(PATH_VBoxCOM)
|
---|
172 | ifdef VBOX_WITH_USB
|
---|
173 | VBoxSVC_INCS.os2 = \
|
---|
174 | $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
|
---|
175 | endif
|
---|
176 |
|
---|
177 | VBoxSVC_LIBS += \
|
---|
178 | $(LIB_DDU) \
|
---|
179 | $(LIB_SETTINGS)
|
---|
180 | VBoxSVC_LIBS.darwin = \
|
---|
181 | $(LIB_VMM) \
|
---|
182 | $(LIB_REM)
|
---|
183 | VBoxSVC_LIBS.solaris = \
|
---|
184 | adm
|
---|
185 | ifdef VBOX_WITH_USB
|
---|
186 | VBoxSVC_LIBS.solaris += \
|
---|
187 | devinfo
|
---|
188 | endif
|
---|
189 |
|
---|
190 | VBoxSVC_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
|
---|
191 |
|
---|
192 | VBoxSVC_SOURCES = \
|
---|
193 | Global.cpp \
|
---|
194 | Logging.cpp \
|
---|
195 | AutoLock.cpp \
|
---|
196 | Matching.cpp \
|
---|
197 | VirtualBoxBase.cpp \
|
---|
198 | VirtualBoxErrorInfoImpl.cpp \
|
---|
199 | VirtualBoxImpl.cpp \
|
---|
200 | VirtualBoxImplExtra.cpp \
|
---|
201 | MachineImpl.cpp \
|
---|
202 | SnapshotImpl.cpp \
|
---|
203 | HardDiskImpl.cpp \
|
---|
204 | HardDiskAttachmentImpl.cpp \
|
---|
205 | ProgressImpl.cpp \
|
---|
206 | DVDDriveImpl.cpp \
|
---|
207 | DVDImageImpl.cpp \
|
---|
208 | FloppyDriveImpl.cpp \
|
---|
209 | FloppyImageImpl.cpp \
|
---|
210 | HostImpl.cpp \
|
---|
211 | HostDVDDriveImpl.cpp \
|
---|
212 | HostFloppyDriveImpl.cpp \
|
---|
213 | HostNetworkInterfaceImpl.cpp \
|
---|
214 | GuestOSTypeImpl.cpp \
|
---|
215 | NetworkAdapterImpl.cpp \
|
---|
216 | SerialPortImpl.cpp \
|
---|
217 | ParallelPortImpl.cpp \
|
---|
218 | USBControllerImpl.cpp \
|
---|
219 | SATAControllerImpl.cpp \
|
---|
220 | AudioAdapterImpl.cpp \
|
---|
221 | SharedFolderImpl.cpp \
|
---|
222 | SystemPropertiesImpl.cpp \
|
---|
223 | BIOSSettingsImpl.cpp \
|
---|
224 | $(if $(VBOX_WITH_VRDP),VRDPServerImpl.cpp,) \
|
---|
225 | $(if $(VBOX_WITH_XPCOM),xpcom/server.cpp,)
|
---|
226 |
|
---|
227 | VBoxSVC_SOURCES.darwin = \
|
---|
228 | darwin/iokit.cpp
|
---|
229 |
|
---|
230 | VBoxSVC_SOURCES.win = \
|
---|
231 | win/svcmain.cpp \
|
---|
232 | win/svchlp.cpp \
|
---|
233 | win/VBoxSVC.rc
|
---|
234 |
|
---|
235 | VBoxSVC_SOURCES.linux = \
|
---|
236 | linux/vbox-libhal.cpp
|
---|
237 |
|
---|
238 | VBoxSVC_SOURCES.solaris = \
|
---|
239 | linux/vbox-libhal.cpp
|
---|
240 |
|
---|
241 | ifdef VBOX_WITH_USB
|
---|
242 | VBoxSVC_SOURCES += \
|
---|
243 | USBDeviceFilterImpl.cpp \
|
---|
244 | USBProxyService.cpp \
|
---|
245 | HostUSBDeviceImpl.cpp
|
---|
246 | VBoxSVC_SOURCES.darwin += darwin/USBProxyServiceDarwin.cpp
|
---|
247 | VBoxSVC_SOURCES.linux += linux/USBProxyServiceLinux.cpp
|
---|
248 | VBoxSVC_SOURCES.os2 += os2/USBProxyServiceOs2.cpp
|
---|
249 | VBoxSVC_SOURCES.solaris += solaris/USBProxyServiceSolaris.cpp
|
---|
250 | VBoxSVC_SOURCES.win += win/USBProxyServiceWindows.cpp
|
---|
251 | endif
|
---|
252 |
|
---|
253 | VBoxSVC_LDFLAGS.darwin = -framework IOKit -framework SystemConfiguration
|
---|
254 | ifeq ($(KBUILD_TYPE),debug)
|
---|
255 | VBoxSVC_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
|
---|
256 | endif
|
---|
257 |
|
---|
258 | ifdef VBOX_WITH_RESOURCE_USAGE_API
|
---|
259 | VBoxSVC_SOURCES += \
|
---|
260 | PerformanceImpl.cpp \
|
---|
261 | Performance.cpp
|
---|
262 | VBoxSVC_SOURCES.darwin += darwin/PerformanceDarwin.cpp
|
---|
263 | VBoxSVC_SOURCES.linux += linux/PerformanceLinux.cpp
|
---|
264 | VBoxSVC_SOURCES.os2 += os2/PerformanceOs2.cpp
|
---|
265 | VBoxSVC_SOURCES.solaris += solaris/PerformanceSolaris.cpp
|
---|
266 | VBoxSVC_SOURCES.win += win/PerformanceWin.cpp
|
---|
267 | VBoxSVC_LDFLAGS.darwin += -lproc
|
---|
268 | VBoxSVC_LDFLAGS.solaris += -lkstat
|
---|
269 | VBoxSVC_LDFLAGS.win += wbemuuid.lib powrprof.lib
|
---|
270 | endif
|
---|
271 |
|
---|
272 | win/VBoxSVC.rc_INCS = $(PATH_TARGET)
|
---|
273 | win/VBoxSVC.rc_DEPS = $(PATH_TARGET)/VBoxSVC.rgs $(PATH_TARGET)/VBoxSVC-icon.rc
|
---|
274 | win/VBoxSVC.rc_CLEAN = $(PATH_TARGET)/VBoxSVC-icon.rc
|
---|
275 |
|
---|
276 | $(PATH_TARGET)/VBoxSVC-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(call DIRDEP,$$(@D))
|
---|
277 | $(RM) -f $@
|
---|
278 | $(APPEND) $@ '1 ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
|
---|
279 |
|
---|
280 |
|
---|
281 | ifdef VBOX_WITH_XPCOM
|
---|
282 | #
|
---|
283 | # VBoxSVC wrapper module
|
---|
284 | #
|
---|
285 | VBoxSVCM_TEMPLATE = VBOXMAINCOMP
|
---|
286 | VBoxSVCM_DEFS = IN_RING3 $(VBOX_MAIN_DEFS)
|
---|
287 | VBoxSVCM_INCS = \
|
---|
288 | include \
|
---|
289 | $(PATH_VBoxC) \
|
---|
290 | .
|
---|
291 | VBoxSVCM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
|
---|
292 | VBoxSVCM_SOURCES = \
|
---|
293 | xpcom/server_module.cpp
|
---|
294 | VBoxSVCM_LDFLAGS.darwin = \
|
---|
295 | -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxSVCM.dylib \
|
---|
296 | -exported_symbols_list $(PATH_TARGET)/VBoxSVCM.def
|
---|
297 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
298 | VBoxSVCM_ORDERDEPS += $(PATH_TARGET)/VBoxSVCM.def
|
---|
299 | VBoxSVCM_CLEAN += $(PATH_TARGET)/VBoxSVCM.def
|
---|
300 | $(PATH_TARGET)/VBoxSVCM.def:
|
---|
301 | $(RM) -f $@
|
---|
302 | $(APPEND) $@ _NSGetModule
|
---|
303 | endif
|
---|
304 | VBoxSVCM_INTERMEDIATES = $(IDLHEADER)
|
---|
305 |
|
---|
306 | endif # VBOX_WITH_XPCOM
|
---|
307 |
|
---|
308 |
|
---|
309 | #
|
---|
310 | # VBoxC module
|
---|
311 | #
|
---|
312 | VBoxC_TEMPLATE = VBOXMAINCOMP
|
---|
313 | VBoxC_DEFS = \
|
---|
314 | IN_RING3 \
|
---|
315 | $(VBOX_MAIN_DEFS) \
|
---|
316 | VBOX_COM_INPROC \
|
---|
317 | $(if $(VBOX_WITH_VRDP),VBOX_WITH_VRDP,) \
|
---|
318 | $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
|
---|
319 | $(if $(VBOX_MAIN_RELEASE_LOG),VBOX_MAIN_RELEASE_LOG LOG_ENABLED,) \
|
---|
320 | $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
|
---|
321 | $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
|
---|
322 | $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
|
---|
323 | $(if $(VBOX_WITH_CROSSBOW),VBOX_WITH_CROSSBOW,) \
|
---|
324 | $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,)
|
---|
325 |
|
---|
326 | ifdef VBOX_WITH_USB
|
---|
327 | VBoxC_DEFS += \
|
---|
328 | VBOX_WITH_USB \
|
---|
329 | $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI,)
|
---|
330 | endif
|
---|
331 |
|
---|
332 | VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
|
---|
333 | VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
|
---|
334 |
|
---|
335 | VBoxC_INCS = \
|
---|
336 | include \
|
---|
337 | $(PATH_VBoxC)
|
---|
338 | VBoxC_INCS.win = \
|
---|
339 | $(PATH_VBoxCOM) \
|
---|
340 | .
|
---|
341 |
|
---|
342 | VBoxC_LDFLAGS.darwin = \
|
---|
343 | -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxC.dylib \
|
---|
344 | -exported_symbols_list $(PATH_TARGET)/VBoxC.def
|
---|
345 | ifdef VBOX_USE_VCC80
|
---|
346 | VBoxC_LDFLAGS.win = /MANIFEST
|
---|
347 | endif
|
---|
348 |
|
---|
349 | VBoxC_LIBS += \
|
---|
350 | $(LIB_VMM) \
|
---|
351 | $(LIB_REM)
|
---|
352 |
|
---|
353 | VBoxC_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
|
---|
354 |
|
---|
355 | VBoxC_SOURCES = \
|
---|
356 | Global.cpp \
|
---|
357 | Logging.cpp \
|
---|
358 | AutoLock.cpp \
|
---|
359 | VBoxDll.cpp \
|
---|
360 | Version.cpp \
|
---|
361 | USBDeviceImpl.cpp \
|
---|
362 | RemoteUSBDeviceImpl.cpp \
|
---|
363 | VirtualBoxBase.cpp \
|
---|
364 | VirtualBoxErrorInfoImpl.cpp \
|
---|
365 | ProgressImpl.cpp \
|
---|
366 | SharedFolderImpl.cpp \
|
---|
367 | SessionImpl.cpp \
|
---|
368 | ConsoleImpl.cpp \
|
---|
369 | ConsoleImpl2.cpp \
|
---|
370 | ConsoleVRDPServer.cpp \
|
---|
371 | GuestImpl.cpp \
|
---|
372 | KeyboardImpl.cpp \
|
---|
373 | MouseImpl.cpp \
|
---|
374 | DisplayImpl.cpp \
|
---|
375 | FramebufferImpl.cpp \
|
---|
376 | MachineDebuggerImpl.cpp \
|
---|
377 | VBoxDriversRegister.cpp \
|
---|
378 | AudioSnifferInterface.cpp \
|
---|
379 | VMMDevInterface.cpp
|
---|
380 | VBoxC_SOURCES.win = \
|
---|
381 | win/dllmain.cpp \
|
---|
382 | win/VBoxC.def \
|
---|
383 | win/VBoxC.rc
|
---|
384 | ifdef VBOX_WITH_XPCOM
|
---|
385 | VBoxC_SOURCES += \
|
---|
386 | xpcom/module.cpp
|
---|
387 | endif
|
---|
388 |
|
---|
389 | ifdef VBOX_WITH_HGCM
|
---|
390 | VBoxC_SOURCES += \
|
---|
391 | hgcm/HGCMObjects.cpp \
|
---|
392 | hgcm/HGCMThread.cpp \
|
---|
393 | hgcm/HGCM.cpp
|
---|
394 | endif
|
---|
395 |
|
---|
396 | ifdef VBOX_WITH_USB
|
---|
397 | VBoxC_SOURCES += \
|
---|
398 | RemoteUSBBackend.cpp
|
---|
399 | endif
|
---|
400 |
|
---|
401 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
402 | VBoxC_ORDERDEPS += $(PATH_TARGET)/VBoxC.def
|
---|
403 | VBoxC_CLEAN += $(PATH_TARGET)/VBoxC.def
|
---|
404 | $(PATH_TARGET)/VBoxC.def: $(MAKEFILE_CURRENT)
|
---|
405 | $(RM) -f $@
|
---|
406 | $(APPEND) $@ _NSGetModule
|
---|
407 | $(APPEND) $@ _VBoxDriversRegister
|
---|
408 | endif
|
---|
409 |
|
---|
410 | # Version.cpp uses VBOX_SVN_REV.
|
---|
411 | Version.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
412 | Version.cpp_DEPS = $(VBOX_SVN_REV_KMK)
|
---|
413 |
|
---|
414 | ConsoleImpl.cpp_DEFS = VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
|
---|
415 |
|
---|
416 | win/VBoxC.rc_DEPS = $(PATH_TARGET)/VBoxC.rgs $(PATH_VBoxCOM)/VirtualBox.tlb
|
---|
417 |
|
---|
418 |
|
---|
419 | #
|
---|
420 | # VBoxSettings
|
---|
421 | #
|
---|
422 | VBoxSettings_TEMPLATE = VBOXMAINDLL
|
---|
423 | VBoxSettings_NAME = $(basename $(notdir $(LIB_SETTINGS)))
|
---|
424 | VBoxSettings_SDKS = VBOX_LIBXSLT VBOX_LIBXML2 VBOX_ZLIB
|
---|
425 | VBoxSettings_DEFS = IN_VBOXSETTINGS_R3
|
---|
426 | VBoxSettings_INCS = \
|
---|
427 | include \
|
---|
428 | $(PATH_TARGET)
|
---|
429 | VBoxSettings_SOURCES = \
|
---|
430 | xml/Settings.cpp
|
---|
431 | VBoxSettings_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/$(notdir $(LIB_SETTINGS)) -Wl,-x # no debug info please.
|
---|
432 |
|
---|
433 |
|
---|
434 | #
|
---|
435 | # VBoxCOM - COM Abstraction Layer library
|
---|
436 | #
|
---|
437 | VBoxCOM_TEMPLATE = VBOXMAINLIB
|
---|
438 | VBoxCOM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
|
---|
439 | VBoxCOM_SOURCES = \
|
---|
440 | glue/com.cpp \
|
---|
441 | glue/initterm.cpp \
|
---|
442 | glue/string.cpp \
|
---|
443 | glue/EventQueue.cpp \
|
---|
444 | glue/ErrorInfo.cpp
|
---|
445 | ifeq ($(KBUILD_TARGET),win)
|
---|
446 | VBoxCOM_DEFS.x86 += _WIN32_WINNT=0x0500
|
---|
447 | VBoxCOM_DEFS.amd64 += _WIN32_WINNT=0x0510
|
---|
448 | VBoxCOM_SOURCES += \
|
---|
449 | $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
450 | else
|
---|
451 | VBoxCOM_INCS += \
|
---|
452 | include
|
---|
453 | VBoxCOM_SOURCES += \
|
---|
454 | xpcom/helpers.cpp
|
---|
455 | endif
|
---|
456 |
|
---|
457 |
|
---|
458 | #
|
---|
459 | # Embed XML Schema files to VBoxSVC
|
---|
460 | #
|
---|
461 | VBOX_XML_SCHEMA_H = $(PATH_TARGET)/xml_VirtualBox_settings_xsd.h
|
---|
462 | VBOX_XML_SCHEMA_COMMON_H = $(PATH_TARGET)/xml_VirtualBox_settings_common_xsd.h
|
---|
463 | VBOX_XML_CONVERTER_TEMPLATE_H = $(PATH_TARGET)/xml_SettingsConverter_xsl.h
|
---|
464 |
|
---|
465 | VBOX_XML_SCHEMA_COMMON = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-common.xsd
|
---|
466 | VBOX_XML_SCHEMA.darwin = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-macosx.xsd
|
---|
467 | VBOX_XML_SCHEMA.linux = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-linux.xsd
|
---|
468 | VBOX_XML_SCHEMA.freebsd = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-freebsd.xsd
|
---|
469 | VBOX_XML_SCHEMA.win = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-windows.xsd
|
---|
470 | VBOX_XML_SCHEMA.os2 = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-os2.xsd
|
---|
471 | VBOX_XML_SCHEMA.solaris = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-solaris.xsd
|
---|
472 |
|
---|
473 | VBOX_XML_CONVERTER_TEMPLATE = $(VBOX_PATH_MAIN_SRC)/xml/SettingsConverter.xsl
|
---|
474 |
|
---|
475 | VirtualBoxImplExtra.cpp_DEPS = \
|
---|
476 | $(VBOX_XML_SCHEMA_H) $(VBOX_XML_SCHEMA_COMMON_H) $(VBOX_XML_CONVERTER_TEMPLATE_H)
|
---|
477 |
|
---|
478 | $(VBOX_XML_SCHEMA_H): $(VBOX_XML_SCHEMA.$(KBUILD_TARGET)) $(VBOX_BIN2C)
|
---|
479 | $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
|
---|
480 | $(QUIET)$(VBOX_BIN2C) _xml_VirtualBox_settings_xsd $< $@
|
---|
481 |
|
---|
482 | $(VBOX_XML_SCHEMA_COMMON_H): $(VBOX_XML_SCHEMA_COMMON) $(VBOX_BIN2C)
|
---|
483 | $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
|
---|
484 | $(QUIET)$(VBOX_BIN2C) _xml_VirtualBox_settings_common_xsd $< $@
|
---|
485 |
|
---|
486 | $(VBOX_XML_CONVERTER_TEMPLATE_H): $(VBOX_XML_CONVERTER_TEMPLATE) $(VBOX_BIN2C)
|
---|
487 | $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
|
---|
488 | $(QUIET)$(VBOX_BIN2C) _xml_SettingsConverter_xsl $< $@
|
---|
489 |
|
---|
490 | OTHER_CLEAN += \
|
---|
491 | $(VBOX_XML_SCHEMA_H) $(VBOX_XML_SCHEMA_COMMON_H) $(VBOX_XML_CONVERTER_TEMPLATE_H)
|
---|
492 |
|
---|
493 |
|
---|
494 | #
|
---|
495 | # Generate SchemaDefs.h and SchemaDefs.cpp from XML Schema
|
---|
496 | #
|
---|
497 | VBOX_XML_SCHEMADEFS_H = $(PATH_TARGET)/SchemaDefs.h
|
---|
498 | VBOX_XML_SCHEMADEFS_CPP = $(PATH_TARGET)/SchemaDefs.cpp
|
---|
499 | VBOX_XML_SCHEMADEFS_XSL = $(VBOX_PATH_MAIN_SRC)/xml/SchemaDefs.xsl
|
---|
500 |
|
---|
501 | VBoxC_INTERMEDIATES += $(VBOX_XML_SCHEMADEFS_H)
|
---|
502 | VBoxC_INCS += $(PATH_TARGET)
|
---|
503 | VBoxC_SOURCES += $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
504 |
|
---|
505 | VBoxSVC_INTERMEDIATES += $(VBOX_XML_SCHEMADEFS_H)
|
---|
506 | VBoxSVC_INCS += $(PATH_TARGET)
|
---|
507 | VBoxSVC_SOURCES += $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
508 |
|
---|
509 | OTHER_CLEAN += $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
510 |
|
---|
511 | $(VBOX_XML_SCHEMADEFS_H): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET)) $(VBOX_XML_SCHEMA_COMMON)
|
---|
512 | $(call MSG_TOOL,xsltproc,SchemaDefs,$<,$@)
|
---|
513 | $(QUIET)$(VBOX_XSLTPROC) --stringparam mode declare -o $@ $(filter-out $(VBOX_XML_SCHEMA_COMMON),$^)
|
---|
514 |
|
---|
515 | $(VBOX_XML_SCHEMADEFS_CPP): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET)) $(VBOX_XML_SCHEMA_COMMON)
|
---|
516 | $(call MSG_TOOL,xsltproc,SchemaDefs,$<,$@)
|
---|
517 | $(QUIET)$(VBOX_XSLTPROC) --stringparam mode define -o $@ $(filter-out $(VBOX_XML_SCHEMA_COMMON),$^)
|
---|
518 |
|
---|
519 |
|
---|
520 | #
|
---|
521 | # Installs com related thing(s) to bin.
|
---|
522 | #
|
---|
523 | VBoxMain-com-inst_INST = $(INST_BIN)
|
---|
524 | VBoxMain-com-inst_SOURCES = \
|
---|
525 | win/comregister.cmd
|
---|
526 |
|
---|
527 |
|
---|
528 |
|
---|
529 |
|
---|
530 | # generate rules
|
---|
531 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
532 |
|
---|
533 |
|
---|
534 |
|
---|
535 |
|
---|
536 |
|
---|
537 | #
|
---|
538 | # Additions rules.
|
---|
539 | #
|
---|
540 |
|
---|
541 | XIDLFILE = $(VBOX_PATH_MAIN_SRC)/idl/VirtualBox.xidl
|
---|
542 |
|
---|
543 | ifneq ($(KBUILD_TARGET),win)
|
---|
544 |
|
---|
545 | ## @todo this hack ain't cutting it any longer. (the file name is abspath'ed since ages now.)
|
---|
546 | xpcom/helpers.cpp: $(IDLTYPELIB)
|
---|
547 |
|
---|
548 | $(IDLFILE): $(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl $(XIDLFILE) | $(call DIRDEP,$(dir $(IDLFILE)))
|
---|
549 | $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
|
---|
550 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
551 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
|
---|
552 |
|
---|
553 | $(IDLTYPELIB): $(IDLFILE) | $(call DIRDEP,$(dir $(IDLTYPELIB))) $(VBOX_XPIDL)
|
---|
554 | $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
|
---|
555 | $(QUIET)$(VBOX_XPIDL) -m typelib -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
|
---|
556 | chmod 0644 $@
|
---|
557 | ## @todo ^^^^^^^^^^^^ fix horrible hack
|
---|
558 |
|
---|
559 | $(IDLHEADER): $(IDLFILE) | $(call DIRDEP,$(dir $(IDLHEADER))) $(VBOX_XPIDL)
|
---|
560 | $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
|
---|
561 | $(QUIET)$(VBOX_XPIDL) -m header -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
|
---|
562 |
|
---|
563 | else
|
---|
564 |
|
---|
565 | MAIN_IDL ?= $(EXEC_X86_WIN32) $(firstword $(wildcard \
|
---|
566 | $(PATH_SDK_WINPSDK_BIN)/Midl.Exe\
|
---|
567 | $(PATH_SDK_WINPSDK)/Bin/Midl.Exe\
|
---|
568 | $(PATH_DEVTOOLS)/win.x86/bin/midl.exe\
|
---|
569 | ) Sorry_Cannot_Find_The_Midl_Compiler_In_The_PSDK)
|
---|
570 | IDL_DEFS = /nologo
|
---|
571 | ifdef VBOX_WITH_VRDP
|
---|
572 | IDL_DEFS += /D VBOX_WITH_VRDP
|
---|
573 | endif
|
---|
574 |
|
---|
575 | $(IDLFILE): $(VBOX_PATH_MAIN_SRC)/idl/midl.xsl $(XIDLFILE)
|
---|
576 | $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
|
---|
577 | $(QUIET)$(MKDIR) -p $(VBOX_PATH_SDK)/bindings/mscom/idl
|
---|
578 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
|
---|
579 |
|
---|
580 | $(PATH_TARGET)/VBoxSVC.rgs: $(VBOX_PATH_MAIN_SRC)/win/VirtualBox_rgs.xsl $(XIDLFILE)
|
---|
581 | $(VBOX_XSLTPROC) --stringparam Module VBoxSVC -o $@ $^
|
---|
582 |
|
---|
583 | $(PATH_TARGET)/VBoxC.rgs: $(VBOX_PATH_MAIN_SRC)/win/VirtualBox_rgs.xsl $(XIDLFILE)
|
---|
584 | $(VBOX_XSLTPROC) --stringparam Module VBoxC -o $@ $^
|
---|
585 |
|
---|
586 | ## @todo r=bird: last changes to this rule showed incorrect dependencies here as it broke testcase (see testboxwin2).
|
---|
587 | # This is kind of obvious when looking at the rule, because it's (a) not specifing all it output
|
---|
588 | # and (b) generating more stuff *after* the maintarget has been completed.
|
---|
589 | #
|
---|
590 | # What needs to be done is to not depend on _i.c in the object subdir, but on all the final outputs.
|
---|
591 | $(PATH_VBoxCOM)/VirtualBox_i.c \
|
---|
592 | + $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c \
|
---|
593 | + $(PATH_VBoxCOM)/VirtualBox.h \
|
---|
594 | + $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h \
|
---|
595 | + $(PATH_VBoxCOM)/VirtualBox.tlb \
|
---|
596 | + $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox.tlb: $(IDLFILE) | $(call DIRDEP,$(PATH_VBoxCOM))
|
---|
597 | $(MAIN_IDL) $(IDL_DEFS) \
|
---|
598 | /out $(subst /,\\,$(PATH_VBoxCOM)) \
|
---|
599 | /cpp_cmd $(subst /,\\,$(TOOL_$(VBOX_VCC_TOOL)_CC)) \
|
---|
600 | /I $(subst /,\\,$(PATH_SDK_WINPSDK_INC)) \
|
---|
601 | /I idl \
|
---|
602 | $(subst /,\\,$<)
|
---|
603 | $(MKDIR) -p $(VBOX_PATH_SDK)/bindings/mscom/include
|
---|
604 | $(CP) $(PATH_VBoxCOM)/VirtualBox.h $(VBOX_PATH_SDK)/bindings/mscom/include
|
---|
605 | $(MKDIR) -p $(VBOX_PATH_SDK)/bindings/mscom/lib
|
---|
606 | $(CP) $(PATH_VBoxCOM)/VirtualBox.tlb $(VBOX_PATH_SDK)/bindings/mscom/lib
|
---|
607 | $(CP) $(PATH_VBoxCOM)/VirtualBox_i.c $(VBOX_PATH_SDK)/bindings/mscom/lib
|
---|
608 |
|
---|
609 | endif
|
---|
610 |
|
---|
611 |
|
---|
612 | #
|
---|
613 | # Translation stuff
|
---|
614 | #
|
---|
615 | VBoxSVC_HEADERS = \
|
---|
616 | include/collection.h \
|
---|
617 | include/MachineImpl.h \
|
---|
618 | include/HostDVDDriveImpl.h \
|
---|
619 | include/HostFloppyDriveImpl.h
|
---|
620 |
|
---|
621 | VBoxC_HEADERS = \
|
---|
622 | include/ConsoleImpl.h
|
---|
623 |
|
---|
624 | VBoxSVC_TRANSLATIONS = \
|
---|
625 | nls/VBoxSVC_de.ts
|
---|
626 |
|
---|
627 | VBoxC_TRANSLATIONS = \
|
---|
628 | nls/VBoxC_de.ts
|
---|
629 |
|
---|
630 | updatenls:
|
---|
631 | $(VBOX_LUPDATE) $(VBoxSVC_SOURCES) $(VBoxSVC_HEADERS) -ts $(VBoxSVC_TRANSLATIONS)
|
---|
632 | $(VBOX_LUPDATE) $(VBoxC_SOURCES) $(VBoxC_HEADERS) -ts $(VBoxC_TRANSLATIONS)
|
---|
633 |
|
---|
634 | ifdef VBOX_WITH_XPCOM
|
---|
635 |
|
---|
636 | testidl: $(IDLFILE) $(IDLTYPELIB)
|
---|
637 | testidlhdr: $(IDLHEADER)
|
---|
638 |
|
---|
639 | else
|
---|
640 |
|
---|
641 | testidl: $(IDLFILE) $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
642 |
|
---|
643 | endif
|
---|
644 |
|
---|
645 | testschemadefs: $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
646 |
|
---|
647 |
|
---|
648 | # Hot fix when dependencies goes bad again...
|
---|
649 | #.NOTPARALLEL: $(TARGET_VBoxC) $(TARGET_VBoxSVC) $(TARGET_VBoxCOM) $(IDLHEADER) $(IDLFILE) $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
650 |
|
---|