Makefile.kmk revision bed4a241cf38ca63195615d698aa19312395dc47
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd# Makefile for the VirtualBox Qt GUI.
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# Copyright (C) 2006-2010 Oracle Corporation
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# This file is part of VirtualBox Open Source Edition (OSE), as
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc# available from http://www.virtualbox.org. This file is free software;
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# you can redistribute it and/or modify it under the terms of the GNU
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# 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.
1d980e5489836e977ba59b419e27b0ec875c4bd3takashiSUB_DEPTH = ../../../..
1d980e5489836e977ba59b419e27b0ec875c4bd3takashiinclude $(KBUILD_PATH)/subheader.kmk
1d980e5489836e977ba59b419e27b0ec875c4bd3takashiVBOX_VIRTUALBOX4_SRC := $(PATH_SUB_CURRENT)
3f08db06526d6901aa08c110b5bc7dde6bc39905ndVBOX_VIRTUALBOX4_OUT_DIR := $(PATH_TARGET)/VirtualBox/misc
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# VBOX_WITH_REGISTRATION := 1
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# Ask the user to register at Sun. If this setting is disabled the user can
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# still register using the menu if desired.
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# VBOX_WITH_REGISTRATION_REQUEST := 1
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# For now this should be disabled in any case
9860a26381c920213ebbc3be9297dbf45cdfb3batrawickifdef VBOX_WITH_REGISTRATION
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi VBOX_WITH_REGISTRATION=
1d980e5489836e977ba59b419e27b0ec875c4bd3takashiifdef VBOX_WITH_REGISTRATION_REQUEST
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi VBOX_WITH_REGISTRATION_REQUEST=
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# Show the update notifier dialog during startup. If this setting is disabled
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# the user can still update using the menu if desired.
1d980e5489836e977ba59b419e27b0ec875c4bd3takashiifndef VBOX_OSE
1d980e5489836e977ba59b419e27b0ec875c4bd3takashiVBOX_WITH_UPDATE_REQUEST := 1
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# Build new VirtualBox FE/Qt4 GUI runtime core.
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# Currently its not used, you can build it for developing purposes.
1d980e5489836e977ba59b419e27b0ec875c4bd3takashiVBOX_WITH_NEW_RUNTIME_CORE := 1
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# Force the usage of the new runtime core for the single monitor case also.
1d980e5489836e977ba59b419e27b0ec875c4bd3takashiVBOX_FORCE_NEW_RUNTIME_CORE_ALWAYS := 1
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# The targets.
1d980e5489836e977ba59b419e27b0ec875c4bd3takashiifdef VBOX_WITH_HARDENING
1d980e5489836e977ba59b419e27b0ec875c4bd3takashiPROGRAMS += VirtualBoxHardened
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarDLLS += VirtualBox
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarPROGRAMS += VirtualBox
0bd1ddab48139fbbe68f4e257fe669dc19f58fe9rbowenifeq ($(filter-out freebsd linux openbsd netbsd solaris,$(KBUILD_TARGET)),) # X11
0bd1ddab48139fbbe68f4e257fe669dc19f58fe9rbowen DLLS += VBoxKeyboard
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar ## @todo convert to install target.
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi OTHERS += $(PATH_BIN)/vboxkeyboard.tar.gz
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi CLEAN += $(PATH_BIN)/vboxkeyboard.tar.gz
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# Include the language lists.
1d980e5489836e977ba59b419e27b0ec875c4bd3takashiinclude $(PATH_SUB_CURRENT)/nls/ApprovedLanguages.kmk
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# VBoxKeyboard - keyboard library for X11.
1d980e5489836e977ba59b419e27b0ec875c4bd3takashiVBoxKeyboard_TEMPLATE = VBOXR3
1d980e5489836e977ba59b419e27b0ec875c4bd3takashiVBoxKeyboard_SOURCES = \
1d980e5489836e977ba59b419e27b0ec875c4bd3takashiVBoxKeyboard_LIBS = X11
1d980e5489836e977ba59b419e27b0ec875c4bd3takashiVBoxKeyboard_LIBPATH = $(VBOX_LIBPATH_X11)
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# vboxkeyboard.tar.gz - the LGPLed keyboard library must always be
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# redistributed with usable sources.
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# This rule will link create a temporary symlink to src/X11/ and tar
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# up the selected files into a tarball that is installed into the
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# bin directory (probably belongs in /usr/shared/somewhere really,
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# but wtf, it's not like we're even trying to be FHS compliant).
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar## @todo this should be tar'ed down into the output directory and installed using an install target.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar$(PATH_BIN)/vboxkeyboard.tar.gz: $(abspathex \
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar $(VBoxKeyboard_SOURCES) \
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar ,$(PATH_SUB_CURRENT)) | $(PATH_TARGET)/VBoxKeyboard/
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi $(call MSG_TOOL,tar/gzip,,$@)
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi $(QUIET2)$(RM) -f $(PATH_TARGET)/VBoxKeyboard/vboxkeyboard $@
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi $(QUIET)$(LN_SYMLINK) $(VBOX_VIRTUALBOX4_SRC)/src/X11/ $(PATH_TARGET)/VBoxKeyboard/vboxkeyboard
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi $(QUIET)cd $(PATH_TARGET)/VBoxKeyboard \
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi && tar -chvf - $(addprefix vboxkeyboard/,$(notdir $^)) \
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung | gzip - > $@
727872d18412fc021f03969b8641810d8896820bhumbedooh $(QUIET2)$(RM) -f $(PATH_TARGET)/VBoxKeyboard/vboxkeyboard
727872d18412fc021f03969b8641810d8896820bhumbedoohOTHER_CLEAN += \
0d0ba3a410038e179b695446bb149cce6264e0abnd# Hardened VirtualBox.
0d0ba3a410038e179b695446bb149cce6264e0abndVirtualBoxHardened_TEMPLATE = VBOXR3HARDENEDEXE
ac082aefa89416cbdc9a1836eaf3bed9698201c8humbedoohVirtualBoxHardened_SOURCES = src/hardenedmain.cpp
0d0ba3a410038e179b695446bb149cce6264e0abndVirtualBoxHardened_NAME = VirtualBox
0d0ba3a410038e179b695446bb149cce6264e0abndVirtualBoxHardened_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
0d0ba3a410038e179b695446bb149cce6264e0abnd# Include Qt project file, we'll use FORMS and TRANSLATIONS in
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh# the VirtualBox setup below.
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowenSAVED_TEMPLATE := $(TEMPLATE)
0d0ba3a410038e179b695446bb149cce6264e0abndinclude $(PATH_SUB_CURRENT)/VBoxUI.pro
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi# VirtualBox - The GUI program.
VirtualBox_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
VirtualBox_SDKS.win = WINPSDK DXSDK
ifeq ($(filter-out freebsd linux netbsd openbsd os2,$(KBUILD_TARGET)),) # X11 + os2 ## @todo solaris
VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk
VirtualBox_DEFS.debug = VBOX_CHECK_STATE # QT_FATAL_ASSERT
VirtualBox_DEFS.darwin = VBOX_GUI_USE_QUARTZ2D VBOX_GUI_USE_QIMAGE VBOX_WITHOUT_QHTTP
VirtualBox_DEFS.darwin.x86= USE_HID_FOR_MODIFIERS
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.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_ICHAT_THEATER
VirtualBox_DEFS.win += VBOX_GUI_USE_DDRAW
./src/globals \
./src/widgets \
./src/X11 \
./src/runtime \
VirtualBox_LIBS.linux += Xinerama
VirtualBox_LIBS.solaris += Xinerama
VirtualBox_LIBS.freebsd += Xinerama
VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
VirtualBox_LDFLAGS.linux+= -rdynamic # for backtrace_symbols()
VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
VirtualBox_LDFLAGS.win += /SUBSYSTEM:console
-framework IOKit -framework AppKit -framework ApplicationServices -framework Foundation -framework Carbon \
$(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox.dylib)
VirtualBox_LDFLAGS.darwin.x86 = -framework QuickTime
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
# (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
updatenls:: makeallnls nls/VirtualBox_en.ts