Makefile.kmk revision af062818b47340eef15700d2f0211576ba3506ee
# $Id$
## @file
# Sub-Makefile for the Solaris installer.
#
#
# Copyright (C) 2007-2008 Sun Microsystems, Inc.
#
# 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.
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
# Clara, CA 95054 USA or visit http://www.sun.com if you need
# additional information or have any questions.
#
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
#
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
SOLARIS_INST_DIR := $(PATH_TARGET)/Installer/solaris/install
SOLARIS_INST_DIR_32 := $(SOLARIS_INST_DIR)/$(SOLARIS_DIR_NAME_32)
SOLARIS_INST_DIR_64 := $(SOLARIS_INST_DIR)/$(SOLARIS_DIR_NAME_64)
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/solaris/installdbg
SOLARIS_VBI_DIR := $(PATH_TARGET)/Installer/solaris/installvbi
ifeq ($(KBUILD_TARGET_ARCH),amd64)
SOLARIS_INST_DIR_ISA := $(SOLARIS_INST_DIR_64)
SOL_DBG_OBJCOPY := /usr/sfw/bin/gobjcopy --only-keep-debug
else
SOLARIS_INST_DIR_ISA := $(SOLARIS_INST_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
# Base package
PKGINFO_ARCH = $(shell uname -p)
PKGINFO_REVSTAMP = $(date %Y.%m.%d.%H.%M)
ifndef VBOX_WITH_COMBINED_SOLARIS_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
BLDDIRS += $(SOLARIS_INST_OUT_DIR) $(SOLARIS_INST_DIR) $(SOLARIS_VBI_DIR) $(SOLARIS_DBG_DIR)
PACKING += $(PATH_BIN)/$(PKG_FILENAME).tar.gz $(PATH_BIN)/$(DBG_ARCHIVE)
OTHER_CLEAN += $(addprefix $(SOLARIS_INST_DIR)/,\
#
# 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
#
# Note: Other than the files produced during packing (.pkg, .gzip etc.) all files that
# go into the temporary install folder $(SOLARIS_INST_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,) \
VBoxSVC \
VBoxXPCOMIPCD \
kchmviewer
# Strip these binaries
SOLARIS_STRIP_BINS = \
vboxdrv \
$(if $(VBOX_WITH_NETFLT),vboxflt) \
$(if $(VBOX_WITH_SHARED_FOLDERS),VBoxSharedFolders.so,) \
$(if $(VBOX_WITH_SHARED_CLIPBOARD),VBoxSharedClipboard.so,) \
$(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestPropSvc.so,) \
$(if $(VBOX_WITH_QTGUI),\
$(if $(VBOX_WITH_DEBUGGER_GUI),VBoxDbg.so,) \
$(if $(VBOX_WITH_CROGL),\
ifdef VBOX_WITH_HARDENING
SOLARIS_STRIP_BINS += \
$(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 = \
VMMGC.gc \
# Special differences between 32-bit and 64-bit
SOLARIS_STRIP_BIN_32 = \
ifndef VBOX_WITH_NEW_RECOMPILER
SOLARIS_STRIP_OBJ_64 = VBoxREM2.rel
endif
VBOX_SOL_PYTHON_DIR_64 = 64
# Do not strip anything of these files
SOLARIS_NO_STRIP = \
$(if $(and $(VBOX_LICENSE_FILES),$(VBOX_WITH_QTGUI)),$(VBOX_LICENSE_FILES))
# 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_NETFLT),vboxflt.conf) \
VBox.sh \
$(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,) \
VBoxQtconfig \
VBoxISAExec \
# These extra Qt libs are purely for running VBoxQtconfig
ifdef VBOX_WITH_QTGUI
SOLARIS_QTLIBS = libVBoxQtNetwork.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 = \
$(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),VirtualBox_$(f).chm UserManual_$(f).pdf)
endif
# VRDP
ifdef VBOX_WITH_VRDP
SOLARIS_STRIP_BINS += \
SOLARIS_COMMON += \
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 += \
endif
SOLARIS_ARCH_FILES := \
$(SOLARIS_STRIP_EXES) \
$(SOLARIS_STRIP_BINS) \
$(SOLARIS_STRIP_OBJS) \
$(SOLARIS_NO_STRIP) \
$(SOLARIS_EXTRAS) \
$(SOLARIS_QTLIBS) \
$(SOLARIS_COMMON)
OTHER_CLEAN += \
$(addprefix $(SOLARIS_INST_DIR)/, $(SOLARIS_ARCH_FILES)) \
$(SOLARIS_INST_DIR)/$(PKG_FILENAME).tar.gz \
$(SOLARIS_INST_DIR)/$(PKG_FILENAME).pkg \
$(addprefix $(SOLARIS_DBG_DIR)/,$(SOLARIS_STRIP_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_SOLARIS_PACKAGE
SOLARIS_ARCH_DEPFILES = $(addprefix $(SOLARIS_INST_DIR_64)/,$(SOLARIS_STRIP_EXES)) \
$(addprefix $(SOLARIS_INST_DIR_64)/,$(SOLARIS_STRIP_BINS)) \
$(addprefix $(SOLARIS_INST_DIR_64)/,$(SOLARIS_STRIP_OBJS)) \
$(addprefix $(SOLARIS_INST_DIR_64)/,$(SOLARIS_NO_STRIP)) \
$(addprefix $(SOLARIS_INST_DIR_64)/,$(SOLARIS_QTLIBS)) \
$(addprefix $(SOLARIS_INST_DIR_32)/,$(SOLARIS_STRIP_EXES)) \
$(addprefix $(SOLARIS_INST_DIR_32)/,$(SOLARIS_STRIP_BINS)) \
$(addprefix $(SOLARIS_INST_DIR_32)/,$(SOLARIS_STRIP_OBJS)) \
$(addprefix $(SOLARIS_INST_DIR_32)/,$(SOLARIS_NO_STRIP)) \
$(addprefix $(SOLARIS_INST_DIR_32)/,$(SOLARIS_QTLIBS)) \
$(addprefix $(SOLARIS_INST_DIR_32)/,$(SOLARIS_STRIP_BIN_32)) \
$(if $(VBOX_WITH_NEW_RECOMPILER),,$(addprefix $(SOLARIS_INST_DIR_64)/,$(SOLARIS_STRIP_OBJ_64))) \
$(addprefix $(SOLARIS_OUT_BIN_32)/,VBoxPython.so) \
$(addprefix $(SOLARIS_OUT_BIN_64)/,VBoxPython.so)
else
SOLARIS_ARCH_DEPFILES = $(addprefix $(SOLARIS_INST_DIR_ISA)/,$(SOLARIS_STRIP_EXES)) \
$(addprefix $(SOLARIS_INST_DIR_ISA)/,$(SOLARIS_STRIP_BINS)) \
$(ifeq ($(KBUILD_TARGET_ARCH),x86),$(addprefix $(SOLARIS_INST_DIR_ISA)/,$(SOLARIS_STRIP_BIN_32)),) \
$(ifeq ($(KBUILD_TARGET_ARCH),amd64),$(addprefix $(SOLARIS_INST_DIR_ISA)/,$(SOLARIS_STRIP_OBJ_64)),) \
$(addprefix $(SOLARIS_INST_DIR_ISA)/,$(SOLARIS_STRIP_OBJS)) \
$(addprefix $(SOLARIS_INST_DIR_ISA)/,$(SOLARIS_NO_STRIP)) \
$(addprefix $(SOLARIS_INST_DIR_ISA)/,$(SOLARIS_QTLIBS))
endif
SOLARIS_ARCH_DEPFILES += $(addprefix $(SOLARIS_INST_DIR)/,$(SOLARIS_COMMON))
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 \
$(SOLARIS_DIR_NAME_64)/$(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_INST_DIR)/$(d)/)
BLDDIRS += $(foreach d,\
amd64 \
,$(SOLARIS_VBI_DIR)/$(d)/)
BLDDIRS += $(foreach d,\
additions \
components \
accessible \
,$(SOLARIS_DBG_DIR)/$(d)/)
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)/preremove.sh \
$(VBOX_PATH_SOL_INST_SRC)/vbox.pkginfo \
$(VBOX_PATH_SOL_INST_SRC)/vbox.space \
$(VBOX_PATH_SOL_INST_SRC)/vbox.pkgresponse \
$(VBOX_PATH_SOL_INST_SRC)/VBox.sh \
$(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),) \
$(PATH_ROOT)/src/VBox/HostDrivers/Support/solaris/vboxdrv.conf \
$(if $(VBOX_WITH_NETFLT),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetFlt/solaris/vboxflt.conf) \
$(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)
$(call MSG_L1,Installing binaries $(SOLARIS_INST_DIR))
ifdef VBOX_WITH_COMBINED_SOLARIS_PACKAGE
$(QUIET)$(if $(VBOX_WITH_ADDITIONS_PACKING),$(INSTALL) -m 0644 $(SOLARIS_OUT_BIN_32)/additions/VBoxGuestAdditions.iso $(SOLARIS_INST_DIR)/additions/)
else
$(QUIET)$(if $(VBOX_WITH_ADDITIONS_PACKING),$(INSTALL) -m 0644 $(SOLARIS_OUT_BIN)/additions/VBoxGuestAdditions.iso $(SOLARIS_INST_DIR)/additions/)
endif
$(call MSG_L1,Installing files $(SOLARIS_INST_DIR))
$(QUIET)$(SED) \
-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_INST_DIR)/vbox.pkginfo \
$(VBOX_PATH_SOL_INST_SRC)/vbox.pkginfo
$(QUIET)$(INSTALL) -m 0644 $(PATH_ROOT)/src/VBox/HostDrivers/Support/solaris/vboxdrv.conf $(SOLARIS_INST_DIR)/vboxdrv.conf
$(QUIET)$(INSTALL) -m 0644 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetFlt/solaris/vboxflt.conf $(SOLARIS_INST_DIR)/vboxflt.conf
$(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(PATH_BIN)/LICENSE $(SOLARIS_INST_DIR)/LICENSE)
$(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(PATH_BIN)/LICENSE $(SOLARIS_INST_DIR)/vbox.copyright)
ifdef VBOX_WITH_COMBINED_SOLARIS_PACKAGE
$(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_INST_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_INST_DIR_64)/libSDL-1.2.so.0,)
@# @todo -XXX- how to get rid of this manual MKDIR ?
$(QUIET)$(MKDIR) -p $(SOLARIS_INST_DIR_64)/$(VBOX_SOL_PYTHON_DIR_64)
$(QUIET)$(if $(VBOX_WITH_PYTHON),$(INSTALL) -m 0644 $(if $(VBOX_DO_STRIP),-s) $(SOLARIS_OUT_BIN_32)/VBoxPython.so $(SOLARIS_INST_DIR_32)/VBoxPython.so,)
$(QUIET)$(if $(VBOX_WITH_PYTHON),$(INSTALL) -m 0644 $(if $(VBOX_DO_STRIP),-s) $(SOLARIS_OUT_BIN_64)/VBoxPython.so $(SOLARIS_INST_DIR_64)/$(VBOX_SOL_PYTHON_DIR_64)/VBoxPython.so,)
$(QUIET)$(if $(VBOX_WITH_QTGUI),$(INSTALL) -m 0755 $(PATH_DEVTOOLS)/solaris.x86/qt/v4.3.3-r1/bin/qtconfig $(SOLARIS_INST_DIR_32)/VBoxQtconfig,)
$(QUIET)$(if $(VBOX_WITH_QTGUI),$(INSTALL) -m 0755 $(PATH_DEVTOOLS)/solaris.amd64/qt/v4.3.3-r1/bin/qtconfig $(SOLARIS_INST_DIR_64)/VBoxQtconfig,)
$(QUIET)$(INSTALL) -m 0755 $(SOLARIS_OUT_BIN_32)/VBoxISAExec $(SOLARIS_INST_DIR)/VBoxISAExec
else
$(QUIET)$(if $(VBOX_WITH_VBOXSDL),$(INSTALL) -m 0644 $(PATH_DEVTOOLS_TRG)/libSDL/v1.2.13/lib/libSDL-1.2.so.0.11.2 $(SOLARIS_INST_DIR_ISA)/libSDL-1.2.so.0,)
@# @todo -XXX- how to get rid of this manual MKDIR ?
ifdef VBOX_WITH_PYTHON
$(QUIET)$(if $(SOL64_PKG),$(MKDIR) -p $(SOLARIS_INST_DIR_64)/$(VBOX_SOL_PYTHON_DIR_64),)
$(QUIET)$(INSTALL) -m 0644 $(if $(VBOX_DO_STRIP),-s) $(SOLARIS_OUT_BIN)/VBoxPython.so $(SOLARIS_INST_DIR_ISA)/$(if $(SOL64_PKG),$(VBOX_SOL_PYTHON_DIR_64)/,)VBoxPython.so
endif
$(QUIET)$(if $(VBOX_WITH_QTGUI),$(INSTALL) -m 0755 $(PATH_DEVTOOLS_TRG)/qt/v4.3.3-r1/bin/qtconfig $(SOLARIS_INST_DIR_ISA)/VBoxQtconfig,)
$(QUIET)$(INSTALL) -m 0755 $(SOLARIS_OUT_BIN)/VBoxISAExec $(SOLARIS_INST_DIR)/VBoxISAExec
endif
$(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/virtualbox-zoneaccess.xml $(SOLARIS_INST_DIR)/virtualbox-zoneaccess.xml
$(QUIET)$(if $(VBOX_WITH_WEBSERVICES),$(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/virtualbox-webservice.xml $(SOLARIS_INST_DIR)/virtualbox-webservice.xml,)
$(QUIET)$(if $(VBOX_WITH_WEBSERVICES),$(INSTALL) -m 0755 $(VBOX_PATH_SOL_INST_SRC)/smf-vboxwebsrv.sh $(SOLARIS_INST_DIR)/smf-vboxwebsrv.sh,)
$(QUIET)$(if $(not $(VBOX_WITH_NETFLT))$(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Devices/Network/solaris/vnicinit_solaris.sh $(SOLARIS_INST_DIR)/vnic_setup.sh,)
$(QUIET)$(if $(not $(VBOX_WITH_NETFLT))$(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Devices/Network/solaris/vnicterm_solaris.sh $(SOLARIS_INST_DIR)/vnic_term.sh,)
$(QUIET)$(SED) \
-e "s/_HARDENED_/$(if $(VBOX_WITH_HARDENED),hardened,))/" \
--output $(SOLARIS_INST_DIR)/vboxdrv.sh.tmp \
$(VBOX_PATH_SOL_INST_SRC)/vboxdrv.sh
$(QUIET)$(INSTALL) -m 0755 $(SOLARIS_INST_DIR)/vboxdrv.sh.tmp $(SOLARIS_INST_DIR)/vboxdrv.sh
$(QUIET)$(RM) -f $(SOLARIS_INST_DIR)/vboxdrv.sh.tmp
$(QUIET)$(if $(VBOX_WITH_QTGUI),$(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/virtualbox.desktop $(SOLARIS_INST_DIR)/virtualbox.desktop,)
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOL_INST_SRC)/postinstall.sh $(SOLARIS_INST_DIR)/postinstall.sh
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOL_INST_SRC)/preremove.sh $(SOLARIS_INST_DIR)/preremove.sh
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOL_INST_SRC)/makepackage.sh $(SOLARIS_INST_DIR)/makepackage.sh
$(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/vbox.pkgresponse $(SOLARIS_INST_DIR)/autoresponse
$(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/vbox.space $(SOLARIS_INST_DIR)/vbox.space
$(QUIET)$(SED) \
-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_INST_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_INST_DIR)/$(VBIPKG_FILENAME).pkg,)
$(call MSG_L1,Creating install package: $(PKG_FILENAME).tar.gz)
$(QUIET)$(REDIRECT) -C $(VBOX_PATH_SOL_INST_SRC) -- $(SOLARIS_INST_DIR)/makepackage.sh $(if $(VBOX_WITH_HARDENING),--hardened) \
$(SOLARIS_INST_DIR) \
$(PKG_FILENAME) \
$(if $(VBOX_WITH_SOLARIS_COMBINED_PACKAGE),neutral,$(KBUILD_TARGET_ARCH)) \
$(VBOX_SVN_REV) \
$(if $(VBOX_WITH_SOLARIS_VBI),$(VBIPKG_FILENAME).pkg,)
$(QUIET)$(INSTALL) -m 0644 $(SOLARIS_INST_DIR)/$(PKG_FILENAME).tar.gz $(SOLARIS_OUT_BIN)
@# Clean up files emitted as side-effect or result of packing
$(QUIET)$(RM) -f $(SOLARIS_INST_DIR)/$(PKG_FILENAME).tar.gz
$(QUIET)$(RM) -f $(SOLARIS_INST_DIR)/$(PKG_FILENAME).pkg
$(QUIET)$(if $(VBOX_WITH_SOLARIS_VBI),$(RM) -f $(SOLARIS_INST_DIR)/$(VBIPKG_FILENAME).pkg,)
#
# 32-bit
#
$(addprefix $(SOLARIS_INST_DIR_32)/,$(SOLARIS_STRIP_BINS)): \
$(SOLARIS_INST_DIR_32)/% : $(SOLARIS_OUT_BIN_32)/% | $$(dir $$@)
$(INSTALL) -m 0644 $(if $(VBOX_DO_STRIP),-s,) $< $@
$(addprefix $(SOLARIS_INST_DIR_32)/,$(SOLARIS_STRIP_BIN_32)): \
$(SOLARIS_INST_DIR_32)/% : $(SOLARIS_OUT_BIN_32)/% | $$(dir $$@)
$(INSTALL) -m 0644 $(if $(VBOX_DO_STRIP),-s,) $< $@
$(addprefix $(SOLARIS_INST_DIR_32)/,$(SOLARIS_STRIP_EXES)): \
$(SOLARIS_INST_DIR_32)/% : $(SOLARIS_OUT_BIN_32)/% | $$(dir $$@)
$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
$(addprefix $(SOLARIS_INST_DIR_32)/,$(SOLARIS_STRIP_OBJS)): \
$(SOLARIS_INST_DIR_32)/% : $(SOLARIS_OUT_BIN_32)/% | $$(dir $$@)
$(if $(VBOX_DO_STRIP),$(SOL_OBJCOPY) $< $@, $(INSTALL) -m 0644 $< $@)
$(addprefix $(SOLARIS_INST_DIR_32)/,$(SOLARIS_NO_STRIP)): \
$(SOLARIS_INST_DIR_32)/% : $(SOLARIS_OUT_BIN_32)/% | $$(dir $$@)
$(INSTALL) -m 0644 $< $@
$(addprefix $(SOLARIS_INST_DIR_32)/,$(SOLARIS_QTLIBS)): \
$(SOLARIS_INST_DIR_32)/% : $(PATH_DEVTOOLS)/solaris.x86/qt/v4.3.3-r1/lib/% | $$(dir $$@)
$(INSTALL) -m 0644 $(if $(VBOX_DO_STRIP),-s,) $< $@
#
# 64-bit
#
$(addprefix $(SOLARIS_INST_DIR_64)/,$(SOLARIS_STRIP_BINS)): \
$(SOLARIS_INST_DIR_64)/% : $(SOLARIS_OUT_BIN_64)/% | $$(dir $$@)
$(INSTALL) -m 0644 $(if $(VBOX_DO_STRIP),-s,) $< $@
$(addprefix $(SOLARIS_INST_DIR_64)/,$(SOLARIS_STRIP_EXES)): \
$(SOLARIS_INST_DIR_64)/% : $(SOLARIS_OUT_BIN_64)/% | $$(dir $$@)
$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
$(addprefix $(SOLARIS_INST_DIR_64)/,$(SOLARIS_STRIP_OBJS)): \
$(SOLARIS_INST_DIR_64)/% : $(SOLARIS_OUT_BIN_64)/% | $$(dir $$@)
$(if $(VBOX_DO_STRIP),$(SOL_OBJCOPY) $< $@, $(INSTALL) -m 0644 $< $@)
$(addprefix $(SOLARIS_INST_DIR_64)/,$(SOLARIS_STRIP_OBJ_64)): \
$(SOLARIS_INST_DIR_64)/% : $(SOLARIS_OUT_BIN_64)/% | $$(dir $$@)
$(if $(VBOX_DO_STRIP),$(SOL_OBJCOPY) $< $@, $(INSTALL) -m 0644 $< $@)
$(addprefix $(SOLARIS_INST_DIR_64)/,$(SOLARIS_NO_STRIP)): \
$(SOLARIS_INST_DIR_64)/% : $(SOLARIS_OUT_BIN_64)/% | $$(dir $$@)
$(INSTALL) -m 0644 $< $@
$(addprefix $(SOLARIS_INST_DIR_64)/,$(SOLARIS_QTLIBS)): \
$(SOLARIS_INST_DIR_64)/% : $(PATH_DEVTOOLS)/solaris.amd64/qt/v4.3.3-r1/lib/% | $$(dir $$@)
$(INSTALL) -m 0644 $(if $(VBOX_DO_STRIP),-s,) $< $@
#
# Common (32-bit and 64-bit)
#
$(addprefix $(SOLARIS_INST_DIR)/,$(SOLARIS_COMMON)): \
$(SOLARIS_INST_DIR)/% : $(PATH_BIN)/% | $$(dir $$@)
$(INSTALL) -m 0644 $< $@
#
# -=-=-=-=-=-=-=- VBI package -=-=-=-=-=-=-=-
#
$(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_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)
#
# -=-=-=-=-=-=-=- Debug package -=-=-=-=-=-=-=-
#
$(PATH_BIN)/$(DBG_ARCHIVE): \
$(VBOX_VERSION_STAMP) \
$(VBOX_PATH_SOL_INST_SRC)/Makefile.kmk \
$(addprefix $(SOLARIS_DBG_DIR)/,$(SOLARIS_STRIP_BINS)) \
$(addprefix $(SOLARIS_DBG_DIR)/,$(SOLARIS_STRIP_EXES))
$(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_STRIP_BINS) $(SOLARIS_STRIP_EXES)
$(QUIET)$(CHMOD) 0644 $@
$(addprefix $(SOLARIS_DBG_DIR)/,$(SOLARIS_STRIP_BINS) $(SOLARIS_STRIP_EXES)): \
$(SOLARIS_DBG_DIR)/% : $(PATH_BIN)/% | $$(dir $$@)
$(QUIET)$(SOL_DBG_OBJCOPY) $< $@