Makefile.kmk revision ec5d99cd65c7dd3075df70898fa6641470720936
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Makefile for the VirtualBox Qt GUI.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Copyright (C) 2006-2007 innotek GmbH
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# available from http://www.virtualbox.org. This file is free software;
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# you can redistribute it and/or modify it under the terms of the GNU
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# General Public License (GPL) as published by the Free Software
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# include qmake project file
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Import QDesigner UI sources
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncVirtualBox_QT_UISRCS := $(FORMS)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Import translation sources
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncVirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Import images
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncVirtualBox_QT_IMAGES := $(IMAGES)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# reset things to avoid possible conflicts with kBuild
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncTRANSLATIONS :=
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncVBOX_WITH_REGISTRATION := 1
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncVBOX_WITH_REGISTRATION_REQUEST := 1
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncDEPTH = ../../../..
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncinclude $(PATH_KBUILD)/header.kmk
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# exclude inappropriate UI content
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncifndef VBOX_WITH_REGISTRATION
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncVirtualBox_QT_UISRCS := $(filter-out ui/VBoxRegistrationDlg.ui,$(VirtualBox_QT_UISRCS))
INSTALLS = VirtualBox.nls
VirtualBox_SDKS.win = WINPSDK DXSDK
ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # linux only, yea, right.
$(filter nls/VirtualBox_%.ts,$(VirtualBox_QT_TRANSLATIONS)))
# QDesigner UI sources are imported from VBoxUI.pro as VirtualBox_QT_UISRC
VirtualBox_QT_MOCSRCS = src/VBoxSelectorWnd.cpp
VirtualBox_QT_MOCSRCS += src/VBoxGlobal.cpp
VirtualBox_QT_MOCSRCS += src/COMDefs.cpp
# UI headers (ui.h) containing local definitions of classes that use the Q_OBJECT macro
$(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCHDRS))), $(PATH_VirtualBox)/moc/moc_$(moc).cpp) \
$(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS))), $(PATH_VirtualBox)/ui/$(ui).cpp $(PATH_VirtualBox)/moc/moc_$(ui).cpp) \
$(PATH_VirtualBox)/ui/vbox_image_collection.cpp
$(foreach mocui,$(notdir $(basename $(VirtualBox_QT_MOCUIHDRS))), $(PATH_VirtualBox)/moc/$(mocui).moc) \
# All existing .ui.h files for known .ui sources
src/HappyHttp.cpp_CXXFLAGS += -fexceptions
src/VBoxDownloaderWgt.cpp_CXXFLAGS += -fexceptions
src/VBoxNetworkFramework.cpp_CXXFLAGS += -fexceptions
src/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
VirtualBox_DEFS.debug = VBOX_GUI_DEBUG VBOX_CHECK_STATE # QT_FATAL_ASSERT
VirtualBox_DEFS.darwin = VBOX_GUI_USE_QIMAGE VBOX_WITHOUT_QHTTP
VirtualBox_DEFS.freebsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
VirtualBox_DEFS.linux = VBOX_GUI_USE_SDL
VirtualBox_DEFS.netbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
VirtualBox_DEFS.openbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
VirtualBox_DEFS.os2 = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL QT_DLL
VirtualBox_DEFS.solaris = VBOX_GUI_USE_QIMAGE #VBOX_GUI_USE_SDL
VirtualBox_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
VirtualBox_DEFS.win.amd64 = VBOX_WITHOUT_QHTTP
VirtualBox_DEFS.darwin += VBOX_WITH_HACKED_QT
VirtualBox_DEFS.win += VBOX_GUI_USE_DDRAW
VirtualBox_DEFS.linux += VBOX_GUI_USE_QIMAGE
VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
VirtualBox_LDFLAGS.linux+= -rdynamic # for backtrace_symbols()
VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
VirtualBox_LDFLAGS.win += /SUBSYSTEM:console
VirtualBox_LDFLAGS.darwin = -framework IOKit
$(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \
$(PATH_SDK_DXSDK_LIB)/ddraw.lib \
$(PATH_SDK_DXSDK_LIB)/dxguid.lib
ifdef VBOX_WITH_DEBUGGER_GUI ## @todo make this dynamically loadable and ship with release builds too.
WRAPPERSFILE = $(PATH_VirtualBox)/include/COMWrappers.h
WRAPPERSINCFILE = include/COMDefs.h
WRAPPERSTEMPLATE = include/COMWrappers.xsl
XIDLFILE = ../../Main/idl/VirtualBox.xidl
VirtualBox.app_INST = $(INST_VIRTUALBOX)Contents/
VirtualBox.app_MODE = 644
$(PATH_TARGET)/Info.plist \
$(call MSG_GENERATE,VirtualBox.app,$<,$@)
VirtualBoxVM.app_MODE = 644
src/darwin/VM-PkgInfo=>PkgInfo \
$(PATH_TARGET)/VM-Info.plist: src/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $(call DIRDEP,$(PATH_TARGET))
$(call MSG_GENERATE,VirtualBoxVM.app,$<,$@)
VirtualBox.nls_INST = $(INST_BIN)nls/
VirtualBox.nls_SOURCES = $(patsubst %.ts,$(PATH_VirtualBox)/nls/%.qm,$(notdir $(VirtualBox_QT_TRANSLATIONS)))
VirtualBox.nls_SOURCES += $(patsubst %.ts,$(PATH_VirtualBox)/nls/%.qm,$(notdir $(VirtualBox_QT_TRANSLATIONS_QT)))
VirtualBox.nls_MODE = 644
PROGRAMS.darwin += tstDarwinKeyboard
include $(PATH_KBUILD)/footer.kmk
$(eval mocsrc := $(PATH_$(target))/moc/moc_$(notdir $(basename $(mochdr))).cpp)
## Generate a rule to create a MOC include file from a UI header (ui.h) containing
$(eval mocsrc := $(PATH_$(target))/moc/moc_$(notdir $(basename $(uifile))).cpp)
# static images imported from VBoxUI.pro as VirtualBox_QT_IMAGES
VirtualBox_GENSRCS += $(PATH_VirtualBox)/ui/vbox_image_collection.cpp
OTHER_CLEAN += $(PATH_VirtualBox)/ui/vbox_image_collection.txt
$(PATH_VirtualBox)/ui/VBoxDiskImageManagerDlg.cpp: \
$(PATH_VirtualBox)/ui/VBoxNewHDWzd.h
#$(patsubst %,$(PATH_VirtualBox)/ui/%.cpp,$(notdir $(basename $(VirtualBox_QT_UISRCS)))) : $(VirtualBox_GENHDRS)
# before a new product release. VirtualBox_xx_YY.ts is a template for new
$(QUIET)$(VBOX_LUPDATE) $^ -ts $(VirtualBox_QT_TRANSLATIONS) nls/VirtualBox_xx_YY.ts