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