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