1 | # $Id: Makefile.kmk 13031 2008-10-07 09:21:53Z 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 | SUB_DEPTH = ../../../..
|
---|
23 | include $(KBUILD_PATH)/subheader.kmk
|
---|
24 |
|
---|
25 | ifneq ($(KBUILD_HOST),solaris)
|
---|
26 | $(error "The Solaris guest additions installer can only be built on Solaris!")
|
---|
27 | endif
|
---|
28 |
|
---|
29 | ifeq ($(KBUILD_HOST),solaris)
|
---|
30 | include $(PATH_SUB_CURRENT)/SharedFolders/Makefile.kmk
|
---|
31 | endif
|
---|
32 |
|
---|
33 | PKGFILENAME := VBoxSolarisAdditions.pkg
|
---|
34 | PKGINFO_ARCH = $(shell uname -p)
|
---|
35 | PKGINFO_REVSTAMP = $(date %Y.%m.%d.%H.%M)
|
---|
36 | VBOX_PATH_SOLARIS_ADDITION_INSTALLER := $(PATH_SUB_CURRENT)/Installer
|
---|
37 | VBOX_PATH_X11_ADDITION_INSTALLER := $(PATH_ROOT)/src/VBox/Additions/x11/installer
|
---|
38 | SOLARIS_INST_DIR := $(PATH_TARGET)/install
|
---|
39 |
|
---|
40 | ifeq ($(KBUILD_TYPE),debug)
|
---|
41 | BIN_COPY := $(CP) -f
|
---|
42 | BIN_COPY_SYMBOLS := $(CP) -f
|
---|
43 | else
|
---|
44 | BIN_COPY := /usr/sfw/bin/gobjcopy -S -R .comment
|
---|
45 | BIN_COPY_SYMBOLS := /usr/sfw/bin/gobjcopy -g -R .comment
|
---|
46 | endif
|
---|
47 |
|
---|
48 | PACKING += $(PATH_BIN)/additions/$(PKGFILENAME)
|
---|
49 | OTHER_CLEAN += $(PACKING)
|
---|
50 |
|
---|
51 | #
|
---|
52 | # If we are doing a combined package (x86+amd64) include the binaries from both
|
---|
53 | # architectures otherwise use the one from $(PATH_BIN)/additions
|
---|
54 | #
|
---|
55 | ifdef VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE
|
---|
56 | SOLARIS_ADD_BIN_64 := $(PATH_OUT_BASE)/solaris.amd64/$(KBUILD_TYPE)/bin/additions
|
---|
57 | SOLARIS_ADD_BIN_32 := $(PATH_OUT_BASE)/solaris.x86/$(KBUILD_TYPE)/bin/additions
|
---|
58 | SOLARIS_INST_DIR_64 := $(SOLARIS_INST_DIR)/amd64
|
---|
59 | SOLARIS_INST_DIR_32 := $(SOLARIS_INST_DIR)
|
---|
60 | VBOX_SOLPACKFILES = \
|
---|
61 | $(SOLARIS_ADD_BIN_64)/vboxguest \
|
---|
62 | $(SOLARIS_ADD_BIN_64)/VBoxClient \
|
---|
63 | $(SOLARIS_ADD_BIN_64)/VBoxService \
|
---|
64 | $(SOLARIS_ADD_BIN_64)/VBoxControl \
|
---|
65 | $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_13.so \
|
---|
66 | $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_14.so \
|
---|
67 | $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_70.so \
|
---|
68 | $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_71.so \
|
---|
69 | $(SOLARIS_ADD_BIN_64)/vboxmouse_drv_14.so \
|
---|
70 | $(SOLARIS_ADD_BIN_64)/vboxmouse_drv_70.so \
|
---|
71 | $(SOLARIS_ADD_BIN_64)/vboxmouse_drv_71.so \
|
---|
72 | $(SOLARIS_ADD_BIN_32)/vboxguest \
|
---|
73 | $(SOLARIS_ADD_BIN_32)/VBoxClient \
|
---|
74 | $(SOLARIS_ADD_BIN_32)/VBoxService \
|
---|
75 | $(SOLARIS_ADD_BIN_32)/VBoxControl \
|
---|
76 | $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_13.so \
|
---|
77 | $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_14.so \
|
---|
78 | $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_70.so \
|
---|
79 | $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_71.so \
|
---|
80 | $(SOLARIS_ADD_BIN_32)/vboxmouse_drv_14.so \
|
---|
81 | $(SOLARIS_ADD_BIN_32)/vboxmouse_drv_70.so \
|
---|
82 | $(SOLARIS_ADD_BIN_32)/vboxmouse_drv_71.so
|
---|
83 | else
|
---|
84 | SOLARIS_ADD_BIN := $(PATH_BIN)/additions
|
---|
85 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
86 | SOLARIS_INST_DIR_ISA := $(SOLARIS_INST_DIR)
|
---|
87 | else
|
---|
88 | SOLARIS_INST_DIR_ISA := $(SOLARIS_INST_DIR)/amd64
|
---|
89 | endif
|
---|
90 | VBOX_SOLPACKFILES = \
|
---|
91 | $(SOLARIS_ADD_BIN)/vboxguest \
|
---|
92 | $(SOLARIS_ADD_BIN)/VBoxClient \
|
---|
93 | $(SOLARIS_ADD_BIN)/VBoxService \
|
---|
94 | $(SOLARIS_ADD_BIN)/VBoxControl \
|
---|
95 | $(SOLARIS_ADD_BIN)/vboxvideo_drv_13.so \
|
---|
96 | $(SOLARIS_ADD_BIN)/vboxvideo_drv_14.so \
|
---|
97 | $(SOLARIS_ADD_BIN)/vboxvideo_drv_70.so \
|
---|
98 | $(SOLARIS_ADD_BIN)/vboxvideo_drv_71.so \
|
---|
99 | $(SOLARIS_ADD_BIN)/vboxmouse_drv_14.so \
|
---|
100 | $(SOLARIS_ADD_BIN)/vboxmouse_drv_70.so \
|
---|
101 | $(SOLARIS_ADD_BIN)/vboxmouse_drv_71.so
|
---|
102 | endif
|
---|
103 |
|
---|
104 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
105 |
|
---|
106 | $(PATH_BIN)/additions/VBoxSolarisAdditions.pkg: \
|
---|
107 | $(VBOX_VERSION_STAMP) \
|
---|
108 | $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/makepackage.sh \
|
---|
109 | $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/postinstall.sh \
|
---|
110 | $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/preremove.sh \
|
---|
111 | $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.pkginfo \
|
---|
112 | $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.sh \
|
---|
113 | $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxservice.xml \
|
---|
114 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient \
|
---|
115 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl \
|
---|
116 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11restore.pl \
|
---|
117 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/solaris_xorg.conf \
|
---|
118 | $(VBOX_SOLPACKFILES) \
|
---|
119 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh \
|
---|
120 | $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)) \
|
---|
121 | $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.conf \
|
---|
122 | $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxdevlink.sed \
|
---|
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
|
---|
152 | ifdef 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 | else
|
---|
176 | $(QUIET)$(INSTALL) -m 0644 $(SOLARIS_ADD_BIN)/vboxguest $(SOLARIS_INST_DIR_ISA)/vboxguest
|
---|
177 | $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN)/VBoxClient $(SOLARIS_INST_DIR_ISA)/VBoxClient
|
---|
178 | $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN)/VBoxService $(SOLARIS_INST_DIR_ISA)/VBoxService
|
---|
179 | $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN)/VBoxControl $(SOLARIS_INST_DIR_ISA)/VBoxControl
|
---|
180 | $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxvideo_drv_13.so $(SOLARIS_INST_DIR_ISA)/vboxvideo_drv_13.so
|
---|
181 | $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxvideo_drv_14.so $(SOLARIS_INST_DIR_ISA)/vboxvideo_drv_14.so
|
---|
182 | $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxvideo_drv_70.so $(SOLARIS_INST_DIR_ISA)/vboxvideo_drv_70.so
|
---|
183 | $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxvideo_drv_71.so $(SOLARIS_INST_DIR_ISA)/vboxvideo_drv_71.so
|
---|
184 | $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxmouse_drv_14.so $(SOLARIS_INST_DIR_ISA)/vboxmouse_drv_14.so
|
---|
185 | $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxmouse_drv_70.so $(SOLARIS_INST_DIR_ISA)/vboxmouse_drv_70.so
|
---|
186 | $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxmouse_drv_71.so $(SOLARIS_INST_DIR_ISA)/vboxmouse_drv_71.so
|
---|
187 | endif
|
---|
188 | $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxdevlink.sed $(SOLARIS_INST_DIR)/etc/devlink.tab
|
---|
189 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/VBox.sh $(SOLARIS_INST_DIR)/VBox.sh
|
---|
190 | $(call MSG_L1,Creating install package: $@)
|
---|
191 | $(QUIET)$(SOLARIS_INST_DIR)/makepackage.sh $(SOLARIS_INST_DIR) $(PKGFILENAME) $(VBOX_SVN_REV)
|
---|
192 | $(QUIET)$(INSTALL) -m 0644 $(SOLARIS_INST_DIR)/$(PKGFILENAME) $(PATH_BIN)/additions/$(PKGFILENAME)
|
---|
193 |
|
---|