Makefile revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
#
# Makefile for the VirtualBox Qt GUI.
#
#
# Copyright (C) 2006 InnoTek Systemberatung GmbH
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# General Public License 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.
#
# If you received this file as part of a commercial VirtualBox
# distribution, then only the terms of your commercial VirtualBox
# license agreement apply instead of the previous paragraph.
#
# include qmake project file
# QDesigner UI sources
VirtualBox_QT_UISRCS := $(FORMS)
# reset things to avoid possible conflicts with kBuild
TEMPLATE :=
LANGUAGE :=
FORMS :=
DEPTH = ../../../..
# bird:
# this is a sketch which later can be moved into kBuild core stuff perhaps.
# I might not have got the logic in what causes what to be generated right
# feel free to help.
# QDesigner UI sources are imported from VBoxUI.pro as VirtualBox_QT_UISRC
# Headers containing definitions of classes that use the Q_OBJECT macro
# Sources containing local definitions of classes that use the Q_OBJECT macro
# 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) \
$(VirtualBox_GENSRCS) \
else
VirtualBox_DEFS.win += \
VirtualBox_INCS = \
./include \
$(PATH_VirtualBox)/ui \
$(PATH_VirtualBox)/moc \
$(PATH_VirtualBox)/include \
else
else
$(LIB_RUNTIME) \
$(PATH_BIN)/VBoxXML.so \
$(LIB_REM) \
$(LIB_VMM) \
$(PATH_BIN)/VBoxXPCOM.so \
# generated files we need to clean manually
OTHER_CLEAN = \
$(VirtualBox_GENSRCS) \
$(VirtualBox_GENHDRS) \
$(WRAPPERSFILE)
#
# Source file generation rules
#
## Generate a rule to create a MOC source file from a header containing
# classes that use the Q_OBJECT macro.
# @param $mochdr the header file with Q_OBJECT
## Generate a rule to create a MOC include file from a source containing
# local classes that use the Q_OBJECT macro. This include is then included
# by that source, so it must be generated before the source gets compiled.
# @param $mocsrc the source file with Q_OBJECT
.NOTPARALLEL: $$(mocinc)
## Generate a rule to create a MOC include file from a UI header (ui.h) containing
# local classes that use the Q_OBJECT macro. This include is then included
# by that header, so it must be generated before the UI source gets compiled.
# @param $mocuihdr the UI header file with Q_OBJECT
.NOTPARALLEL: $$(mocuiinc)
.NOTPARALLEL: $$(uihdr)
## Generate rules for generating the Qt source for a target.
# @param $target Target name.
# moc srcs from hdrs with Q_OBJECT
# moc includes from srcs with Q_OBJECT
# moc includes from UI headers with Q_OBJECT
# ui
# dirs
# Generate Qt sources.
# Generate COM Wrappers
$(WRAPPERSINCFILE): $(WRAPPERSFILE)
# this is actually necessary only for Win32 target with disabled dependencies
# static images are imported from VBoxUI.pro as IMAGES
@echo " \
" > $@
#
# Translation stuff
#
$(VBOX_LUPDATE) $(VirtualBox_SOURCES) $(VirtualBox_QT_MOCHDRS) $(VirtualBox_GENHDRS) -ts $(VirtualBox_TRANSLATIONS)
#
# Hand made dependencies go here
#
$(PATH_VirtualBox)/gen/ui/VBoxNewVMWzd$(SUFF_OBJ): $(PATH_VirtualBox)/ui/VBoxNewVMWzd.h $(PATH_VirtualBox)/ui/VBoxDiskImageManagerDlg.h
$(PATH_VirtualBox)/gen/ui/VBoxDiskImageManagerDlg$(SUFF_OBJ): ui/VBoxDiskImageManagerDlg.ui $(PATH_VirtualBox)/ui/VBoxNewHDWzd.h
test: