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