Makefile.kmk revision f7422473f089cb7f3b8be1c3fc223c441627d15c
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# Clara, CA 95054 USA or visit http://www.sun.com if you need
include $(KBUILD_PATH)/subheader.kmk
VBOX_VIRTUALBOX4_OUT_DIR := $(PATH_TARGET)/VirtualBox/misc
# Build new VirtualBox FE/Qt4 GUI runtime core.
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 += VBOX_WITH_ICHAT_THEATER
VirtualBox_DEFS.win += VBOX_GUI_USE_DDRAW
./src/globals \
./src/widgets \
./src/X11 \
./src/runtime \
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/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 += 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