1 | # $Id: Makefile.kmk 3934 2007-07-31 08:36:16Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the VBox Main module.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2007 innotek GmbH
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | # available from http://www.virtualbox.org. This file is free software;
|
---|
11 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | # General Public License as published by the Free Software Foundation,
|
---|
13 | # in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
14 | # distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
15 | # be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 | # If you received this file as part of a commercial VirtualBox
|
---|
18 | # distribution, then only the terms of your commercial VirtualBox
|
---|
19 | # license agreement apply instead of the previous paragraph.
|
---|
20 | #
|
---|
21 |
|
---|
22 | DEPTH = ../../..
|
---|
23 | include $(PATH_KBUILD)/header.kmk
|
---|
24 |
|
---|
25 | SUBDIRS_AFTER = testcase
|
---|
26 |
|
---|
27 | ifndef VBOX_OSE
|
---|
28 | SUBDIRS_AFTER += webservice
|
---|
29 | endif
|
---|
30 |
|
---|
31 | LIBRARIES = VBoxCOM
|
---|
32 | DLLS = VBoxXML VBoxC
|
---|
33 | PROGRAMS = VBoxSVC
|
---|
34 | ifneq ($(BUILD_TARGET),win)
|
---|
35 | ifndef VBOX_WITH_XPCOM
|
---|
36 | $(error "VBox: VBOX_WITH_XPCOM isn't defined")
|
---|
37 | endif
|
---|
38 | DLLS += VBoxSVCM
|
---|
39 | ifneq ($(BUILD_TARGET),os2)
|
---|
40 | DEFS += VBOX_WITH_SYS_V_IPC_SESSION_WATCHER
|
---|
41 | endif
|
---|
42 | DEFS += VBOX_WITH_UNIXY_TAP_NETWORKING
|
---|
43 | endif
|
---|
44 |
|
---|
45 |
|
---|
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 |
|
---|
104 | VBoxSVC_TEMPLATE = VBOXMAINEXE
|
---|
105 | VBoxSVC_DEFS = CFGLDR_HAVE_COM IN_CFGLDR_R3
|
---|
106 | ifdef VBOX_WITH_VRDP
|
---|
107 | VBoxSVC_DEFS += VBOX_VRDP IN_VRDP_R3
|
---|
108 | endif
|
---|
109 | ifdef VBOX_WITH_HGCM
|
---|
110 | VBoxSVC_DEFS += VBOX_HGCM
|
---|
111 | endif
|
---|
112 | ifdef VBOX_MAIN_RELEASE_LOG
|
---|
113 | VBoxSVC_DEFS += VBOX_MAIN_RELEASE_LOG LOG_ENABLED
|
---|
114 | endif
|
---|
115 | ifdef VBOX_WITH_USB
|
---|
116 | VBoxSVC_DEFS += VBOX_WITH_USB
|
---|
117 | endif
|
---|
118 | ifdef VBOX_WITH_ALSA
|
---|
119 | VBoxSVC_DEFS += VBOX_WITH_ALSA
|
---|
120 | endif
|
---|
121 | ifdef VBOX_WITH_WINMM
|
---|
122 | VBoxSVC_DEFS += VBOX_WITH_WINMM
|
---|
123 | endif
|
---|
124 | ifdef VBOX_WITHOUT_LINUX_COMPILER_H
|
---|
125 | VBoxSVC_DEFS += VBOX_WITHOUT_LINUX_COMPILER_H
|
---|
126 | endif
|
---|
127 |
|
---|
128 | VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
|
---|
129 | VBoxSVC_DEFS.win.x86 += _WIN32_WINNT=0x0500
|
---|
130 | VBoxSVC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
|
---|
131 | VBoxSVC_DEFS.linux += VBOX_USE_LIBHAL
|
---|
132 |
|
---|
133 | VBoxSVC_INCS = \
|
---|
134 | include \
|
---|
135 | $(PATH_VBoxSVC) \
|
---|
136 | $(PATH_VBoxCOM) \
|
---|
137 | $(PATH_CURRENT)
|
---|
138 | ifeq ($(BUILD_TARGET),win)
|
---|
139 | VBoxSVC_LIBS += \
|
---|
140 | $(PATH_LIB)/VBoxDDU$(VBOX_SUFF_LIB) \
|
---|
141 | $(PATH_LIB)/VBoxXML$(VBOX_SUFF_LIB)
|
---|
142 | else
|
---|
143 | VBoxSVC_LIBS += \
|
---|
144 | $(PATH_BIN)/VBoxDDU$(VBOX_SUFF_DLL) \
|
---|
145 | $(PATH_BIN)/VBoxXML$(VBOX_SUFF_DLL)
|
---|
146 | endif
|
---|
147 | VBoxSVC_LIBS.darwin = \
|
---|
148 | $(LIB_VMM) \
|
---|
149 | $(LIB_REM)
|
---|
150 |
|
---|
151 | VBoxSVC_SOURCES = \
|
---|
152 | Logging.cpp \
|
---|
153 | Matching.cpp \
|
---|
154 | USBDeviceFilterImpl.cpp \
|
---|
155 | USBProxyService.cpp \
|
---|
156 | VirtualBoxBase.cpp \
|
---|
157 | VirtualBoxXMLUtil.cpp \
|
---|
158 | VirtualBoxErrorInfoImpl.cpp \
|
---|
159 | VirtualBoxImpl.cpp \
|
---|
160 | MachineImpl.cpp \
|
---|
161 | SnapshotImpl.cpp \
|
---|
162 | HardDiskImpl.cpp \
|
---|
163 | HardDiskAttachmentImpl.cpp \
|
---|
164 | ProgressImpl.cpp \
|
---|
165 | DVDDriveImpl.cpp \
|
---|
166 | DVDImageImpl.cpp \
|
---|
167 | FloppyDriveImpl.cpp \
|
---|
168 | FloppyImageImpl.cpp \
|
---|
169 | HostImpl.cpp \
|
---|
170 | HostDVDDriveImpl.cpp \
|
---|
171 | HostFloppyDriveImpl.cpp \
|
---|
172 | HostUSBDeviceImpl.cpp \
|
---|
173 | GuestOSTypeImpl.cpp \
|
---|
174 | NetworkAdapterImpl.cpp \
|
---|
175 | SerialPortImpl.cpp \
|
---|
176 | ParallelPortImpl.cpp \
|
---|
177 | USBControllerImpl.cpp \
|
---|
178 | AudioAdapterImpl.cpp \
|
---|
179 | SharedFolderImpl.cpp \
|
---|
180 | SystemPropertiesImpl.cpp \
|
---|
181 | BIOSSettingsImpl.cpp
|
---|
182 |
|
---|
183 | ifdef VBOX_WITH_VRDP
|
---|
184 | VBoxSVC_SOURCES += VRDPServerImpl.cpp
|
---|
185 | endif
|
---|
186 |
|
---|
187 | VBoxSVC_SOURCES.darwin = \
|
---|
188 | darwin/iokit.cpp
|
---|
189 |
|
---|
190 | VBoxSVC_SOURCES.win = \
|
---|
191 | HostNetworkInterfaceImpl.cpp \
|
---|
192 | win32/svcmain.cpp \
|
---|
193 | win32/svchlp.cpp \
|
---|
194 | win32/VBoxSVC.rc
|
---|
195 |
|
---|
196 | VBoxSVC_SOURCES.linux = \
|
---|
197 | linux/vbox-libhal.cpp
|
---|
198 |
|
---|
199 | ifdef VBOX_WITH_XPCOM
|
---|
200 | VBoxSVC_SOURCES += \
|
---|
201 | linux/server.cpp
|
---|
202 | endif
|
---|
203 |
|
---|
204 | ifdef VBOX_WITH_USB
|
---|
205 | VBoxSVC_SOURCES.darwin += darwin/USBProxyServiceDarwin.cpp
|
---|
206 | VBoxSVC_SOURCES.linux += linux/USBProxyServiceLinux.cpp
|
---|
207 | VBoxSVC_SOURCES.win += win32/USBProxyServiceWin32.cpp
|
---|
208 | endif
|
---|
209 |
|
---|
210 | VBoxSVC_LDFLAGS.darwin = -framework IOKit
|
---|
211 | ifeq ($(BUILD_TYPE),debug)
|
---|
212 | VBoxSVC_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
|
---|
213 | endif
|
---|
214 |
|
---|
215 | # Alternative USB filtering.
|
---|
216 | ifeq ($(filter-out darwin,$(BUILD_TARGET)),)
|
---|
217 | VBoxSVC_DEFS += VBOX_WITH_USBFILTER
|
---|
218 | VBoxSVC_LIBS += $(PATH_LIB)/USBLib$(VBOX_SUFF_LIB)
|
---|
219 | endif
|
---|
220 |
|
---|
221 |
|
---|
222 | #
|
---|
223 | # VBoxSVC wrapper module
|
---|
224 | #
|
---|
225 |
|
---|
226 | ifdef VBOX_WITH_XPCOM
|
---|
227 |
|
---|
228 | VBoxSVCM_TEMPLATE = VBOXMAINDLL
|
---|
229 | ifneq ($(BUILD_TARGET),linux)
|
---|
230 | VBoxSVCM_INST = $(INST_BIN)components/
|
---|
231 | endif
|
---|
232 | VBoxSVCM_DEFS = IN_RING3 IN_CFGLDR_R3
|
---|
233 | VBoxSVCM_INCS = \
|
---|
234 | include \
|
---|
235 | $(PATH_VBoxC) \
|
---|
236 | $(PATH_CURRENT)
|
---|
237 | VBoxSVCM_SOURCES = \
|
---|
238 | linux/server_module.cpp
|
---|
239 | VBoxSVCM_LDFLAGS.darwin = \
|
---|
240 | -install_name @executable_path/components/VBoxSVCM.dylib \
|
---|
241 | -exported_symbols_list $(PATH_TARGET)/VBoxSVCM.def
|
---|
242 | ifeq ($(BUILD_TARGET),darwin)
|
---|
243 | VBoxSVCM_ORDERDEPS += $(PATH_TARGET)/VBoxSVCM.def
|
---|
244 | VBoxSVCM_CLEAN += $(PATH_TARGET)/VBoxSVCM.def
|
---|
245 | $(PATH_TARGET)/VBoxSVCM.def:
|
---|
246 | $(RM) -f $@
|
---|
247 | $(APPEND) $@ _NSGetModule
|
---|
248 | endif
|
---|
249 |
|
---|
250 | endif # VBOX_WITH_XPCOM
|
---|
251 |
|
---|
252 | #
|
---|
253 | # VBoxC module
|
---|
254 | #
|
---|
255 |
|
---|
256 | VBoxC_TEMPLATE = VBOXMAINDLL
|
---|
257 | ifneq ($(filter-out linux win,$(BUILD_TARGET)),)
|
---|
258 | VBoxC_INST = $(INST_BIN)components/
|
---|
259 | endif
|
---|
260 |
|
---|
261 | VBoxC_DEFS = IN_RING3 IN_CFGLDR_R3
|
---|
262 | VBoxC_DEFS += VBOX_COM_INPROC
|
---|
263 |
|
---|
264 | ifdef VBOX_WITH_VRDP
|
---|
265 | VBoxC_DEFS += VBOX_VRDP IN_VRDP_R3
|
---|
266 | ifdef VBOX_WITH_VRDP_NO_COM
|
---|
267 | VBoxC_DEFS += VRDP_NO_COM
|
---|
268 | endif
|
---|
269 | endif
|
---|
270 | ifdef VBOX_WITH_HGCM
|
---|
271 | VBoxC_DEFS += VBOX_HGCM
|
---|
272 | endif
|
---|
273 | ifdef VBOX_MAIN_RELEASE_LOG
|
---|
274 | VBoxC_DEFS += VBOX_MAIN_RELEASE_LOG LOG_ENABLED
|
---|
275 | endif
|
---|
276 | ifdef VBOX_WITH_USB
|
---|
277 | VBoxC_DEFS += VBOX_WITH_USB
|
---|
278 | endif
|
---|
279 | ifdef VBOX_WITH_ALSA
|
---|
280 | VBoxC_DEFS += VBOX_WITH_ALSA
|
---|
281 | endif
|
---|
282 | ifdef VBOX_WITH_WINMM
|
---|
283 | VBoxC_DEFS += VBOX_WITH_WINMM
|
---|
284 | endif
|
---|
285 |
|
---|
286 | VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
|
---|
287 | VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
|
---|
288 |
|
---|
289 | VBoxC_INCS = \
|
---|
290 | include \
|
---|
291 | $(PATH_VBoxC) \
|
---|
292 | $(PATH_VBoxCOM)
|
---|
293 | VBoxC_INCS.win := \
|
---|
294 | $(PATH_SUB_CURRENT)
|
---|
295 |
|
---|
296 | VBoxC_LDFLAGS.darwin = \
|
---|
297 | -install_name @executable_path/components/VBoxSVCM.dylib \
|
---|
298 | -exported_symbols_list $(PATH_TARGET)/VBoxC.def
|
---|
299 | ifdef VBOX_USE_VCC80
|
---|
300 | VBoxC_LDFLAGS.win = /MANIFEST
|
---|
301 | endif
|
---|
302 |
|
---|
303 | VBoxC_LIBS += \
|
---|
304 | $(LIB_VMM) \
|
---|
305 | $(LIB_REM)
|
---|
306 |
|
---|
307 | VBoxC_SOURCES = \
|
---|
308 | Logging.cpp \
|
---|
309 | VBoxDll.cpp \
|
---|
310 | USBDeviceImpl.cpp \
|
---|
311 | RemoteUSBDeviceImpl.cpp \
|
---|
312 | VirtualBoxBase.cpp \
|
---|
313 | VirtualBoxErrorInfoImpl.cpp \
|
---|
314 | ProgressImpl.cpp \
|
---|
315 | SharedFolderImpl.cpp \
|
---|
316 | SessionImpl.cpp \
|
---|
317 | ConsoleImpl.cpp \
|
---|
318 | ConsoleVRDPServer.cpp \
|
---|
319 | GuestImpl.cpp \
|
---|
320 | KeyboardImpl.cpp \
|
---|
321 | MouseImpl.cpp \
|
---|
322 | DisplayImpl.cpp \
|
---|
323 | FramebufferImpl.cpp \
|
---|
324 | MachineDebuggerImpl.cpp \
|
---|
325 | VBoxDriversRegister.cpp \
|
---|
326 | AudioSnifferInterface.cpp \
|
---|
327 | VMMDevInterface.cpp
|
---|
328 | VBoxC_SOURCES.win = \
|
---|
329 | win32/dllmain.cpp \
|
---|
330 | win32/VBoxC.def \
|
---|
331 | win32/VBoxC.rc
|
---|
332 | ifdef VBOX_WITH_XPCOM
|
---|
333 | VBoxC_SOURCES += \
|
---|
334 | linux/module.cpp
|
---|
335 | endif
|
---|
336 |
|
---|
337 | ifdef VBOX_WITH_HGCM
|
---|
338 | VBoxC_SOURCES += \
|
---|
339 | hgcm/HGCMObjects.cpp \
|
---|
340 | hgcm/HGCMThread.cpp \
|
---|
341 | hgcm/HGCM.cpp
|
---|
342 | endif
|
---|
343 |
|
---|
344 | ifdef VBOX_WITH_USB
|
---|
345 | VBoxC_SOURCES += \
|
---|
346 | RemoteUSBBackend.cpp
|
---|
347 | endif
|
---|
348 |
|
---|
349 | ifeq ($(BUILD_TARGET),darwin)
|
---|
350 | VBoxC_ORDERDEPS += $(PATH_TARGET)/VBoxC.def
|
---|
351 | VBoxC_CLEAN += $(PATH_TARGET)/VBoxC.def
|
---|
352 | $(PATH_TARGET)/VBoxC.def: $(MAKEFILE_CURRENT)
|
---|
353 | $(RM) -f $@
|
---|
354 | $(APPEND) $@ _NSGetModule
|
---|
355 | $(APPEND) $@ _VBoxDriversRegister
|
---|
356 | endif
|
---|
357 |
|
---|
358 | # ConsoleImpl.cpp uses VBOX_SVN_REV.
|
---|
359 | ConsoleImpl.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
360 | ConsoleImpl.cpp_DEPS = $(VBOX_SVN_REV_KMK)
|
---|
361 |
|
---|
362 | #
|
---|
363 | # VBoxXML
|
---|
364 | #
|
---|
365 | VBoxXML_TEMPLATE = VBOXMAINDLL
|
---|
366 | VBoxXML_SDKS = VBOX_XALAN VBOX_XERCES
|
---|
367 | ## @todo Why do we need this? Why isn't it in the template?!?
|
---|
368 | VBoxXML_CXXFLAGS.win = -EHsc
|
---|
369 | VBoxXML_DEFS = \
|
---|
370 | CFGLDR_HAVE_COM IN_RING3 IN_CFGLDR_R3
|
---|
371 | VBoxXML_INCS = \
|
---|
372 | include \
|
---|
373 | $(PATH_TARGET)
|
---|
374 | VBoxXML_SOURCES = \
|
---|
375 | xml/cfgldr.cpp \
|
---|
376 | xml/cfgldrhlp.cpp
|
---|
377 | VBoxXML_LDFLAGS.darwin = -install_name @executable_path/VBoxXML.dylib -Wl,-x # no debug info please.
|
---|
378 |
|
---|
379 | ## @todo (dmik): temporarily embed SettingsConverter.xsl into VBoxXML,
|
---|
380 | # later it should go to VBoxSVC as well
|
---|
381 | xml/cfgldr.cpp_DEPS = $(PATH_TARGET)/SettingsConverter_xsl.h
|
---|
382 | OTHER_CLEAN += $(PATH_TARGET)/SettingsConverter_xsl.h
|
---|
383 | $(PATH_TARGET)/SettingsConverter_xsl.h: xml/SettingsConverter.xsl $(VBOX_BIN2C) | $(call DIRDEP,$(PATH_TARGET))
|
---|
384 | $(call MSG_TOOL,bin2c,VBoxXML,$<,$@)
|
---|
385 | $(QUIET)$(VBOX_BIN2C) SettingsConverter_xsl $< $@
|
---|
386 |
|
---|
387 |
|
---|
388 | #
|
---|
389 | # tstCFGLdr - broken.
|
---|
390 | #
|
---|
391 |
|
---|
392 | tstCFGLdr_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
393 | tstCFGLdr_SDKS = VBOX_XALAN VBOX_XERCES
|
---|
394 | tstCFGLdr_DEFS = IN_CFGLDR_R3 STANDALONE_TEST
|
---|
395 | tstCFGLdr_SOURCES = \
|
---|
396 | xml/cfgldr.cpp \
|
---|
397 | xml/cfgldrhlp.cpp
|
---|
398 | tstCFGLdr_INCS = \
|
---|
399 | include \
|
---|
400 | $(PATH_TARGET)
|
---|
401 |
|
---|
402 |
|
---|
403 | #
|
---|
404 | # VBoxCOM - COM Abstraction Layer library
|
---|
405 | #
|
---|
406 |
|
---|
407 | VBoxCOM_TEMPLATE = VBOXMAINLIB
|
---|
408 | VBoxCOM_SOURCES = \
|
---|
409 | glue/com.cpp \
|
---|
410 | glue/initterm.cpp \
|
---|
411 | glue/string.cpp \
|
---|
412 | glue/EventQueue.cpp \
|
---|
413 | glue/ErrorInfo.cpp
|
---|
414 | ifeq ($(BUILD_TARGET),win)
|
---|
415 | VBoxCOM_DEFS.x86 += _WIN32_WINNT=0x0500
|
---|
416 | VBoxCOM_DEFS.amd64 += _WIN32_WINNT=0x0510
|
---|
417 | VBoxCOM_SOURCES += \
|
---|
418 | $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
419 | else
|
---|
420 | VBoxCOM_INCS += \
|
---|
421 | include
|
---|
422 | VBoxCOM_SOURCES += \
|
---|
423 | linux/helpers.cpp
|
---|
424 | endif
|
---|
425 |
|
---|
426 |
|
---|
427 | #
|
---|
428 | # Generate _DEPS on all sources which depends on generated headers.
|
---|
429 | #
|
---|
430 | ifeq ($(BUILD_TARGET),win)
|
---|
431 | PREREQS = $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
432 | else
|
---|
433 | PREREQS = $(IDLTYPELIB) $(IDLHEADER)
|
---|
434 | endif
|
---|
435 |
|
---|
436 | # brute force way to ensure the prereqs are generated before anything is compiled.
|
---|
437 | define def_src_deps
|
---|
438 | $(src)_DEPS += $(PREREQS)
|
---|
439 | endef
|
---|
440 | $(foreach src,\
|
---|
441 | $(VBoxC_SOURCES) $(VBoxC_SOURCES.$(BUILD_TARGET)) \
|
---|
442 | $(VBoxSVC_SOURCES) $(VBoxSVC_SOURCES.$(BUILD_TARGET)) \
|
---|
443 | $(VBoxCOM_SOURCES) \
|
---|
444 | ,$(eval $(value def_src_deps)))
|
---|
445 |
|
---|
446 |
|
---|
447 | #
|
---|
448 | # Embed XML Schema files to VBoxSVC
|
---|
449 | #
|
---|
450 | VBOX_XML_ENTITIES = $(PATH_TARGET)/VirtualBoxXMLUtil_entities.h
|
---|
451 | VBOX_XML_ENTITIES_COMMON = $(PATH_TARGET)/VirtualBoxXMLUtil_common_entities.h
|
---|
452 |
|
---|
453 | VBOX_XML_SCHEMA_COMMON = xml/VirtualBox-settings-common.xsd
|
---|
454 | VBOX_XML_SCHEMA.darwin = xml/VirtualBox-settings-macosx.xsd
|
---|
455 | VBOX_XML_SCHEMA.linux = xml/VirtualBox-settings-linux.xsd
|
---|
456 | VBOX_XML_SCHEMA.win = xml/VirtualBox-settings-windows.xsd
|
---|
457 | VBOX_XML_SCHEMA.os2 = xml/VirtualBox-settings-os2.xsd
|
---|
458 |
|
---|
459 | VirtualBoxXMLUtil.cpp_DEPS = $(VBOX_XML_ENTITIES) $(VBOX_XML_ENTITIES_COMMON)
|
---|
460 |
|
---|
461 | $(VBOX_XML_ENTITIES_COMMON): $(VBOX_XML_SCHEMA_COMMON) $(VBOX_BIN2C)
|
---|
462 | $(call MSG_TOOL,bin2c,VBoxXML,$<,$@)
|
---|
463 | $(QUIET)$(VBOX_BIN2C) VirtualBox_settings_common_xsd $< $@
|
---|
464 |
|
---|
465 | $(VBOX_XML_ENTITIES): $(VBOX_XML_SCHEMA.$(BUILD_TARGET)) $(VBOX_BIN2C)
|
---|
466 | $(call MSG_TOOL,bin2c,VBoxXML,$<,$@)
|
---|
467 | $(QUIET)$(VBOX_BIN2C) VirtualBox_settings_xsd $< $@
|
---|
468 |
|
---|
469 | OTHER_CLEAN += $(VBOX_XML_ENTITIES) $(VBOX_XML_ENTITIES_COMMON)
|
---|
470 |
|
---|
471 |
|
---|
472 | #
|
---|
473 | # Generate SchemaDefs.h from XML Schema
|
---|
474 | #
|
---|
475 | VBOX_XML_SCHEMADEFS_H = $(PATH_TARGET)/SchemaDefs.h
|
---|
476 | VBOX_XML_SCHEMADEFS_XSL = xml/SchemaDefs.xsl
|
---|
477 |
|
---|
478 | VBoxC_DEPS += $(VBOX_XML_SCHEMADEFS_H)
|
---|
479 | VBoxC_INCS += $(PATH_TARGET)
|
---|
480 | VBoxSVC_DEPS += $(VBOX_XML_SCHEMADEFS_H)
|
---|
481 | VBoxSVC_INCS += $(PATH_TARGET)
|
---|
482 |
|
---|
483 | $(VBOX_XML_SCHEMADEFS_H): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(BUILD_TARGET)) $(VBOX_XML_SCHEMA_COMMON)
|
---|
484 | $(call MSG_TOOL,xsltproc,VBoxXML,$<,$@)
|
---|
485 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $(filter-out $(VBOX_XML_SCHEMA_COMMON),$^)
|
---|
486 |
|
---|
487 | OTHER_CLEAN += $(VBOX_XML_SCHEMADEFS_H)
|
---|
488 | .NOTPARALLEL: $(VBOX_XML_SCHEMADEFS_H)
|
---|
489 |
|
---|
490 |
|
---|
491 |
|
---|
492 | #
|
---|
493 | # Creates the symlinks necessary for making XPCOM work.
|
---|
494 | #
|
---|
495 | ## @todo Figure out why Linux really needs this, darwin doesn't...
|
---|
496 | xpcom-components_INST = $(INST_BIN)components/
|
---|
497 | ifeq ($(BUILD_TARGET),linux)
|
---|
498 | xpcom-components_SYMLINKS = \
|
---|
499 | VirtualBox_XPCOM.xpt=>../VirtualBox_XPCOM.xpt \
|
---|
500 | VBoxXPCOMBase.xpt=>../VBoxXPCOMBase.xpt \
|
---|
501 | VBoxC$(SUFF_DLL)=>../VBoxC$(SUFF_DLL) \
|
---|
502 | VBoxSVCM$(SUFF_DLL)=>../VBoxSVCM$(SUFF_DLL) \
|
---|
503 | VBoxXPCOMIPCC$(SUFF_DLL)=>../VBoxXPCOMIPCC$(SUFF_DLL)
|
---|
504 | endif
|
---|
505 |
|
---|
506 | # generate
|
---|
507 | include $(PATH_KBUILD)/footer.kmk
|
---|
508 |
|
---|
509 |
|
---|
510 | #
|
---|
511 | # Additions rules.
|
---|
512 | #
|
---|
513 |
|
---|
514 | XIDLFILE = idl/VirtualBox.xidl
|
---|
515 |
|
---|
516 | ifneq ($(BUILD_TARGET),win)
|
---|
517 |
|
---|
518 | linux/helpers.cpp: $(IDLTYPELIB)
|
---|
519 |
|
---|
520 | $(IDLFILE): idl/xpidl.xsl $(XIDLFILE) | $(call DIRDEP,$(dir $(IDLFILE)))
|
---|
521 | $(call MSG_TOOL,xsltproc,VBoxXML,$<,$@)
|
---|
522 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
523 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
|
---|
524 |
|
---|
525 | $(IDLTYPELIB): $(IDLFILE) | $(call DIRDEP,$(dir $(IDLTYPELIB)))
|
---|
526 | $(call MSG_TOOL,xpidl,VBoxXML,$<,$@)
|
---|
527 | $(QUIET)$(VBOX_XPIDL) -m typelib -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
|
---|
528 |
|
---|
529 | $(IDLHEADER): $(IDLFILE) | $(call DIRDEP,$(dir $(IDLHEADER)))
|
---|
530 | $(call MSG_TOOL,xpidl,VBoxXML,$<,$@)
|
---|
531 | $(QUIET)$(VBOX_XPIDL) -m header -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
|
---|
532 |
|
---|
533 | else
|
---|
534 |
|
---|
535 | MAIN_IDL ?= $(EXEC_X86_WIN32) $(firstword $(wildcard \
|
---|
536 | $(PATH_SDK_WINPSDK_BIN)/Midl.Exe\
|
---|
537 | $(PATH_SDK_WINPSDK)/Bin/Midl.Exe\
|
---|
538 | $(PATH_DEVTOOLS)/win.x86/bin/midl.exe\
|
---|
539 | ) Sorry_Cannot_Find_The_Midl_Compiler_In_The_PSDK)
|
---|
540 | IDL_DEFS = /nologo
|
---|
541 | ifdef VBOX_WITH_VRDP
|
---|
542 | IDL_DEFS += /D VBOX_VRDP
|
---|
543 | endif
|
---|
544 |
|
---|
545 | $(IDLFILE): idl/midl.xsl $(XIDLFILE)
|
---|
546 | $(call MSG_TOOL,xsltproc,VBoxXML,$<,$@)
|
---|
547 | $(QUIET)$(MKDIR) -p $(VBOX_PATH_SDK)/idl
|
---|
548 | $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
|
---|
549 |
|
---|
550 | ## @todo r=bird: last changes to this rule showed incorrect dependencies here as it broke testcase (see testboxwin2).
|
---|
551 | # This is kind of obvious when looking at the rule, because it's (a) not specifing all it output
|
---|
552 | # and (b) generating more stuff *after* the maintarget has been completed.
|
---|
553 | #
|
---|
554 | # What needs to be done is to not depend on _i.c in the object subdir, but on all the final outputs.
|
---|
555 | $(PATH_VBoxCOM)/VirtualBox_i.c: $(IDLFILE) | $(call DIRDEP,$(PATH_VBoxCOM))
|
---|
556 | $(MAIN_IDL) $(IDL_DEFS) \
|
---|
557 | /out $(subst /,\\,$(PATH_VBoxCOM)) \
|
---|
558 | /cpp_cmd $(subst /,\\,$(TOOL_$(VBOX_VCC_TOOL)_CC)) \
|
---|
559 | /I $(subst /,\\,$(PATH_SDK_WINPSDK_INC)) \
|
---|
560 | /I idl \
|
---|
561 | $(subst /,\\,$<)
|
---|
562 | $(MKDIR) -p $(VBOX_PATH_SDK)/include
|
---|
563 | $(CP) $(PATH_VBoxCOM)/VirtualBox.h $(VBOX_PATH_SDK)/include
|
---|
564 | $(MKDIR) -p $(VBOX_PATH_SDK)/lib
|
---|
565 | $(CP) $(PATH_VBoxCOM)/VirtualBox.tlb $(VBOX_PATH_SDK)/lib
|
---|
566 | $(CP) $(PATH_VBoxCOM)/VirtualBox_i.c $(VBOX_PATH_SDK)/lib
|
---|
567 |
|
---|
568 | endif
|
---|
569 |
|
---|
570 | # bird: anyone still using this? If not it's a gonner.
|
---|
571 | ## Hack to work around wine's trouble with midl.exe and rc.exe (seems to be msvcrt.dll related)
|
---|
572 | #gen: $(PREREQS)
|
---|
573 |
|
---|
574 |
|
---|
575 | #
|
---|
576 | # Translation stuff
|
---|
577 | #
|
---|
578 | VBoxSVC_HEADERS = \
|
---|
579 | include/collection.h \
|
---|
580 | include/MachineImpl.h \
|
---|
581 | include/HostDVDDriveImpl.h \
|
---|
582 | include/HostFloppyDriveImpl.h
|
---|
583 |
|
---|
584 | VBoxC_HEADERS = \
|
---|
585 | include/ConsoleImpl.h
|
---|
586 |
|
---|
587 | VBoxSVC_TRANSLATIONS = \
|
---|
588 | nls/VBoxSVC_de.ts
|
---|
589 |
|
---|
590 | VBoxC_TRANSLATIONS = \
|
---|
591 | nls/VBoxC_de.ts
|
---|
592 |
|
---|
593 | updatenls:
|
---|
594 | $(VBOX_LUPDATE) $(VBoxSVC_SOURCES) $(VBoxSVC_HEADERS) -ts $(VBoxSVC_TRANSLATIONS)
|
---|
595 | $(VBOX_LUPDATE) $(VBoxC_SOURCES) $(VBoxC_HEADERS) -ts $(VBoxC_TRANSLATIONS)
|
---|
596 |
|
---|
597 | ifdef VBOX_WITH_XPCOM
|
---|
598 |
|
---|
599 | testidl: $(IDLFILE) $(IDLTYPELIB)
|
---|
600 | testidlhdr: $(IDLHEADER)
|
---|
601 |
|
---|
602 | else
|
---|
603 |
|
---|
604 | testidl: $(IDLFILE) $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
605 |
|
---|
606 | endif
|
---|
607 |
|
---|
608 | $(PATH_BIN)/comregister.cmd: win32/comregister.cmd
|
---|
609 | $(CP) $< $@
|
---|
610 |
|
---|
611 |
|
---|
612 | # Hot fix when dependencies goes bad again...
|
---|
613 | #.NOTPARALLEL: $(TARGET_VBoxC) $(TARGET_VBoxSVC) $(TARGET_VBoxCOM) $(IDLHEADER) $(IDLFILE) $(PATH_VBoxCOM)/VirtualBox_i.c
|
---|
614 |
|
---|