VirtualBox

source: vbox/trunk/src/VBox/Main/Makefile.kmk@ 18761

Last change on this file since 18761 was 18749, checked in by vboxsync, 16 years ago

Stopping the build when doxygen is unhappy is not yet ready for prime time.
The build boxen use different doxygen versions with different capabilities
and need updating before stopping is an option.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 24.6 KB
Line 
1# $Id: Makefile.kmk 18749 2009-04-06 11:24:19Z vboxsync $
2## @file
3# Makefile for the VBox Main module.
4#
5
6#
7# Copyright (C) 2006-2007 Sun Microsystems, Inc.
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 (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22SUB_DEPTH = ../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25#
26# Include sub-makefile(s).
27#
28ifdef VBOX_WITH_WEBSERVICES
29 include $(PATH_SUB_CURRENT)/webservice/Makefile.kmk
30endif
31include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
32include $(PATH_SUB_CURRENT)/cbinding/Makefile.kmk
33
34
35#
36# Targets and globals (bit of a mess...)
37#
38VBOX_PATH_MAIN_SRC := $(PATH_SUB_CURRENT)
39
40ifdef VBOX_ONLY_SDK
41 # used by some rules
42 PATH_VBoxCOM = $(PATH_TARGET)/VBoxCOM
43 BLDDIRS += $(PATH_VBoxCOM) $(PATH_BIN)/components
44 # I'm Evil! Dr. Evil.
45 include $(KBUILD_PATH)/tools/VCC70.kmk
46 include $(KBUILD_PATH)/sdks/WINPSDK.kmk
47endif #!VBOX_ONLY_SDK
48
49
50# Construct VBOX_MAIN_DEFS
51## @todo eliminate or expand VBOX_MAIN_DEFS.
52VBOX_MAIN_DEFS =
53ifneq ($(KBUILD_TARGET),win)
54 ifndef VBOX_WITH_XPCOM
55 $(error "VBox: VBOX_WITH_XPCOM isn't defined")
56 endif
57 ifneq ($(KBUILD_TARGET),os2)
58 VBOX_MAIN_DEFS+= VBOX_WITH_SYS_V_IPC_SESSION_WATCHER
59 endif
60endif
61VBOX_MAIN_DEFS += \
62 $(if $(VBOX_WITH_NETFLT),VBOX_WITH_NETFLT,) \
63 $(if $(VBOX_WITH_CROGL),VBOX_WITH_CROGL,) \
64 $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
65 $(if $(VBOX_WITH_HOSTNETIF_API),VBOX_WITH_HOSTNETIF_API,)
66
67if1of ($(KBUILD_TARGET), linux freebsd solaris)
68 VBOX_MAIN_DEFS += VBOX_MAIN_USE_SEMRW
69#else
70# if1of ($(VBOX_VERSION_BUILD),1 3 5 7 9)
71# VBOX_MAIN_DEFS += VBOX_MAIN_AUTOLOCK_TRAP
72# endif
73endif
74
75# Unconditionally enable the new semaphore key generation code
76VBOX_MAIN_DEFS += VBOX_WITH_NEW_SYS_V_KEYGEN
77
78VBOX_IDL_FILE.MSCOM = $(VBOX_PATH_SDK)/bindings/mscom/idl/VirtualBox.idl
79VBOX_IDL_FILE.XPCOM = $(VBOX_PATH_SDK)/bindings/xpcom/idl/VirtualBox_XPCOM.idl
80
81VBOX_IDL_TYPELIB.XPCOM = $(PATH_BIN)/components/VirtualBox_XPCOM.xpt
82VBOX_IDL_HEADER.XPCOM = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
83
84# The MS COM specific stuff.
85if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" == "win"
86 OTHERS += \
87 $(VBOX_IDL_FILE.MSCOM) \
88 $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h \
89 $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox.tlb \
90 $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c \
91 $(VBOX_PATH_SDK)/bindings/mscom/python/samples/vboxshell.py \
92 $(VBOX_PATH_SDK)/bindings/mscom/python/samples/shellcommon.py
93 OTHER_CLEAN += \
94 $(VBOX_IDL_FILE.MSCOM) \
95 $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h \
96 $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox.tlb \
97 $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c \
98 $(PATH_VBoxCOM)/VirtualBox.h \
99 $(PATH_VBoxCOM)/VirtualBox_i.c \
100 $(PATH_VBoxCOM)/VirtualBox.tlb \
101 $(VBOX_PATH_SDK)/bindings/mscom/python/samples/vboxshell.py \
102 $(VBOX_PATH_SDK)/bindings/mscom/python/samples/shellcommon.py
103
104 VBOX_MAIN_PREREQS += $(PATH_VBoxCOM)/VirtualBox_i.c
105 BLDDIRS += $(VBOX_PATH_SDK)/bindings/mscom/idl
106endif
107
108# The XPCOM specific stuff.
109if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" != "win"
110 OTHERS += $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM) $(VBOX_IDL_HEADER.XPCOM)
111 OTHER_CLEAN += \
112 $(VBOX_IDL_FILE.XPCOM) \
113 $(VBOX_IDL_HEADER.XPCOM) \
114 $(VBOX_IDL_TYPELIB.XPCOM)
115
116 VBOX_MAIN_PREREQS += $(VBOX_IDL_TYPELIB.XPCOM) $(VBOX_IDL_HEADER.XPCOM)
117 BLDDIRS += \
118 $(VBOX_PATH_SDK)/bindings/xpcom/idl \
119 $(VBOX_PATH_SDK)/bindings/xpcom/include
120endif # xpcom
121
122
123#
124# Strip documentation from source XIDL so that we don't get a full
125# recompile every time a comma in the documentation is changed.
126#
127$(VBOX_XIDL_FILE).ts |+ $(VBOX_XIDL_FILE): \
128 $(VBOX_XIDL_FILE_SRC) \
129 $(VBOX_PATH_MAIN_SRC)/idl/docstrip.xsl \
130 | $$(dir $$@)
131# $(CP) -fv $< $(VBOX_XIDL_FILE).ts
132 $(VBOX_XSLTPROC) -o $(VBOX_XIDL_FILE).ts $(VBOX_PATH_MAIN_SRC)/idl/docstrip.xsl $<
133 $(CP) --changed -fv $(VBOX_XIDL_FILE).ts $(VBOX_XIDL_FILE)
134
135
136#
137# The Main API documentation
138#
139VBOX_MAIN_DOC_DIR = $(VBOX_PATH_SDK)/docs
140BLDDIRS += $(VBOX_MAIN_DOC_DIR)
141
142$(PATH_TARGET)/docs.Main: \
143 $(VBOX_PATH_MAIN_SRC)/Doxyfile.Main \
144 $(VBOX_PATH_MAIN_SRC)/idl/doxygen.xsl \
145 $(VBOX_XIDL_FILE_SRC) \
146 | $(PATH_TARGET)/ \
147 $(VBOX_MAIN_DOC_DIR)/
148 $(RM) -f $(wildcard $(VBOX_MAIN_DOC_DIR)/html/*) $(PATH_TARGET)/docs.Main
149 $(VBOX_XSLTPROC) -o $(PATH_TARGET)/VirtualBox.idl $(VBOX_PATH_MAIN_SRC)/idl/doxygen.xsl $(VBOX_XIDL_FILE_SRC)
150 $(REDIRECT) -E 'DOCDIR=$(VBOX_MAIN_DOC_DIR)' -E 'PATH_TARGET=$(PATH_TARGET)' -E 'PATH_CHM=$(subst /,\,$(VBOX_MAIN_DOC_DIR)/VirtualBoxAPI.chm)' \
151 -- doxygen $(VBOX_PATH_MAIN_SRC)/Doxyfile.Main
152 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) ">>>>>>>>>>>>>>>>>>>> Main.err: >>>>>>>>>>>>>>>>>>>>>>>>"
153 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(CAT) "$(PATH_TARGET)/Main.err"
154 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "<<<<<<<<<<<<<<<<<<<< Main.err <<<<<<<<<<<<<<<<<<<<<<<<<"
155 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> **************************************************"
156 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> Please fix above doxygen errors/warnings listed in"
157 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> $(PATH_TARGET)/Main.err"
158 $(QUIET)$(TEST) -s "$(PATH_TARGET)/Main.err" -- $(ECHO_EXT) "===> **************************************************"
159 -$(EXEC_X86_WIN32) $(VBOX_PATH_HTML_HELP_WORKSHOP)/hhc.exe $(subst /,\\,$(VBOX_MAIN_DOC_DIR)/html/index.hhp)
160 $(APPEND) $(PATH_TARGET)/docs.Main
161# aliases
162docs.main docs.Main: $(PATH_TARGET)/docs.Main
163if !defined(VBOX_ONLY_DOCS)
164docs: $(PATH_TARGET)/docs.Main
165endif
166
167
168#
169# Some SDK bit.
170#
171INSTALLS += VBox-main-xidl
172VBox-main-xidl_INST = $(INST_SDK)bindings/
173VBox-main-xidl_SOURCES = $(VBOX_XIDL_FILE_SRC)
174
175
176ifndef VBOX_ONLY_SDK # Note this goes on for *very* long
177
178#
179# Generate SchemaDefs.h and SchemaDefs.cpp from XML Schema
180# These two files are used by both VBoxC and VBoxSVC.
181#
182BLDDIRS += $(PATH_TARGET)/Main
183VBOX_XML_SCHEMADEFS_H = $(PATH_TARGET)/Main/SchemaDefs.h
184VBOX_XML_SCHEMADEFS_CPP = $(PATH_TARGET)/Main/SchemaDefs.cpp
185VBOX_XML_SCHEMADEFS_XSL = $(VBOX_PATH_MAIN_SRC)/xml/SchemaDefs.xsl
186
187testschemadefs: $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
188
189
190#
191# VBoxSVC executable
192#
193PROGRAMS += VBoxSVC
194VBoxSVC_TEMPLATE = VBOXMAINEXE
195VBoxSVC_DEFS = \
196 VBOX_MAIN_SETTINGS_ADDONS \
197 $(VBOX_MAIN_DEFS) \
198 $(if $(VBOX_WITH_VRDP),VBOX_WITH_VRDP,) \
199 $(if $(VBOX_WITH_HEADLESS),VBOX_WITH_HEADLESS,) \
200 $(if $(VBOX_WITH_QTGUI),VBOX_WITH_QTGUI,) \
201 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
202 $(if $(VBOX_MAIN_RELEASE_LOG),VBOX_MAIN_RELEASE_LOG LOG_ENABLED,) \
203 $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
204 $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
205 $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
206 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
207 $(if $(VBOX_WITH_AHCI),VBOX_WITH_AHCI,) \
208 $(if $(VBOX_WITHOUT_LINUX_COMPILER_H),VBOX_WITHOUT_LINUX_COMPILER_H,) \
209 $(if $(VBOX_WITH_RESOURCE_USAGE_API),VBOX_WITH_RESOURCE_USAGE_API,) \
210 $(if $(VBOX_WITH_PDM_ASYNC_COMPLETION),VBOX_WITH_PDM_ASYNC_COMPLETION,) \
211 $(if $(VBOX_WITH_DBUS),VBOX_WITH_DBUS,) \
212 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,)
213
214VBoxSVC_CXXFLAGS = $(filter-out -Wno-unused,$(TEMPLATE_VBOXMAINEXE_CXXFLAGS))
215
216ifdef VBOX_WITH_USB
217 VBoxSVC_DEFS += \
218 VBOX_WITH_USB \
219 $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI,) \
220 $(if $(VBOX_WITH_NEW_USB_CODE_ON_DARWIN),VBOX_WITH_NEW_USB_CODE_ON_DARWIN,)
221endif
222
223
224VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
225VBoxSVC_DEFS.win.x86 += _WIN32_WINNT=0x0500
226VBoxSVC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
227# Try to load and use libhal at runtime for probing removable media
228# VBoxSVC_DEFS.linux += VBOX_USE_LIBHAL
229VBoxSVC_DEFS.solaris += VBOX_USE_LIBHAL
230ifdef VBOX_SOLARIS_NSL_RESOLVED
231 VBoxSVC_DEFS.solaris += VBOX_SOLARIS_NSL_RESOLVED
232endif
233
234VBoxSVC_INCS = \
235 include \
236 $(PATH_VBoxSVC) \
237 $(dir $(VBOX_XML_SCHEMADEFS_H)) \
238 .
239VBoxSVC_INCS.win = \
240 $(PATH_VBoxCOM)
241ifdef VBOX_WITH_USB
242 VBoxSVC_INCS.os2 = \
243 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
244endif
245
246VBoxSVC_LIBS += \
247 $(LIB_DDU) \
248 $(LIB_SETTINGS)
249VBoxSVC_LIBS.darwin = \
250 $(LIB_VMM) \
251 $(LIB_REM)
252VBoxSVC_LIBS.solaris = \
253 adm \
254 nsl
255ifdef VBOX_WITH_NETFLT
256 ifdef VBOX_SOLARIS_NSL_RESOLVED
257 VBoxSVC_LIBS.solaris += devinfo
258 endif
259 VBoxSVC_LIBS.solaris += socket
260endif
261ifdef VBOX_WITH_USB
262 VBoxSVC_LIBS.solaris += \
263 devinfo
264endif
265
266VBoxSVC_INTERMEDIATES = \
267 $(VBOX_MAIN_PREREQS) \
268 $(VBOX_XML_SCHEMADEFS_H)
269
270VBoxSVC_SOURCES = \
271 Global.cpp \
272 Logging.cpp \
273 AutoLock.cpp \
274 Matching.cpp \
275 VirtualBoxBase.cpp \
276 VirtualBoxErrorInfoImpl.cpp \
277 VirtualBoxImpl.cpp \
278 VirtualBoxImplExtra.cpp \
279 ApplianceImpl.cpp \
280 MachineImpl.cpp \
281 SnapshotImpl.cpp \
282 MediumImpl.cpp \
283 HardDiskImpl.cpp \
284 HardDiskAttachmentImpl.cpp \
285 HardDiskFormatImpl.cpp \
286 ProgressImpl.cpp \
287 DVDDriveImpl.cpp \
288 FloppyDriveImpl.cpp \
289 HostImpl.cpp \
290 HostDVDDriveImpl.cpp \
291 HostFloppyDriveImpl.cpp \
292 HostNetworkInterfaceImpl.cpp \
293 DHCPServerImpl.cpp \
294 DHCPServerRunner.cpp \
295 GuestOSTypeImpl.cpp \
296 NetworkAdapterImpl.cpp \
297 SerialPortImpl.cpp \
298 ParallelPortImpl.cpp \
299 USBControllerImpl.cpp \
300 StorageControllerImpl.cpp \
301 AudioAdapterImpl.cpp \
302 SharedFolderImpl.cpp \
303 SystemPropertiesImpl.cpp \
304 BIOSSettingsImpl.cpp \
305 Version.cpp \
306 HostPower.cpp \
307 $(if $(VBOX_WITH_VRDP),VRDPServerImpl.cpp,) \
308 $(if $(VBOX_WITH_XPCOM),xpcom/server.cpp,) \
309 $(VBOX_XML_SCHEMADEFS_CPP)
310
311VBoxSVC_SOURCES.darwin = \
312 darwin/iokit.cpp \
313 darwin/HostPowerDarwin.cpp
314
315VBoxSVC_SOURCES.win = \
316 win/svcmain.cpp \
317 win/svchlp.cpp \
318 win/HostPowerWin.cpp \
319 win/VBoxSVC.rc
320
321VBoxSVC_SOURCES.linux = \
322 linux/HostHardwareLinux.cpp
323
324ifdef VBOX_WITH_DBUS
325 VBoxSVC_SOURCES.linux += linux/vbox-dbus.cpp
326endif
327
328VBoxSVC_SOURCES.solaris = \
329 linux/vbox-libhal.cpp \
330 solaris/DynLoadLibSolaris.cpp
331
332ifdef VBOX_WITH_USB
333 VBoxSVC_SOURCES += \
334 USBDeviceFilterImpl.cpp \
335 USBProxyService.cpp \
336 HostUSBDeviceImpl.cpp
337 VBoxSVC_SOURCES.darwin += darwin/USBProxyServiceDarwin.cpp
338 VBoxSVC_SOURCES.linux += linux/USBProxyServiceLinux.cpp
339 VBoxSVC_SOURCES.os2 += os2/USBProxyServiceOs2.cpp
340 VBoxSVC_SOURCES.solaris += solaris/USBProxyServiceSolaris.cpp
341 VBoxSVC_SOURCES.win += win/USBProxyServiceWindows.cpp
342endif
343
344ifdef VBOX_WITH_NETFLT
345 # Note! The includes from the TOOL has lower priority than the SDKs,
346 # since comdef.h is in both the DDK and VCC we want to make sure
347 # we're using the VCC since we're not using the DDK compiler/crt.
348 # Since this is potentially risky, restrict it to the source file
349 # needing it.
350 win/NetIf-win.cpp_INCS.win += $(PATH_TOOL_$(VBOX_VCC_TOOL)_INC)
351 VBoxSVC_LIBS.win += \
352 $(PATH_LIB)/WinNetConfig.lib \
353 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
354 $(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
355 ifdef VBOX_NETFLT_ONDEMAND_BIND
356 VBoxSVC_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
357 endif
358endif
359VBoxSVC_LDFLAGS.darwin = -framework IOKit -framework SystemConfiguration
360ifeq ($(KBUILD_TYPE),debug)
361 VBoxSVC_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
362endif
363
364ifdef VBOX_WITH_RESOURCE_USAGE_API
365 VBoxSVC_SOURCES += \
366 PerformanceImpl.cpp \
367 Performance.cpp
368 VBoxSVC_SOURCES.darwin += darwin/PerformanceDarwin.cpp
369 VBoxSVC_SOURCES.freebsd += freebsd/PerformanceFreeBSD.cpp
370 VBoxSVC_SOURCES.linux += linux/PerformanceLinux.cpp
371 VBoxSVC_SOURCES.os2 += os2/PerformanceOs2.cpp
372 VBoxSVC_SOURCES.solaris += solaris/PerformanceSolaris.cpp
373 VBoxSVC_SOURCES.win += win/PerformanceWin.cpp
374 VBoxSVC_LDFLAGS.darwin += -lproc
375 VBoxSVC_LDFLAGS.solaris += -lkstat
376 VBoxSVC_LDFLAGS.win += psapi.lib powrprof.lib
377endif
378
379ifdef VBOX_WITH_HOSTNETIF_API
380 VBoxSVC_SOURCES.win += win/NetIf-win.cpp
381 VBoxSVC_SOURCES.linux += linux/NetIf-linux.cpp
382 VBoxSVC_SOURCES.os2 += os2/NetIf-os2.cpp
383 VBoxSVC_SOURCES.darwin += darwin/NetIf-darwin.cpp
384 VBoxSVC_SOURCES.solaris += solaris/NetIf-solaris.cpp
385 VBoxSVC_DEFS += VBOX_WITH_HOSTNETIF_API
386 if1of ($(KBUILD_TARGET), linux darwin solaris)
387 VBoxSVC_SOURCES += generic/NetIf-generic.cpp
388 endif
389endif
390
391
392win/VBoxSVC.rc_INCS = $(PATH_VBoxSVC)
393win/VBoxSVC.rc_DEPS = $(PATH_VBoxSVC)/VBoxSVC.rgs $(PATH_VBoxSVC)/VBoxSVC-icon.rc
394win/VBoxSVC.rc_CLEAN = $(PATH_VBoxSVC)/VBoxSVC.rgs $(PATH_VBoxSVC)/VBoxSVC-icon.rc
395
396$$(PATH_VBoxSVC)/VBoxSVC-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$(@D))
397 $(APPEND) -t $@ '1 ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
398
399$$(PATH_VBoxSVC)/VBoxSVC.rgs: $(VBOX_PATH_MAIN_SRC)/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(dir $$(@D))
400 $(VBOX_XSLTPROC) --stringparam Module VBoxSVC -o $@ $< $(VBOX_XIDL_FILE)
401
402#
403# Embed XML Schema files to VBoxSVC
404#
405VBOX_XML_SCHEMA_COMMON = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-common.xsd
406VBOX_XML_SCHEMA.darwin = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-macosx.xsd
407VBOX_XML_SCHEMA.linux = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-linux.xsd
408VBOX_XML_SCHEMA.freebsd = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-freebsd.xsd
409VBOX_XML_SCHEMA.win = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-windows.xsd
410VBOX_XML_SCHEMA.os2 = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-os2.xsd
411VBOX_XML_SCHEMA.solaris = $(VBOX_PATH_MAIN_SRC)/xml/VirtualBox-settings-solaris.xsd
412
413VBOX_XML_CONVERTER_TEMPLATE = $(VBOX_PATH_MAIN_SRC)/xml/SettingsConverter.xsl
414
415$$(PATH_VBoxSVC)/xml_VirtualBox_settings_xsd.h: $(VBOX_XML_SCHEMA.$(KBUILD_TARGET)) $(VBOX_BIN2C)
416 $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
417 $(QUIET)$(VBOX_BIN2C) _xml_VirtualBox_settings_xsd $< $@
418
419$$(PATH_VBoxSVC)/xml_VirtualBox_settings_common_xsd.h: $(VBOX_XML_SCHEMA_COMMON) $(VBOX_BIN2C)
420 $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
421 $(QUIET)$(VBOX_BIN2C) _xml_VirtualBox_settings_common_xsd $< $@
422
423$$(PATH_VBoxSVC)/xml_SettingsConverter_xsl.h: $(VBOX_XML_CONVERTER_TEMPLATE) $(VBOX_BIN2C)
424 $(call MSG_TOOL,bin2c,VBoxSVC,$<,$@)
425 $(QUIET)$(VBOX_BIN2C) _xml_SettingsConverter_xsl $< $@
426
427VirtualBoxImplExtra.cpp_DEPS = \
428 $(PATH_VBoxSVC)/xml_VirtualBox_settings_xsd.h \
429 $(PATH_VBoxSVC)/xml_VirtualBox_settings_common_xsd.h \
430 $(PATH_VBoxSVC)/xml_SettingsConverter_xsl.h
431VBoxSVC_CLEAN += $(VirtualBoxImplExtra.cpp_DEPS)
432
433$(VBOX_XML_SCHEMADEFS_H): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET)) $(VBOX_XML_SCHEMA_COMMON) | $$(dir $$@)
434 $(call MSG_GENERATE,SchemaDefs,$@,$<)
435 $(VBOX_XSLTPROC) --stringparam mode declare -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET))
436
437$(VBOX_XML_SCHEMADEFS_CPP): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET)) $(VBOX_XML_SCHEMA_COMMON) | $$(dir $$@)
438 $(call MSG_GENERATE,SchemaDefs,$@,$<)
439 $(VBOX_XSLTPROC) --stringparam mode define -o $@ $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(KBUILD_TARGET))
440
441OTHER_CLEAN += $(VBOX_XML_SCHEMADEFS_H) $(VBOX_XML_SCHEMADEFS_CPP)
442
443
444ifdef VBOX_WITH_XPCOM
445#
446# VBoxSVCM - VBoxSVC wrapper module
447#
448DLLS += VBoxSVCM
449VBoxSVCM_TEMPLATE = VBOXMAINCOMP
450VBoxSVCM_DEFS = IN_RING3 $(VBOX_MAIN_DEFS)
451VBoxSVCM_INCS = \
452 include \
453 $(PATH_VBoxC) \
454 .
455VBoxSVCM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
456VBoxSVCM_SOURCES = \
457 xpcom/server_module.cpp
458VBoxSVCM_LDFLAGS.darwin = \
459 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxSVCM.dylib \
460 -exported_symbols_list $(PATH_VBoxSVCM)/VBoxSVCM.def
461 ifeq ($(KBUILD_TARGET),darwin)
462VBoxSVCM_ORDERDEPS += $(PATH_VBoxSVCM)/VBoxSVCM.def
463VBoxSVCM_CLEAN += $(PATH_VBoxSVCM)/VBoxSVCM.def
464$$(PATH_VBoxSVCM)/VBoxSVCM.def:
465 $(RM) -f $@
466 $(APPEND) $@ _NSGetModule
467 endif
468VBoxSVCM_INTERMEDIATES += $(VBOX_IDL_HEADER.XPCOM)
469
470endif # VBOX_WITH_XPCOM
471
472
473#
474# VBoxSettings
475#
476DLLS += VBoxSettings
477VBoxSettings_TEMPLATE = VBOXMAINDLL
478VBoxSettings_NAME = $(basename $(notdir $(LIB_SETTINGS)))
479VBoxSettings_SDKS = VBOX_LIBXSLT VBOX_LIBXML2 VBOX_ZLIB VBOX_BOOST
480VBoxSettings_DEFS = IN_VBOXXML_R3
481VBoxSettings_INCS = \
482 include
483VBoxSettings_SOURCES = \
484 xml/xml.cpp \
485 xml/Settings.cpp
486VBoxSettings_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/$(notdir $(LIB_SETTINGS)) -Wl,-x # no debug info please.
487
488
489#
490# VBoxC module
491#
492DLLS += VBoxC
493VBoxC_TEMPLATE = VBOXMAINCOMP
494VBoxC_DEFS = \
495 IN_RING3 \
496 $(VBOX_MAIN_DEFS) \
497 VBOX_COM_INPROC \
498 $(if $(VBOX_WITH_VRDP),VBOX_WITH_VRDP,) \
499 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
500 $(if $(VBOX_MAIN_RELEASE_LOG),VBOX_MAIN_RELEASE_LOG LOG_ENABLED,) \
501 $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
502 $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
503 $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
504 $(if $(VBOX_WITH_CROSSBOW),VBOX_WITH_CROSSBOW,) \
505 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
506 $(if $(VBOX_WITH_EFI),VBOX_WITH_EFI,) \
507 $(if $(VBOX_WITH_HPET),VBOX_WITH_HPET,) \
508 $(if $(VBOX_WITH_SMC),VBOX_WITH_SMC,) \
509 $(if $(VBOX_WITH_LPC),VBOX_WITH_LPC,) \
510 $(if $(VBOX_WITH_PDM_ASYNC_COMPLETION),VBOX_WITH_PDM_ASYNC_COMPLETION,)
511ifdef VBOX_WITH_USB
512VBoxC_DEFS += \
513 VBOX_WITH_USB \
514 $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI,)
515endif
516VBoxC_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE
517VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
518VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
519
520VBoxC_INCS = \
521 include \
522 $(PATH_VBoxC) \
523 $(dir $(VBOX_XML_SCHEMADEFS_H))
524VBoxC_INCS.win = \
525 $(PATH_VBoxCOM) \
526 .
527
528VBoxC_LDFLAGS.darwin = \
529 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxC.dylib \
530 -exported_symbols_list $(PATH_VBoxC)/VBoxC.def
531ifdef VBOX_USE_VCC80
532 VBoxC_LDFLAGS.win = /MANIFEST
533endif
534
535VBoxC_LIBS += \
536 $(LIB_VMM) \
537 $(LIB_REM)
538
539ifdef VBOX_WITH_NETFLT
540 VBoxC_LIBS.win += $(PATH_LIB)/WinNetConfig.lib
541endif
542
543VBoxC_INTERMEDIATES = \
544 $(VBOX_MAIN_PREREQS) \
545 $(VBOX_XML_SCHEMADEFS_H)
546
547VBoxC_SOURCES = \
548 Global.cpp \
549 Logging.cpp \
550 AutoLock.cpp \
551 VBoxDll.cpp \
552 Version.cpp \
553 USBDeviceImpl.cpp \
554 RemoteUSBDeviceImpl.cpp \
555 VirtualBoxBase.cpp \
556 VirtualBoxErrorInfoImpl.cpp \
557 ProgressImpl.cpp \
558 SharedFolderImpl.cpp \
559 SessionImpl.cpp \
560 ConsoleImpl.cpp \
561 ConsoleImpl2.cpp \
562 ConsoleVRDPServer.cpp \
563 GuestImpl.cpp \
564 KeyboardImpl.cpp \
565 MouseImpl.cpp \
566 DisplayImpl.cpp \
567 FramebufferImpl.cpp \
568 MachineDebuggerImpl.cpp \
569 VBoxDriversRegister.cpp \
570 AudioSnifferInterface.cpp \
571 VMMDevInterface.cpp \
572 $(VBOX_XML_SCHEMADEFS_CPP)
573VBoxC_SOURCES.win = \
574 win/dllmain.cpp \
575 win/VBoxC.def \
576 win/VBoxC.rc
577
578ifdef VBOX_WITH_XPCOM
579VBoxC_SOURCES += \
580 xpcom/module.cpp
581endif
582
583ifdef VBOX_WITH_HGCM
584VBoxC_SOURCES += \
585 hgcm/HGCMObjects.cpp \
586 hgcm/HGCMThread.cpp \
587 hgcm/HGCM.cpp
588endif
589
590ifdef VBOX_WITH_USB
591VBoxC_SOURCES += \
592 RemoteUSBBackend.cpp
593endif
594
595ifeq ($(KBUILD_TARGET),darwin)
596VBoxC_ORDERDEPS += $(PATH_VBoxC)/VBoxC.def
597VBoxC_CLEAN += $(PATH_VBoxC)/VBoxC.def
598$$(PATH_VBoxC)/VBoxC.def: $(MAKEFILE_CURRENT)
599 $(RM) -f $@
600 $(APPEND) $@ _NSGetModule
601 $(APPEND) $@ _VBoxDriversRegister
602endif
603
604ConsoleImpl.cpp_DEFS = \
605 VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
606
607
608Version.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
609Version.cpp_DEPS = $(VBOX_SVN_REV_KMK)
610
611win/VBoxC.rc_DEPS = $(PATH_VBoxC)/VBoxC.rgs $(PATH_VBoxCOM)/VirtualBox.tlb
612VBoxC_CLEAN.win += $(PATH_VBoxC)/VBoxC.rgs
613
614$$(PATH_VBoxC)/VBoxC.rgs: $(VBOX_PATH_MAIN_SRC)/win/VirtualBox_rgs.xsl $(VBOX_XIDL_FILE) | $$(PATH_VBoxC)/
615 $(VBOX_XSLTPROC) --stringparam Module VBoxC -o $@ $< $(VBOX_XIDL_FILE)
616
617
618#
619# VBoxCOM - COM Abstraction Layer library
620#
621LIBRARIES += VBoxCOM
622VBoxCOM_TEMPLATE = VBOXMAINLIB
623VBoxCOM_INTERMEDIATES = $(VBOX_MAIN_PREREQS)
624VBoxCOM_SOURCES = \
625 glue/com.cpp \
626 glue/initterm.cpp \
627 glue/string.cpp \
628 glue/EventQueue.cpp \
629 glue/ErrorInfo.cpp \
630 glue/errorprint2.cpp \
631 glue/SupportErrorInfo.cpp \
632 glue/VirtualBoxErrorInfo.cpp
633ifeq ($(KBUILD_TARGET),win)
634 VBoxCOM_DEFS.x86 += _WIN32_WINNT=0x0500
635 VBoxCOM_DEFS.amd64 += _WIN32_WINNT=0x0510
636 VBoxCOM_SOURCES += \
637 $(PATH_VBoxCOM)/VirtualBox_i.c
638else # !win
639 VBoxCOM_INCS += \
640 include
641 VBoxCOM_SOURCES += \
642 xpcom/helpers.cpp
643endif # !win
644
645
646endif # !VBOX_ONLY_SDK (the ifndef is far above)
647
648
649#
650# Installs com related thing(s) to bin.
651#
652INSTALLS.win += VBoxMain-com-inst
653VBoxMain-com-inst_INST = $(INST_BIN)
654VBoxMain-com-inst_SOURCES = \
655 win/comregister.cmd
656
657
658# generate rules
659include $(KBUILD_PATH)/subfooter.kmk
660
661
662
663#
664# Additions rules.
665#
666
667## @todo this hack ain't cutting it any longer. (the file name is abspath'ed since ages now.)
668xpcom/helpers.cpp: $(VBOX_IDL_TYPELIB.XPCOM)
669
670$(VBOX_IDL_FILE.XPCOM): $(VBOX_PATH_MAIN_SRC)/idl/xpidl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
671 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
672 $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
673
674$(VBOX_IDL_TYPELIB.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
675 $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
676 $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m typelib -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
677 chmod 0644 $@
678## @todo ^^^^^^^^^^^^ fix horrible hack
679
680$(VBOX_IDL_HEADER.XPCOM): $(VBOX_IDL_FILE.XPCOM) | $$(dir $$@) $(VBOX_XPIDL)
681 $(call MSG_TOOL,xpidl,VBoxSVC,$<,$@)
682 $(QUIET)$(VBOX_XPIDL_ENV)$(VBOX_XPIDL) -m header -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
683
684
685VBOX_MAIN_IDL ?= $(EXEC_X86_WIN32) $(call VBOX_FN_MAKE_WIN_PATH,$(firstword $(wildcard \
686 $(PATH_SDK_WINPSDK_BIN)/Midl.Exe\
687 $(PATH_SDK_WINPSDK)/Bin/Midl.Exe\
688 $(PATH_DEVTOOLS)/win.x86/bin/midl.exe\
689 ) Sorry_Cannot_Find_The_Midl_Compiler_In_The_PSDK))
690IDL_DEFS = /nologo
691ifdef VBOX_WITH_VRDP
692 IDL_DEFS += /D VBOX_WITH_VRDP
693endif
694
695$(VBOX_IDL_FILE.MSCOM): $(VBOX_PATH_MAIN_SRC)/idl/midl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
696 $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
697 $(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
698
699
700# Aliases for testing purposes.
701ifdef VBOX_WITH_XPCOM
702testidl: $(VBOX_IDL_FILE.XPCOM) $(VBOX_IDL_TYPELIB.XPCOM)
703testidlhdr: $(VBOX_IDL_HEADER.XPCOM)
704else
705testidl: $(VBOX_IDL_FILE.MSCOM) $(PATH_VBoxCOM)/VirtualBox_i.c
706endif
707
708
709## @todo r=bird: last changes to this rule showed incorrect dependencies here as it broke testcase (see testboxwin2).
710# This is kind of obvious when looking at the rule, because it's (a) not specifying all it output
711# and (b) generating more stuff *after* the main target has been completed.
712#
713# What needs to be done is to not depend on _i.c in the object subdir, but on all the final outputs.
714$(PATH_VBoxCOM)/VirtualBox_i.c \
715+ $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c \
716+ $(PATH_VBoxCOM)/VirtualBox.h \
717+ $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h \
718+ $(PATH_VBoxCOM)/VirtualBox.tlb \
719+ $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox.tlb: $(VBOX_IDL_FILE.MSCOM) | $(call DIRDEP,$(PATH_VBoxCOM))
720 $(VBOX_MAIN_IDL) $(IDL_DEFS) \
721 /out $(call VBOX_FN_MAKE_WIN_PATH,$(PATH_VBoxCOM)) \
722 /cpp_cmd $(subst $(EXEC_X86_WIN32),,$(call VBOX_FN_MAKE_WIN_PATH,$(TOOL_$(VBOX_VCC_TOOL)_CC))) \
723 /I $(call VBOX_FN_MAKE_WIN_PATH,$(PATH_SDK_WINPSDK_INC)) \
724 /I idl \
725 $(call VBOX_FN_MAKE_WIN_PATH,$<)
726 $(MKDIR) -p $(VBOX_PATH_SDK)/bindings/mscom/include
727 $(CP) $(PATH_VBoxCOM)/VirtualBox.h $(VBOX_PATH_SDK)/bindings/mscom/include
728 $(MKDIR) -p $(VBOX_PATH_SDK)/bindings/mscom/lib
729 $(CP) $(PATH_VBoxCOM)/VirtualBox.tlb $(VBOX_PATH_SDK)/bindings/mscom/lib
730 $(CP) $(PATH_VBoxCOM)/VirtualBox_i.c $(VBOX_PATH_SDK)/bindings/mscom/lib
731
732
733## @todo Use install targets, please.
734# Actually, what on earth is this stuff doing? Why copy two files like this?
735$(VBOX_PATH_SDK)/bindings/mscom/python/samples/shellcommon.py \
736+ $(VBOX_PATH_SDK)/bindings/mscom/python/samples/vboxshell.py: \
737 $(PATH_ROOT)/src/VBox/Frontends/VBoxShell/shellcommon.py \
738 $(PATH_ROOT)/src/VBox/Frontends/VBoxShell/mscom/vboxshell.py
739 $(MKDIR) -p $(VBOX_PATH_SDK)/bindings/mscom/python/samples
740 $(CP) $(PATH_ROOT)/src/VBox/Frontends/VBoxShell/shellcommon.py $(VBOX_PATH_SDK)/bindings/mscom/python/samples/shellcommon.py
741 $(CP) $(PATH_ROOT)/src/VBox/Frontends/VBoxShell/mscom/vboxshell.py $(VBOX_PATH_SDK)/bindings/mscom/python/samples/vboxshell.py
742
743#
744# Translation stuff
745#
746VBoxSVC_VBOX_HEADERS = \
747 include/collection.h \
748 include/MachineImpl.h \
749 include/HostDVDDriveImpl.h \
750 include/HostFloppyDriveImpl.h
751VBoxSVC_VBOX_TRANSLATIONS = \
752 nls/VBoxSVC_de.ts
753
754VBoxC_VBOX_HEADERS = \
755 include/ConsoleImpl.h
756VBoxC_VBOX_TRANSLATIONS = \
757 nls/VBoxC_de.ts
758
759updatenls::
760 $(VBOX_LUPDATE) $(VBoxSVC_SOURCES) $(VBoxSVC_VBOX_HEADERS) -ts $(VBoxSVC_VBOX_TRANSLATIONS)
761 $(VBOX_LUPDATE) $(VBoxC_SOURCES) $(VBoxC_VBOX_HEADERS) -ts $(VBoxC_VBOX_TRANSLATIONS)
762
763testconverter:: $(VBOX_USER_HOME)/VirtualBox.xml
764 $(call MSG_TOOL,xsltproc,Test Settings Converter,$<,$(VBOX_USER_HOME)/VirtualBox.xml.test)
765 $(QUIET)$(VBOX_XSLTPROC) -o $(VBOX_USER_HOME)/VirtualBox.xml.test xml/SettingsConverter.xsl $<
766
767testconverter2:: $(VBOX_USER_HOME)/Machines/dos/dos.xml
768 $(call MSG_TOOL,xsltproc,Test Settings Converter,$<,$<.test)
769 $(QUIET)$(VBOX_XSLTPROC) -o $<.test xml/SettingsConverter.xsl $<
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette