Makefile.kmk revision d10b60270f0c0eeb87f45002a010cff8ba2126b1
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# Makefile for the Solaris guest additions base directory.
772269936494ffaddd0750ba9e28e805ba81398cvboxsync# Copyright (C) 2008-2012 Oracle Corporation
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# available from http://www.virtualbox.org. This file is free software;
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# you can redistribute it and/or modify it under the terms of the GNU
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# General Public License (GPL) as published by the Free Software
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# The contents of this file may alternatively be used under the terms
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# of the Common Development and Distribution License Version 1.0
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# VirtualBox OSE distribution, in which case the provisions of the
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsync# CDDL are applicable instead of those of the GPL.
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsync# You may elect to license modified versions of this file under the
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsync# terms and conditions of either the GPL or the CDDL or both.
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncSUB_DEPTH = ../../../..
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncinclude $(KBUILD_PATH)/subheader.kmk
95d42763b8808d795c23148d7dbc00a3b7b40d6fvboxsync#ifneq ($(KBUILD_HOST),solaris)
5624b5f5d3f03f40350e197b28420bf8604bdf49vboxsync#$(error "The Solaris guest additions installer can only be built on Solaris!")
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncifeq ($(KBUILD_TARGET),solaris)
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsync include $(PATH_SUB_CURRENT)/SharedFolders/Makefile.kmk
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync include $(PATH_SUB_CURRENT)/Mouse/Makefile.kmk
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync include $(PATH_SUB_CURRENT)/DRM/Makefile.kmk
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncifdef VBOX_WITH_COMBINED_SOLARIS_PACKAGE ## @todo remove this when tinderclient.pl is updated.
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync VBOX_WITH_COMBINED_GUEST_PACKAGE := 1
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncPKGINFO_ARCH = $(shell uname -p)
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncPKGINFO_REVSTAMP = $(date %Y.%m.%d.%H.%M)
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncVBOX_PATH_SOLARIS_ADDITION_INSTALLER := $(PATH_SUB_CURRENT)/Installer
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncVBOX_PATH_X11_ADDITION_INSTALLER := $(PATH_ROOT)/src/VBox/Additions/x11/Installer
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncSOLARIS_ADDDIR_NAME_64 := amd64
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_ADDDIR_NAME_32 := i386
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_ADDINST_OUT_DIR := $(PATH_TARGET)/AdditionsInstaller
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_VBOXADDINST_SUBDIR := /opt/VirtualBoxAdditions
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_VBOXADDINST_DIR := $(SOLARIS_ADDINST_OUT_DIR)$(SOLARIS_VBOXADDINST_SUBDIR)
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_VBOXADDINST_DIR_32 := $(SOLARIS_VBOXADDINST_DIR)/$(SOLARIS_ADDDIR_NAME_32)
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_VBOXADDINST_DIR_64 := $(SOLARIS_VBOXADDINST_DIR)/$(SOLARIS_ADDDIR_NAME_64)
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_ADD_OUT_BIN_64 := $(PATH_OUT_BASE)/solaris.amd64/$(KBUILD_TYPE)/bin/additions
3b3bc8a9383a065307e540b83fc3a3d6c548a082vboxsyncSOLARIS_ADD_OUT_BIN_32 := $(PATH_OUT_BASE)/solaris.x86/$(KBUILD_TYPE)/bin/additions
3b3bc8a9383a065307e540b83fc3a3d6c548a082vboxsyncSOLARIS_ADD_OUT_BIN_ISA := $(PATH_OUT_BASE)/solaris.$(KBUILD_TARGET_ARCH)/$(KBUILD_TYPE)/bin/additions
e86b61a73c007051e5d85795d3f533fdf10f38a0vboxsyncSOLARIS_ADD_DRIVERINST_DIR := $(SOLARIS_ADDINST_OUT_DIR)/usr/kernel/drv
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_ADD_DRIVERINST_DIR_32 := $(SOLARIS_ADD_DRIVERINST_DIR)
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_ADD_DRIVERINST_DIR_64 := $(SOLARIS_ADD_DRIVERINST_DIR)/amd64
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_ADD_SYSLIBINST_DIR_32 := $(SOLARIS_ADDINST_OUT_DIR)/usr/lib
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_ADD_SYSLIBINST_DIR_64 := $(SOLARIS_ADDINST_OUT_DIR)/usr/lib/amd64
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_ADD_USRBIN_DIR := $(SOLARIS_ADDINST_OUT_DIR)/usr/bin
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_ADD_USRSBIN_DIR := $(SOLARIS_ADDINST_OUT_DIR)/usr/sbin
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncSOLARIS_ADD_ETCFS_DIR := $(SOLARIS_ADDINST_OUT_DIR)/etc/fs/vboxfs
5828e9d7f59d4682a58585195d67153abdabacfcvboxsyncSOLARIS_ADD_SERVICESINST_DIR := $(SOLARIS_ADDINST_OUT_DIR)/var/svc/manifest/application/virtualbox
2d9f6000b2f90f4bcd52e3991f6b09714c8ebb13vboxsyncifeq ($(KBUILD_TARGET_ARCH),x86)
63405971350d5cc0efe5f322bf782a1c29838c74vboxsync SOLARIS_ADDDIR_NAME_ISA := $(SOLARIS_ADDDIR_NAME_32)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync SOLARIS_VBOXADDINST_DIR_ISA := $(SOLARIS_VBOXADDINST_DIR_32)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync SOLARIS_ADD_DRIVERINST_DIR_ISA := $(SOLARIS_ADD_DRIVERINST_DIR_32)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync SOLARIS_ADD_SYSLIBINST_DIR_ISA := $(SOLARIS_ADD_SYSLIBINST_DIR_32)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync SOLARIS_ADDDIR_NAME_ISA := $(SOLARIS_ADDDIR_NAME_64)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync SOLARIS_VBOXADDINST_DIR_ISA := $(SOLARIS_VBOXADDINST_DIR_64)
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsync SOLARIS_ADD_DRIVERINST_DIR_ISA := $(SOLARIS_ADD_DRIVERINST_DIR_64)
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync SOLARIS_ADD_SYSLIBINST_DIR_ISA := $(SOLARIS_ADD_SYSLIBINST_DIR_64)
d69930a3cf6b803abb7b78052fed26021afbc602vboxsyncifeq ($(KBUILD_TYPE),debug)
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsync BIN_COPY := $(CP) -f
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync BIN_COPY_SYMBOLS := $(CP) -f
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsync BIN_COPY := /usr/sfw/bin/gobjcopy -S -R .comment
f8244da4b4e02d8d4ce0669eeb4093e31c301888vboxsync BIN_COPY_SYMBOLS := /usr/sfw/bin/gobjcopy -g -R .comment
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsync VBOX_COMPRESS := compress -f
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncINSTALLS += solaris-addcommon solaris-addcommonbins
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncPROGRAMS += VBoxAddISAExec
421f8a82f5330c53443c1e893e3279f7ce27b0advboxsyncPACKING += $(PATH_STAGE_BIN)/additions/$(PKGFILENAME)
421f8a82f5330c53443c1e893e3279f7ce27b0advboxsyncOTHER_CLEAN += $(PACKING) $(SOLARIS_ADDINST_OUT_DIR)/$(PKGFILENAME)
421f8a82f5330c53443c1e893e3279f7ce27b0advboxsync# VBoxAddISAExec
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncVBoxAddISAExec_TEMPLATE = VBOXR3EXE
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncVBoxAddISAExec_NAME = VBoxISAExec
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncVBoxAddISAExec_INST = $(INST_ADDITIONS)
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncVBoxAddISAExec_DEPS = $(VBOX_SVN_REV_KMK)
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncVBoxAddISAExec_SOURCES = $(PATH_ROOT)/src/VBox/Installer/solaris/VBoxISAExec.c
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync# Install to $(PATH_STAGE_BIN)/additions/ files from various source paths (to pack them using rules)
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncsolaris-addcommonbins_INST = bin/additions/
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncsolaris-addcommonbins_MODE = a+rx,u+w
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncsolaris-addcommonbins_SOURCES = \
ba86b8bc8fec4d0d9338f069ac7c41d710b977c1vboxsync $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.sh \
78bc21b26041085260be615bb02307d23274789cvboxsync $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl \
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsync $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config15sol.pl \
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsync $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11restore.pl \
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsync $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient=>1099.vboxclient \
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsync $(VBOX_PATH_X11_ADDITION_INSTALLER)/solaris_xorg.conf \
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsync $(VBOX_PATH_X11_ADDITION_INSTALLER)/solaris_xorg_modeless.conf \
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsync $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/VBox.sh
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncsolaris-addcommon_INST = bin/additions/
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncsolaris-addcommon_MODE = a+r,u+w
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncsolaris-addcommon_SOURCES = \
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsync $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.conf=>vboxguest.conf \
ba86b8bc8fec4d0d9338f069ac7c41d710b977c1vboxsync $(PATH_ROOT)/src/VBox/Additions/solaris/Mouse/vboxms.conf=>vboxms.conf \
ba86b8bc8fec4d0d9338f069ac7c41d710b977c1vboxsync $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxclient.desktop \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxservice.xml \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync $(PATH_ROOT)/src/VBox/Additions/solaris/Mouse/vboxmslnk.xml \
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsync $(VBOX_BRAND_LICENSE_TXT)=>LICENSE
b63a8e349101c3cacb413cfdc13472bd1f639c4bvboxsync# Create full directory tree
8941c379efb460127c48a74f4525a79d77b21da3vboxsyncBLDDIRS += \
8941c379efb460127c48a74f4525a79d77b21da3vboxsync $(SOLARIS_ADDINST_OUT_DIR) \
8941c379efb460127c48a74f4525a79d77b21da3vboxsync $(addprefix $(SOLARIS_ADDINST_OUT_DIR)/,\
b63a8e349101c3cacb413cfdc13472bd1f639c4bvboxsync opt/VirtualBoxAdditions/$(SOLARIS_ADDDIR_NAME_32) \
b63a8e349101c3cacb413cfdc13472bd1f639c4bvboxsync opt/VirtualBoxAdditions/$(SOLARIS_ADDDIR_NAME_64) \
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_ADD_STRIP_BINS = \
efda5c4c4db213abd0692df0ea34a26f6230d59avboxsync VBoxClient \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync VBoxService \
c6b64c517598aa515d93f4f8713d56a44bb5f88avboxsync VBoxControl \
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsync vboxfsmount \
d69930a3cf6b803abb7b78052fed26021afbc602vboxsync vboxmslnk \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync $(if ($VBOX_WITH_PAM),pam_vbox.so,) \
95d42763b8808d795c23148d7dbc00a3b7b40d6fvboxsync $(if $(VBOX_OSE),,vboxfs_s10)
421f8a82f5330c53443c1e893e3279f7ce27b0advboxsyncSOLARIS_ADD_SYSLIBS = \
1cc3bd5463294790ba54c78fde5313264185e50cvboxsyncSOLARIS_ADD_DRIVERS = \
421f8a82f5330c53443c1e893e3279f7ce27b0advboxsync vboxguest \
95d42763b8808d795c23148d7dbc00a3b7b40d6fvboxsyncSOLARIS_ADD_DRIVERS_CONF = \
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_ADD_XORG_DRIVERS = \
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_ADD_COMMON_BINS = \
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsync VBoxISAExec
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_ADD_USRBIN_LINKS = \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync VBoxService \
5828e9d7f59d4682a58585195d67153abdabacfcvboxsync VBoxClient \
78bc21b26041085260be615bb02307d23274789cvboxsync VBoxControl
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_ADD_USRSBIN_LINKS = \
deac0fbd5d65e79e311713cff78df42d5451f5b0vboxsyncSOLARIS_ADD_COMMON = \
772269936494ffaddd0750ba9e28e805ba81398cvboxsyncSOLARIS_ADD_SERVICES = \
$(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/makepackage.sh \
$(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/postinstall.sh \
$(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/preremove.sh \
$(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.pkginfo \
$(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.depend \
$(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.sh \
$(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxservice.xml \
$(PATH_ROOT)/src/VBox/Additions/solaris/Mouse/vboxmslnk.xml \
$(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/VBox.sh \
$(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config15sol.pl \
$(VBOX_PATH_X11_ADDITION_INSTALLER)/x11restore.pl \
$(VBOX_PATH_X11_ADDITION_INSTALLER)/solaris_xorg.conf \
$(VBOX_PATH_X11_ADDITION_INSTALLER)/solaris_xorg_modeless.conf \
$(PATH_SUB_CURRENT)/solaris/Makefile.kmk \
--output $(SOLARIS_ADDINST_OUT_DIR)/vboxguest.pkginfo \
$(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.pkginfo
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/makepackage.sh $(SOLARIS_ADDINST_OUT_DIR)/makepackage.sh
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/postinstall.sh $(SOLARIS_ADDINST_OUT_DIR)/postinstall.sh
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/preremove.sh $(SOLARIS_ADDINST_OUT_DIR)/preremove.sh
$(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.space $(SOLARIS_ADDINST_OUT_DIR)/vboxguest.space
$(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.depend $(SOLARIS_ADDINST_OUT_DIR)/vboxguest.depend
#$(QUIET)$(INSTALL) -m 0644 $(VBOX_BRAND_LICENSE_TXT) $(SOLARIS_ADDINST_OUT_DIR)/vboxguest.copyright
$(QUIET)$(LN_SYMLINK) -f ../..$(SOLARIS_VBOXADDINST_SUBDIR)/1099.vboxclient $(SOLARIS_ADD_USRBIN_DIR)/VBoxClient-all
$(QUIET)$(LN_SYMLINK) -f ../../..$(SOLARIS_VBOXADDINST_SUBDIR)/$(SOLARIS_ADDDIR_NAME_32)/vboxfsmount $(SOLARIS_ADD_ETCFS_DIR)/mount
$(LN_SYMLINK) -f ../../..$(SOLARIS_VBOXADDINST_SUBDIR)/$(SOLARIS_ADDDIR_NAME_ISA)/vboxfsmount $(SOLARIS_ADD_ETCFS_DIR)/mount
$(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxservice.xml $(SOLARIS_ADD_SERVICESINST_DIR)/vboxservice.xml
$(QUIET)$(INSTALL) -m 0644 $(PATH_ROOT)/src/VBox/Additions/solaris/Mouse/vboxmslnk.xml $(SOLARIS_ADD_SERVICESINST_DIR)/vboxmslnk.xml
$(QUIET)$(SOLARIS_ADDINST_OUT_DIR)/makepackage.sh $(SOLARIS_ADDINST_OUT_DIR) $(PKGFILENAME) $(VBOX_SVN_REV) $(VBOX_SOL_PKG_DEV)
$(QUIET)$(INSTALL) -m 0644 $(SOLARIS_ADDINST_OUT_DIR)/$(PKGFILENAME) $(PATH_STAGE_BIN)/additions/$(PKGFILENAME)
# Common binaries/shell scripts