Makefile.kmk revision 35ff97cd483b4cfd5d03ea30a4d360977d59c553
# $Id$
## @file
# Sub-Makefile for the Solaris installer.
#
#
# Copyright (C) 2007-2010 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# 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
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#
SUB_DEPTH = ../../../..
include $(KBUILD_PATH)/subheader.kmk
ifneq ($(KBUILD_HOST),solaris)
$(error "The Solaris installer can only be built on Solaris!") # yeah, right.
endif
# Unset this to speed up things during makefile hacking.
VBOX_SOL_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT)
#
# Globals
#
ifdef VBOX_WITH_COMBINED_SOLARIS_PACKAGE ## @todo remove this when tinderclient.pl is updated.
VBOX_WITH_COMBINED_PACKAGE := 1
endif
VBOX_PATH_SOL_INST_SRC := $(PATH_SUB_CURRENT)
SOLARIS_DIR_NAME_64 := amd64
SOLARIS_DIR_NAME_32 := i386
SOLARIS_INST_OUT_DIR := $(PATH_TARGET)/Installer
SOLARIS_BASEINST_DIR := $(PATH_TARGET)/Installer/BasePkg
SOLARIS_VBOXINST_SUBDIR := opt/VirtualBox
SOLARIS_VBOXINST_DIR := $(SOLARIS_BASEINST_DIR)/$(SOLARIS_VBOXINST_SUBDIR)
SOLARIS_VBOXINST_DIR_32 := $(SOLARIS_VBOXINST_DIR)/$(SOLARIS_DIR_NAME_32)
SOLARIS_VBOXINST_DIR_64 := $(SOLARIS_VBOXINST_DIR)/$(SOLARIS_DIR_NAME_64)
SOLARIS_DRIVERINST_DIR := $(SOLARIS_BASEINST_DIR)/platform/i86pc/kernel/drv
SOLARIS_DRIVERINST_DIR_32 := $(SOLARIS_DRIVERINST_DIR)
SOLARIS_DRIVERINST_DIR_64 := $(SOLARIS_DRIVERINST_DIR)/amd64
SOLARIS_USR_DIR := $(SOLARIS_BASEINST_DIR)/usr
SOLARIS_USRBIN_DIR := $(SOLARIS_USR_DIR)/bin
SOLARIS_USRSHR_APPS_DIR := $(SOLARIS_USR_DIR)/share/applications
SOLARIS_USRSHR_PIXMAPS_DIR := $(SOLARIS_USR_DIR)/share/pixmaps
SOLARIS_VBOXSMF_DIR := $(SOLARIS_BASEINST_DIR)/var/svc/manifest/application/virtualbox
SOLARIS_ETC_DIR := $(SOLARIS_BASEINST_DIR)/etc
SOLARIS_OUT_BIN_64 := $(PATH_OUT_BASE)/solaris.amd64/$(KBUILD_TYPE)/bin
SOLARIS_OUT_BIN_32 := $(PATH_OUT_BASE)/solaris.x86/$(KBUILD_TYPE)/bin
SOLARIS_OUT_BIN := $(PATH_BIN)
SOLARIS_DBG_DIR := $(PATH_TARGET)/Installer/DebugPkg
SOLARIS_DBG_DIR_32 := $(SOLARIS_DBG_DIR)/$(SOLARIS_DIR_NAME_32)
SOLARIS_DBG_DIR_64 := $(SOLARIS_DBG_DIR)/$(SOLARIS_DIR_NAME_64)
SOLARIS_VBI_DIR := $(PATH_TARGET)/Installer/KernelPkg
ifeq ($(KBUILD_TARGET_ARCH),amd64)
SOLARIS_VBOXINST_DIR_ISA := $(SOLARIS_VBOXINST_DIR_64)
SOLARIS_DRIVERINST_DIR_ISA := $(SOLARIS_DRIVERINST_DIR_64)
SOLARIS_DBG_DIR_ISA := $(SOLARIS_DBG_DIR_64)
SOL_DBG_OBJCOPY := /usr/sfw/bin/gobjcopy --only-keep-debug
SOL64_PKG := 1
else
SOLARIS_VBOXINST_DIR_ISA := $(SOLARIS_VBOXINST_DIR_32)
SOLARIS_DRIVERINST_DIR_ISA := $(SOLARIS_DRIVERINST_DIR_32)
SOLARIS_DBG_DIR_ISA := $(SOLARIS_DBG_DIR_32)
SOL_DBG_OBJCOPY := $(CP) -p # Solaris ld/gobjcopy(2.15) don't get along on x86, works only on amd64. So just using cp for now.
endif
SOL_OBJCOPY := /usr/sfw/bin/gobjcopy --strip-unneeded -R .comment
SOL_GTAR := /usr/sfw/bin/gtar
# Figure out the paths to the two platform specific Qt4 directories
SOLARIS_PATH_QT_32 = $(subst solaris.$(KBUILD_TARGET_ARCH),solaris.x86,$(VBOX_PATH_QT4))
SOLARIS_PATH_QT_64 = $(subst solaris.$(KBUILD_TARGET_ARCH),solaris.amd64,$(VBOX_PATH_QT4))
# Base package
PKGINFO_ARCH = $(shell uname -p)
PKGINFO_REVSTAMP = $(date %Y.%m.%d.%H.%M)
ifndef VBOX_WITH_COMBINED_PACKAGE
PKG_FILENAME = VirtualBox-$(VBOX_VERSION_STRING)-SunOS-$(KBUILD_TARGET_ARCH)-r$(VBOX_SVN_REV)
else
PKG_FILENAME = VirtualBox-$(VBOX_VERSION_STRING)-SunOS-r$(VBOX_SVN_REV)
endif
# Debug package
DBG_ARCHIVE = VirtualBoxDebug.tar.bz2
# Kernel interface (vbi) package
VBIPKG_FILENAME = VirtualBoxKern-$(VBOX_VERSION_STRING)-SunOS-r$(VBOX_SVN_REV)
#
# Targets
#
PROGRAMS += VBoxZoneAccess VBoxISAExec
INSTALLS += solaris-doc solaris-bin solaris-drv-confs
BLDDIRS += \
$(SOLARIS_INST_OUT_DIR) \
$(SOLARIS_BASEINST_DIR) \
$(SOLARIS_VBOXINST_DIR) \
$(SOLARIS_VBI_DIR) \
$(SOLARIS_DBG_DIR)
BLDDIRS += $(addprefix $(SOLARIS_BASEINST_DIR)/,\
usr \
usr/bin \
platform \
platform/i86pc \
platform/i86pc/kernel \
platform/i86pc/kernel/drv \
platform/i86pc/kernel/drv/amd64 \
)
PACKING += $(PATH_BIN)/$(PKG_FILENAME).tar.gz $(PATH_BIN)/$(DBG_ARCHIVE)
OTHER_CLEAN += $(addprefix $(SOLARIS_BASEINST_DIR)/,\
vbox.pkginfo vbox.copyright vbox.space vbox.depend vbox.pkgresponse \
makepackage.sh prototype postinstall.sh checkinstall.sh preremove.sh)
#
# VBoxZoneAccess
#
VBoxZoneAccess_TEMPLATE = VBOXR3EXE
VBoxZoneAccess_DEPS = $(VBOX_SVN_REV_KMK)
VBoxZoneAccess_SOURCES = VBoxZoneAccess.c
VBoxZoneAccess_LIBS = $(LIB_RUNTIME)
#
# VBoxISAExec
#
VBoxISAExec_TEMPLATE = VBOXR3EXE
VBoxISAExec_DEPS = $(VBOX_SVN_REV_KMK)
VBoxISAExec_SOURCES = VBoxISAExec.c
#
# Solaris installs.
#
solaris-doc_INST = bin/
solaris-doc_MODE = a+r,u+w
solaris-doc_SOURCES = \
$(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)=>LICENSE) \
$(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/$(if $(VBOX_OSE),OSE,NonOSE)/VirtualBox_64px.png=>VBox.png
solaris-bin_INST = bin/
solaris-bin_MODE = a+rx,u+w
solaris-bin_SOURCES = \
$(if $(VBOX_WITH_PYTHON),$(PATH_ROOT)/src/VBox/Frontends/VBoxShell/vboxshell.py,) \
$(VBOX_PATH_SOL_INST_SRC)/vboxconfig.sh \
$(VBOX_PATH_SOL_INST_SRC)/VBox.sh \
$(VBOX_PATH_SOL_INST_SRC)/pkginstall.sh \
$(if $(VBOX_WITH_WEBSERVICES),$(VBOX_PATH_SOL_INST_SRC)/smf-vboxwebsrv.sh,)
solaris-drv-confs_INST = bin/
solaris-drv-confs_MODE = a+r,u+w
solaris-drv-confs_SOURCES = \
$(PATH_ROOT)/src/VBox/HostDrivers/Support/solaris/vboxdrv.conf \
$(if $(VBOX_WITH_NETFLT),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetFlt/solaris/vboxflt.conf) \
$(if $(VBOX_WITH_NETADP),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetAdp/solaris/vboxnet.conf) \
$(if $(VBOX_WITH_USB),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/solaris/vboxusbmon.conf) \
$(if $(VBOX_WITH_NEW_USB_CODE_ON_SOLARIS),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/solaris/vboxusb.conf)
#
# Note: Other than the files produced during packing (.pkg, .gzip etc.) all files that
# go into the temporary install folder $(SOLARIS_VBOXINST_DIR) should be part of $(SOLARIS_ARCH_FILES).
# For the files produced during packing they should be cleaned up promptly when the work is done.
#
# Strip these executables
SOLARIS_STRIP_EXES = \
VBoxZoneAccess \
$(if $(VBOX_WITH_QTGUI),VirtualBox,) \
VBoxManage \
$(if $(VBOX_WITH_VBOXBFE),VBoxBFE,) \
$(if $(VBOX_WITH_VBOXSDL),VBoxSDL,) \
$(if $(VBOX_WITH_NETADP),VBoxNetAdpCtl,) \
VBoxNetDHCP \
VBoxSVC \
$(if $(VBOX_WITH_CROGL),VBoxTestOGL,) \
VBoxXPCOMIPCD \
$(if $(VBOX_WITH_KCHMVIEWER),kchmviewer,)
ifdef VBOX_WITH_USB
ifndef VBOX_WITH_NEW_USB_CODE_ON_SOLARIS
SOLARIS_STRIP_EXES += VBoxUSBHelper
endif
endif
SOLARIS_DRIVER_BINS = \
vboxdrv \
$(if $(VBOX_WITH_NETFLT),vboxflt,) \
$(if $(VBOX_WITH_NETADP),vboxnet,) \
$(if $(VBOX_WITH_USB),vboxusbmon,) \
$(if $(VBOX_WITH_NEW_USB_CODE_ON_SOLARIS),vboxusb,)
SOLARIS_DRIVER_CONFS = \
vboxdrv.conf \
$(if $(VBOX_WITH_NETFLT),vboxflt.conf,) \
$(if $(VBOX_WITH_NETADP),vboxnet.conf,) \
$(if $(VBOX_WITH_USB),vboxusbmon.conf,) \
$(if $(VBOX_WITH_NEW_USB_CODE_ON_SOLARIS),vboxusb.conf,)
# Strip these binaries
SOLARIS_STRIP_BINS = \
VBoxDD.so \
VBoxDD2.so \
VBoxREM.so \
VBoxRT.so \
VBoxDDU.so \
VBoxVMM.so \
VBoxXPCOM.so \
VBoxXPCOMC.so \
$(if $(VBOX_WITH_SHARED_FOLDERS),VBoxSharedFolders.so,) \
$(if $(VBOX_WITH_SHARED_CLIPBOARD),VBoxSharedClipboard.so,) \
$(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestPropSvc.so,) \
$(if $(VBOX_WITH_GUEST_CONTROL),VBoxGuestControlSvc.so,) \
$(if $(VBOX_WITH_JXPCOM),libvboxjxpcom.so,) \
$(if $(VBOX_WITH_QTGUI),\
VBoxKeyboard.so \
$(if $(VBOX_WITH_QT4_SUN),\
libQtCoreVBox.so.4 \
libQtGuiVBox.so.4 \
libQtNetworkVBox.so.4 \
$(if $(VBOX_GUI_USE_QGL),libQtOpenGLVBox.so.4,) \
accessible/libqtaccessiblewidgets.so,)) \
$(if $(VBOX_WITH_DEBUGGER_GUI),VBoxDbg.so,) \
$(if $(VBOX_WITH_CROGL),\
VBoxOGLhostcrutil.so \
VBoxOGLhosterrorspu.so \
VBoxOGLrenderspu.so \
VBoxSharedCrOpenGL.so) \
components/VBoxC.so \
components/VBoxSVCM.so \
components/VBoxXPCOMIPCC.so
ifdef VBOX_WITH_HARDENING
SOLARIS_STRIP_BINS += \
VBoxNetDHCP.so \
$(if $(VBOX_WITH_VBOXBFE),VBoxBFE.so,) \
$(if $(VBOX_WITH_VBOXSDL),VBoxSDL.so,) \
$(if $(VBOX_WITH_QTGUI),VirtualBox.so,)
endif
# Do not remove relocation information of these binaries
SOLARIS_STRIP_OBJS = \
VBoxDD2GC.gc \
VBoxDD2R0.r0 \
VBoxDDGC.gc \
VBoxDDR0.r0 \
VMMGC.gc \
VMMR0.r0
# Special differences between 32-bit and 64-bit
SOLARIS_STRIP_BIN_32 = \
VBoxREM32.so \
VBoxREM64.so
VBOX_SOL_PYTHON_DIR_64 = 64
# Do not strip anything of these files
SOLARIS_NO_STRIP = \
components/VBoxXPCOMBase.xpt \
components/VirtualBox_XPCOM.xpt \
$(if $(and $(VBOX_LICENSE_FILES),$(VBOX_WITH_QTGUI)),$(VBOX_LICENSE_FILES)) \
SOLARIS_USRBIN_LINKS = \
$(if $(VBOX_WITH_QTGUI),VirtualBox,) \
$(if $(VBOX_WITH_HEADLESS),VBoxHeadless,) \
$(if $(VBOX_WITH_VBOXSDL),VBoxSDL,) \
VBoxManage
SOLARIS_COMMON_EXES = \
vboxconfig.sh \
VBox.sh \
pkginstall.sh \
$(if $(VBOX_WITH_PYTHON),vboxshell.py,) \
$(if $(VBOX_WITH_WEBSERVICES),smf-vboxwebsrv.sh,) \
# Things packed explicitly, not from $(PATH_BIN), track these to clean-up properly
SOLARIS_EXTRAS = \
$(if $(VBOX_OSE),,LICENSE) \
VBox.png \
autoresponse \
$(if $(VBOX_WITH_VBOXSDL),libSDL-1.2.so.0,) \
$(if $(not $(VBOX_WITH_NETFLT))vnic_setup.sh,) \
$(if $(not $(VBOX_WITH_NETFLT))vnic_term.sh,) \
$(if $(VBOX_WITH_QTGUI),virtualbox.desktop,) \
virtualbox-webservice.xml \
virtualbox-zoneaccess.xml \
VBoxQtconfig \
VBoxISAExec \
vbox.copyright \
ReadMe.txt
# These extra Qt libs are purely for running VBoxQtconfig
ifdef VBOX_WITH_QTGUI
SOLARIS_QTLIBS = \
$(if $(VBOX_WITH_QT4_SUN),\
libQtXmlVBox.so.4 \
libQtSqlVBox.so.4 \
libQt3SupportVBox.so.4,)
endif
ifdef VBOX_WITH_QTGUI
include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
SOLARIS_NO_STRIP += $(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES),nls/VirtualBox_$(f).qm nls/qt_$(f).qm)
endif
# Documentation (packed as DOCS as they are arch. neutral)
ifdef VBOX_WITH_DOCS_PACKING
SOLARIS_COMMON = \
VirtualBox.chm \
UserManual.pdf \
$(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),VirtualBox_$(f).chm UserManual_$(f).pdf)
endif
# Python XPCOM glue
ifdef VBOX_WITH_PYTHON
SOLARIS_COMMON += \
$(foreach f,$(notdir $(wildcard $(PATH_BIN)/sdk/bindings/xpcom/python/xpcom/*.py)),sdk/bindings/xpcom/python/xpcom/$(f)) \
sdk/bindings/xpcom/python/xpcom/client/__init__.py \
sdk/bindings/xpcom/python/xpcom/server/__init__.py \
sdk/bindings/xpcom/python/xpcom/server/enumerator.py \
sdk/bindings/xpcom/python/xpcom/server/factory.py \
sdk/bindings/xpcom/python/xpcom/server/loader.py \
sdk/bindings/xpcom/python/xpcom/server/module.py \
sdk/bindings/xpcom/python/xpcom/server/policy.py \
sdk/installer/vboxapisetup.py \
sdk/installer/vboxapi/__init__.py \
sdk/installer/vboxapi/VirtualBox_constants.py
endif
ifdef VBOX_WITH_JXPCOM
SOLARIS_COMMON += \
sdk/bindings/xpcom/java/vboxjxpcom.jar
endif
# VRDP
ifdef VBOX_WITH_VRDP
SOLARIS_STRIP_BINS += \
VBoxVRDP.so \
VRDPAuth.so
SOLARIS_COMMON += \
rdesktop-vrdp.tar.gz
ifdef VBOX_WITH_VRDP_RDESKTOP
SOLARIS_COMMON += $(addprefix rdesktop-vrdp-keymaps/,$(notdir $(wildcard $(SOLARIS_OUT_BIN)/rdesktop-vrdp-keymaps/*)))
SOLARIS_STRIP_EXES += \
rdesktop-vrdp
endif
endif
SOLARIS_STRIP_BINS += \
$(if $(and $(VBOX_WITH_HARDENING),$(VBOX_WITH_HEADLESS)),VBoxHeadless.so,)
SOLARIS_STRIP_EXES += \
$(if $(VBOX_WITH_HEADLESS),VBoxHeadless) \
$(if $(VBOX_WITH_WEBSERVICES),vboxwebsrv) \
$(if $(VBOX_WITH_WEBSERVICES),webtest)
# Guest Additions
ifdef VBOX_WITH_ADDITIONS_PACKING
SOLARIS_COMMON += \
additions/VBoxGuestAdditions.iso
endif
# EFI firmware
ifdef VBOX_WITH_EFIFW_PACKING
SOLARIS_COMMON += \
VBoxEFI32.fd \
VBoxEFI64.fd
endif
SOLARIS_ARCH_FILES := \
$(SOLARIS_STRIP_EXES) \
$(SOLARIS_DRIVER_BINS) \
$(SOLARIS_DRIVER_CONFS) \
$(SOLARIS_USRBIN_LINKS) \
$(SOLARIS_STRIP_BINS) \
$(SOLARIS_STRIP_OBJS) \
$(SOLARIS_NO_STRIP) \
$(SOLARIS_EXTRAS) \
$(SOLARIS_QTLIBS) \
$(SOLARIS_COMMON_EXES) \
$(SOLARIS_COMMON)
SOLARIS_DBG_FILES := \
$(SOLARIS_STRIP_EXES) \
$(SOLARIS_STRIP_BINS) \
$(SOLARIS_DRIVER_BINS)
OTHER_CLEAN += \
$(addprefix $(SOLARIS_VBOXINST_DIR)/, $(SOLARIS_ARCH_FILES)) \
$(SOLARIS_BASEINST_DIR)/$(PKG_FILENAME).tar.gz \
$(SOLARIS_BASEINST_DIR)/$(PKG_FILENAME).pkg \
$(addprefix $(SOLARIS_DBG_DIR)/,$(SOLARIS_STRIP_BINS)) \
$(addprefix $(SOLARIS_DBG_DIR)/,$(SOLARIS_DRIVER_BINS)) \
$(addprefix $(SOLARIS_DBG_DIR)/,$(SOLARIS_STRIP_EXES)) \
$(SOLARIS_DBG_DIR)/$(DBG_ARCHIVE) \
$(SOLARIS_VBI_DIR)/$(VBIPKG_FILENAME).tar.gz \
$(SOLARIS_VBI_DIR)/$(VBIPKG_FILENAME).pkg
ifdef VBOX_WITH_COMBINED_PACKAGE
SOLARIS_ARCH_DEPFILES = $(addprefix $(SOLARIS_VBOXINST_DIR_64)/,$(SOLARIS_STRIP_EXES)) \
$(addprefix $(SOLARIS_VBOXINST_DIR_64)/,$(SOLARIS_STRIP_BINS)) \
$(addprefix $(SOLARIS_DRIVERINST_DIR_64)/,$(SOLARIS_DRIVER_BINS)) \
$(addprefix $(SOLARIS_VBOXINST_DIR_64)/,$(SOLARIS_STRIP_OBJS)) \
$(addprefix $(SOLARIS_VBOXINST_DIR_64)/,$(SOLARIS_NO_STRIP)) \
$(addprefix $(SOLARIS_VBOXINST_DIR_64)/,$(SOLARIS_QTLIBS)) \
$(addprefix $(SOLARIS_VBOXINST_DIR_32)/,$(SOLARIS_STRIP_EXES)) \
$(addprefix $(SOLARIS_VBOXINST_DIR_32)/,$(SOLARIS_STRIP_BINS)) \
$(addprefix $(SOLARIS_DRIVERINST_DIR_32)/,$(SOLARIS_DRIVER_BINS)) \
$(addprefix $(SOLARIS_VBOXINST_DIR_32)/,$(SOLARIS_STRIP_OBJS)) \
$(addprefix $(SOLARIS_VBOXINST_DIR_32)/,$(SOLARIS_NO_STRIP)) \
$(addprefix $(SOLARIS_VBOXINST_DIR_32)/,$(SOLARIS_QTLIBS)) \
$(addprefix $(SOLARIS_VBOXINST_DIR_32)/,$(SOLARIS_STRIP_BIN_32)) \
$(wildcard $(addprefix $(SOLARIS_OUT_BIN_32)/,VBoxPython*.so)) \
$(wildcard $(addprefix $(SOLARIS_OUT_BIN_64)/,VBoxPython*.so))
SOLARIS_DBG_DEPFILES = $(addprefix $(SOLARIS_DBG_DIR_64)/,$(SOLARIS_DBG_FILES)) \
$(addprefix $(SOLARIS_DBG_DIR_32)/,$(SOLARIS_DBG_FILES))
else
SOLARIS_ARCH_DEPFILES = $(addprefix $(SOLARIS_VBOXINST_DIR_ISA)/,$(SOLARIS_STRIP_EXES)) \
$(addprefix $(SOLARIS_VBOXINST_DIR_ISA)/,$(SOLARIS_STRIP_BINS)) \
$(addprefix $(SOLARIS_DRIVERINST_DIR_ISA)/,$(SOLARIS_DRIVER_BINS)) \
$(addprefix $(SOLARIS_DRIVERINST_DIR)/,$(SOLARIS_DRIVER_CONFS)) \
$(ifeq ($(KBUILD_TARGET_ARCH),x86),$(addprefix $(SOLARIS_VBOXINST_DIR_ISA)/,$(SOLARIS_STRIP_BIN_32)),) \
$(ifeq ($(KBUILD_TARGET_ARCH),amd64),$(addprefix $(SOLARIS_VBOXINST_DIR_ISA)/,$(SOLARIS_STRIP_OBJ_64)),) \
$(addprefix $(SOLARIS_VBOXINST_DIR_ISA)/,$(SOLARIS_STRIP_OBJS)) \
$(addprefix $(SOLARIS_VBOXINST_DIR_ISA)/,$(SOLARIS_NO_STRIP)) \
$(addprefix $(SOLARIS_VBOXINST_DIR_ISA)/,$(SOLARIS_QTLIBS))
SOLARIS_DBG_DEPFILES = $(addprefix $(SOLARIS_DBG_DIR_ISA)/,$(SOLARIS_DBG_FILES))
endif
SOLARIS_ARCH_DEPFILES += $(addprefix $(SOLARIS_VBOXINST_DIR)/,$(SOLARIS_COMMON)) \
$(addprefix $(SOLARIS_DRIVERINST_DIR)/,$(SOLARIS_DRIVER_CONFS)) \
$(addprefix $(SOLARIS_VBOXINST_DIR)/,$(SOLARIS_COMMON_EXES)) \
$(addprefix $(SOLARIS_USRBIN_DIR)/,$(SOLARIS_USRBIN_LINKS))
BLDDIRS += $(foreach d,\
additions \
rdesktop-vrdp-keymaps \
$(SOLARIS_DIR_NAME_64) \
$(SOLARIS_DIR_NAME_64)/components \
$(SOLARIS_DIR_NAME_64)/nls \
$(SOLARIS_DIR_NAME_64)/accessible \
$(VBOX_SOL_PYTHON_DIR_64) \
$(SOLARIS_DIR_NAME_32) \
$(SOLARIS_DIR_NAME_32)/components \
$(SOLARIS_DIR_NAME_32)/nls \
$(SOLARIS_DIR_NAME_32)/accessible \
$(if $(VBOX_WITH_PYTHON),\
sdk/ \
sdk/installer \
sdk/installer/vboxapi \
sdk/bindings/xpcom/python/xpcom \
sdk/bindings/xpcom/python/xpcom/server \
sdk/bindings/xpcom/python/xpcom/client,) \
$(if $(VBOX_WITH_JXPCOM), \
sdk/bindings/xpcom/java,) \
,$(SOLARIS_VBOXINST_DIR)/$(d)/)
BLDDIRS += $(foreach d,\
amd64 \
,$(SOLARIS_VBI_DIR)/$(d)/)
BLDDIRS += $(foreach d,\
additions \
components \
accessible \
$(SOLARIS_DIR_NAME_64) \
$(SOLARIS_DIR_NAME_64)/components \
$(SOLARIS_DIR_NAME_64)/accessible \
$(VBOX_SOL_PYTHON_DIR_64) \
$(SOLARIS_DIR_NAME_32) \
$(SOLARIS_DIR_NAME_32)/components \
$(SOLARIS_DIR_NAME_32)/nls \
$(SOLARIS_DIR_NAME_32)/accessible \
,$(SOLARIS_DBG_DIR)/$(d))
# List of files to be tar.gz'd, the files will be
# installed in $(SOLARIS_BASEINST_DIR) and .gz'd from there.
SOLARIS_TAR_GZ_FILES := \
$(PKG_FILENAME).pkg \
$(if $(VBOX_WITH_SOLARIS_VBI),$(VBIPKG_FILENAME).pkg,) \
LICENSE \
autoresponse \
ReadMe.txt
include $(KBUILD_PATH)/subfooter.kmk
#
# -=-=-=-=-=-=-=- Main package -=-=-=-=-=-=-=-
#
## @todo r=bird: makepackage.sh packing a directory tree, right? So, there is no guarantee that it's not
# containing any obsolete files the way packing is performed here. Consider recursivly
# invoking $(MAKE) vbox_copy_sdk_files (or similar) to do the copying after $(RM) -Rf the
# directory tree.
$(PATH_BIN)/$(PKG_FILENAME).tar.gz: \
$(VBOX_VERSION_STAMP) \
$(VBOX_PATH_SOL_INST_SRC)/makepackage.sh \
$(VBOX_PATH_SOL_INST_SRC)/postinstall.sh \
$(VBOX_PATH_SOL_INST_SRC)/checkinstall.sh \
$(VBOX_PATH_SOL_INST_SRC)/preremove.sh \
$(VBOX_PATH_SOL_INST_SRC)/vbox.pkginfo \
$(VBOX_PATH_SOL_INST_SRC)/vbox.space \
$(VBOX_PATH_SOL_INST_SRC)/vbox.depend \
$(VBOX_PATH_SOL_INST_SRC)/vbox.pkgresponse \
$(VBOX_PATH_SOL_INST_SRC)/virtualbox.desktop \
$(PATH_ROOT)/doc/ReadMe-Solaris.txt \
$(VBOX_PATH_SOL_INST_SRC)/Makefile.kmk \
$(if $(VBOX_WITH_SOLARIS_VBI),$(SOLARIS_VBI_DIR)/$(VBIPKG_FILENAME).pkg,) \
$(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)) \
$(if $(VBOX_OSE),,$(PATH_BIN)/LICENSE) \
$(if $(and $(VBOX_LICENSE_BINS),$(VBOX_WITH_QTGUI)),$(VBOX_LICENSE_BINS),) \
$(if $(VBOX_WITH_NETADP),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetAdp/solaris/hostname.vboxnet0,) \
$(if $(not $(VBOX_WITH_NETFLT))$(PATH_ROOT)/src/VBox/Devices/Network/solaris/vnicinit_solaris.sh,) \
$(if $(not $(VBOX_WITH_NETFLT))$(PATH_ROOT)/src/VBox/Devices/Network/solaris/vnicterm_solaris.sh,) \
$(addprefix $(PATH_BIN)/,$(filter-out $(SOLARIS_EXTRAS) $(SOLARIS_QTLIBS),$(SOLARIS_ARCH_FILES))) \
VBoxISAExec \
$(SOLARIS_ARCH_DEPFILES)
$(QUIET)$(RM) -f $(wildcard $(PATH_BIN)/VirtualBox-*-r*.tar.gz)
$(call MSG_L1,Installing binaries $(SOLARIS_VBOXINST_DIR))
ifdef VBOX_WITH_COMBINED_PACKAGE
$(QUIET)$(if $(VBOX_WITH_ADDITIONS_PACKING),$(INSTALL) -m 0644 $(SOLARIS_OUT_BIN_32)/additions/VBoxGuestAdditions.iso $(SOLARIS_VBOXINST_DIR)/additions/)
else
$(QUIET)$(if $(VBOX_WITH_ADDITIONS_PACKING),$(INSTALL) -m 0644 $(SOLARIS_OUT_BIN)/additions/VBoxGuestAdditions.iso $(SOLARIS_VBOXINST_DIR)/additions/)
endif
$(call MSG_L1,Installing files $(SOLARIS_VBOXINST_DIR))
$(QUIET)$(SED) \
-e "s/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g" \
-e "s/@VBOX_VENDOR@/$(VBOX_VENDOR)/g" \
-e "s/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g" \
-e "s/@VBOX_SVN_REV@/$(VBOX_SVN_REV)/g" \
-e "s/@VBOX_VERSION_REVSTAMP@/$(PKGINFO_REVSTAMP)/g" \
-e "s/@UNAME_P@/$(PKGINFO_ARCH)/g" \
--output $(SOLARIS_BASEINST_DIR)/vbox.pkginfo \
$(VBOX_PATH_SOL_INST_SRC)/vbox.pkginfo
@# @todo BLDDIRS doesn't do "-p" subdir creation; so create for now
$(QUIET)$(if $(VBOX_WITH_NETADP),$(MKDIR) -p $(SOLARIS_ETC_DIR),)
$(QUIET)$(MKDIR) -p $(SOLARIS_VBOXSMF_DIR)
$(QUIET)$(if $(VBOX_WITH_QTGUI),$(MKDIR) -p $(SOLARIS_USRSHR_APPS_DIR),)
$(QUIET)$(MKDIR) -p $(SOLARIS_USRSHR_PIXMAPS_DIR)
$(QUIET)$(if $(VBOX_WITH_NETADP),$(INSTALL) -m 0644 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetAdp/solaris/hostname.vboxnet0 $(SOLARIS_ETC_DIR)/hostname.vboxnet0,)
$(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(PATH_BIN)/LICENSE $(SOLARIS_VBOXINST_DIR)/LICENSE)
$(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(PATH_BIN)/LICENSE $(SOLARIS_BASEINST_DIR)/vbox.copyright)
$(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(PATH_BIN)/LICENSE $(SOLARIS_BASEINST_DIR)/LICENSE)
ifdef VBOX_WITH_COMBINED_PACKAGE
ifndef VBOX_OSE
$(QUIET)$(if $(VBOX_WITH_VBOXSDL),$(INSTALL) -m 0644 $(PATH_DEVTOOLS)/solaris.x86/libSDL/v1.2.13/lib/libSDL-1.2.so.0.11.2 $(SOLARIS_VBOXINST_DIR_32)/libSDL-1.2.so.0,)
$(QUIET)$(if $(VBOX_WITH_VBOXSDL),$(INSTALL) -m 0644 $(PATH_DEVTOOLS)/solaris.amd64/libSDL/v1.2.13/lib/libSDL-1.2.so.0.11.2 $(SOLARIS_VBOXINST_DIR_64)/libSDL-1.2.so.0,)
endif
@# @todo -XXX- how to get rid of this manual MKDIR ?
$(QUIET)$(MKDIR) -p $(SOLARIS_VBOXINST_DIR)/$(VBOX_SOL_PYTHON_DIR_64)
$(QUIET)$(if $(VBOX_WITH_PYTHON),$(INSTALL) -m 0644 $(if $(VBOX_DO_STRIP),-s) $(wildcard $(SOLARIS_OUT_BIN_32)/VBoxPython*.so) $(SOLARIS_VBOXINST_DIR)/,)
$(QUIET)$(if $(VBOX_WITH_PYTHON),$(INSTALL) -m 0644 $(if $(VBOX_DO_STRIP),-s) $(wildcard $(SOLARIS_OUT_BIN_64)/VBoxPython*.so) $(SOLARIS_VBOXINST_DIR)/$(VBOX_SOL_PYTHON_DIR_64)/,)
$(QUIET)$(if $(VBOX_WITH_QTGUI),$(if ($VBOX_WITH_QT4_SUN),$(INSTALL) -m 0755 $(SOLARIS_PATH_QT_32)/bin/qtconfig $(SOLARIS_VBOXINST_DIR_32)/VBoxQtconfig,),)
$(QUIET)$(if $(VBOX_WITH_QTGUI),$(if $(VBOX_WITH_QT4_SUN),$(INSTALL) -m 0755 $(SOLARIS_PATH_QT_64)/bin/qtconfig $(SOLARIS_VBOXINST_DIR_64)/VBoxQtconfig,),)
$(QUIET)$(INSTALL) -m 0755 $(SOLARIS_OUT_BIN_32)/VBoxISAExec $(SOLARIS_VBOXINST_DIR)/VBoxISAExec
$(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../rdesktop-vrdp-keymaps $(SOLARIS_VBOXINST_DIR_32)/rdesktop-vrdp-keymaps,)
$(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../rdesktop-vrdp-keymaps $(SOLARIS_VBOXINST_DIR_64)/rdesktop-vrdp-keymaps,)
$(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../additions $(SOLARIS_VBOXINST_DIR_32)/additions,)
$(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../additions $(SOLARIS_VBOXINST_DIR_64)/additions,)
$(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../VirtualBox.chm $(SOLARIS_VBOXINST_DIR_32)/VirtualBox.chm,)
$(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../VirtualBox.chm $(SOLARIS_VBOXINST_DIR_64)/VirtualBox.chm,)
$(QUIET)$(if $(VBOX_WITH_EFIFW_PACKING),$(LN_SYMLINK) -f ../VBoxEFI32.fd $(SOLARIS_VBOXINST_DIR_64)/VBoxEFI32.fd,)
$(QUIET)$(if $(VBOX_WITH_EFIFW_PACKING),$(LN_SYMLINK) -f ../VBoxEFI32.fd $(SOLARIS_VBOXINST_DIR_32)/VBoxEFI32.fd,)
$(QUIET)$(if $(VBOX_WITH_EFIFW_PACKING),$(LN_SYMLINK) -f ../VBoxEFI64.fd $(SOLARIS_VBOXINST_DIR_64)/VBoxEFI64.fd,)
$(QUIET)$(if $(VBOX_WITH_EFIFW_PACKING),$(LN_SYMLINK) -f ../VBoxEFI64.fd $(SOLARIS_VBOXINST_DIR_32)/VBoxEFI64.fd,)
else
ifndef VBOX_OSE
$(QUIET)$(if $(VBOX_WITH_VBOXSDL),$(INSTALL) -m 0644 $(PATH_DEVTOOLS_TRG)/libSDL/v1.2.13/lib/libSDL-1.2.so.0.11.2 $(SOLARIS_VBOXINST_DIR_ISA)/libSDL-1.2.so.0,)
endif
@# @todo -XXX- how to get rid of this manual MKDIR ?
ifdef VBOX_WITH_PYTHON
$(QUIET)$(if $(SOL64_PKG),$(MKDIR) -p $(SOLARIS_VBOXINST_DIR)/$(VBOX_SOL_PYTHON_DIR_64),)
$(QUIET)$(INSTALL) -m 0644 $(if $(VBOX_DO_STRIP),-s) $(wildcard $(SOLARIS_OUT_BIN)/VBoxPython*.so) $(SOLARIS_VBOXINST_DIR)/$(if $(SOL64_PKG),$(VBOX_SOL_PYTHON_DIR_64)/,)
endif
$(QUIET)$(if $(VBOX_WITH_QTGUI),$(if $(VBOX_WITH_QT4_SUN),$(INSTALL) -m 0755 $(VBOX_PATH_QT4)/bin/qtconfig $(SOLARIS_VBOXINST_DIR_ISA)/VBoxQtconfig,),)
$(QUIET)$(INSTALL) -m 0755 $(SOLARIS_OUT_BIN)/VBoxISAExec $(SOLARIS_VBOXINST_DIR)/VBoxISAExec
$(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../rdesktop-vrdp-keymaps $(SOLARIS_VBOXINST_DIR_ISA)/rdesktop-vrdp-keymaps,)
$(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../additions $(SOLARIS_VBOXINST_DIR_ISA)/additions,)
$(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../VirtualBox.chm $(SOLARIS_VBOXINST_DIR_ISA)/VirtualBox.chm,)
$(QUIET)$(if $(VBOX_WITH_EFIFW_PACKING),$(LN_SYMLINK) -f ../VBoxEFI32.fd $(SOLARIS_VBOXINST_DIR_ISA)/VBoxEFI32.fd,)
$(QUIET)$(if $(VBOX_WITH_EFIFW_PACKING),$(LN_SYMLINK) -f ../VBoxEFI64.fd $(SOLARIS_VBOXINST_DIR_ISA)/VBoxEFI64.fd,)
endif
$(QUIET)$(LN_SYMLINK) -f ./pkginstall.sh $(SOLARIS_VBOXINST_DIR)/ipsinstall.sh
$(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../../$(SOLARIS_VBOXINST_SUBDIR)/VBox.sh $(SOLARIS_USRBIN_DIR)/VBoxQtconfig,)
$(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/virtualbox-zoneaccess.xml $(SOLARIS_VBOXSMF_DIR)/virtualbox-zoneaccess.xml
$(QUIET)$(if $(VBOX_WITH_WEBSERVICES),$(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/virtualbox-webservice.xml $(SOLARIS_VBOXSMF_DIR)/virtualbox-webservice.xml,)
$(QUIET)$(if $(not $(VBOX_WITH_NETFLT))$(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Devices/Network/solaris/vnicinit_solaris.sh $(SOLARIS_VBOXINST_DIR)/vnic_setup.sh,)
$(QUIET)$(if $(not $(VBOX_WITH_NETFLT))$(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Devices/Network/solaris/vnicterm_solaris.sh $(SOLARIS_VBOXINST_DIR)/vnic_term.sh,)
$(QUIET)$(SED) \
-e "s/_HARDENED_/$(if $(VBOX_WITH_HARDENED),hardened,)/" \
--output $(SOLARIS_VBOXINST_DIR)/vboxconfig.sh.tmp \
$(PATH_BIN)/vboxconfig.sh
$(QUIET)$(INSTALL) -m 0755 $(SOLARIS_VBOXINST_DIR)/vboxconfig.sh.tmp $(SOLARIS_VBOXINST_DIR)/vboxconfig.sh
$(QUIET)$(RM) -f $(SOLARIS_VBOXINST_DIR)/vboxconfig.sh.tmp
$(QUIET)$(SED) \
-e "s/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g" \
--output $(SOLARIS_USRSHR_APPS_DIR)/virtualbox.desktop \
$(VBOX_PATH_SOL_INST_SRC)/virtualbox.desktop
$(QUIET)$(INSTALL) -m 0644 $(SOLARIS_OUT_BIN)/VBox.png $(SOLARIS_USRSHR_PIXMAPS_DIR)/VBox.png
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOL_INST_SRC)/postinstall.sh $(SOLARIS_BASEINST_DIR)/postinstall.sh
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOL_INST_SRC)/checkinstall.sh $(SOLARIS_BASEINST_DIR)/checkinstall.sh
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOL_INST_SRC)/preremove.sh $(SOLARIS_BASEINST_DIR)/preremove.sh
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOL_INST_SRC)/makepackage.sh $(SOLARIS_BASEINST_DIR)/makepackage.sh
$(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/vbox.pkgresponse $(SOLARIS_VBOXINST_DIR)/autoresponse
$(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/vbox.pkgresponse $(SOLARIS_BASEINST_DIR)/autoresponse
$(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/vbox.space $(SOLARIS_BASEINST_DIR)/vbox.space
@# Warning!! If we add NON-PYTHON dependencies to vbox.depend, remove the VBOX_WITH_PYTHON setting
$(QUIET)$(if $(VBOX_WITH_PYTHON),$(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/vbox.depend $(SOLARIS_BASEINST_DIR)/vbox.depend,)
$(QUIET)$(SED) \
-e "s/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g" \
-e "s/@VBOX_VENDOR@/$(VBOX_VENDOR)/g" \
-e "s/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g" \
-e "s/@BUILD_TARGET_ARCH@/$(KBUILD_TARGET_ARCH)/g" \
-e "s/@VBOX_SVN_REV@/$(VBOX_SVN_REV)/g" \
--output $(SOLARIS_BASEINST_DIR)/ReadMe.txt \
$(PATH_ROOT)/doc/ReadMe-Solaris.txt
$(QUIET)$(if $(VBOX_WITH_SOLARIS_VBI),$(INSTALL) -m 0644 $(SOLARIS_VBI_DIR)/$(VBIPKG_FILENAME).pkg $(SOLARIS_BASEINST_DIR)/$(VBIPKG_FILENAME).pkg,)
$(call MSG_L1,Creating install package: $(PKG_FILENAME).tar.gz)
$(QUIET)$(REDIRECT) -C $(VBOX_PATH_SOL_INST_SRC) -- $(SOLARIS_BASEINST_DIR)/makepackage.sh $(if $(VBOX_WITH_HARDENING),--hardened) \
$(SOLARIS_BASEINST_DIR) \
$(PKG_FILENAME) \
$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),neutral,$(KBUILD_TARGET_ARCH)) \
$(VBOX_SVN_REV) \
$(if $(VBOX_WITH_SOLARIS_VBI),$(VBIPKG_FILENAME).pkg,)
$(call MSG_L1,Creating final tar.gz package)
$(QUIET)$(SOL_GTAR) -C $(SOLARIS_BASEINST_DIR) -zcvf $(SOLARIS_BASEINST_DIR)/$(PKG_FILENAME).tar.gz $(SOLARIS_TAR_GZ_FILES)
$(QUIET)$(INSTALL) -m 0644 $(SOLARIS_BASEINST_DIR)/$(PKG_FILENAME).tar.gz $(SOLARIS_OUT_BIN)
@# Clean up files emitted as side-effect or result of packing
$(QUIET)$(RM) -f $(SOLARIS_BASEINST_DIR)/$(PKG_FILENAME).tar.gz
$(QUIET)$(RM) -f $(SOLARIS_BASEINST_DIR)/$(PKG_FILENAME).pkg
$(QUIET)$(if $(VBOX_WITH_SOLARIS_VBI),$(RM) -f $(SOLARIS_BASEINST_DIR)/$(VBIPKG_FILENAME).pkg,)
$(call MSG_L1,Packaging completed.)
#
# 32-bit Main Package
#
$(addprefix $(SOLARIS_VBOXINST_DIR_32)/,$(SOLARIS_STRIP_BINS)): \
$(SOLARIS_VBOXINST_DIR_32)/% : $(SOLARIS_OUT_BIN_32)/% | $$(dir $$@)
$(INSTALL) -m 0644 $(if $(VBOX_DO_STRIP),-s,) $< $@
$(addprefix $(SOLARIS_DRIVERINST_DIR_32)/,$(SOLARIS_DRIVER_BINS)): \
$(SOLARIS_DRIVERINST_DIR_32)/% : $(SOLARIS_OUT_BIN_32)/% | $$(dir $$@)
$(INSTALL) -m 0644 $(if $(VBOX_DO_STRIP),-s,) $< $@
$(addprefix $(SOLARIS_VBOXINST_DIR_32)/,$(SOLARIS_STRIP_BIN_32)): \
$(SOLARIS_VBOXINST_DIR_32)/% : $(SOLARIS_OUT_BIN_32)/% | $$(dir $$@)
$(INSTALL) -m 0644 $(if $(VBOX_DO_STRIP),-s,) $< $@
$(addprefix $(SOLARIS_VBOXINST_DIR_32)/,$(SOLARIS_STRIP_EXES)): \
$(SOLARIS_VBOXINST_DIR_32)/% : $(SOLARIS_OUT_BIN_32)/% | $$(dir $$@)
$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
$(addprefix $(SOLARIS_VBOXINST_DIR_32)/,$(SOLARIS_STRIP_OBJS)): \
$(SOLARIS_VBOXINST_DIR_32)/% : $(SOLARIS_OUT_BIN_32)/% | $$(dir $$@)
$(if $(VBOX_DO_STRIP),$(SOL_OBJCOPY) $< $@, $(INSTALL) -m 0644 $< $@)
$(addprefix $(SOLARIS_VBOXINST_DIR_32)/,$(SOLARIS_NO_STRIP)): \
$(SOLARIS_VBOXINST_DIR_32)/% : $(SOLARIS_OUT_BIN_32)/% | $$(dir $$@)
$(INSTALL) -m 0644 $< $@
$(addprefix $(SOLARIS_VBOXINST_DIR_32)/,$(SOLARIS_QTLIBS)): \
$(SOLARIS_VBOXINST_DIR_32)/% : $(SOLARIS_PATH_QT_32)/lib/% | $$(dir $$@)
$(INSTALL) -m 0644 $(if $(VBOX_DO_STRIP),-s,) $< $@
#
# 64-bit Main Package
#
$(addprefix $(SOLARIS_VBOXINST_DIR_64)/,$(SOLARIS_STRIP_BINS)): \
$(SOLARIS_VBOXINST_DIR_64)/% : $(SOLARIS_OUT_BIN_64)/% | $$(dir $$@)
$(INSTALL) -m 0644 $(if $(VBOX_DO_STRIP),-s,) $< $@
$(addprefix $(SOLARIS_DRIVERINST_DIR_64)/,$(SOLARIS_DRIVER_BINS)): \
$(SOLARIS_DRIVERINST_DIR_64)/% : $(SOLARIS_OUT_BIN_64)/% | $$(dir $$@)
$(INSTALL) -m 0644 $(if $(VBOX_DO_STRIP),-s,) $< $@
$(addprefix $(SOLARIS_VBOXINST_DIR_64)/,$(SOLARIS_STRIP_EXES)): \
$(SOLARIS_VBOXINST_DIR_64)/% : $(SOLARIS_OUT_BIN_64)/% | $$(dir $$@)
$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
$(addprefix $(SOLARIS_VBOXINST_DIR_64)/,$(SOLARIS_STRIP_OBJS)): \
$(SOLARIS_VBOXINST_DIR_64)/% : $(SOLARIS_OUT_BIN_64)/% | $$(dir $$@)
$(if $(VBOX_DO_STRIP),$(SOL_OBJCOPY) $< $@, $(INSTALL) -m 0644 $< $@)
$(addprefix $(SOLARIS_VBOXINST_DIR_64)/,$(SOLARIS_STRIP_OBJ_64)): \
$(SOLARIS_VBOXINST_DIR_64)/% : $(SOLARIS_OUT_BIN_64)/% | $$(dir $$@)
$(if $(VBOX_DO_STRIP),$(SOL_OBJCOPY) $< $@, $(INSTALL) -m 0644 $< $@)
$(addprefix $(SOLARIS_VBOXINST_DIR_64)/,$(SOLARIS_NO_STRIP)): \
$(SOLARIS_VBOXINST_DIR_64)/% : $(SOLARIS_OUT_BIN_64)/% | $$(dir $$@)
$(INSTALL) -m 0644 $< $@
$(addprefix $(SOLARIS_VBOXINST_DIR_64)/,$(SOLARIS_QTLIBS)): \
$(SOLARIS_VBOXINST_DIR_64)/% : $(SOLARIS_PATH_QT_64)/lib/% | $$(dir $$@)
$(INSTALL) -m 0644 $(if $(VBOX_DO_STRIP),-s,) $< $@
#
# Common (32-bit and 64-bit)
#
$(addprefix $(SOLARIS_VBOXINST_DIR)/,$(SOLARIS_COMMON)): \
$(SOLARIS_VBOXINST_DIR)/% : $(PATH_BIN)/% | $$(dir $$@)
$(INSTALL) -m 0644 $< $@
# Driver configuration files
$(addprefix $(SOLARIS_DRIVERINST_DIR)/,$(SOLARIS_DRIVER_CONFS)): \
$(SOLARIS_DRIVERINST_DIR)/% : $(PATH_BIN)/% | $$(dir $$@)
$(INSTALL) -m 0644 $< $@
# Common executables
$(addprefix $(SOLARIS_VBOXINST_DIR)/,$(SOLARIS_COMMON_EXES)): \
$(SOLARIS_VBOXINST_DIR)/% : $(PATH_BIN)/% | $$(dir $$@)
$(INSTALL) -m 0755 $< $@
#
# Common (relative symlinks to /opt/VirtualBox/ from /usr/bin/)
# Some symlinks are created manually in the prepackage steps above (eg. VBoxQtconfig)
# as those binaries do not originate from $(PATH_BIN)
#
$(addprefix $(SOLARIS_USRBIN_DIR)/,$(SOLARIS_USRBIN_LINKS)): \
$(SOLARIS_USRBIN_DIR)/% : % | $$(dir $$@)
$(LN_SYMLINK) -f ../../$(SOLARIS_VBOXINST_SUBDIR)/VBox.sh $@
#
# -=-=-=-=-=-=-=- VBI package -=-=-=-=-=-=-=-
#
ifdef VBOX_WITH_SOLARIS_VBI
$(SOLARIS_VBI_DIR)/$(VBIPKG_FILENAME).pkg: \
$(VBOX_VERSION_STAMP) \
$(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)) \
$(if $(VBOX_OSE),,$(PATH_BIN)/LICENSE) \
$(VBOX_PATH_SOL_INST_SRC)/vbi/vboxkern.pkginfo \
$(VBOX_PATH_SOL_INST_SRC)/vbi/makepackage.sh \
$(VBOX_PATH_SOL_INST_SRC)/vbi/preremove.sh \
$(VBOX_PATH_SOL_INST_SRC)/Makefile.kmk \
$(PATH_ROOT)/src/VBox/Runtime/r0drv/solaris/vbi/32/vbi \
$(PATH_ROOT)/src/VBox/Runtime/r0drv/solaris/vbi/64/vbi
$(call MSG_L1,Installing vbi binaries $(SOLARIS_VBI_DIR))
$(QUIET)$(RM) -Rf $(SOLARIS_VBI_DIR)
$(QUIET)$(MKDIR) -p $(SOLARIS_VBI_DIR)/amd64
$(QUIET)$(INSTALL) -m 0644 $(PATH_ROOT)/src/VBox/Runtime/r0drv/solaris/vbi/32/vbi $(SOLARIS_VBI_DIR)/vbi
$(QUIET)$(INSTALL) -m 0644 $(PATH_ROOT)/src/VBox/Runtime/r0drv/solaris/vbi/64/vbi $(SOLARIS_VBI_DIR)/amd64/vbi
$(call MSG_L1,Installing other files $(SOLARIS_VBI_DIR))
$(QUIET)$(SED) \
-e "s/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g" \
-e "s/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g" \
-e "s/@VBOX_VERSION_REVSTAMP@/$(PKGINFO_REVSTAMP)/g" \
-e "s/@UNAME_P@/$(PKGINFO_ARCH)/g" \
--output $(SOLARIS_VBI_DIR)/vboxkern.pkginfo \
$(VBOX_PATH_SOL_INST_SRC)/vbi/vboxkern.pkginfo
$(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(PATH_BIN)/LICENSE $(SOLARIS_VBI_DIR)/vbox.copyright)
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOL_INST_SRC)/vbi/makepackage.sh $(SOLARIS_VBI_DIR)/makepackage.sh
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOL_INST_SRC)/vbi/preremove.sh $(SOLARIS_VBI_DIR)/preremove.sh
$(call MSG_L1,Creating install package: $(VBIPKG_FILENAME).pkg)
$(QUIET)$(REDIRECT) -C $(VBOX_PATH_SOL_INST_SRC) -- $(SOLARIS_VBI_DIR)/makepackage.sh $(SOLARIS_VBI_DIR) $(VBIPKG_FILENAME)
endif
#
# -=-=-=-=-=-=-=- Debug package -=-=-=-=-=-=-=-
#
$(PATH_BIN)/$(DBG_ARCHIVE): \
$(VBOX_VERSION_STAMP) \
$(VBOX_PATH_SOL_INST_SRC)/Makefile.kmk \
$(SOLARIS_DBG_DEPFILES)
$(call MSG_L1,Installing debug binaries $(SOLARIS_DBG_DIR))
$(call MSG_L1,Packing $@)
$(QUIET)/usr/sfw/bin/gtar --owner 0 --group 0 -cjRhf $(PATH_BIN)/$(DBG_ARCHIVE) -C $(SOLARIS_DBG_DIR) $(SOLARIS_DBG_DEPFILES)
$(QUIET)$(CHMOD) 0644 $@
#
# 32-bit Debug package
#
$(addprefix $(SOLARIS_DBG_DIR_32)/,$(SOLARIS_STRIP_BINS) $(SOLARIS_STRIP_EXES)): \
$(SOLARIS_DBG_DIR_32)/% : $(SOLARIS_OUT_BIN_32)/% | $$(dir $$@)
$(SOL_DBG_OBJCOPY) $< $@
$(addprefix $(SOLARIS_DBG_DIR_32)/,$(SOLARIS_DRIVER_BINS)): \
$(SOLARIS_DBG_DIR_32)/% : $(SOLARIS_OUT_BIN_32)/% | $$(dir $$@)
$(SOL_DBG_OBJCOPY) $< $@
#
# 64-bit Debug package
#
$(addprefix $(SOLARIS_DBG_DIR_64)/,$(SOLARIS_STRIP_BINS) $(SOLARIS_STRIP_EXES)): \
$(SOLARIS_DBG_DIR_64)/% : $(SOLARIS_OUT_BIN_64)/% | $$(dir $$@)
$(SOL_DBG_OBJCOPY) $< $@
$(addprefix $(SOLARIS_DBG_DIR_64)/,$(SOLARIS_DRIVER_BINS)): \
$(SOLARIS_DBG_DIR_64)/% : $(SOLARIS_OUT_BIN_64)/% | $$(dir $$@)
$(SOL_DBG_OBJCOPY) $< $@