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.amd64 += _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.x86 = _WIN32_WINNT=0x0500
|
---|
349 | VBoxCOM_DEFS.amd64 = _WIN32_WINNT=0x0510
|
---|
350 | VBoxCOM_SOURCES = \
|
---|
351 | $(VBoxCOM_COMMON_SOURCES) \
|
---|
352 | $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
353 | VBoxCOM_INCS = \
|
---|
354 | $(PATH_BIN)/sdk/include
|
---|
355 |
|
---|
356 |
|
---|
357 | #
|
---|
358 | # VBoxXPCOM
|
---|
359 | #
|
---|
360 | VBoxXPCOM_TEMPLATE = VBOXMAIN
|
---|
361 | VBoxXPCOM_SOURCES = \
|
---|
362 | $(VBoxCOM_COMMON_SOURCES) \
|
---|
363 | linux/helpers.cpp
|
---|
364 | VBoxXPCOM_INCS = \
|
---|
365 | $(PATH_BIN)/sdk/include \
|
---|
366 | include \
|
---|
367 | $(VBOX_XPCOM_INCS)
|
---|
368 |
|
---|
369 |
|
---|
370 | #
|
---|
371 | # Generate _DEPS on all sources which depends on generated headers.
|
---|
372 | #
|
---|
373 | ifeq ($(BUILD_TARGET),win)
|
---|
374 | PREREQS = $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
375 | else
|
---|
376 | PREREQS = $(IDLTYPELIB) $(IDLHEADER)
|
---|
377 | endif
|
---|
378 |
|
---|
379 | # brute force way to ensure the prereqs are generated before anything is compiled.
|
---|
380 | define def_src_deps
|
---|
381 | $(src)_DEPS = $(PREREQS)
|
---|
382 | endef
|
---|
383 | $(foreach src,\
|
---|
384 | $(VBoxC_SOURCES) $(VBoxC_SOURCES.$(BUILD_TARGET)) \
|
---|
385 | $(VBoxSVC_SOURCES) $(VBoxSVC_SOURCES.$(BUILD_TARGET)) \
|
---|
386 | $(VBoxCOM_COMMON_SOURCES) $(VBoxCOM_SOURCES) $(VBoxXPCOM_SOURCES) \
|
---|
387 | ,$(eval $(value def_src_deps)))
|
---|
388 |
|
---|
389 |
|
---|
390 | #
|
---|
391 | # Embed XML Schema files to VBoxSVC
|
---|
392 | #
|
---|
393 | VBOX_XML_ENTITIES = $(PATH_TARGET)/VirtualBoxXMLUtil_entities.h
|
---|
394 | VBOX_XML_ENTITIES_COMMON = $(PATH_TARGET)/VirtualBoxXMLUtil_common_entities.h
|
---|
395 |
|
---|
396 | VBOX_XML_SCHEMA_COMMON = xml/VirtualBox-settings-common.xsd
|
---|
397 | VBOX_XML_SCHEMA.darwin = xml/VirtualBox-settings-macosx.xsd
|
---|
398 | VBOX_XML_SCHEMA.linux = xml/VirtualBox-settings-linux.xsd
|
---|
399 | VBOX_XML_SCHEMA.win = xml/VirtualBox-settings-windows.xsd
|
---|
400 |
|
---|
401 | VirtualBoxXMLUtil.cpp_DEPS = $(VBOX_XML_ENTITIES) $(VBOX_XML_ENTITIES_COMMON)
|
---|
402 |
|
---|
403 | $(VBOX_XML_ENTITIES_COMMON): $(VBOX_XML_SCHEMA_COMMON) $(VBOX_BIN2C)
|
---|
404 | $(call MSG_L1,bin2c $< => $@)
|
---|
405 | $(QUIET)$(VBOX_BIN2C) VirtualBox_settings_common_xsd $< $@
|
---|
406 |
|
---|
407 | $(VBOX_XML_ENTITIES): $(VBOX_XML_SCHEMA.$(BUILD_TARGET)) $(VBOX_BIN2C)
|
---|
408 | $(call MSG_L1,bin2c $< => $@)
|
---|
409 | $(QUIET)$(VBOX_BIN2C) VirtualBox_settings_xsd $< $@
|
---|
410 |
|
---|
411 | OTHER_CLEAN += $(VBOX_XML_ENTITIES) $(VBOX_XML_ENTITIES_COMMON)
|
---|
412 |
|
---|
413 |
|
---|
414 | #
|
---|
415 | # Generate SchemaDefs.h from XML Schema
|
---|
416 | #
|
---|
417 | VBOX_XML_SCHEMADEFS_H = $(PATH_TARGET)/SchemaDefs.h
|
---|
418 | VBOX_XML_SCHEMADEFS_XSL = xml/SchemaDefs.xsl
|
---|
419 |
|
---|
420 | VBoxC_DEPS += $(VBOX_XML_SCHEMADEFS_H)
|
---|
421 | VBoxC_INCS += $(PATH_TARGET)
|
---|
422 | VBoxSVC_DEPS += $(VBOX_XML_SCHEMADEFS_H)
|
---|
423 | VBoxSVC_INCS += $(PATH_TARGET)
|
---|
424 |
|
---|
425 | $(VBOX_XML_SCHEMADEFS_H): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(BUILD_TARGET)) $(VBOX_XML_SCHEMA_COMMON)
|
---|
426 | $(call MSG_L1,xsltproc $@)
|
---|
427 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $(filter-out $(VBOX_XML_SCHEMA_COMMON),$^)
|
---|
428 |
|
---|
429 | OTHER_CLEAN += $(VBOX_XML_SCHEMADEFS_H)
|
---|
430 | .NOTPARALLEL: $(VBOX_XML_SCHEMADEFS_H)
|
---|
431 |
|
---|
432 |
|
---|
433 |
|
---|
434 | #
|
---|
435 | # Creates the symlinks necessary for making XPCOM work.
|
---|
436 | #
|
---|
437 | xpcom-components_INST = bin/components/
|
---|
438 | xpcom-components_SYMLINKS = \
|
---|
439 | VBoxC$(SUFF_DLL)=>../VBoxC$(SUFF_DLL) \
|
---|
440 | VBoxXPCOMIPCC$(SUFF_DLL)=>../VBoxXPCOMIPCC$(SUFF_DLL) \
|
---|
441 | VirtualBox_XPCOM.xpt=>../VirtualBox_XPCOM.xpt \
|
---|
442 | VBoxXPCOMBase.xpt=>../VBoxXPCOMBase.xpt
|
---|
443 |
|
---|
444 |
|
---|
445 | # generate
|
---|
446 | include $(PATH_KBUILD)/footer.kmk
|
---|
447 |
|
---|
448 |
|
---|
449 | #
|
---|
450 | # Additions rules.
|
---|
451 | #
|
---|
452 |
|
---|
453 | XIDLFILE = idl/VirtualBox.xidl
|
---|
454 |
|
---|
455 | ifneq ($(BUILD_TARGET),win)
|
---|
456 |
|
---|
457 | linux/helpers.cpp: $(IDLTYPELIB)
|
---|
458 |
|
---|
459 | $(IDLFILE): idl/xpidl.xsl $(XIDLFILE)
|
---|
460 | $(call MSG_L1,xsltproc $<,=> $@)
|
---|
461 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
462 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
|
---|
463 |
|
---|
464 | $(IDLTYPELIB): $(IDLFILE)
|
---|
465 | $(call MSG_L1,xpidl $<,=> $@)
|
---|
466 | $(QUIET)$(VBOX_XPIDL) -m typelib -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
|
---|
467 |
|
---|
468 | $(IDLHEADER): $(IDLFILE)
|
---|
469 | $(call MSG_L1,xpidl $<,=> $@)
|
---|
470 | $(QUIET)$(VBOX_XPIDL) -m header -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
|
---|
471 |
|
---|
472 | $(PATH_BIN)/components/.keep:
|
---|
473 | $(MKDIR) -p $(@D)
|
---|
474 | $(QUIET)echo "keep" > $@
|
---|
475 |
|
---|
476 | else
|
---|
477 |
|
---|
478 | MAIN_IDL ?= $(EXEC_X86_WIN32) $(firstword $(wildcard \
|
---|
479 | $(PATH_SDK_WINPSDK_BIN)/Midl.Exe\
|
---|
480 | $(PATH_SDK_WINPSDK)/Bin/Midl.Exe\
|
---|
481 | $(PATH_DEVTOOLS)/win.x86/bin/midl.exe\
|
---|
482 | ) Sorry_Cannot_Find_The_Midl_Compiler_In_The_PSDK)
|
---|
483 | IDL_DEFS = /nologo
|
---|
484 | ifdef VBOX_WITH_VRDP
|
---|
485 | IDL_DEFS += /D VBOX_VRDP
|
---|
486 | endif
|
---|
487 |
|
---|
488 | $(IDLFILE): idl/midl.xsl $(XIDLFILE)
|
---|
489 | $(call MSG_L1,xsltproc $<,=> $@)
|
---|
490 | $(QUIET)$(MKDIR) -p $(PATH_BIN)/sdk/idl
|
---|
491 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
|
---|
492 |
|
---|
493 | ## @todo r=bird: last changes to this rule showed incorrect dependencies here as it broke testcase (see testboxwin2).
|
---|
494 | # This is kind of obvious when looking at the rule, because it's (a) not specifing all it output
|
---|
495 | # and (b) generating more stuff *after* the maintarget has been completed.
|
---|
496 | #
|
---|
497 | # What needs to be done is to not depend on _i.c in the object subdir, but on all the final outputs.
|
---|
498 | $(PATH_VBoxCOM)/VirtualBox_i.c: $(IDLFILE) | $(call DIRDEP,$(PATH_VBoxCOM))
|
---|
499 | $(MAIN_IDL) $(IDL_DEFS) \
|
---|
500 | /out $(subst /,\\,$(PATH_VBoxCOM)) \
|
---|
501 | /cpp_cmd $(subst /,\\,$(TOOL_$(VBOX_VCC_TOOL)_CC)) \
|
---|
502 | /I $(subst /,\\,$(PATH_SDK_WINPSDK_INC)) \
|
---|
503 | /I idl \
|
---|
504 | $(subst /,\\,$<)
|
---|
505 | $(MKDIR) -p $(PATH_BIN)/sdk/include
|
---|
506 | $(CP) $(PATH_VBoxCOM)/VirtualBox.h $(PATH_BIN)/sdk/include
|
---|
507 | $(MKDIR) -p $(PATH_BIN)/sdk/lib
|
---|
508 | $(CP) $(PATH_VBoxCOM)/VirtualBox.tlb $(PATH_BIN)/sdk/lib
|
---|
509 | $(CP) $(PATH_VBoxCOM)/VirtualBox_i.c $(PATH_BIN)/sdk/lib
|
---|
510 |
|
---|
511 | endif
|
---|
512 |
|
---|
513 | # bird: anyone still using this? If not it's a gonner.
|
---|
514 | ## Hack to work around wine's trouble with midl.exe and rc.exe (seems to be msvcrt.dll related)
|
---|
515 | #gen: $(PREREQS)
|
---|
516 |
|
---|
517 |
|
---|
518 | #
|
---|
519 | # Translation stuff
|
---|
520 | #
|
---|
521 | VBoxSVC_HEADERS = \
|
---|
522 | include/collection.h \
|
---|
523 | include/MachineImpl.h \
|
---|
524 | include/HostDVDDriveImpl.h \
|
---|
525 | include/HostFloppyDriveImpl.h
|
---|
526 |
|
---|
527 | VBoxC_HEADERS = \
|
---|
528 | include/ConsoleImpl.h
|
---|
529 |
|
---|
530 | VBoxSVC_TRANSLATIONS = \
|
---|
531 | nls/VBoxSVC_de.ts
|
---|
532 |
|
---|
533 | VBoxC_TRANSLATIONS = \
|
---|
534 | nls/VBoxC_de.ts
|
---|
535 |
|
---|
536 | updatenls:
|
---|
537 | $(VBOX_LUPDATE) $(VBoxSVC_SOURCES) $(VBoxSVC_HEADERS) -ts $(VBoxSVC_TRANSLATIONS)
|
---|
538 | $(VBOX_LUPDATE) $(VBoxC_SOURCES) $(VBoxC_HEADERS) -ts $(VBoxC_TRANSLATIONS)
|
---|
539 |
|
---|
540 | ifdef VBOX_WITH_XPCOM
|
---|
541 |
|
---|
542 | testidl: $(IDLFILE) $(IDLTYPELIB)
|
---|
543 | testidlhdr: $(IDLHEADER)
|
---|
544 |
|
---|
545 | else
|
---|
546 |
|
---|
547 | testidl: $(IDLFILE) $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
548 |
|
---|
549 | endif
|
---|
550 |
|
---|
551 | $(PATH_BIN)/comregister.cmd: win32/comregister.cmd
|
---|
552 | $(CP) $< $@
|
---|
553 |
|
---|
554 |
|
---|
555 | # Hot fix when dependencies goes bad again...
|
---|
556 | #.NOTPARALLEL: $(TARGET_VBoxC) $(TARGET_VBoxSVC) $(TARGET_VBoxXPCOM) $(TARGET_VBoxCOM) $(IDLHEADER) $(IDLFILE) $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
557 |
|
---|