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