Makefile.kmk revision 40f816668d362e859601b6e450ffea01a6f0e5e5
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 as published by the Free Software Foundation,
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# distribution. VirtualBox OSE is distributed in the hope that it will
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# be useful, but WITHOUT ANY WARRANTY of any kind.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# If you received this file as part of a commercial VirtualBox
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# distribution, then only the terms of your commercial VirtualBox
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# license agreement apply instead of the previous paragraph.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncifeq ($(BUILD_TARGET),linux)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncXKEYBOARD_NEW := 1
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 :=
include $(PATH_KBUILD)/header.kmk
INSTALLS = VirtualBox.nls
VirtualBox_SDKS.win = WINPSDK DXSDK
VirtualBox_SDKS.linux = LIBSDL
VirtualBox_SDKS.os2 = LIBSDL
$(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/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/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
VirtualBox_DEFS.linux = VBOX_GUI_USE_SDL
VirtualBox_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
VirtualBox_DEFS.os2 = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL QT_DLL
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
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