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