Makefile.kmk revision b7a42d8f7bda452eaf00683acaedb93176f3bf37
a9be0b7162b90cfed2910a8fb8a6032064b28967vboxsync# Makefile for the VirtualBox Qt GUI.
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync# Copyright (C) 2006-2009 Sun Microsystems, Inc.
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync# available from http://www.virtualbox.org. This file is free software;
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# you can redistribute it and/or modify it under the terms of the GNU
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# General Public License (GPL) as published by the Free Software
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# additional information or have any questions.
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsyncSUB_DEPTH = ../../../..
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsyncinclude $(KBUILD_PATH)/subheader.kmk
a9be0b7162b90cfed2910a8fb8a6032064b28967vboxsyncVBOX_VIRTUALBOX4_SRC := $(PATH_SUB_CURRENT)
a9be0b7162b90cfed2910a8fb8a6032064b28967vboxsyncVBOX_VIRTUALBOX4_OUT_DIR := $(PATH_TARGET)/VirtualBox/misc
a9be0b7162b90cfed2910a8fb8a6032064b28967vboxsyncVBOX_WITH_REGISTRATION := 1
a9be0b7162b90cfed2910a8fb8a6032064b28967vboxsync# Ask the user to register at Sun. If this setting is disabled the user can
a9be0b7162b90cfed2910a8fb8a6032064b28967vboxsync# still register using the menu if desired.
a9be0b7162b90cfed2910a8fb8a6032064b28967vboxsyncVBOX_WITH_REGISTRATION_REQUEST := 1
a9be0b7162b90cfed2910a8fb8a6032064b28967vboxsync# Show the update notifier dialog during startup. If this setting is disabled
a9be0b7162b90cfed2910a8fb8a6032064b28967vboxsync# the user can still update using the menu if desired.
a9be0b7162b90cfed2910a8fb8a6032064b28967vboxsyncVBOX_WITH_UPDATE_REQUEST := 1
OTHERS += $(PATH_BIN)/vboxkeyboard.tar.gz
CLEAN += $(PATH_BIN)/vboxkeyboard.tar.gz
INSTALLS += VirtualBox.nls
include $(PATH_SUB_CURRENT)/nls/ApprovedLanguages.kmk
# vboxkeyboard.tar.gz - the LGPLed keyboard library must always be
# This rule will link create a temporary symlink to src/X11/ and tar
# bin directory (probably belongs in /usr/shared/somewhere really,
## @todo this should be tar'ed down into the output directory and installed using an install target.
$(PATH_BIN)/vboxkeyboard.tar.gz: $(abspathex \
$(call MSG_TOOL,tar/gzip,,$@)
$(QUIET2)$(RM) -f $(PATH_TARGET)/VBoxKeyboard/vboxkeyboard $@
$(QUIET2)$(RM) -f $(PATH_TARGET)/VBoxKeyboard/vboxkeyboard
$(PATH_BIN)/vboxkeyboard.tar.gz
VirtualBoxHardened_SOURCES = src/hardenedmain.cpp
#VirtualBoxHardened_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
include $(PATH_SUB_CURRENT)/VBoxUI.pro
#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.x86 += VBOX_WITH_HACKED_QT
VirtualBox_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
VirtualBox_DEFS.win += VBOX_GUI_USE_DDRAW
VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
VirtualBox_LDFLAGS.linux+= -rdynamic # for backtrace_symbols()
VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
VirtualBox_LDFLAGS.win += /SUBSYSTEM:console
VirtualBox_LDFLAGS.darwin = -lz \
-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 ui/VBoxRegistrationDlg.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 += $(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/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)/include/COMWrappers.xsl \
$(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_VIRTUALBOX4_SRC)/include/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 \
# 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