Makefile.kmk revision 7fc7241bf0f23b9fbdd3fa584108a66d9eeb85cd
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd# Makefile for the VirtualBox Qt GUI.
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# Copyright (C) 2006 InnoTek Systemberatung GmbH
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# This file is part of VirtualBox Open Source Edition (OSE), as
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc# available from http://www.virtualbox.org. This file is free software;
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# you can redistribute it and/or modify it under the terms of the GNU
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# General Public License as published by the Free Software Foundation,
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
2e545ce2450a9953665f701bb05350f0d3f26275nd# distribution. VirtualBox OSE is distributed in the hope that it will
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# be useful, but WITHOUT ANY WARRANTY of any kind.
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# If you received this file as part of a commercial VirtualBox
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# distribution, then only the terms of your commercial VirtualBox
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen# license agreement apply instead of the previous paragraph.
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endifeq ($(BUILD_TARGET),linux)
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endXKEYBOARD_NEW := 1
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# include qmake project file
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# Import QDesigner UI sources
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjungVirtualBox_QT_UISRCS := $(FORMS)
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# Import translation sources
253547fb9cc7986e84ff68aef076f664fc4169dctakashiVirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS)
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# Import images
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_QT_IMAGES := $(IMAGES)
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# reset things to avoid possible conflicts with kBuild
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endTEMPLATE :=
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endLANGUAGE :=
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endTRANSLATIONS :=
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endDEPTH = ../../../..
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedoohinclude $(PATH_KBUILD)/header.kmk
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endPROGRAMS = VirtualBox
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_TEMPLATE = VBOXQTGUIEXE
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_SDKS.win = WINPSDK DXSDK
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endifeq ($(BUILD_TARGET),darwin)
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# For the launch trick we need different inode numbers.
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_INST = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# Each nls/VirtualBox_xx_YY.ts file must have a qt_xx_YY.ts counterpart
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_QT_TRANSLATIONS_QT := \
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end $(filter nls/VirtualBox_%.ts,$(VirtualBox_QT_TRANSLATIONS)))
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# QDesigner UI sources are imported from VBoxUI.pro as VirtualBox_QT_UISRC
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# Headers containing definitions of classes that use the Q_OBJECT macro
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_QT_MOCHDRS = \
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# Sources containing local definitions of classes that use the Q_OBJECT macro
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_QT_MOCSRCS = src/VBoxSelectorWnd.cpp
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endifneq ($(BUILD_TARGET),win)
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_QT_MOCSRCS += src/COMDefs.cpp
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# UI headers (ui.h) containing local definitions of classes that use the Q_OBJECT macro
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_QT_MOCUIHDRS = \
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endifeq ($(BUILD_TARGET),win)
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_QT_MOCUIHDRS += ui/VBoxVMNetworkSettings.ui.h
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# All generated sources. Note: this list MUST be in sync with Qt source
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# generation rules defined somewhere below!
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_GENSRCS = \
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCHDRS))), $(PATH_VirtualBox)/moc/moc_$(moc).cpp) \
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS))), $(PATH_VirtualBox)/ui/$(ui).cpp $(PATH_VirtualBox)/moc/moc_$(ui).cpp) \
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end $(PATH_VirtualBox)/ui/vbox_image_collection.cpp
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# All generated headers. Note: this list MUST be in sync with Qt source
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# generation rules defined somewhere below!
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_GENHDRS = \
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end $(foreach mocui,$(notdir $(basename $(VirtualBox_QT_MOCUIHDRS))), $(PATH_VirtualBox)/moc/$(mocui).moc) \
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCSRCS))), $(PATH_VirtualBox)/moc/$(moc).moc) \
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS))), $(PATH_VirtualBox)/ui/$(ui).h)
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# All existing .ui.h files for known .ui sources
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_QT_UIHDRS = \
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end $(wildcard $(addsuffix .h,$(VirtualBox_QT_UISRCS)))
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# All header files
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_HEADERS = \
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end $(wildcard include/*.h) \
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end $(VirtualBox_GENHDRS) \
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end $(VirtualBox_QT_UIHDRS)
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_SOURCES = \
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end $(VirtualBox_GENSRCS) \
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end## @todo how to detect what tool is used?
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end# more generic -Wno-extra
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endifneq ($(BUILD_TARGET),win)
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endsrc/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_DEFS = VBOX_GUI_SEPARATE_VM_PROCESS
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_DEFS.debug = VBOX_GUI_DEBUG VBOX_CHECK_STATE # QT_FATAL_ASSERT
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_DEFS.darwin = VBOX_GUI_USE_QIMAGE
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_DEFS.linux = VBOX_GUI_USE_SDL
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endVirtualBox_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end#ifndef VBOX_OSE
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end VirtualBox_DEFS.darwin += VBOX_WITH_HACKED_QT
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1endifneq ($(BUILD_TYPE),release)
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end # non-release builds has some extra features.
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung VirtualBox_DEFS += VBOX_GUI_USE_REFRESH_TIMER VBOX_WITH_DEBUGGER_GUI_MENU
727872d18412fc021f03969b8641810d8896820bhumbedooh VirtualBox_DEFS.win += VBOX_GUI_USE_DDRAW
0d0ba3a410038e179b695446bb149cce6264e0abnd VirtualBox_DEFS.linux += VBOX_GUI_USE_QIMAGE
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedoohifdef VBOX_WITH_ALSA
0d0ba3a410038e179b695446bb149cce6264e0abnd VirtualBox_DEFS += VBOX_WITH_ALSA
727872d18412fc021f03969b8641810d8896820bhumbedoohifdef VBOX_OSE
0d0ba3a410038e179b695446bb149cce6264e0abnd VirtualBox_DEFS += VBOX_OSE
ac082aefa89416cbdc9a1836eaf3bed9698201c8humbedoohVirtualBox_INCS = \
0d0ba3a410038e179b695446bb149cce6264e0abnd ./include \
0d0ba3a410038e179b695446bb149cce6264e0abnd $(PATH_VirtualBox)/ui \
0d0ba3a410038e179b695446bb149cce6264e0abnd $(PATH_VirtualBox)/moc \
727872d18412fc021f03969b8641810d8896820bhumbedooh $(PATH_VirtualBox)/include \
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedoohifeq ($(BUILD_TYPE),release)
205f749042ed530040a4f0080dbcb47ceae8a374rjung VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
0d0ba3a410038e179b695446bb149cce6264e0abnd VirtualBox_LDFLAGS.linux+= -rdynamic # for backtrace_symbols()
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd ifeq ($(USERNAME),dmik)
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end 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