1 | # $Id: Makefile.kmk 10268 2008-07-05 06:22:21Z 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 | VBoxSVC_LDFLAGS.darwin = -framework IOKit
|
---|
264 | ifeq ($(KBUILD_TYPE),debug)
|
---|
265 | VBoxSVC_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
|
---|
266 | endif
|
---|
267 |
|
---|
268 | win/VBoxSVC.rc_INCS = $(PATH_TARGET)
|
---|
269 | win/VBoxSVC.rc_DEPS = $(PATH_TARGET)/VBoxSVC.rgs $(PATH_TARGET)/VBoxSVC-icon.rc
|
---|
270 | win/VBoxSVC.rc_CLEAN = $(PATH_TARGET)/VBoxSVC-icon.rc
|
---|
271 |
|
---|
272 | $(PATH_TARGET)/VBoxSVC-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(call DIRDEP,$$(@D))
|
---|
273 | $(RM) -f $@
|
---|
274 | $(APPEND) $@ '1 ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
|
---|
275 |
|
---|
276 |
|
---|
277 | #
|
---|
278 | # VBoxSVC wrapper module
|
---|
279 | #
|
---|
280 | ifdef VBOX_WITH_XPCOM
|
---|
281 |
|
---|
282 | VBoxSVCM_TEMPLATE = VBOXMAINDLL
|
---|
283 | ifneq ($(KBUILD_TARGET),linux)
|
---|
284 | VBoxSVCM_INST = $(INST_BIN)components/
|
---|
285 | endif
|
---|
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 | ifdef VBOX_WITH_ORIGIN
|
---|
295 | VBoxSVCM_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/..'
|
---|
296 | endif
|
---|
297 | VBoxSVCM_LDFLAGS.darwin = \
|
---|
298 | -install_name @executable_path/components/VBoxSVCM.dylib \
|
---|
299 | -exported_symbols_list $(PATH_TARGET)/VBoxSVCM.def
|
---|
300 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
301 | VBoxSVCM_ORDERDEPS += $(PATH_TARGET)/VBoxSVCM.def
|
---|
302 | VBoxSVCM_CLEAN += $(PATH_TARGET)/VBoxSVCM.def
|
---|
303 | $(PATH_TARGET)/VBoxSVCM.def:
|
---|
304 | $(RM) -f $@
|
---|
305 | $(APPEND) $@ _NSGetModule
|
---|
306 | endif
|
---|
307 | VBoxSVCM_INTERMEDIATES = $(IDLHEADER)
|
---|
308 |
|
---|
309 | endif # VBOX_WITH_XPCOM
|
---|
310 |
|
---|
311 |
|
---|
312 | #
|
---|
313 | # VBoxC module
|
---|
314 | #
|
---|
315 | VBoxC_TEMPLATE = VBOXMAINDLL
|
---|
316 | ifneq ($(filter-out linux win,$(KBUILD_TARGET)),)
|
---|
317 | VBoxC_INST = $(INST_BIN)components/
|
---|
318 | endif
|
---|
319 |
|
---|
320 | VBoxC_DEFS = IN_RING3 $(VBOX_MAIN_DEFS)
|
---|
321 | VBoxC_DEFS += VBOX_COM_INPROC
|
---|
322 |
|
---|
323 | ifdef VBOX_WITH_VRDP
|
---|
324 | VBoxC_DEFS += VBOX_VRDP
|
---|
325 | endif
|
---|
326 | ifdef VBOX_WITH_HGCM
|
---|
327 | VBoxC_DEFS += VBOX_HGCM
|
---|
328 | endif
|
---|
329 | ifdef VBOX_MAIN_RELEASE_LOG
|
---|
330 | VBoxC_DEFS += VBOX_MAIN_RELEASE_LOG LOG_ENABLED
|
---|
331 | endif
|
---|
332 | ifdef VBOX_WITH_USB
|
---|
333 | VBoxC_DEFS += VBOX_WITH_USB
|
---|
334 | ifdef VBOX_WITH_EHCI
|
---|
335 | VBoxC_DEFS += VBOX_WITH_EHCI
|
---|
336 | endif
|
---|
337 | endif
|
---|
338 | ifdef VBOX_WITH_ALSA
|
---|
339 | VBoxC_DEFS += VBOX_WITH_ALSA
|
---|
340 | endif
|
---|
341 | ifdef VBOX_WITH_PULSE
|
---|
342 | VBoxC_DEFS += VBOX_WITH_PULSE
|
---|
343 | endif
|
---|
344 | ifdef VBOX_WITH_WINMM
|
---|
345 | VBoxC_DEFS += VBOX_WITH_WINMM
|
---|
346 | endif
|
---|
347 | ifdef VBOX_WITH_CROSSBOW
|
---|
348 | VBoxC_DEFS += VBOX_WITH_CROSSBOW
|
---|
349 | endif
|
---|
350 | ifdef VBOX_WITH_E1000
|
---|
351 | VBoxC_DEFS += VBOX_WITH_E1000
|
---|
352 | endif
|
---|
353 |
|
---|
354 | VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
|
---|
355 | VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
|
---|
356 |
|
---|
357 | VBoxC_INCS = \
|
---|
358 | include \
|
---|
359 | $(PATH_VBoxC)
|
---|
360 | VBoxC_INCS.win = \
|
---|
361 | $(PATH_VBoxCOM) \
|
---|
362 | .
|
---|
363 |
|
---|
364 | ifdef VBOX_WITH_ORIGIN
|
---|
365 | VBoxC_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/..'
|
---|
366 | endif
|
---|
367 | VBoxC_LDFLAGS.darwin = \
|
---|
368 | -install_name @executable_path/components/VBoxSVCM.dylib \
|
---|
369 | -exported_symbols_list $(PATH_TARGET)/VBoxC.def
|
---|
370 | ifdef VBOX_USE_VCC80
|
---|
371 | VBoxC_LDFLAGS.win = /MANIFEST
|
---|
372 | endif
|
---|
373 |
|
---|
374 | VBoxC_LIBS += \
|
---|
375 | $(LIB_VMM) \
|
---|
376 | $(LIB_REM)
|
---|
377 |
|
---|
378 | VBoxC_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
|
---|
379 |
|
---|
380 | VBoxC_SOURCES = \
|
---|
381 | Global.cpp \
|
---|
382 | Logging.cpp \
|
---|
383 | AutoLock.cpp \
|
---|
384 | VBoxDll.cpp \
|
---|
385 | Version.cpp \
|
---|
386 | USBDeviceImpl.cpp \
|
---|
387 | RemoteUSBDeviceImpl.cpp \
|
---|
388 | VirtualBoxBase.cpp \
|
---|
389 | VirtualBoxErrorInfoImpl.cpp \
|
---|
390 | ProgressImpl.cpp \
|
---|
391 | SharedFolderImpl.cpp \
|
---|
392 | SessionImpl.cpp \
|
---|
393 | ConsoleImpl.cpp \
|
---|
394 | ConsoleImpl2.cpp \
|
---|
395 | ConsoleVRDPServer.cpp \
|
---|
396 | GuestImpl.cpp \
|
---|
397 | KeyboardImpl.cpp \
|
---|
398 | MouseImpl.cpp \
|
---|
399 | DisplayImpl.cpp \
|
---|
400 | FramebufferImpl.cpp \
|
---|
401 | MachineDebuggerImpl.cpp \
|
---|
402 | VBoxDriversRegister.cpp \
|
---|
403 | AudioSnifferInterface.cpp \
|
---|
404 | VMMDevInterface.cpp
|
---|
405 | VBoxC_SOURCES.win = \
|
---|
406 | win/dllmain.cpp \
|
---|
407 | win/VBoxC.def \
|
---|
408 | win/VBoxC.rc
|
---|
409 | ifdef VBOX_WITH_XPCOM
|
---|
410 | VBoxC_SOURCES += \
|
---|
411 | xpcom/module.cpp
|
---|
412 | endif
|
---|
413 |
|
---|
414 | ifdef VBOX_WITH_HGCM
|
---|
415 | VBoxC_SOURCES += \
|
---|
416 | hgcm/HGCMObjects.cpp \
|
---|
417 | hgcm/HGCMThread.cpp \
|
---|
418 | hgcm/HGCM.cpp
|
---|
419 | endif
|
---|
420 |
|
---|
421 | ifdef VBOX_WITH_USB
|
---|
422 | VBoxC_SOURCES += \
|
---|
423 | RemoteUSBBackend.cpp
|
---|
424 | endif
|
---|
425 |
|
---|
426 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
427 | VBoxC_ORDERDEPS += $(PATH_TARGET)/VBoxC.def
|
---|
428 | VBoxC_CLEAN += $(PATH_TARGET)/VBoxC.def
|
---|
429 | $(PATH_TARGET)/VBoxC.def: $(MAKEFILE_CURRENT)
|
---|
430 | $(RM) -f $@
|
---|
431 | $(APPEND) $@ _NSGetModule
|
---|
432 | $(APPEND) $@ _VBoxDriversRegister
|
---|
433 | endif
|
---|
434 |
|
---|
435 | # Version.cpp uses VBOX_SVN_REV.
|
---|
436 | Version.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
437 | Version.cpp_DEPS = $(VBOX_SVN_REV_KMK)
|
---|
438 |
|
---|
439 | ConsoleImpl.cpp_DEFS = VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
|
---|
440 |
|
---|
441 | win/VBoxC.rc_DEPS = $(PATH_TARGET)/VBoxC.rgs $(PATH_VBoxCOM)/VirtualBox.tlb
|
---|
442 |
|
---|
443 |
|
---|
444 | #
|
---|
445 | # VBoxSettings
|
---|
446 | #
|
---|
447 | VBoxSettings_TEMPLATE = VBOXMAINDLL
|
---|
448 | VBoxSettings_NAME = $(basename $(notdir $(LIB_SETTINGS)))
|
---|
449 | VBoxSettings_SDKS = VBOX_LIBXSLT VBOX_LIBXML2 VBOX_ZLIB
|
---|
450 | VBoxSettings_DEFS = IN_VBOXSETTINGS_R3
|
---|
451 | VBoxSettings_INCS = \
|
---|
452 | include \
|
---|
453 | $(PATH_TARGET)
|
---|
454 | VBoxSettings_SOURCES = \
|
---|
455 | xml/Settings.cpp
|
---|
456 | VBoxSettings_LDFLAGS.darwin = -install_name @executable_path/$(notdir $(LIB_SETTINGS)) -Wl,-x # no debug info please.
|
---|
457 |
|
---|
458 |
|
---|
459 | #
|
---|
460 | # VBoxCOM - COM Abstraction Layer library
|
---|
461 | #
|
---|
462 | VBoxCOM_TEMPLATE = VBOXMAINLIB
|
---|
463 | VBoxCOM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
|
---|
464 | VBoxCOM_SOURCES = \
|
---|
465 | glue/com.cpp \
|
---|
466 | glue/initterm.cpp \
|
---|
467 | glue/string.cpp \
|
---|
468 | glue/EventQueue.cpp \
|
---|
469 | glue/ErrorInfo.cpp
|
---|
470 | ifeq ($(KBUILD_TARGET),win)
|
---|
471 | VBoxCOM_DEFS.x86 += _WIN32_WINNT=0x0500
|
---|
472 | VBoxCOM_DEFS.amd64 += _WIN32_WINNT=0x0510
|
---|
473 | VBoxCOM_SOURCES += \
|
---|
474 | $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
475 | else
|
---|
476 | VBoxCOM_INCS += \
|
---|
477 | include
|
---|
478 | VBoxCOM_SOURCES += \
|
---|
479 | xpcom/helpers.cpp
|
---|
480 | endif
|
---|
481 |
|
---|
482 |
|
---|
483 | #
|
---|
484 | # Embed XML Schema files to VBoxSVC
|
---|
485 | #
|
---|
486 | VBOX_XML_SCHEMA_H = $(PATH_TARGET)/xml_VirtualBox_settings_xsd.h
|
---|
487 | VBOX_XML_SCHEMA_COMMON_H = $(PATH_TARGET)/xml_VirtualBox_settings_common_xsd.h
|
---|
488 | VBOX_XML_CONVERTER_TEMPLATE_H = $(PATH_TARGET)/xml_SettingsConverter_xsl.h
|
---|
489 |
|
---|
490 | VBOX_XML_SCHEMA_COMMON = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-common.xsd
|
---|
491 | VBOX_XML_SCHEMA.darwin = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-macosx.xsd
|
---|
492 | VBOX_XML_SCHEMA.linux = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-linux.xsd
|
---|
493 | VBOX_XML_SCHEMA.freebsd = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-freebsd.xsd
|
---|
494 | VBOX_XML_SCHEMA.win = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-windows.xsd
|
---|
495 | VBOX_XML_SCHEMA.os2 = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-os2.xsd
|
---|
496 | VBOX_XML_SCHEMA.solaris = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-solaris.xsd
|
---|
497 |
|
---|
498 | VBOX_XML_CONVERTER_TEMPLATE = $(VBOX_PATH_MAIN_SRC)/xml/SettingsConverter.xsl
|
---|
499 |
|
---|
500 | VirtualBoxImplExtra.cpp_DEPS = \
|
---|
501 | $(VBOX_XML_SCHEMA_H) $(VBOX_XML_SCHEMA_COMMON_H) $(VBOX_XML_CONVERTER_TEMPLATE_H)
|
---|
502 |
|
---|
503 | $(VBOX_XML_SCHEMA_H): $(VBOX_XML_SCHEMA.$(KBUILD_TARGET)) $(VBOX_BIN2C)
|
---|
504 | $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
|
---|
505 | $(QUIET)$(VBOX_BIN2C) _xml_VirtualBox_settings_xsd $< $@
|
---|
506 |
|
---|
507 | $(VBOX_XML_SCHEMA_COMMON_H): $(VBOX_XML_SCHEMA_COMMON) $(VBOX_BIN2C)
|
---|
508 | $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
|
---|
509 | $(QUIET)$(VBOX_BIN2C) _xml_VirtualBox_settings_common_xsd $< $@
|
---|
510 |
|
---|
511 | $(VBOX_XML_CONVERTER_TEMPLATE_H): $(VBOX_XML_CONVERTER_TEMPLATE) $(VBOX_BIN2C)
|
---|
512 | $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
|
---|
513 | $(QUIET)$(VBOX_BIN2C) _xml_SettingsConverter_xsl $< $@
|
---|
514 |
|
---|
515 | OTHER_CLEAN += \
|
---|
516 | $(VBOX_XML_SCHEMA_H) $(VBOX_XML_SCHEMA_COMMON_H) $(VBOX_XML_CONVERTER_TEMPLATE_H)
|
---|
517 |
|
---|
518 |
|
---|
519 | #
|
---|
520 | # Generate SchemaDefs.h and SchemaDefs.cpp from XML Schema
|
---|
521 | #
|
---|
522 | VBOX_XML_SCHEMADEFS_H = $(PATH_TARGET)/SchemaDefs.h
|
---|
523 | VBOX_XML_SCHEMADEFS_CPP = $(PATH_TARGET)/SchemaDefs.cpp
|
---|
524 | VBOX_XML_SCHEMADEFS_XSL = $(VBOX_PATH_MAIN_SRC)/xml/SchemaDefs.xsl
|
---|
525 |
|
---|
526 | VBoxC_INTERMEDIATES += $(VBOX_XML_SCHEMADEFS_H)
|
---|
527 | VBoxC_INCS += $(PATH_TARGET)
|
---|
528 | VBoxC_SOURCES += $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
529 |
|
---|
530 | VBoxSVC_INTERMEDIATES += $(VBOX_XML_SCHEMADEFS_H)
|
---|
531 | VBoxSVC_INCS += $(PATH_TARGET)
|
---|
532 | VBoxSVC_SOURCES += $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
533 |
|
---|
534 | OTHER_CLEAN += $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
535 |
|
---|
536 | $(VBOX_XML_SCHEMADEFS_H): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET)) $(VBOX_XML_SCHEMA_COMMON)
|
---|
537 | $(call MSG_TOOL,xsltproc,SchemaDefs,$<,$@)
|
---|
538 | $(QUIET)$(VBOX_XSLTPROC) --stringparam mode declare -o $@ $(filter-out $(VBOX_XML_SCHEMA_COMMON),$^)
|
---|
539 |
|
---|
540 | $(VBOX_XML_SCHEMADEFS_CPP): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET)) $(VBOX_XML_SCHEMA_COMMON)
|
---|
541 | $(call MSG_TOOL,xsltproc,SchemaDefs,$<,$@)
|
---|
542 | $(QUIET)$(VBOX_XSLTPROC) --stringparam mode define -o $@ $(filter-out $(VBOX_XML_SCHEMA_COMMON),$^)
|
---|
543 |
|
---|
544 |
|
---|
545 | #
|
---|
546 | # Creates the symlinks necessary for making XPCOM work.
|
---|
547 | #
|
---|
548 | ## @todo Figure out why Linux really needs this, darwin doesn't...
|
---|
549 |
|
---|
550 | xpcom-components_INST = $(INST_BIN)components/
|
---|
551 | ifeq ($(KBUILD_TARGET),linux)
|
---|
552 | xpcom-components_SYMLINKS = \
|
---|
553 | VirtualBox_XPCOM.xpt=>../VirtualBox_XPCOM.xpt \
|
---|
554 | VBoxXPCOMBase.xpt=>../VBoxXPCOMBase.xpt \
|
---|
555 | VBoxC$(SUFF_DLL)=>../VBoxC$(SUFF_DLL) \
|
---|
556 | VBoxSVCM$(SUFF_DLL)=>../VBoxSVCM$(SUFF_DLL) \
|
---|
557 | VBoxXPCOMIPCC$(SUFF_DLL)=>../VBoxXPCOMIPCC$(SUFF_DLL)
|
---|
558 | endif
|
---|
559 |
|
---|
560 |
|
---|
561 | #
|
---|
562 | # Installs com related thing(s) to bin.
|
---|
563 | #
|
---|
564 | VBoxMain-com-inst_INST = $(INST_BIN)
|
---|
565 | VBoxMain-com-inst_SOURCES = \
|
---|
566 | win/comregister.cmd
|
---|
567 |
|
---|
568 |
|
---|
569 |
|
---|
570 |
|
---|
571 | # generate rules
|
---|
572 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
573 |
|
---|
574 |
|
---|
575 |
|
---|
576 |
|
---|
577 |
|
---|
578 | #
|
---|
579 | # Additions rules.
|
---|
580 | #
|
---|
581 |
|
---|
582 | XIDLFILE = $(VBOX_PATH_MAIN_SRC)/idl/VirtualBox.xidl
|
---|
583 |
|
---|
584 | ifneq ($(KBUILD_TARGET),win)
|
---|
585 |
|
---|
586 | ## @todo this hack ain't cutting it any longer. (the file name is abspath'ed since ages now.)
|
---|
587 | xpcom/helpers.cpp: $(IDLTYPELIB)
|
---|
588 |
|
---|
589 | $(IDLFILE): $(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl $(XIDLFILE) | $(call DIRDEP,$(dir $(IDLFILE)))
|
---|
590 | $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
|
---|
591 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
592 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
|
---|
593 |
|
---|
594 | $(IDLTYPELIB): $(IDLFILE) | $(call DIRDEP,$(dir $(IDLTYPELIB))) $(VBOX_XPIDL)
|
---|
595 | $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
|
---|
596 | $(QUIET)$(VBOX_XPIDL) -m typelib -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
|
---|
597 |
|
---|
598 | $(IDLHEADER): $(IDLFILE) | $(call DIRDEP,$(dir $(IDLHEADER))) $(VBOX_XPIDL)
|
---|
599 | $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
|
---|
600 | $(QUIET)$(VBOX_XPIDL) -m header -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
|
---|
601 |
|
---|
602 | else
|
---|
603 |
|
---|
604 | MAIN_IDL ?= $(EXEC_X86_WIN32) $(firstword $(wildcard \
|
---|
605 | $(PATH_SDK_WINPSDK_BIN)/Midl.Exe\
|
---|
606 | $(PATH_SDK_WINPSDK)/Bin/Midl.Exe\
|
---|
607 | $(PATH_DEVTOOLS)/win.x86/bin/midl.exe\
|
---|
608 | ) Sorry_Cannot_Find_The_Midl_Compiler_In_The_PSDK)
|
---|
609 | IDL_DEFS = /nologo
|
---|
610 | ifdef VBOX_WITH_VRDP
|
---|
611 | IDL_DEFS += /D VBOX_VRDP
|
---|
612 | endif
|
---|
613 |
|
---|
614 | $(IDLFILE): $(VBOX_PATH_MAIN_SRC)/idl/midl.xsl $(XIDLFILE)
|
---|
615 | $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
|
---|
616 | $(QUIET)$(MKDIR) -p $(VBOX_PATH_SDK)/idl
|
---|
617 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
|
---|
618 |
|
---|
619 | $(PATH_TARGET)/VBoxSVC.rgs: $(VBOX_PATH_MAIN_SRC)/win/VirtualBox_rgs.xsl $(XIDLFILE)
|
---|
620 | $(VBOX_XSLTPROC) --stringparam Module VBoxSVC -o $@ $^
|
---|
621 |
|
---|
622 | $(PATH_TARGET)/VBoxC.rgs: $(VBOX_PATH_MAIN_SRC)/win/VirtualBox_rgs.xsl $(XIDLFILE)
|
---|
623 | $(VBOX_XSLTPROC) --stringparam Module VBoxC -o $@ $^
|
---|
624 |
|
---|
625 | ## @todo r=bird: last changes to this rule showed incorrect dependencies here as it broke testcase (see testboxwin2).
|
---|
626 | # This is kind of obvious when looking at the rule, because it's (a) not specifing all it output
|
---|
627 | # and (b) generating more stuff *after* the maintarget has been completed.
|
---|
628 | #
|
---|
629 | # What needs to be done is to not depend on _i.c in the object subdir, but on all the final outputs.
|
---|
630 | $(PATH_VBoxCOM)/VirtualBox_i.c \
|
---|
631 | + $(VBOX_PATH_SDK)/lib/VirtualBox_i.c \
|
---|
632 | + $(PATH_VBoxCOM)/VirtualBox.h \
|
---|
633 | + $(VBOX_PATH_SDK)/include/VirtualBox.h \
|
---|
634 | + $(PATH_VBoxCOM)/VirtualBox.tlb \
|
---|
635 | + $(VBOX_PATH_SDK)/lib/VirtualBox.tlb: $(IDLFILE) | $(call DIRDEP,$(PATH_VBoxCOM))
|
---|
636 | $(MAIN_IDL) $(IDL_DEFS) \
|
---|
637 | /out $(subst /,\\,$(PATH_VBoxCOM)) \
|
---|
638 | /cpp_cmd $(subst /,\\,$(TOOL_$(VBOX_VCC_TOOL)_CC)) \
|
---|
639 | /I $(subst /,\\,$(PATH_SDK_WINPSDK_INC)) \
|
---|
640 | /I idl \
|
---|
641 | $(subst /,\\,$<)
|
---|
642 | $(MKDIR) -p $(VBOX_PATH_SDK)/include
|
---|
643 | $(CP) $(PATH_VBoxCOM)/VirtualBox.h $(VBOX_PATH_SDK)/include
|
---|
644 | $(MKDIR) -p $(VBOX_PATH_SDK)/lib
|
---|
645 | $(CP) $(PATH_VBoxCOM)/VirtualBox.tlb $(VBOX_PATH_SDK)/lib
|
---|
646 | $(CP) $(PATH_VBoxCOM)/VirtualBox_i.c $(VBOX_PATH_SDK)/lib
|
---|
647 |
|
---|
648 | endif
|
---|
649 |
|
---|
650 |
|
---|
651 | #
|
---|
652 | # Translation stuff
|
---|
653 | #
|
---|
654 | VBoxSVC_HEADERS = \
|
---|
655 | include/collection.h \
|
---|
656 | include/MachineImpl.h \
|
---|
657 | include/HostDVDDriveImpl.h \
|
---|
658 | include/HostFloppyDriveImpl.h
|
---|
659 |
|
---|
660 | VBoxC_HEADERS = \
|
---|
661 | include/ConsoleImpl.h
|
---|
662 |
|
---|
663 | VBoxSVC_TRANSLATIONS = \
|
---|
664 | nls/VBoxSVC_de.ts
|
---|
665 |
|
---|
666 | VBoxC_TRANSLATIONS = \
|
---|
667 | nls/VBoxC_de.ts
|
---|
668 |
|
---|
669 | updatenls:
|
---|
670 | $(VBOX_LUPDATE) $(VBoxSVC_SOURCES) $(VBoxSVC_HEADERS) -ts $(VBoxSVC_TRANSLATIONS)
|
---|
671 | $(VBOX_LUPDATE) $(VBoxC_SOURCES) $(VBoxC_HEADERS) -ts $(VBoxC_TRANSLATIONS)
|
---|
672 |
|
---|
673 | ifdef VBOX_WITH_XPCOM
|
---|
674 |
|
---|
675 | testidl: $(IDLFILE) $(IDLTYPELIB)
|
---|
676 | testidlhdr: $(IDLHEADER)
|
---|
677 |
|
---|
678 | else
|
---|
679 |
|
---|
680 | testidl: $(IDLFILE) $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
681 |
|
---|
682 | endif
|
---|
683 |
|
---|
684 | testschemadefs: $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
685 |
|
---|
686 |
|
---|
687 | # Hot fix when dependencies goes bad again...
|
---|
688 | #.NOTPARALLEL: $(TARGET_VBoxC) $(TARGET_VBoxSVC) $(TARGET_VBoxCOM) $(IDLHEADER) $(IDLFILE) $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
689 |
|
---|