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