Makefile.kmk revision c7c3d3ff942b7f5c5d63f00c58adaf0e1e64e497
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Makefile for the VirtualBox Qt3 GUI.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Copyright (C) 2006-2007 Sun Microsystems, Inc.
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# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# additional information or have any questions.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncSUB_DEPTH = ../../../..
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncinclude $(KBUILD_PATH)/subheader.kmk
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncVBOX_PATH_VIRTUALBOX3_SRC := $(PATH_SUB_CURRENT)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncVBOX_WITH_REGISTRATION := 1
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncVBOX_WITH_REGISTRATION_REQUEST := 1
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# The targets.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncifdef VBOX_WITH_HARDENING
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync PROGRAMS += VirtualBox3Hardened
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync DLLS += VirtualBox
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync PROGRAMS += VirtualBox
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncifeq ($(filter-out freebsd linux openbsd netbsd solaris,$(KBUILD_TARGET)),) # X11
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync DLLS += VBoxKeyboard3
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync OTHERS += $(PATH_BIN)/vboxkeyboard3.tar.gz
# Hack for installing the qt.dll when building for OS/2.
qt.dll_INST = $(INST_BIN)
qt.dll_SOURCES += \
# vboxkeyboard3.tar.gz - the LGPLed keyboard library must always be
DIRECTORY_PREFIX = src/linux/
$(PATH_BIN)/vboxkeyboard3.tar.gz: $(abspathex $(VBoxKeyboard3_TARSOURCES),$(PATH_SUB_CURRENT)) $(PATH_TARGET)/$(SOURCE_DIRECTORY)
$(call MSG_TOOL,tar/gzip,,$@)
&& tar -cvhf - $(addprefix $(SOURCE_DIRECTORY)/,$(subst $(DIRECTORY_PREFIX),,$(VBoxKeyboard3_TARSOURCES))) \
$(PATH_BIN)/vboxkeyboard3.tar.gz \
VirtualBox3Hardened_SOURCES = src/hardenedmain.cpp
#VirtualBox3Hardened_INST.darwin = $(INST_BIN)VirtualBox3 $(INST_BIN)VirtualBoxVM3
include $(PATH_SUB_CURRENT)/VBoxUI.pro
# Import images from VBoxUI.pro and add some additional ones
#VirtualBox_INST.darwin = $(INST_BIN)VirtualBox3 $(INST_BIN)VirtualBoxVM3
VirtualBox_SDKS.win = WINPSDK DXSDK
VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk
# QDesigner UI sources are imported from VBoxUI.pro.
FORMS := $(filter-out ui/VBoxRegistrationDlg.ui,$(FORMS))
# OSE version is always necessary for lupdate/lrelease
FORMS += ui/VBoxAboutDlg.ui
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
$(PATH_VirtualBox)/VirtualBox.rc
VirtualBox_SOURCES += src/VBoxAboutNonOSEDlg.cpp
VirtualBox_QT_MOCHDRS += include/VBoxAboutNonOSEDlg.h
VirtualBox_DEFS.debug = VBOX_GUI_DEBUG VBOX_CHECK_STATE # QT_FATAL_ASSERT
VirtualBox_DEFS.darwin = VBOX_GUI_USE_QUARTZ2D VBOX_GUI_USE_QIMAGE VBOX_WITHOUT_QHTTP
VirtualBox_DEFS.freebsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
VirtualBox_DEFS.linux = VBOX_GUI_USE_QIMAGE #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.darwin += VBOX_WITH_ICHAT_THEATER
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.os2 = -Zlinker /PM:PM -Zno-fork
$(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox3.dylib)
VirtualBox_LDFLAGS.darwin += -framework Foundation -framework AppKit -framework InstantMessage -framework QuartzCore
$(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \
$(PATH_SDK_DXSDK_LIB)/ddraw.lib \
$(PATH_SDK_DXSDK_LIB)/dxguid.lib
VirtualBox_LIBS.os2 += $(PATH_DLL)/VBoxHlp$(VBOX_SUFF_DLL)
ifdef VBOX_WITH_DEBUGGER_GUI ## @todo make this dynamically loadable and ship with release builds too.
VirtualBox_src/HappyHttp.cpp_CXXFLAGS += -fexceptions
VirtualBox_src/VBoxDownloaderWgt.cpp_CXXFLAGS += -fexceptions
VirtualBox_src/VBoxNetworkFramework.cpp_CXXFLAGS += -fexceptions
VirtualBox_src/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
# static images imported from VBoxUI.pro as VirtualBox_QT_IMAGES
VirtualBox_SOURCES += $(PATH_VirtualBox)/ui/vbox_image_collection.cpp
VirtualBox_CLEAN += $(PATH_VirtualBox)/ui/vbox_image_collection.cpp $(PATH_VirtualBox)/ui/vbox_image_collection.txt
$$(PATH_VirtualBox)/ui/vbox_image_collection.txt: $(PATH_SUB_CURRENT)/VBoxUI.pro $(VirtualBox_QT_IMAGES) | $$(dir $$@)
$$(PATH_VirtualBox)/ui/vbox_image_collection.cpp: $$(PATH_VirtualBox)/ui/vbox_image_collection.txt | $$(dir $$@)
VirtualBox_CLEAN += $(PATH_VirtualBox)/include/COMWrappers.h
VirtualBox_INTERMEDIATES += $(PATH_VirtualBox)/include/COMWrappers.h
$$(PATH_VirtualBox)/include/COMWrappers.h: \
$(PATH_ROOT)/src/VBox/Main/idl/VirtualBox.xidl \
$(VBOX_PATH_VIRTUALBOX3_SRC)/include/COMWrappers.xsl \
$(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_PATH_VIRTUALBOX3_SRC)/include/COMWrappers.xsl $<
testwrappers:: $(PATH_VirtualBox)/include/COMWrappers.h
# On Windows we'll have to generate/edit the resource file.
$$(PATH_VirtualBox)/VirtualBox.rc: $(PATH_SUB_CURRENT)/Makefile.kmk $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
VirtualBox3.app_INST = $(INST_VIRTUALBOX)Contents/
VirtualBox3.app_MODE = 644
$(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns
$$(PATH_VirtualBox3.app)/Info.plist: $(PATH_SUB_CURRENT)/src/darwin/Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
$(call MSG_GENERATE,VirtualBox3.app,$<,$@)
VirtualBoxVM3.app_MODE = 644
src/darwin/VM-PkgInfo=>PkgInfo \
$(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns
$$(PATH_VirtualBoxVM3.app)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
$(call MSG_GENERATE,VirtualBoxVM3.app,$<,$@)
PROGRAMS.darwin += tstDarwinKeyboard
# Restore / reset things to avoid possible conflicts with kBuild (VBoxUI.pro).
include $(KBUILD_PATH)/subfooter.kmk
# before a new product release. VirtualBox_xx_YY.ts is a template for new
$(filter-out nls/qt_%.ts,$(VirtualBox_QT_TRANSLATIONS)) \