1 | # $Id: Makefile.kmk 12149 2008-09-05 17:39:54Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the Solaris guest additions base directory.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2008 Sun Microsystems, Inc.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | # available from http://www.virtualbox.org. This file is free software;
|
---|
11 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | # General Public License (GPL) as published by the Free Software
|
---|
13 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
18 | # Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
19 | # additional information or have any questions.
|
---|
20 | #
|
---|
21 |
|
---|
22 | ifdef VBOX_KBUILD_HACKING
|
---|
23 | SUB_DEPTH = ../../../..
|
---|
24 | else
|
---|
25 | SUB_DEPTH = ..
|
---|
26 | DEPTH ?= ../../../..
|
---|
27 | endif
|
---|
28 | include $(KBUILD_PATH)/subheader.kmk
|
---|
29 |
|
---|
30 | ifneq ($(KBUILD_HOST),solaris)
|
---|
31 | $(error "The Solaris guest additions installer can only be built on Solaris!")
|
---|
32 | endif
|
---|
33 |
|
---|
34 | ifeq ($(KBUILD_HOST),solaris)
|
---|
35 | include $(PATH_SUB_CURRENT)/SharedFolders/Makefile.kmk
|
---|
36 | endif
|
---|
37 |
|
---|
38 | PKGFILENAME := VBoxSolarisAdditions.pkg
|
---|
39 | PKGINFO_ARCH = $(shell uname -p)
|
---|
40 | PKGINFO_REVSTAMP = $(date %Y.%m.%d.%H.%M)
|
---|
41 | VBOX_PATH_SOLARIS_ADDITION_INSTALLER := $(PATH_SUB_CURRENT)/Installer
|
---|
42 | VBOX_PATH_X11_ADDITION_INSTALLER := $(PATH_ROOT)/src/VBox/Additions/x11/installer
|
---|
43 | SOLARIS_INST_DIR := $(PATH_TARGET)/install
|
---|
44 | SOLARIS64_INST_DIR := $(SOLARIS_INST_DIR)/amd64
|
---|
45 |
|
---|
46 | ifeq ($(KBUILD_TYPE),debug)
|
---|
47 | BIN_COPY := $(CP) -f
|
---|
48 | BIN_COPY_SYMBOLS := $(CP) -f
|
---|
49 | else
|
---|
50 | BIN_COPY := /usr/sfw/bin/gobjcopy -S -R .comment
|
---|
51 | BIN_COPY_SYMBOLS := /usr/sfw/bin/gobjcopy -g -R .comment
|
---|
52 | endif
|
---|
53 |
|
---|
54 | PACKING += $(PATH_BIN)/additions/$(PKGFILENAME)
|
---|
55 | OTHER_CLEAN += $(PACKING)
|
---|
56 |
|
---|
57 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
58 |
|
---|
59 | $(PATH_BIN)/additions/VBoxSolarisAdditions.pkg: \
|
---|
60 | $(VBOX_VERSION_STAMP) \
|
---|
61 | $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/makepackage.sh \
|
---|
62 | $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/postinstall.sh \
|
---|
63 | $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/preremove.sh \
|
---|
64 | $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.pkginfo \
|
---|
65 | $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.sh \
|
---|
66 | $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxservice.xml \
|
---|
67 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient \
|
---|
68 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl \
|
---|
69 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11restore.pl \
|
---|
70 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/solaris_xorg.conf \
|
---|
71 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh \
|
---|
72 | $(PATH_BIN)/additions/vboxguest \
|
---|
73 | $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.conf \
|
---|
74 | $(if $(VBOX_OSE),,$(PATH_ROOT)/doc/License.txt) \
|
---|
75 | $(PATH_BIN)/additions/VBoxClient \
|
---|
76 | $(PATH_BIN)/additions/VBoxService \
|
---|
77 | $(PATH_BIN)/additions/VBoxControl \
|
---|
78 | $(PATH_BIN)/additions/vboxvideo_drv_13.so \
|
---|
79 | $(PATH_BIN)/additions/vboxvideo_drv_14.so \
|
---|
80 | $(PATH_BIN)/additions/vboxvideo_drv_70.so \
|
---|
81 | $(PATH_BIN)/additions/vboxvideo_drv_71.so \
|
---|
82 | $(PATH_BIN)/additions/vboxmouse_drv_14.so \
|
---|
83 | $(PATH_BIN)/additions/vboxmouse_drv_70.so \
|
---|
84 | $(PATH_BIN)/additions/vboxmouse_drv_71.so \
|
---|
85 | $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxdevlink.sed \
|
---|
86 | $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/VBox.sh \
|
---|
87 | $(PATH_SUB_CURRENT)/solaris/Makefile.kmk
|
---|
88 | $(call MSG_L1,Installing guest additions)
|
---|
89 | @# Clear out the existing package files if needed
|
---|
90 | $(QUIET)rm -rf $(SOLARIS_INST_DIR)
|
---|
91 | $(QUIET)$(MKDIR) -p $(SOLARIS_INST_DIR)
|
---|
92 | $(QUIET)$(MKDIR) -p $(SOLARIS64_INST_DIR)
|
---|
93 | $(QUIET)$(MKDIR) -p $(SOLARIS_INST_DIR)/etc
|
---|
94 | $(QUIET)$(SED) \
|
---|
95 | -e "s/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g" \
|
---|
96 | -e "s/@VBOX_VERSION_REVSTAMP@/$(PKGINFO_REVSTAMP)/g" \
|
---|
97 | -e "s/@UNAME_P@/$(PKGINFO_ARCH)/g" \
|
---|
98 | --output $(SOLARIS_INST_DIR)/vboxguest.pkginfo \
|
---|
99 | $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.pkginfo
|
---|
100 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/makepackage.sh $(SOLARIS_INST_DIR)/makepackage.sh
|
---|
101 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/postinstall.sh $(SOLARIS_INST_DIR)/postinstall.sh
|
---|
102 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/preremove.sh $(SOLARIS_INST_DIR)/preremove.sh
|
---|
103 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.sh $(SOLARIS_INST_DIR)/vboxguest.sh
|
---|
104 | $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxservice.xml $(SOLARIS_INST_DIR)/vboxservice.xml
|
---|
105 | $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.space $(SOLARIS_INST_DIR)/vboxguest.space
|
---|
106 | $(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(PATH_ROOT)/doc/License.txt $(SOLARIS_INST_DIR)/vboxguest.copyright)
|
---|
107 | $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxclient.desktop $(SOLARIS_INST_DIR)/vboxclient.desktop
|
---|
108 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient $(SOLARIS_INST_DIR)/1099.vboxclient
|
---|
109 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl $(SOLARIS_INST_DIR)/x11config.pl
|
---|
110 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11restore.pl $(SOLARIS_INST_DIR)/x11restore.pl
|
---|
111 | $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_X11_ADDITION_INSTALLER)/solaris_xorg.conf $(SOLARIS_INST_DIR)/solaris_xorg.conf
|
---|
112 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh $(SOLARIS_INST_DIR)/VBoxRandR.sh
|
---|
113 | $(QUIET)$(INSTALL) -m 0644 $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.conf $(SOLARIS_INST_DIR)/vboxguest.conf
|
---|
114 | $(QUIET)$(INSTALL) -m 0644 $(PATH_BIN)/additions/vboxguest $(SOLARIS_INST_DIR)/vboxguest
|
---|
115 | @#$(QUIET)$(if $(VBOX_DO_STRIP),strip $(SOLARIS_INST_DIR)/vboxguest,)
|
---|
116 | $(QUIET)$(INSTALL) -s -m 0755 $(PATH_BIN)/additions/VBoxClient $(SOLARIS_INST_DIR)/VBoxClient
|
---|
117 | $(QUIET)$(INSTALL) -s -m 0755 $(PATH_BIN)/additions/VBoxService $(SOLARIS_INST_DIR)/VBoxService
|
---|
118 | $(QUIET)$(INSTALL) -s -m 0755 $(PATH_BIN)/additions/VBoxControl $(SOLARIS_INST_DIR)/VBoxControl
|
---|
119 | $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_13.so $(SOLARIS_INST_DIR)/vboxvideo_drv_13.so
|
---|
120 | $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_14.so $(SOLARIS_INST_DIR)/vboxvideo_drv_14.so
|
---|
121 | $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_70.so $(SOLARIS_INST_DIR)/vboxvideo_drv_70.so
|
---|
122 | $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_71.so $(SOLARIS_INST_DIR)/vboxvideo_drv_71.so
|
---|
123 | $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_14.so $(SOLARIS_INST_DIR)/vboxmouse_drv_14.so
|
---|
124 | $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_70.so $(SOLARIS_INST_DIR)/vboxmouse_drv_70.so
|
---|
125 | $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_71.so $(SOLARIS_INST_DIR)/vboxmouse_drv_71.so
|
---|
126 | $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxdevlink.sed $(SOLARIS_INST_DIR)/etc/devlink.tab
|
---|
127 | $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/VBox.sh $(SOLARIS_INST_DIR)/VBox.sh
|
---|
128 | $(call MSG_L1,Creating install package: $@)
|
---|
129 | $(QUIET)$(SOLARIS_INST_DIR)/makepackage.sh $(SOLARIS_INST_DIR) $(PKGFILENAME) $(KBUILD_TARGET_ARCH)
|
---|
130 | $(QUIET)$(INSTALL) -m 0644 $(SOLARIS_INST_DIR)/$(PKGFILENAME) $(PATH_BIN)/additions/$(PKGFILENAME)
|
---|
131 |
|
---|