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