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 = $(PATH_BIN)/sdk/idl/VirtualBox.idl
|
---|
49 | OTHER_CLEAN = \
|
---|
50 | $(PATH_BIN)/comregister.cmd \
|
---|
51 | $(PATH_BIN)/sdk/include/VirtualBox.h \
|
---|
52 | $(IDLFILE) \
|
---|
53 | $(PATH_BIN)/sdk/lib/VirtualBox.tlb \
|
---|
54 | $(PATH_BIN)/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 = $(PATH_BIN)/sdk/idl/VirtualBox_XPCOM.idl
|
---|
61 | IDLTYPELIB = $(PATH_BIN)/VirtualBox_XPCOM.xpt
|
---|
62 | IDLHEADER = $(PATH_BIN)/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 | VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
|
---|
115 | VBoxSVC_DEFS.win.x86 += _WIN32_WINNT=0x0400
|
---|
116 | VBoxSVC_DEFS.win.am64 += _WIN32_WINNT=0x0510
|
---|
117 | VBoxSVC_INCS = \
|
---|
118 | include \
|
---|
119 | $(PATH_VBoxSVC) \
|
---|
120 | $(PATH_VBoxCOM) \
|
---|
121 | $(PATH_BIN)/sdk/include
|
---|
122 | ifneq ($(BUILD_TARGET),win)
|
---|
123 | VBoxSVC_INCS += \
|
---|
124 | $(VBOX_XPCOM_INCS)
|
---|
125 | endif
|
---|
126 | ifdef VBOX_WITH_XPCOM
|
---|
127 | VBoxSVC_LIBS += \
|
---|
128 | $(PATH_BIN)/VBoxDD$(VBOX_SUFF_DLL) \
|
---|
129 | $(PATH_BIN)/VBoxXML$(VBOX_SUFF_DLL) \
|
---|
130 | $(TARGET_VBoxXPCOM)
|
---|
131 | VBoxSVC_LIBS += \
|
---|
132 | $(PATH_LIB)/VBoxXPCOMGlue$(VBOX_SUFF_LIB) \
|
---|
133 | $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
|
---|
134 | VBoxSVC_LIBS.darwin = \
|
---|
135 | $(LIB_REM)
|
---|
136 | else
|
---|
137 | VBoxSVC_LIBS = \
|
---|
138 | $(PATH_LIB)/VBoxDD$(VBOX_SUFF_LIB) \
|
---|
139 | $(PATH_LIB)/VBoxXML.lib \
|
---|
140 | $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB)
|
---|
141 | endif
|
---|
142 | VBoxSVC_SOURCES = \
|
---|
143 | Logging.cpp \
|
---|
144 | Matching.cpp \
|
---|
145 | USBDeviceFilterImpl.cpp \
|
---|
146 | USBProxyService.cpp \
|
---|
147 | VirtualBoxBase.cpp \
|
---|
148 | VirtualBoxXMLUtil.cpp \
|
---|
149 | VirtualBoxErrorInfoImpl.cpp \
|
---|
150 | VirtualBoxImpl.cpp \
|
---|
151 | MachineImpl.cpp \
|
---|
152 | SnapshotImpl.cpp \
|
---|
153 | HardDiskImpl.cpp \
|
---|
154 | HardDiskAttachmentImpl.cpp \
|
---|
155 | ProgressImpl.cpp \
|
---|
156 | DVDDriveImpl.cpp \
|
---|
157 | DVDImageImpl.cpp \
|
---|
158 | FloppyDriveImpl.cpp \
|
---|
159 | FloppyImageImpl.cpp \
|
---|
160 | HostImpl.cpp \
|
---|
161 | HostDVDDriveImpl.cpp \
|
---|
162 | HostFloppyDriveImpl.cpp \
|
---|
163 | HostUSBDeviceImpl.cpp \
|
---|
164 | GuestOSTypeImpl.cpp \
|
---|
165 | NetworkAdapterImpl.cpp \
|
---|
166 | USBControllerImpl.cpp \
|
---|
167 | AudioAdapterImpl.cpp \
|
---|
168 | SharedFolderImpl.cpp \
|
---|
169 | SystemPropertiesImpl.cpp \
|
---|
170 | BIOSSettingsImpl.cpp
|
---|
171 |
|
---|
172 | ifdef VBOX_WITH_VRDP
|
---|
173 | VBoxSVC_SOURCES += VRDPServerImpl.cpp
|
---|
174 | endif
|
---|
175 |
|
---|
176 | VBoxSVC_SOURCES.win = \
|
---|
177 | HostNetworkInterfaceImpl.cpp \
|
---|
178 | win32/svcmain.cpp \
|
---|
179 | win32/svchlp.cpp \
|
---|
180 | win32/VBoxSVC.rc
|
---|
181 |
|
---|
182 | ifdef VBOX_WITH_XPCOM
|
---|
183 | VBoxSVC_SOURCES += \
|
---|
184 | linux/server.cpp
|
---|
185 | endif
|
---|
186 |
|
---|
187 | ifdef VBOX_WITH_USB
|
---|
188 | VBoxSVC_SOURCES.linux += linux/USBProxyServiceLinux.cpp
|
---|
189 | VBoxSVC_SOURCES.win += win32/USBProxyServiceWin32.cpp
|
---|
190 | endif
|
---|
191 |
|
---|
192 | ifeq ($(BUILD_TYPE),debug)
|
---|
193 | VBoxSVC_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
|
---|
194 | endif
|
---|
195 |
|
---|
196 | #
|
---|
197 | # VBoxC
|
---|
198 | #
|
---|
199 | VBoxC_TEMPLATE = VBOXMAIN
|
---|
200 | VBoxC_DEFS = IN_RING3 IN_CFGLDR_R3
|
---|
201 | VBoxC_DEFS += VBOX_COM_INPROC
|
---|
202 | ifdef VBOX_WITH_VRDP
|
---|
203 | VBoxC_DEFS += VBOX_VRDP IN_VRDP_R3
|
---|
204 | endif
|
---|
205 | ifdef VBOX_WITH_HGCM
|
---|
206 | VBoxC_DEFS += VBOX_HGCM
|
---|
207 | endif
|
---|
208 | ifdef VBOX_MAIN_RELEASE_LOG
|
---|
209 | VBoxC_DEFS += VBOX_MAIN_RELEASE_LOG LOG_ENABLED
|
---|
210 | endif
|
---|
211 | ifdef VBOX_WITH_USB
|
---|
212 | VBoxC_DEFS += VBOX_WITH_USB
|
---|
213 | endif
|
---|
214 | ifdef VBOX_WITH_ALSA
|
---|
215 | VBoxC_DEFS += VBOX_WITH_ALSA
|
---|
216 | endif
|
---|
217 | VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0400
|
---|
218 | VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
|
---|
219 | VBoxC_INCS = \
|
---|
220 | include \
|
---|
221 | $(PATH_VBoxC) \
|
---|
222 | $(PATH_VBoxCOM) \
|
---|
223 | $(PATH_BIN)/sdk/include
|
---|
224 | ifneq ($(BUILD_TARGET),win)
|
---|
225 | VBoxC_INCS += \
|
---|
226 | $(VBOX_XPCOM_INCS)
|
---|
227 | endif
|
---|
228 | ifdef VBOX_USE_VCC80
|
---|
229 | VBoxC_LDFLAGS.win = /MANIFEST
|
---|
230 | endif
|
---|
231 | ifdef VBOX_WITH_XPCOM
|
---|
232 | VBoxC_LIBS = \
|
---|
233 | $(TARGET_VBoxXPCOM) \
|
---|
234 | $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL) \
|
---|
235 | $(PATH_LIB)/VBoxXPCOMGlue$(VBOX_SUFF_LIB)
|
---|
236 | else
|
---|
237 | VBoxC_LIBS = \
|
---|
238 | $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB)
|
---|
239 | endif
|
---|
240 | VBoxC_LIBS += \
|
---|
241 | $(LIB_VMM) \
|
---|
242 | $(LIB_REM)
|
---|
243 | VBoxC_SOURCES = \
|
---|
244 | Logging.cpp \
|
---|
245 | VBoxDll.cpp \
|
---|
246 | USBDeviceImpl.cpp \
|
---|
247 | RemoteUSBDeviceImpl.cpp \
|
---|
248 | VirtualBoxBase.cpp \
|
---|
249 | VirtualBoxErrorInfoImpl.cpp \
|
---|
250 | ProgressImpl.cpp \
|
---|
251 | SharedFolderImpl.cpp \
|
---|
252 | SessionImpl.cpp \
|
---|
253 | ConsoleImpl.cpp \
|
---|
254 | ConsoleVRDPServer.cpp \
|
---|
255 | GuestImpl.cpp \
|
---|
256 | KeyboardImpl.cpp \
|
---|
257 | MouseImpl.cpp \
|
---|
258 | DisplayImpl.cpp \
|
---|
259 | FramebufferImpl.cpp \
|
---|
260 | MachineDebuggerImpl.cpp \
|
---|
261 | VBoxDriversRegister.cpp \
|
---|
262 | AudioSnifferInterface.cpp \
|
---|
263 | VMMDevInterface.cpp
|
---|
264 | VBoxC_SOURCES.win = \
|
---|
265 | win32/dllmain.cpp \
|
---|
266 | win32/VBoxC.def \
|
---|
267 | win32/VBoxC.rc
|
---|
268 | ifdef VBOX_WITH_XPCOM
|
---|
269 | VBoxC_SOURCES += \
|
---|
270 | linux/module.cpp
|
---|
271 | endif
|
---|
272 |
|
---|
273 | ifdef VBOX_WITH_HGCM
|
---|
274 | VBoxC_SOURCES += \
|
---|
275 | hgcm/HGCMObjects.cpp \
|
---|
276 | hgcm/HGCMThread.cpp \
|
---|
277 | hgcm/HGCM.cpp
|
---|
278 | endif
|
---|
279 |
|
---|
280 | ifdef VBOX_WITH_USB
|
---|
281 | VBoxC_SOURCES += \
|
---|
282 | RemoteUSBBackend.cpp
|
---|
283 | endif
|
---|
284 |
|
---|
285 |
|
---|
286 | #
|
---|
287 | # VBoxXML
|
---|
288 | #
|
---|
289 | VBoxXML_TEMPLATE = VBOXMAIN
|
---|
290 | VBoxXML_SDKS = VBOX_XALAN VBOX_XERCES
|
---|
291 | ## @todo Why do we need this? Why isn't it in the template?!?
|
---|
292 | VBoxXML_CXXFLAGS.win = -EHsc
|
---|
293 | VBoxXML_DEFS = \
|
---|
294 | CFGLDR_HAVE_COM IN_RING3 IN_CFGLDR_R3
|
---|
295 | VBoxXML_INCS = \
|
---|
296 | include \
|
---|
297 | $(PATH_TARGET)
|
---|
298 | VBoxXML_SOURCES = \
|
---|
299 | xml/cfgldr.cpp \
|
---|
300 | xml/cfgldrhlp.cpp
|
---|
301 | ifdef VBOX_WITH_XPCOM
|
---|
302 | VBoxXML_LIBS = \
|
---|
303 | $(TARGET_VBoxXPCOM) \
|
---|
304 | $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
|
---|
305 | endif
|
---|
306 |
|
---|
307 | ## @todo (dmik): temporarily embed SettingsConverter.xsl into VBoxXML,
|
---|
308 | # later it should go to VBoxSVC as well
|
---|
309 | xml/cfgldr.cpp_DEPS = $(PATH_TARGET)/SettingsConverter_xsl.h
|
---|
310 | OTHER_CLEAN += $(PATH_TARGET)/SettingsConverter_xsl.h
|
---|
311 | $(PATH_TARGET)/SettingsConverter_xsl.h: xml/SettingsConverter.xsl $(VBOX_BIN2C) | $(call DIRDEP,$(PATH_TARGET))
|
---|
312 | $(call MSG_L1,bin2c $< => $@)
|
---|
313 | $(QUIET)$(VBOX_BIN2C) SettingsConverter_xsl $< $@
|
---|
314 |
|
---|
315 |
|
---|
316 | #
|
---|
317 | # tstCFGLdr - broken.
|
---|
318 | #
|
---|
319 | tstCFGLdr_TEMPLATE = VBOXR3
|
---|
320 | tstCFGLdr_SDKS = VBOX_XALAN VBOX_XERCES
|
---|
321 | tstCFGLdr_DEFS = IN_CFGLDR_R3 STANDALONE_TEST
|
---|
322 | ## @todo these makes uncessary noice. fix the template usage!
|
---|
323 | tstCFGLdr_CXXFLAGS.win = -EHsc
|
---|
324 | tstCFGLdr_SOURCES = \
|
---|
325 | xml/cfgldr.cpp \
|
---|
326 | xml/cfgldrhlp.cpp
|
---|
327 | tstCFGLdr_INCS = \
|
---|
328 | include \
|
---|
329 | $(PATH_TARGET)
|
---|
330 | ifdef VBOX_WITH_XPCOM
|
---|
331 | tstCFGLdr_LIBS = \
|
---|
332 | $(PATH_LIB)/VBoxXPCOM$(VBOX_SUFF_LIB)
|
---|
333 | endif
|
---|
334 | tstCFGLdr_LIBS += \
|
---|
335 | $(LIB_RUNTIME)
|
---|
336 |
|
---|
337 |
|
---|
338 | #
|
---|
339 | # VBoxCOM - COM Abstraction Layer library
|
---|
340 | #
|
---|
341 | VBoxCOM_COMMON_SOURCES = \
|
---|
342 | glue/com.cpp \
|
---|
343 | glue/string.cpp \
|
---|
344 | glue/EventQueue.cpp \
|
---|
345 | glue/ErrorInfo.cpp
|
---|
346 |
|
---|
347 | VBoxCOM_TEMPLATE = VBOXMAIN
|
---|
348 | VBoxCOM_DEFS = _WIN32_WINNT=0x0500
|
---|
349 | VBoxCOM_SOURCES = \
|
---|
350 | $(VBoxCOM_COMMON_SOURCES) \
|
---|
351 | $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
352 | VBoxCOM_INCS = \
|
---|
353 | $(PATH_BIN)/sdk/include
|
---|
354 |
|
---|
355 |
|
---|
356 | #
|
---|
357 | # VBoxXPCOM
|
---|
358 | #
|
---|
359 | VBoxXPCOM_TEMPLATE = VBOXMAIN
|
---|
360 | VBoxXPCOM_SOURCES = \
|
---|
361 | $(VBoxCOM_COMMON_SOURCES) \
|
---|
362 | linux/helpers.cpp
|
---|
363 | VBoxXPCOM_INCS = \
|
---|
364 | $(PATH_BIN)/sdk/include \
|
---|
365 | include \
|
---|
366 | $(VBOX_XPCOM_INCS)
|
---|
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 = 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)
|
---|
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 $(PATH_BIN)/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 $(PATH_BIN)/sdk/include
|
---|
505 | $(CP) $(PATH_VBoxCOM)/VirtualBox.h $(PATH_BIN)/sdk/include
|
---|
506 | $(MKDIR) -p $(PATH_BIN)/sdk/lib
|
---|
507 | $(CP) $(PATH_VBoxCOM)/VirtualBox.tlb $(PATH_BIN)/sdk/lib
|
---|
508 | $(CP) $(PATH_VBoxCOM)/VirtualBox_i.c $(PATH_BIN)/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 |
|
---|