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