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