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