# $Id: Makefile.kmk 11344 2008-08-11 18:08:17Z vboxsync $ ## @file # Makefile for the VirtualBox Qt GUI. # # # Copyright (C) 2006-2007 Sun Microsystems, Inc. # # This file is part of VirtualBox Open Source Edition (OSE), as # available from http://www.virtualbox.org. This file is free software; # you can redistribute it and/or modify it under the terms of the GNU # General Public License (GPL) as published by the Free Software # Foundation, in version 2 as it comes in the "COPYING" file of the # VirtualBox OSE distribution. VirtualBox OSE is distributed in the # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. # # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa # Clara, CA 95054 USA or visit http://www.sun.com if you need # additional information or have any questions. # DEPTH = ../../../.. include $(KBUILD_PATH)/header.kmk # # Globals. # VBOX_VIRTUALBOX4_SRC := $(PATH_SUB_CURRENT) VBOX_WITH_REGISTRATION := 1 # Ask the user to register at Sun. If this setting is disabled the user can # still register using the menu if desired. VBOX_WITH_REGISTRATION_REQUEST := 1 # Show the update notifier dialog during startup. If this setting is disabled # the user can still update using the menu if desired. VBOX_WITH_UPDATE_REQUEST := 1 # Disable the debugger for now, this is another story. VBOX_WITH_DEBUGGER_GUI := DEFS := $(filter-out VBOX_WITH_DEBUGGER_GUI,$(DEFS)) # Guess VBOX_WITH_QT4_SUN ifndef VBOX_WITH_QT4_SUN ifndef VBOX_OSE if1of ($(KBUILD_TARGET), darwin solaris win) VBOX_WITH_QT4_SUN := 1 endif endif endif # # Handmade configuration of qt4 - very annoying, this needs to # be cleaned up properly later some time (not important now). # ifeq ($(VBOX_PATH_QT4),) ifeq ($(KBUILD_TARGET),darwin) VBOX_PATH_QT4 := $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*))) ifeq ($(VBOX_PATH_QT4),) ifneq ($(wildcard /Library/Frameworks/QtCore.framework),) # Using the global installation (for OSE). VBOX_PATH_QT4 ?= /usr VBOX_PATH_QT4_FRAMEWORKS ?= /Library/Frameworks endif endif else if1of ($(KBUILD_TARGET),win) VBOX_PATH_QT4 ?= $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*))) else if1of ($(KBUILD_TARGET),solaris) VBOX_PATH_QT4 ?= $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*))) ifneq ($(VBOX_PATH_QT4),) VBOX_WITH_QT4_SUN = 1 endif endif endif ifeq ($(VBOX_PATH_QT4),) if1of ($(USERNAME), bird) # gentoo (64-bit) VBOX_PATH_QT4 ?= /usr VBOX_PATH_QT4_LIB ?= /usr/lib/qt4 endif endif VBOX_PATH_QT4 ?= /usr VBOX_PATH_QT4_LIB ?= $(VBOX_PATH_QT4)/lib # Hack LD_LIBRARY_PATH for stuff in tools. ifdef VBOX_WITH_QT4_SUN if1of ($(KBUILD_TARGET), linux) export LD_LIBRARY_PATH := $(VBOX_PATH_QT4_LIB):$(LD_LIBRARY_PATH) endif endif ifdef VBOX_WITH_QT4_SUN # # Install our Qt DLLs / Shared Objects / Frameworks. # ## @todo move to the root Makefile.kmk, and remove qt4-bin from INSTALLS below. INSTALLS += qt4-bin qt4-bin_MODE = 644 ifeq ($(KBUILD_TARGET),darwin) qt4-bin_INST = $(INST_VIRTUALBOX)Contents/Frameworks/ qt4-bin_SOURCES = \ $(VBOX_PATH_QT4)/Frameworks/QtCore.framework/Versions/4/QtCore=>QtCore.framework/Versions/4/QtCore \ $(VBOX_PATH_QT4)/Frameworks/QtGui.framework/Versions/4/QtGui=>QtGui.framework/Versions/4/QtGui else ifeq ($(KBUILD_TARGET),win) qt4-bin_INST = $(INST_BIN) qt4-bin_SOURCES = \ $(VBOX_PATH_QT4_LIB)/VBoxQtCore4.dll \ $(VBOX_PATH_QT4_LIB)/VBoxQtGui4.dll else qt4-bin_INST = $(INST_BIN) qt4-bin_SOURCES = \ $(VBOX_PATH_QT4_LIB)/libVBoxQtCore.so.4 \ $(VBOX_PATH_QT4_LIB)/libVBoxQtGui.so.4 endif endif # VBOX_WITH_QT4_SUN # Template copy from the qt3 stuff. Appended a "4" on the # relevant places. # # Template for building Qt GUI executables. # TEMPLATE_VBOXQT4GUIEXE = VBox Qt4 GUI Executable USES += qt4 TEMPLATE_VBOXQT4GUIEXE_USES = qt4 TEMPLATE_VBOXQT4GUIEXE_QTTOOL = QT4 TEMPLATE_VBOXQT4GUIEXE_MOCTOOL = QT4 TEMPLATE_VBOXQT4GUIEXE_UICTOOL = QT4 TEMPLATE_VBOXQT4GUIEXE_RCCTOOL = QT4 TEMPLATE_VBOXQT4GUIEXE_LRCTOOL = QT4 TEMPLATE_VBOXQT4GUIEXE_SDKS = QT4 ifdef VBOX_WITH_QT4_SUN ifneq ($(KBUILD_TARGET),darwin) ## @todo The next darwin build should also make use the prefix just to make things more uniform. TEMPLATE_VBOXQT4GUIEXE_QT_PREFIX = VBox endif endif TEMPLATE_VBOXQT4GUIEXE_DEFS = IN_RING3 QT_NO_DEBUG QT_THREAD_SUPPORT QT_SHARED HAVE_CONFIG_H $(ARCH_BITS_DEFS) TEMPLATE_VBOXQT4GUIEXE_INCS = \ $(VBOX_PATH_SDK)/include ifeq ($(KBUILD_TARGET),win) TEMPLATE_VBOXQT4GUIEXE_TOOL = $(VBOX_VCC_TOOL) TEMPLATE_VBOXQT4GUIEXE_DEFS += \ _WIN32_WINNT=0x0500 UNICODE _UNICODE \ QT_DLL _CRT_SECURE_NO_DEPRECATE \ $(QMAKE_PRL_DEFINES) ## @todo VCC70 flags? ifdef VBOX_USE_VCC80 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \ -nologo -Zm200 -W3 -MD -Zi -EHsc -Zc:wchar_t- TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.debug = -RTCsu else TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \ -nologo -Zm200 -W3 -MD -Zi -GX TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.debug = -GZ endif TEMPLATE_VBOXQT4GUIEXE_INCS += \ $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) TEMPLATE_VBOXQT4GUIEXE_LDFLAGS = \ /NOD /NOLOGO /INCREMENTAL:NO /MAPINFO:EXPORTS /DEBUG \ /DELAYLOAD:oleaut32.dll TEMPLATE_VBOXQT4GUIEXE_SDKS += WINPSDK TEMPLATE_VBOXQT4GUIEXE_LIBS = \ $(VBOX_LIBS_QT4) \ $(LIB_RUNTIME) \ $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcprt.lib \ $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcrt.lib \ $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/oldnames.lib \ $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib \ $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls.lib TEMPLATE_VBOXQT4GUIEXE_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS) else # the gcc guys: TEMPLATE_VBOXQT4GUIEXE_TOOL = $(VBOX_GCC_TOOL) TEMPLATE_VBOXQT4GUIEXE_DEFS.linux = _REENTRANT TEMPLATE_VBOXQT4GUIEXE_DEFS.solaris = _REENTRANT TEMPLATE_VBOXQT4GUIEXE_INCS += \ $(LIB_SDL_INC) TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \ -pipe -Wall -W -frtti -fno-exceptions -Wno-non-virtual-dtor \ -Wno-long-long -fshort-wchar -fno-strict-aliasing \ $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.x86 = -m32 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.amd64 = -m64 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.linux = -pthread TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.x86 = -m32 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.amd64 = -m64 TEMPLATE_VBOXQT4GUIEXE_LIBS = \ $(VBOX_LIBS_QT4) \ $(LIB_SDL) \ $(LIB_RUNTIME) \ $(LIB_REM) \ $(LIB_VMM) ifeq ($(KBUILD_TARGET),linux) TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += $(VBOX_LD_as_needed) TEMPLATE_VBOXQT4GUIEXE_LIBS += \ $(VBOX_XCURSOR_LIBS) TEMPLATE_VBOXQT4GUIEXE_LIBPATH += \ $(VBOX_LIBPATH_X11) else ifeq ($(KBUILD_TARGET),darwin) TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += -framework Carbon -framework QuickTime -bind_at_load TEMPLATE_VBOXQT4GUIEXE_LIBS += TEMPLATE_VBOXQT4GUIEXE_LIBPATH += else TEMPLATE_VBOXQT4GUIEXE_INCS += \ $(VBOX_XCURSOR_INCS) TEMPLATE_VBOXQT4GUIEXE_LIBS += \ $(VBOX_XCURSOR_LIBS) \ Xext \ X11 \ m \ $(LIB_PTHREAD) TEMPLATE_VBOXQT4GUIEXE_LIBPATH += \ $(VBOX_LIBPATH_X11) ifeq ($(KBUILD_TARGET),freebsd) TEMPLATE_VBOXQT4GUIEXE_INCS += \ /usr/include \ /usr/X11R6/include \ /usr/local/include endif ifeq ($(KBUILD_TARGET),solaris) TEMPLATE_VBOXQT4GUIEXE_LIBS += \ rt socket nsl endif endif ifdef VBOX_WITH_ORIGIN # Assume the Qt shared objects are in the same directory as the executable, on Solaris too. TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)' endif endif # Add COM/XPCOM stuff TEMPLATE_VBOXQT4GUIEXE_LIBS += \ $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB) ifdef VBOX_WITH_XPCOM ## @todo may be worth creating the VBOX_XPCOM SDK def, or just a SDK_VBOXXPCOM. TEMPLATE_VBOXQT4GUIEXE_DEFS += VBOX_WITH_XPCOM TEMPLATE_VBOXQT4GUIEXE_INCS += \ $(VBOX_XPCOM_INCS) TEMPLATE_VBOXQT4GUIEXE_LIBS += \ $(LIB_XPCOM) endif # # Template for building Qt GUI components. # TEMPLATE_VBOXQT4GUI = VBox Qt GUI Components TEMPLATE_VBOXQT4GUI_EXTENDS = VBOXQTGUIEXE TEMPLATE_VBOXQT4GUI_LIBS = $(filter-out $(QTMAIN),$(TEMPLATE_VBOXQT4GUIEXE_LIBS)) ifeq ($(KBUILD_TARGET),darwin) TEMPLATE_VBOXQT4GUI_LDFLAGS = $(filter-out -framework Carbon -framework QuickTime -bind_at_load,$(TEMPLATE_VBOXQT4GUIEXE_LDFLAGS)) endif ifeq ($(filter-out solaris.x86 %.amd64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),) ifneq ($(KBUILD_TARGET),win) TEMPLATE_VBOXQT4GUI_DEFS = PIC $(TEMPLATE_VBOXQT4GUIEXE_DEFS) TEMPLATE_VBOXQT4GUI_CFLAGS = -fPIC $(TEMPLATE_VBOXQT4GUIEXE_CFLAGS) TEMPLATE_VBOXQT4GUI_CXXFLAGS = -fPIC $(TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS) TEMPLATE_VBOXQT4GUI_LDFLAGS = -fPIC $(TEMPLATE_VBOXQT4GUIEXE_LDFLAGS) endif endif # # The targets. # PROGRAMS += VirtualBox4 ifeq ($(filter-out freebsd linux openbsd netbsd solaris,$(KBUILD_TARGET)),) # X11 DLLS += VBoxKeyboard ## @todo convert to install target. OTHERS += $(PATH_BIN)/vboxkeyboard.tar.gz CLEAN += $(PATH_BIN)/vboxkeyboard.tar.gz endif INSTALLS += VirtualBox4.nls # # VBoxKeyboard - keyboard library for X11. # VBoxKeyboard_TEMPLATE = VBOXR3 VBoxKeyboard_SOURCES = \ src/linux/keyboard-new.c VBoxKeyboard_LIBS = X11 VBoxKeyboard_LIBPATH = $(VBOX_LIBPATH_X11) # # vboxkeyboard.tar.gz - the LGPLed keyboard library must always be # redistributed with usable sources. # # This rule will link create a temporary symlink to src/linux/ and tar # up the selected files into a tarball that is installed into the # bin directory (probably belongs in /usr/shared/somewhere really, # but wtf, it's not like we're even trying to be FHS compliant). # ## @todo this should be tar'ed down into the output directory and installed using an install target. $(PATH_BIN)/vboxkeyboard.tar.gz: \ $(VBoxKeyboard_SOURCES) \ src/linux/COPYING.LIB \ src/linux/keyboard.h \ src/linux/keyboard-layouts.h \ src/linux/keyboard-list.h \ src/linux/keyboard-tables.h \ src/linux/keyboard-types.h \ src/linux/Makefile $(call MSG_TOOL,tar/gzip,,$@) $(QUIET2)$(RM) -f $(PATH_TARGET)/vboxkeyboard $@ $(QUIET)$(LN_SYMLINK) $(VBOX_VIRTUALBOX4_SRC)/src/linux/ $(PATH_TARGET)/vboxkeyboard $(QUIET)cd $(PATH_TARGET) \ && tar -chvf - $(addprefix vboxkeyboard/,$(notdir $^)) \ | gzip - > $@ $(QUIET2)$(RM) -f $(PATH_TARGET)/vboxkeyboard # # Include Qt project file, we'll use FORMS and TRANSLATIONS in # the VirtualBox4 setup below. # SAVED_TEMPLATE := $(TEMPLATE) include $(PATH_SUB_CURRENT)/VBoxUI.pro # # VirtualBox4 - The GUI program. # VirtualBox4_TEMPLATE = VBOXQT4GUIEXE VirtualBox4_NAME = VirtualBox VirtualBox4_SDKS.win = WINPSDK DXSDK ifeq ($(filter-out freebsd linux netbsd openbsd os2,$(KBUILD_TARGET)),) # X11 + os2 ## @todo solaris VirtualBox4_SDKS += LIBSDL endif ifeq ($(KBUILD_TARGET),darwin) # For the launch trick we need different inode numbers. VirtualBox4_INST = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM # For testing iChat Theater stuff change the sdk path (HACK ALERT!) ifdef VBOX_WITH_ICHAT_THEATER VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk endif endif # darwin VirtualBox4_DEFS = VBOX_GUI_SEPARATE_VM_PROCESS VirtualBox4_DEFS.debug = VBOX_GUI_DEBUG VBOX_CHECK_STATE # QT_FATAL_ASSERT VirtualBox4_DEFS.darwin = VBOX_GUI_USE_QUARTZ2D VBOX_GUI_USE_QIMAGE VBOX_WITHOUT_QHTTP VirtualBox4_DEFS.freebsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL VirtualBox4_DEFS.linux = VBOX_GUI_USE_SDL VirtualBox4_DEFS.netbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL VirtualBox4_DEFS.openbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL VirtualBox4_DEFS.solaris = VBOX_GUI_USE_QIMAGE #VBOX_GUI_USE_SDL VirtualBox4_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL VirtualBox4_DEFS.win.amd64 = VBOX_WITHOUT_QHTTP #ifndef VBOX_OSE ## @todo VBOX_WITH_HACKED_QT doesn't apply to Qt4, so why is this still here? VirtualBox4_DEFS.darwin += VBOX_WITH_HACKED_QT #endif ifdef VBOX_WITH_ICHAT_THEATER VirtualBox4_DEFS.darwin += VBOX_WITH_ICHAT_THEATER endif ifneq ($(KBUILD_TYPE),release) # non-release builds has some extra features. VirtualBox4_DEFS.win += VBOX_GUI_USE_DDRAW VirtualBox4_DEFS.linux += VBOX_GUI_USE_QIMAGE endif ifdef VBOX_WITH_REGISTRATION VirtualBox4_DEFS += VBOX_WITH_REGISTRATION endif ifdef VBOX_WITH_REGISTRATION_REQUEST VirtualBox4_DEFS += VBOX_WITH_REGISTRATION_REQUEST endif ifdef VBOX_WITH_UPDATE_REQUEST VirtualBox4_DEFS += VBOX_WITH_UPDATE_REQUEST endif ifdef VBOX_WITH_ALSA VirtualBox4_DEFS += VBOX_WITH_ALSA endif ifdef VBOX_WITH_PULSE VirtualBox4_DEFS += VBOX_WITH_PULSE endif ifdef VBOX_WITH_E1000 VirtualBox4_DEFS += VBOX_WITH_E1000 endif ifdef VBOX_OSE VirtualBox4_DEFS += VBOX_OSE endif ifdef VBOX_WITH_DEBUGGER_GUI VirtualBox4_DEFS += VBOX_WITH_DEBUGGER_GUI_MENU endif VirtualBox4_INCS = \ ./include \ $(PATH_VirtualBox4)/include ifeq ($(KBUILD_TYPE),release) VirtualBox4_LDFLAGS.win += /SUBSYSTEM:windows else VirtualBox4_LDFLAGS.linux+= -rdynamic # for backtrace_symbols() ifeq ($(USERNAME),dmik) VirtualBox4_LDFLAGS.win += /SUBSYSTEM:windows else VirtualBox4_LDFLAGS.win += /SUBSYSTEM:console endif endif # r=bird: what is -lz doing here? it belongs in LIBS VirtualBox4_LDFLAGS.darwin = -framework IOKit -framework AppKit -framework ApplicationServices -framework Foundation -lz ifdef VBOX_WITH_ICHAT_THEATER VirtualBox4_LDFLAGS.darwin += -framework InstantMessage -framework QuartzCore endif VirtualBox4_LIBS.win = \ $(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \ $(PATH_SDK_DXSDK_LIB)/ddraw.lib \ $(PATH_SDK_DXSDK_LIB)/dxguid.lib ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11 VirtualBox4_LIBS += $(PATH_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL) endif ifdef VBOX_WITH_DEBUGGER_GUI ## @todo make this dynamically loadable and ship with release builds too. ifeq ($(KBUILD_TARGET),win) VirtualBox4_LIBS += $(PATH_LIB)/VBoxDbg$(VBOX_SUFF_LIB) else VirtualBox4_LIBS += $(PATH_DLL)/VBoxDbg$(VBOX_SUFF_DLL) endif endif # Headers containing definitions of classes that use the Q_OBJECT macro. VirtualBox4_QT_MOCHDRS = \ include/QIWidgetValidator.h \ include/QIHotKeyEdit.h \ include/QIStatusBar.h \ include/QIStateIndicator.h \ include/QIMessageBox.h \ include/QILabel.h \ include/QILabel_p.h \ include/QILabelSeparator.h \ include/QIAbstractWizard.h \ include/QIListView.h \ include/QITreeWidget.h \ include/QIMainDialog.h \ include/QIHelpButton.h \ include/QIDialog.h \ include/VBoxFilePathSelectorWidget.h \ include/VBoxUtils.h \ include/VBoxGlobalSettings.h \ include/VBoxGlobal.h \ include/VBoxVMListView.h \ include/VBoxMediaComboBox.h \ include/VBoxSelectorWnd.h \ include/VBoxConsoleWnd.h \ include/VBoxConsoleView.h \ include/VBoxProblemReporter.h \ include/VBoxDownloaderWgt.h \ include/VBoxNetworkFramework.h \ include/VBoxAboutDlg.h \ include/VBoxCloseVMDlg.h \ include/VBoxNewVMWzd.h \ include/VBoxNewHDWzd.h \ include/VBoxVMFirstRunWzd.h \ include/VBoxRegistrationDlg.h \ include/VBoxUpdateDlg.h \ include/VBoxSnapshotDetailsDlg.h \ include/VBoxVMInformationDlg.h \ include/VBoxTakeSnapshotDlg.h \ include/VBoxSnapshotsWgt.h \ include/VBoxVMLogViewer.h \ include/VBoxDiskImageManagerDlg.h \ include/VBoxSettingsUtils.h \ include/VBoxVMSettingsGeneral.h \ include/VBoxVMSettingsHD.h \ include/VBoxVMSettingsCD.h \ include/VBoxVMSettingsFD.h \ include/VBoxVMSettingsAudio.h \ include/VBoxVMSettingsNetwork.h \ include/VBoxVMSettingsSerial.h \ include/VBoxVMSettingsParallel.h \ include/VBoxVMSettingsUSB.h \ include/VBoxVMSettingsUSBFilterDetails.h \ include/VBoxVMSettingsSF.h \ include/VBoxVMSettingsSFDetails.h \ include/VBoxVMSettingsVRDP.h \ include/VBoxGLSettingsGeneral.h \ include/VBoxGLSettingsInput.h \ include/VBoxGLSettingsUpdate.h \ include/VBoxGLSettingsLanguage.h \ include/VBoxSettingsDialog.h \ include/VBoxSettingsDialogSpecific.h \ include/VBoxSettingsPage.h \ include/VBoxSettingsSelector.h # Sources containing local definitions of classes that use the Q_OBJECT macro. VirtualBox4_QT_MOCSRCS = \ src/VBoxSelectorWnd.cpp \ src/VBoxDiskImageManagerDlg.cpp ifdef VBOX_WITH_XPCOM VirtualBox4_QT_MOCSRCS += \ src/COMDefs.cpp endif VirtualBox4_SOURCES = \ src/main.cpp \ src/COMDefs.cpp \ src/QIWidgetValidator.cpp \ src/QIHotKeyEdit.cpp \ src/QIStateIndicator.cpp \ src/QIStatusBar.cpp \ src/QIMessageBox.cpp \ src/QILabel.cpp \ src/QILabelSeparator.cpp \ src/QIAbstractWizard.cpp \ src/QIDialog.cpp \ src/QIDialogButtonBox.cpp \ src/QIListView.cpp \ src/QITreeWidget.cpp \ src/QIMainDialog.cpp \ src/QILineEdit.cpp \ src/QIHelpButton.cpp \ src/VBoxFilePathSelectorWidget.cpp \ src/VBoxDefs.cpp \ src/VBoxGlobalSettings.cpp \ src/VBoxGlobal.cpp \ src/VBoxMediaComboBox.cpp \ src/VBoxProblemReporter.cpp \ src/VBoxSelectorWnd.cpp \ src/VBoxConsoleView.cpp \ src/VBoxConsoleWnd.cpp \ src/VBoxDownloaderWgt.cpp \ src/VBoxVMListView.cpp \ src/VBoxFrameBuffer.cpp \ src/HappyHttp.cpp \ src/VBoxNetworkFramework.cpp \ src/VBoxAboutDlg.cpp \ src/VBoxCloseVMDlg.cpp \ src/VBoxNewVMWzd.cpp \ src/VBoxNewHDWzd.cpp \ src/VBoxVMFirstRunWzd.cpp \ src/VBoxRegistrationDlg.cpp \ src/VBoxUpdateDlg.cpp \ src/VBoxSnapshotDetailsDlg.cpp \ src/VBoxVMInformationDlg.cpp \ src/VBoxTakeSnapshotDlg.cpp \ src/VBoxSnapshotsWgt.cpp \ src/VBoxVMLogViewer.cpp \ src/VBoxDiskImageManagerDlg.cpp \ src/VBoxVMSettingsGeneral.cpp \ src/VBoxVMSettingsHD.cpp \ src/VBoxVMSettingsCD.cpp \ src/VBoxVMSettingsFD.cpp \ src/VBoxVMSettingsAudio.cpp \ src/VBoxVMSettingsNetwork.cpp \ src/VBoxVMSettingsSerial.cpp \ src/VBoxVMSettingsParallel.cpp \ src/VBoxVMSettingsUSB.cpp \ src/VBoxVMSettingsUSBFilterDetails.cpp \ src/VBoxVMSettingsSF.cpp \ src/VBoxVMSettingsSFDetails.cpp \ src/VBoxVMSettingsVRDP.cpp \ src/VBoxGLSettingsGeneral.cpp \ src/VBoxGLSettingsInput.cpp \ src/VBoxGLSettingsUpdate.cpp \ src/VBoxGLSettingsLanguage.cpp \ src/VBoxSettingsDialog.cpp \ src/VBoxSettingsDialogSpecific.cpp \ src/VBoxSettingsSelector.cpp ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11 ifndef VBOX_OSE VirtualBox4_QT_MOCHDRS += \ include/VBoxLicenseViewer.h VirtualBox4_SOURCES += \ src/VBoxLicenseViewer.cpp endif VirtualBox4_SOURCES += \ src/linux/XKeyboard-new.cpp endif VirtualBox4_SOURCES.win += \ src/VBoxFBDDRAW.cpp \ $(PATH_TARGET)/VirtualBox4.rc VirtualBox4_SOURCES.darwin = \ src/darwin/DarwinKeyboard.cpp \ src/darwin/DarwinCursor.cpp \ src/darwin/VBoxUtils-darwin.cpp \ src/VBoxFBQuartz2D.cpp # src/darwin/VBoxAquaStyle.cpp ifdef VBOX_WITH_ICHAT_THEATER VirtualBox4_SOURCES.darwin += \ src/darwin/VBoxIChatTheaterWrapper.m endif # The Qt modules we're using. # (The include directory and lib/framework for each module will be added by the Qt4 unit.) VirtualBox4_QT_MODULES = Core Gui # Import QDesigner UI sources and translations from VBoxUI.pro. # Note that the OSE about dialog is always required by lupdate/lrelease. ifndef VBOX_WITH_REGISTRATION FORMS := $(filter-out ui/VBoxRegistrationDlg.ui,$(FORMS)) endif VirtualBox4_SOURCES := \ $(VirtualBox4_SOURCES) \ $(FORMS) \ ui/VBoxAboutDlg.ui # Resource files with some OSE differences. VirtualBox4_SOURCES += VirtualBox.qrc ifdef VBOX_OSE VirtualBox4_SOURCES += VirtualBox_OSE.qrc else VirtualBox4_SOURCES += VirtualBox_NonOSE.qrc VirtualBox4_SOURCES += src/VBoxAboutNonOSEDlg.cpp VirtualBox4_QT_MOCHDRS += include/VBoxAboutNonOSEDlg.h endif VirtualBox_OSE.qrc_RCCFLAGS = -name OSE VirtualBox_NonOSE.qrc_RCCFLAGS = -name NonOSE # Import the translation source from VBoxUI.pro and add the qt_xx_YY counterparts VirtualBox4_QT_TRANSLATIONS := $(TRANSLATIONS) \ $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS))) # Compress the translation units. VirtualBox4_LRCFLAGS = -compress # Where to install the translations (a separate install target, VirtualBox4-nls-inst is created). VirtualBox4_QT_TRANSLATIONS_INST = $(INST_BIN)nls/ # Some flag hacks (should go away). ifneq ($(KBUILD_TARGET),win) src/HappyHttp.cpp_CXXFLAGS += -fexceptions src/VBoxDownloaderWgt.cpp_CXXFLAGS += -fexceptions src/VBoxNetworkFramework.cpp_CXXFLAGS += -fexceptions endif src/HappyHttp.cpp_CXXFLAGS.linux += -O2 ## @todo how to detect what tool is used? ## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use # more generic -Wno-extra # bird: What about $(if $(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-extra))? ifdef VBOX_WITH_XPCOM src/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra) endif # # On Windows we'll have to generate/edit the resource file. # The IDI_ICON1 name is Qt specific. # $(PATH_TARGET)/VirtualBox4.rc: $(PATH_SUB_CURRENT)/Makefile.kmk $(VBOX_WINDOWS_ICON_FILE) | $$(call DIRDEP,$$(@D)) $(RM) -f $@ $(APPEND) $@ 'IDI_ICON1 ICON "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"' VirtualBox4_CLEAN.win += $(PATH_TARGET)/VirtualBox4.rc # # Other stuff. # VBOX_WRAPPERS_FILE4 = $(PATH_VirtualBox4)/include/COMWrappers.h VirtualBox4_BLDDIRS += $(PATH_VirtualBox4)/include/ VirtualBox4_INTERMEDIATES = $(VBOX_WRAPPERS_FILE4) VBOX_WRAPPERS_INC_FILE4 = include/COMDefs.h VBOX_WRAPPERS_TEMPLATE4 = include/COMWrappers.xsl VBOX_WRAPPERS_XIDLFILE4 = ../../Main/idl/VirtualBox.xidl # generated files we need to clean manually OTHER_CLEAN = \ $(VirtualBox4_GENSRCS) \ $(VirtualBox4_GENHDRS) \ $(VBOX_WRAPPERS_FILE4) \ $(PATH_BIN)/vboxkeyboard.tar.gz # # On OS X (darwin) we need to install icon resources and compulsory bundle contents. # The VirtualBoxVM.app helper is for launching VMs (fixes some issues with the dock). # INSTALLS.darwin += VirtualBox.app VirtualBox.app_INST = $(INST_VIRTUALBOX)Contents/ VirtualBox.app_MODE = 644 VirtualBox.app_SOURCES = \ src/darwin/PkgInfo \ $(PATH_TARGET)/Info.plist \ $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns $(PATH_TARGET)/Info.plist: src/darwin/Info.plist $(VBOX_VERSION_MK) | $(call DIRDEP,$(PATH_TARGET)) $(call MSG_GENERATE,VirtualBox.app,$<,$@) $(QUIET)$(RM) -f $@ $(QUIET)$(SED) \ -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \ -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \ -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \ -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \ $< > $@ INSTALLS.darwin += VirtualBoxVM.app VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/ VirtualBoxVM.app_MODE = 644 VirtualBoxVM.app_SOURCES = \ src/darwin/VM-PkgInfo=>PkgInfo \ $(PATH_TARGET)/VM-Info.plist=>Info.plist \ $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns VirtualBoxVM.app_SYMLINKS = \ MacOS=>../../../MacOS/ $(PATH_TARGET)/VM-Info.plist: src/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $(call DIRDEP,$(PATH_TARGET)) $(call MSG_GENERATE,VirtualBoxVM.app,$<,$@) $(QUIET)$(RM) -f $@ $(QUIET)$(SED) \ -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \ -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \ -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \ -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \ --output $@ $< # # Testcase for the darwin keyboard routines. # ifdef VBOX_WITH_TESTCASES PROGRAMS.darwin += tstDarwinKeyboard4 tstDarwinKeyboard4_NAME = tstDarwinKeyboard tstDarwinKeyboard4_TEMPLATE = VBOXR3TSTEXE tstDarwinKeyboard4_INCS = include tstDarwinKeyboard4_SOURCES = \ src/darwin/tstDarwinKeyboard.cpp \ src/darwin/DarwinKeyboard.cpp tstDarwinKeyboard4_LDFLAGS = -framework IOKit -framework Carbon tstDarwinKeyboard4_LIBS = \ $(LIB_RUNTIME) endif # # Install the license file. Belongs in the root makefile really. # # Note: I'm doing this right here because the GUI will _not_ run # without that file which might be annoying for developers! # ifndef VBOX_OSE ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) $(VBOX_LICENSE_BIN): $(VBOX_LICENSE_SRC) $(call MSG_GENERATE,,$@) $(QUIET)$(CP) $< $@ $(PATH_BIN)/VirtualBox: $(VBOX_LICENSE_BIN) endif endif # Unset everything that was loaded from VBoxUI.pro. TEMPLATE := $(SAVED_TEMPLATE) SAVED_TEMPLATE := LANGUAGE := FORMS := TRANSLATIONS := IMAGES := # Commit the magic. # (note: before custom rules that make usage of generated variables!). include $(KBUILD_PATH)/footer.kmk # # Generate the COM wrappers. # $(VBOX_WRAPPERS_INC_FILE4): $(VBOX_WRAPPERS_FILE4) $(VBOX_WRAPPERS_FILE4): $(VBOX_WRAPPERS_XIDLFILE4) $(VBOX_WRAPPERS_TEMPLATE4) | $(call DIRDEP,$(PATH_VirtualBox4)/include/) $(call MSG_TOOL,xsltproc,VirtualBox4,$<,$@) $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_WRAPPERS_TEMPLATE4) $< # alias for generating the COM Wrappers file. testwrappers:: $(VBOX_WRAPPERS_FILE4) # # Update all known NLS translation (.ts) files in the nls/ subdirectory. # # NOTE: This target is intended to be run only by the GUI maintainer shortly # before a new product release. VirtualBox_xx_YY.ts is a template for new # languages and should never be actually translated or installed. # updatenls:: \ $(filter-out %.qrc,$(VirtualBox4_SOURCES)) \ $(wildcard include/*.h) $(call MSG_L1,lupdate all languages (nls/*.ts)) $(QUIET)$(TOOL_QT4_LUPDATE) \ $^ \ -ts \ $(filter-out nls/qt_%.ts,$(VirtualBox4_QT_TRANSLATIONS)) \ nls/VirtualBox_xx_YY.ts