VirtualBox

source: vbox/trunk/src/VBox/Additions/solaris/Makefile.kmk@ 15269

Last change on this file since 15269 was 15269, checked in by vboxsync, 16 years ago

Solaris/Installer: changing temporary output dir.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 14.4 KB
Line 
1# $Id: Makefile.kmk 15269 2008-12-10 17:28:01Z 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
22SUB_DEPTH = ../../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25ifneq ($(KBUILD_HOST),solaris)
26$(error "The Solaris guest additions installer can only be built on Solaris!")
27endif
28
29ifeq ($(KBUILD_HOST),solaris)
30 include $(PATH_SUB_CURRENT)/SharedFolders/Makefile.kmk
31endif
32
33PKGFILENAME := VBoxSolarisAdditions.pkg
34PKGINFO_ARCH = $(shell uname -p)
35PKGINFO_REVSTAMP = $(date %Y.%m.%d.%H.%M)
36VBOX_PATH_SOLARIS_ADDITION_INSTALLER := $(PATH_SUB_CURRENT)/Installer
37VBOX_PATH_X11_ADDITION_INSTALLER := $(PATH_ROOT)/src/VBox/Additions/x11/installer
38SOLARIS_INST_DIR := $(PATH_TARGET)/addinstall
39
40ifeq ($(KBUILD_TYPE),debug)
41 BIN_COPY := $(CP) -f
42 BIN_COPY_SYMBOLS := $(CP) -f
43else
44 BIN_COPY := /usr/sfw/bin/gobjcopy -S -R .comment
45 BIN_COPY_SYMBOLS := /usr/sfw/bin/gobjcopy -g -R .comment
46 VBOX_COMPRESS := compress -f
47endif
48
49PACKING += $(PATH_BIN)/additions/$(PKGFILENAME)
50OTHER_CLEAN += $(PACKING)
51
52#
53# If we are doing a combined package (x86+amd64) include the binaries from both
54# architectures otherwise use the one from $(PATH_BIN)/additions
55#
56ifdef VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE
57 SOLARIS_ADD_BIN_64 := $(PATH_OUT_BASE)/solaris.amd64/$(KBUILD_TYPE)/bin/additions
58 SOLARIS_ADD_BIN_32 := $(PATH_OUT_BASE)/solaris.x86/$(KBUILD_TYPE)/bin/additions
59 SOLARIS_INST_DIR_64 := $(SOLARIS_INST_DIR)/amd64
60 SOLARIS_INST_DIR_32 := $(SOLARIS_INST_DIR)
61 VBOX_SOLPACKFILES = \
62 $(SOLARIS_ADD_BIN_64)/vboxguest \
63 $(SOLARIS_ADD_BIN_64)/VBoxClient \
64 $(SOLARIS_ADD_BIN_64)/VBoxService \
65 $(SOLARIS_ADD_BIN_64)/VBoxControl \
66 $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_13.so \
67 $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_14.so \
68 $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_70.so \
69 $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_71.so \
70 $(SOLARIS_ADD_BIN_64)/vboxmouse_drv_14.so \
71 $(SOLARIS_ADD_BIN_64)/vboxmouse_drv_70.so \
72 $(SOLARIS_ADD_BIN_64)/vboxmouse_drv_71.so \
73 $(SOLARIS_ADD_BIN_32)/vboxguest \
74 $(SOLARIS_ADD_BIN_32)/VBoxClient \
75 $(SOLARIS_ADD_BIN_32)/VBoxService \
76 $(SOLARIS_ADD_BIN_32)/VBoxControl \
77 $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_13.so \
78 $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_14.so \
79 $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_70.so \
80 $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_71.so \
81 $(SOLARIS_ADD_BIN_32)/vboxmouse_drv_14.so \
82 $(SOLARIS_ADD_BIN_32)/vboxmouse_drv_70.so \
83 $(SOLARIS_ADD_BIN_32)/vboxmouse_drv_71.so
84else
85 SOLARIS_ADD_BIN := $(PATH_BIN)/additions
86 ifeq ($(KBUILD_TARGET_ARCH),x86)
87 SOLARIS_INST_DIR_ISA := $(SOLARIS_INST_DIR)
88 else
89 SOLARIS_INST_DIR_ISA := $(SOLARIS_INST_DIR)/amd64
90 endif
91 VBOX_SOLPACKFILES = \
92 $(SOLARIS_ADD_BIN)/vboxguest \
93 $(SOLARIS_ADD_BIN)/VBoxClient \
94 $(SOLARIS_ADD_BIN)/VBoxService \
95 $(SOLARIS_ADD_BIN)/VBoxControl \
96 $(SOLARIS_ADD_BIN)/vboxvideo_drv_13.so \
97 $(SOLARIS_ADD_BIN)/vboxvideo_drv_14.so \
98 $(SOLARIS_ADD_BIN)/vboxvideo_drv_70.so \
99 $(SOLARIS_ADD_BIN)/vboxvideo_drv_71.so \
100 $(SOLARIS_ADD_BIN)/vboxmouse_drv_14.so \
101 $(SOLARIS_ADD_BIN)/vboxmouse_drv_70.so \
102 $(SOLARIS_ADD_BIN)/vboxmouse_drv_71.so
103endif
104
105include $(KBUILD_PATH)/subfooter.kmk
106
107$(PATH_BIN)/additions/VBoxSolarisAdditions.pkg: \
108 $(VBOX_VERSION_STAMP) \
109 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/makepackage.sh \
110 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/postinstall.sh \
111 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/preremove.sh \
112 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.pkginfo \
113 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.sh \
114 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxservice.xml \
115 $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient \
116 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl \
117 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11restore.pl \
118 $(VBOX_PATH_X11_ADDITION_INSTALLER)/solaris_xorg.conf \
119 $(VBOX_SOLPACKFILES) \
120 $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh \
121 $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)) \
122 $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.conf \
123 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/VBox.sh \
124 $(PATH_SUB_CURRENT)/solaris/Makefile.kmk
125 $(call MSG_L1,Installing guest additions)
126 @# Clear out the existing package files if needed
127 $(QUIET)rm -rf $(SOLARIS_INST_DIR)
128 $(QUIET)$(MKDIR) -p $(SOLARIS_INST_DIR)
129 $(QUIET)$(if $(VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE),$(MKDIR) -p $(SOLARIS_INST_DIR_64),$(MKDIR) -p $(SOLARIS_INST_DIR_ISA))
130 $(QUIET)$(MKDIR) -p $(SOLARIS_INST_DIR)/etc
131 $(QUIET)$(SED) \
132 -e "s/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g" \
133 -e "s/@VBOX_SVN_REV@/$(VBOX_SVN_REV)/g" \
134 -e "s/@VBOX_VERSION_REVSTAMP@/$(PKGINFO_REVSTAMP)/g" \
135 -e "s/@UNAME_P@/$(PKGINFO_ARCH)/g" \
136 --output $(SOLARIS_INST_DIR)/vboxguest.pkginfo \
137 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.pkginfo
138 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/makepackage.sh $(SOLARIS_INST_DIR)/makepackage.sh
139 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/postinstall.sh $(SOLARIS_INST_DIR)/postinstall.sh
140 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/preremove.sh $(SOLARIS_INST_DIR)/preremove.sh
141 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.sh $(SOLARIS_INST_DIR)/vboxguest.sh
142 $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxservice.xml $(SOLARIS_INST_DIR)/vboxservice.xml
143 $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.space $(SOLARIS_INST_DIR)/vboxguest.space
144 $(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(VBOX_BRAND_LICENSE_TXT) $(SOLARIS_INST_DIR)/vboxguest.copyright)
145 $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxclient.desktop $(SOLARIS_INST_DIR)/vboxclient.desktop
146 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient $(SOLARIS_INST_DIR)/1099.vboxclient
147 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl $(SOLARIS_INST_DIR)/x11config.pl
148 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11restore.pl $(SOLARIS_INST_DIR)/x11restore.pl
149 $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_X11_ADDITION_INSTALLER)/solaris_xorg.conf $(SOLARIS_INST_DIR)/solaris_xorg.conf
150 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh $(SOLARIS_INST_DIR)/VBoxRandR.sh
151 $(QUIET)$(INSTALL) -m 0644 $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.conf $(SOLARIS_INST_DIR)/vboxguest.conf
152ifdef VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE
153 $(QUIET)$(INSTALL) -m 0644 $(SOLARIS_ADD_BIN_64)/vboxguest $(SOLARIS_INST_DIR_64)/vboxguest
154 $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN_64)/VBoxClient $(SOLARIS_INST_DIR_64)/VBoxClient
155 $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN_64)/VBoxService $(SOLARIS_INST_DIR_64)/VBoxService
156 $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN_64)/VBoxControl $(SOLARIS_INST_DIR_64)/VBoxControl
157 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_13.so $(SOLARIS_INST_DIR_64)/vboxvideo_drv_13.so
158 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_14.so $(SOLARIS_INST_DIR_64)/vboxvideo_drv_14.so
159 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_70.so $(SOLARIS_INST_DIR_64)/vboxvideo_drv_70.so
160 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_71.so $(SOLARIS_INST_DIR_64)/vboxvideo_drv_71.so
161 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_64)/vboxmouse_drv_14.so $(SOLARIS_INST_DIR_64)/vboxmouse_drv_14.so
162 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_64)/vboxmouse_drv_70.so $(SOLARIS_INST_DIR_64)/vboxmouse_drv_70.so
163 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_64)/vboxmouse_drv_71.so $(SOLARIS_INST_DIR_64)/vboxmouse_drv_71.so
164 $(QUIET)$(INSTALL) -m 0644 $(SOLARIS_ADD_BIN_32)/vboxguest $(SOLARIS_INST_DIR_32)/vboxguest
165 $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN_32)/VBoxClient $(SOLARIS_INST_DIR_32)/VBoxClient
166 $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN_32)/VBoxService $(SOLARIS_INST_DIR_32)/VBoxService
167 $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN_32)/VBoxControl $(SOLARIS_INST_DIR_32)/VBoxControl
168 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_13.so $(SOLARIS_INST_DIR_32)/vboxvideo_drv_13.so
169 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_14.so $(SOLARIS_INST_DIR_32)/vboxvideo_drv_14.so
170 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_70.so $(SOLARIS_INST_DIR_32)/vboxvideo_drv_70.so
171 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_71.so $(SOLARIS_INST_DIR_32)/vboxvideo_drv_71.so
172 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_32)/vboxmouse_drv_14.so $(SOLARIS_INST_DIR_32)/vboxmouse_drv_14.so
173 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_32)/vboxmouse_drv_70.so $(SOLARIS_INST_DIR_32)/vboxmouse_drv_70.so
174 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_32)/vboxmouse_drv_71.so $(SOLARIS_INST_DIR_32)/vboxmouse_drv_71.so
175 ifdef VBOX_COMPRESS
176 # Compress binaries as we distribute uncompressed pkgs
177 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_64)/VBoxClient
178 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_64)/VBoxService
179 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_64)/VBoxControl
180 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_64)/vboxvideo_drv_13.so
181 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_64)/vboxvideo_drv_14.so
182 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_64)/vboxvideo_drv_70.so
183 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_64)/vboxvideo_drv_71.so
184 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_64)/vboxmouse_drv_14.so
185 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_64)/vboxmouse_drv_70.so
186 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_64)/vboxmouse_drv_71.so
187 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_32)/VBoxClient
188 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_32)/VBoxService
189 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_32)/VBoxControl
190 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_32)/vboxvideo_drv_13.so
191 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_32)/vboxvideo_drv_14.so
192 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_32)/vboxvideo_drv_70.so
193 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_32)/vboxvideo_drv_71.so
194 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_32)/vboxmouse_drv_14.so
195 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_32)/vboxmouse_drv_70.so
196 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_32)/vboxmouse_drv_71.so
197 endif # VBOX_COMPRESS
198else # !VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE
199 $(QUIET)$(INSTALL) -m 0644 $(SOLARIS_ADD_BIN)/vboxguest $(SOLARIS_INST_DIR_ISA)/vboxguest
200 $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN)/VBoxClient $(SOLARIS_INST_DIR_ISA)/VBoxClient
201 $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN)/VBoxService $(SOLARIS_INST_DIR_ISA)/VBoxService
202 $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN)/VBoxControl $(SOLARIS_INST_DIR_ISA)/VBoxControl
203 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxvideo_drv_13.so $(SOLARIS_INST_DIR_ISA)/vboxvideo_drv_13.so
204 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxvideo_drv_14.so $(SOLARIS_INST_DIR_ISA)/vboxvideo_drv_14.so
205 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxvideo_drv_70.so $(SOLARIS_INST_DIR_ISA)/vboxvideo_drv_70.so
206 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxvideo_drv_71.so $(SOLARIS_INST_DIR_ISA)/vboxvideo_drv_71.so
207 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxmouse_drv_14.so $(SOLARIS_INST_DIR_ISA)/vboxmouse_drv_14.so
208 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxmouse_drv_70.so $(SOLARIS_INST_DIR_ISA)/vboxmouse_drv_70.so
209 $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxmouse_drv_71.so $(SOLARIS_INST_DIR_ISA)/vboxmouse_drv_71.so
210 ifdef VBOX_COMPRESS
211 # Compress binaries as we distribute uncompressed pkgs
212 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_ISA)/VBoxClient
213 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_ISA)/VBoxService
214 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_ISA)/VBoxControl
215 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_ISA)/vboxvideo_drv_13.so
216 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_ISA)/vboxvideo_drv_14.so
217 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_ISA)/vboxvideo_drv_70.so
218 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_ISA)/vboxvideo_drv_71.so
219 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_ISA)/vboxmouse_drv_14.so
220 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_ISA)/vboxmouse_drv_70.so
221 $(QUIET)$(VBOX_COMPRESS) $(SOLARIS_INST_DIR_ISA)/vboxmouse_drv_71.so
222 endif # VBOX_COMPRESS
223endif # !VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE
224 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/VBox.sh $(SOLARIS_INST_DIR)/VBox.sh
225 $(call MSG_L1,Creating install package: $@)
226 $(QUIET)$(SOLARIS_INST_DIR)/makepackage.sh $(SOLARIS_INST_DIR) $(PKGFILENAME) $(VBOX_SVN_REV)
227 $(QUIET)$(INSTALL) -m 0644 $(SOLARIS_INST_DIR)/$(PKGFILENAME) $(PATH_BIN)/additions/$(PKGFILENAME)
228
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette