Makefile.kmk revision 8f0f6fa2332bd885220c33aeada6edc7933da291
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd# Makefile for the VirtualBox Qt GUI.
a78048ccbdb6256da15e6b0e7e95355e480c2301nd# Copyright (C) 2006-2010 Oracle Corporation
a78048ccbdb6256da15e6b0e7e95355e480c2301nd# This file is part of VirtualBox Open Source Edition (OSE), as
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc# available from http://www.virtualbox.org. This file is free software;
a78048ccbdb6256da15e6b0e7e95355e480c2301nd# you can redistribute it and/or modify it under the terms of the GNU
a78048ccbdb6256da15e6b0e7e95355e480c2301nd# General Public License (GPL) as published by the Free Software
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# Foundation, in version 2 as it comes in the "COPYING" file of the
2e545ce2450a9953665f701bb05350f0d3f26275nd# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
a78048ccbdb6256da15e6b0e7e95355e480c2301ndSUB_DEPTH = ../../../..
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rboweninclude $(KBUILD_PATH)/subheader.kmk
3f08db06526d6901aa08c110b5bc7dde6bc39905ndVBOX_VIRTUALBOX4_SRC := $(PATH_SUB_CURRENT)
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVBOX_VIRTUALBOX4_OUT_DIR := $(PATH_TARGET)/VirtualBox/misc
253547fb9cc7986e84ff68aef076f664fc4169dctakashi# VBOX_WITH_REGISTRATION := 1
a78048ccbdb6256da15e6b0e7e95355e480c2301nd# Ask the user to register at Sun. If this setting is disabled the user can
4b575a6b6704b516f22d65a3ad35696d7b9ba372rpluem# still register using the menu if desired.
4b575a6b6704b516f22d65a3ad35696d7b9ba372rpluem# VBOX_WITH_REGISTRATION_REQUEST := 1
a78048ccbdb6256da15e6b0e7e95355e480c2301nd# For now this should be disabled in any case
a78048ccbdb6256da15e6b0e7e95355e480c2301ndifdef VBOX_WITH_REGISTRATION
a78048ccbdb6256da15e6b0e7e95355e480c2301nd VBOX_WITH_REGISTRATION=
a78048ccbdb6256da15e6b0e7e95355e480c2301ndifdef VBOX_WITH_REGISTRATION_REQUEST
a78048ccbdb6256da15e6b0e7e95355e480c2301nd VBOX_WITH_REGISTRATION_REQUEST=
a78048ccbdb6256da15e6b0e7e95355e480c2301nd# Show the update notifier dialog during startup. If this setting is disabled
a78048ccbdb6256da15e6b0e7e95355e480c2301nd# the user can still update using the menu if desired.
a78048ccbdb6256da15e6b0e7e95355e480c2301ndifndef VBOX_OSE
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVBOX_WITH_UPDATE_REQUEST := 1
a78048ccbdb6256da15e6b0e7e95355e480c2301nd# The targets.
a78048ccbdb6256da15e6b0e7e95355e480c2301ndifdef VBOX_WITH_HARDENING
a78048ccbdb6256da15e6b0e7e95355e480c2301ndPROGRAMS += VirtualBoxHardened
a78048ccbdb6256da15e6b0e7e95355e480c2301ndDLLS += VirtualBox
a78048ccbdb6256da15e6b0e7e95355e480c2301ndPROGRAMS += VirtualBox
a78048ccbdb6256da15e6b0e7e95355e480c2301nd# Include the language lists.
a78048ccbdb6256da15e6b0e7e95355e480c2301ndinclude $(PATH_SUB_CURRENT)/nls/ApprovedLanguages.kmk
a78048ccbdb6256da15e6b0e7e95355e480c2301nd# Hardened VirtualBox.
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBoxHardened_TEMPLATE = VBOXR3HARDENEDEXE
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBoxHardened_SOURCES = src/hardenedmain.cpp
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBoxHardened_NAME = VirtualBox
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBoxHardened_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
a78048ccbdb6256da15e6b0e7e95355e480c2301nd# Include Qt project file, we'll use FORMS and TRANSLATIONS in
a78048ccbdb6256da15e6b0e7e95355e480c2301nd# the VirtualBox setup below.
a78048ccbdb6256da15e6b0e7e95355e480c2301ndSAVED_TEMPLATE := $(TEMPLATE)
a78048ccbdb6256da15e6b0e7e95355e480c2301ndinclude $(PATH_SUB_CURRENT)/VBoxUI.pro
a78048ccbdb6256da15e6b0e7e95355e480c2301nd# VirtualBox - The GUI program.
a78048ccbdb6256da15e6b0e7e95355e480c2301ndUSES += qt4
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBox_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXQT4GUI,VBOXQT4GUIEXE)
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBox_NAME = VirtualBox
a78048ccbdb6256da15e6b0e7e95355e480c2301ndifndef VBOX_WITH_HARDENING # For the launch trick we need different inode numbers.
a78048ccbdb6256da15e6b0e7e95355e480c2301nd VirtualBox_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBox_SDKS.win = WINPSDK DXSDK
a78048ccbdb6256da15e6b0e7e95355e480c2301ndif1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd os2) # X11 + os2 ## @todo solaris
a78048ccbdb6256da15e6b0e7e95355e480c2301nd VirtualBox_SDKS += LIBSDL
a78048ccbdb6256da15e6b0e7e95355e480c2301ndifdef VBOX_WITH_ICHAT_THEATER
a78048ccbdb6256da15e6b0e7e95355e480c2301nd # For testing iChat Theater stuff change the sdk path (HACK ALERT!)
a78048ccbdb6256da15e6b0e7e95355e480c2301nd VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBox_DEFS =
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBox_DEFS.debug = VBOX_CHECK_STATE # QT_FATAL_ASSERT
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBox_DEFS.darwin = VBOX_GUI_USE_QUARTZ2D VBOX_GUI_USE_QIMAGE
a78048ccbdb6256da15e6b0e7e95355e480c2301ndifndef VBOX_WITH_COCOA_QT
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBox_DEFS.darwin.x86= USE_HID_FOR_MODIFIERS
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBox_DEFS.freebsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBox_DEFS.linux = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBox_DEFS.netbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBox_DEFS.openbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBox_DEFS.solaris = VBOX_GUI_USE_QIMAGE #VBOX_GUI_USE_SDL
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBox_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
a78048ccbdb6256da15e6b0e7e95355e480c2301ndifdef VBOX_WITH_ICHAT_THEATER
a78048ccbdb6256da15e6b0e7e95355e480c2301nd VirtualBox_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
a78048ccbdb6256da15e6b0e7e95355e480c2301ndifneq ($(KBUILD_TYPE),release)
a78048ccbdb6256da15e6b0e7e95355e480c2301nd # non-release builds has some extra features.
a78048ccbdb6256da15e6b0e7e95355e480c2301nd VirtualBox_DEFS.win += VBOX_GUI_USE_DDRAW
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBox_DEFS += \
a78048ccbdb6256da15e6b0e7e95355e480c2301nd $(if $(VBOX_WITH_REGISTRATION),VBOX_WITH_REGISTRATION) \
5652dbe450e4fcfdf36d4cfb42d7f2345ded29a4maczniak $(if $(VBOX_WITH_REGISTRATION_REQUEST),VBOX_WITH_REGISTRATION_REQUEST) \
a78048ccbdb6256da15e6b0e7e95355e480c2301nd $(if $(VBOX_WITH_UPDATE_REQUEST),VBOX_WITH_UPDATE_REQUEST) \
d05e31513e1ed1df255774920b11ccad0262ad9cnd $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA) \
a78048ccbdb6256da15e6b0e7e95355e480c2301nd $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE) \
a78048ccbdb6256da15e6b0e7e95355e480c2301nd $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS) \
a78048ccbdb6256da15e6b0e7e95355e480c2301nd $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000) \
a78048ccbdb6256da15e6b0e7e95355e480c2301nd $(if $(VBOX_WITH_NETFLT)$(eq $(KBUILD_TARGET),freebsd),VBOX_WITH_NETFLT) \
a78048ccbdb6256da15e6b0e7e95355e480c2301nd $(if $(VBOX_WITH_VDE),VBOX_WITH_VDE) \
a78048ccbdb6256da15e6b0e7e95355e480c2301nd $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI)
5652dbe450e4fcfdf36d4cfb42d7f2345ded29a4maczniakifdef VBOX_WITH_DEBUGGER_GUI
a78048ccbdb6256da15e6b0e7e95355e480c2301nd VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI
a78048ccbdb6256da15e6b0e7e95355e480c2301nd if "$(KBUILD_TYPE)" != "release"
d05e31513e1ed1df255774920b11ccad0262ad9cnd VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI_MENU
a78048ccbdb6256da15e6b0e7e95355e480c2301ndifdef VBOX_WITH_VIDEOHWACCEL
a78048ccbdb6256da15e6b0e7e95355e480c2301nd VirtualBox_DEFS += VBOX_WITH_VIDEOHWACCEL \
a78048ccbdb6256da15e6b0e7e95355e480c2301nd VBOX_GUI_USE_QGL
a78048ccbdb6256da15e6b0e7e95355e480c2301ndelse ifdef VBOX_GUI_USE_QGL
a78048ccbdb6256da15e6b0e7e95355e480c2301nd VirtualBox_DEFS += VBOX_GUI_USE_QGL
a78048ccbdb6256da15e6b0e7e95355e480c2301ndifdef VBOX_WITH_VIRTIO
a78048ccbdb6256da15e6b0e7e95355e480c2301nd VirtualBox_DEFS += VBOX_WITH_VIRTIO
a78048ccbdb6256da15e6b0e7e95355e480c2301ndifdef VBOX_WITH_WDDM
a78048ccbdb6256da15e6b0e7e95355e480c2301nd VirtualBox_DEFS += VBOX_WITH_WDDM
a78048ccbdb6256da15e6b0e7e95355e480c2301ndifdef VBOX_BLEEDING_EDGE
a78048ccbdb6256da15e6b0e7e95355e480c2301nd VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
a78048ccbdb6256da15e6b0e7e95355e480c2301nd VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
a78048ccbdb6256da15e6b0e7e95355e480c2301nd VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
a78048ccbdb6256da15e6b0e7e95355e480c2301nd VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVBOX_GUI_INC_DIRS = \
a78048ccbdb6256da15e6b0e7e95355e480c2301ndifdef VBOX_WITH_REGISTRATION
a78048ccbdb6256da15e6b0e7e95355e480c2301nd VBOX_GUI_INC_DIRS += \
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBox_INCS = \
a78048ccbdb6256da15e6b0e7e95355e480c2301nd $(VBOX_GUI_INC_DIRS) \
a78048ccbdb6256da15e6b0e7e95355e480c2301nd $(PATH_VirtualBox)/include
a78048ccbdb6256da15e6b0e7e95355e480c2301nd# Necessary for the hdd backend enumeration
a78048ccbdb6256da15e6b0e7e95355e480c2301ndVirtualBox_LIBS = $(LIB_DDU)
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung# This library is required for multi-monitor support
0d0ba3a410038e179b695446bb149cce6264e0abndifdef VBOX_WITH_VIDEOHWACCEL
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedooh# Necessary for save state support
727872d18412fc021f03969b8641810d8896820bhumbedoohVirtualBox_LIBS += $(LIB_VMM)
0d0ba3a410038e179b695446bb149cce6264e0abndifeq ($(KBUILD_TYPE),release)
0d0ba3a410038e179b695446bb149cce6264e0abnd VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
0d0ba3a410038e179b695446bb149cce6264e0abnd VirtualBox_LDFLAGS.linux+= -rdynamic # for backtrace_symbols()
0d0ba3a410038e179b695446bb149cce6264e0abnd ifeq ($(USERNAME),dmik)
0d0ba3a410038e179b695446bb149cce6264e0abnd VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
0d0ba3a410038e179b695446bb149cce6264e0abnd VirtualBox_LDFLAGS.win += /SUBSYSTEM:console
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowenif defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
0d0ba3a410038e179b695446bb149cce6264e0abnd VirtualBox_LDFLAGS.win += /DelayLoad:QtOpenGLVBox4.dll /DelayLoad:OPENGL32.dll
a78048ccbdb6256da15e6b0e7e95355e480c2301nd -framework AppKit -framework Carbon \
$(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox.dylib)
VirtualBox_LDFLAGS.darwin += -framework InstantMessage -framework QuartzCore
VirtualBox_LDFLAGS.darwin += -framework OpenGL
$(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \
$(PATH_SDK_DXSDK_LIB)/ddraw.lib \
$(PATH_SDK_DXSDK_LIB)/dxguid.lib
VirtualBox_LIBS.solaris += GL
VirtualBox_LIBS.linux += GL
VirtualBox_LIBS.freebsd += GL
# (The include directory and lib/framework for each module will be added by the Qt4 unit.)
# Import QDesigner UI sources and translations from VBoxUI.pro.
FORMS := $(filter-out src/wizards/registration/UIRegistrationWzdPage1.ui,$(FORMS))
# Resource files with some OSE differences (VirtualBoxBrand.qrc is created further down).
VirtualBox_SOURCES += VirtualBox1.qrc
VirtualBox1.qrc_RCCFLAGS = -name BASIC1
VirtualBox_SOURCES += VirtualBox2.qrc
VirtualBox2.qrc_RCCFLAGS = -name BASIC2
VirtualBox_SOURCES += VirtualBoxMac.qrc
VirtualBoxMac.qrc_RCCFLAGS = -name MAC
VirtualBox_SOURCES += VirtualBoxOther.qrc
VirtualBoxOther.qrc_RCCFLAGS = -name OTHER
VirtualBox_SOURCES += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
$(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc_RCCFLAGS = -name BRAND
VirtualBox_SOURCES += VirtualBoxShaders.qrc
VirtualBoxShaders.qrc_RCCFLAGS = -name SHADERS
# Import the translation source from VBoxUI.pro and add the qt_xx_YY counterparts
# bird: What about $(if $(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-extra))?
VirtualBox_src/globals/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
VirtualBox_INTERMEDIATES += $(PATH_VirtualBox)/include/COMWrappers.h
$(PATH_VirtualBox)/include/COMWrappers \
$(PATH_VirtualBox)/include/COMWrappers.tmp \
$(PATH_VirtualBox)/include/COMWrappers.h \
$(PATH_VirtualBox)/include/COMWrappers.cpp
VirtualBox_SOURCES += $(PATH_VirtualBox)/include/COMWrappers.cpp
$$(PATH_VirtualBox)/include/COMWrappers \
+| $$(PATH_VirtualBox)/include/COMWrappers.h \
+| $$(PATH_VirtualBox)/include/COMWrappers.cpp: \
$(VBOX_VIRTUALBOX4_SRC)/src/globals/COMWrappers.xsl \
$(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_VIRTUALBOX4_SRC)/src/globals/COMWrappers.xsl $<
' * DO NOT EDIT! This is a generated file, see COMWrappers.h for details.' \
'#include "VBoxGlobal.h"' \
testwrappers:: $$(PATH_VirtualBox)/include/COMWrappers.h
VirtualBox_CLEAN += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
$(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc: \
$(VBOX_VIRTUALBOX4_SRC)/VirtualBoxBrand.qrc \
VirtualBox_INTERMEDIATES += $(VirtualBox_0_OUTDIR)/include/precomp.h.gch
tstx: $$(VirtualBox_0_OUTDIR)/include/precomp.h.gch
$$(VirtualBox_0_OUTDIR)/include/precomp.h.gch: \
$(PATH_SUB_CURRENT)/src/precomp.h \
$$(VirtualBox_0_OUTDIR)/include/COMWrappers.h \
$$(filter %.gen.h, $$(VirtualBox_INTERMEDIATES) ) \
$(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h \
$(if-expr "$(KBUILD_TYPE)" == "debug", '-DDEBUG' '-DDEBUG_bird' '-DDEBUG_USERNAME=bird' '-DVBOX_CHECK_STATE' ,) \
# On Windows we'll have to generate/edit part of the resource file.
src/win/VirtualBox.rc_INCS = $(PATH_VirtualBox)
$$(PATH_VirtualBox)/VirtualBox-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
INSTALLS += VirtualBox.lproj
VirtualBox.lproj_MODE = 755
VirtualBox.lproj_DIRS := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES))
# The VirtualBoxVM.app helper is for launching VMs (fixes some issues with the dock).
INSTALLS += VirtualBox.app
VirtualBox.app_INST = $(INST_VIRTUALBOX)Contents/
VirtualBox.app_MODE = 644
$(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns
$$(PATH_VirtualBox.app)/Info.plist: $(PATH_SUB_CURRENT)/src/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/
$(call MSG_GENERATE,VirtualBox.app,$<,$@)
INSTALLS += VirtualBoxVM.app
VirtualBoxVM.app_MODE = 644
src/darwin/VM-PkgInfo=>PkgInfo \
$$(PATH_VirtualBoxVM.app)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
$(call MSG_GENERATE,VirtualBoxVM.app,$<,$@)
VBoxOGL2D_DEFS = IN_RING3 QT_NO_DEBUG QT_THREAD_SUPPORT QT_SHARED HAVE_CONFIG_H $(ARCH_BITS_DEFS) VBOX_WITH_VIDEOHWACCEL VBOX_GUI_USE_QGL
PROGRAMS.darwin += tstDarwinKeyboard
tstDarwinKeyboard_DEFS.x86 = USE_HID_FOR_MODIFIERS
# Unset everything that was loaded from VBoxUI.pro.
include $(KBUILD_PATH)/subfooter.kmk
# before a new product release. VirtualBox_xx_YY.ts is a template for new
#VirtualBox_QT_TRANSLATIONS = nls/VirtualBox_de.ts
updatenls:: makeallnls nls/VirtualBox_en.ts