VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/Makefile.kmk@ 30601

Last change on this file since 30601 was 29406, checked in by vboxsync, 15 years ago

Additions/x11 and linux/installer: install the xorg.conf.d rule to load vboxmouse by default on X.Org Server 1.8 (based on r60935 from 3.1 and r61290 from 3.0)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 16.8 KB
Line 
1# $Id: Makefile.kmk 29406 2010-05-12 10:23:05Z vboxsync $
2## @file
3# Makefile for the linux guest additions base directory.
4#
5
6#
7# Copyright (C) 2006-2007 Oracle Corporation
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
18SUB_DEPTH = ../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21#
22# Include sub-makefiles.
23#
24include $(PATH_SUB_CURRENT)/sharedfolders/Makefile.kmk
25include $(PATH_SUB_CURRENT)/drm/Makefile.kmk
26
27#
28# Globals
29#
30
31# Basic path components
32VBOX_LNX_ADD_PACKAGE_NAME := VBoxGuestAdditions
33VBOX_LNX_ADD_INST_OUT_DIR := $(PATH_TARGET)/Additions/Installer/linux/
34VBOX_LNX_ADD_INST_DBG_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)debug/
35VBOX_LNX_ADD_INST_STAGE_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)install/
36
37# Installation paths for binaries and files
38VBOX_LNX_ADD_INST_BIN_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)bin/
39VBOX_LNX_ADD_INST_SBIN_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)sbin/
40VBOX_LNX_ADD_INST_LIB_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)lib/
41VBOX_LNX_ADD_INST_SHARE_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)share/
42VBOX_LNX_ADD_INST_MOD_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)lib/$(VBOX_LNX_ADD_PACKAGE_NAME)/
43VBOX_LNX_ADD_INST_KMOD_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)src/
44VBOX_LNX_ADD_INST_INIT_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)init/
45
46# Installation paths for debug symbols
47VBOX_LNX_ADD_DBG_BIN_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)bin/
48VBOX_LNX_ADD_DBG_SBIN_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)sbin/
49VBOX_LNX_ADD_DBG_LIB_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)lib/
50VBOX_LNX_ADD_DBG_MOD_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)lib/$(VBOX_LNX_ADD_PACKAGE_NAME)/
51
52# Script source directories
53VBOX_PATH_LNX_ADD_INST := $(PATH_SUB_CURRENT)/installer/
54VBOX_REL_LNX_ADD_INST := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_LNX_ADD_INST))
55VBOX_PATH_X11_ADD_INST := $(PATH_ROOT)/src/VBox/Additions/x11/Installer/
56VBOX_REL_X11_ADD_INST := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_X11_ADD_INST))
57VBOX_PATH_LNX_INST_SRC := $(PATH_ROOT)/src/VBox/Installer/linux/
58VBOX_REL_LNX_INST_SRC := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_LNX_INST_SRC))
59
60# Unset this to speed up things during makefile hacking.
61VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT)
62
63
64#
65# Targets
66#
67ifndef VBOX_OSE
68 BLDDIRS += \
69 $(VBOX_LNX_ADD_INST_OUT_DIR) \
70 $(VBOX_LNX_ADD_INST_BIN_DIR) \
71 $(VBOX_LNX_ADD_INST_SBIN_DIR) \
72 $(VBOX_LNX_ADD_INST_LIB_DIR) \
73 $(VBOX_LNX_ADD_INST_MOD_DIR) \
74 $(VBOX_LNX_ADD_INST_KMOD_DIR) \
75 $(VBOX_LNX_ADD_INST_INIT_DIR) \
76 $(VBOX_LNX_ADD_INST_DBG_DIR) \
77 $(VBOX_LNX_ADD_DBG_BIN_DIR) \
78 $(VBOX_LNX_ADD_DBG_SBIN_DIR) \
79 $(VBOX_LNX_ADD_DBG_LIB_DIR) \
80 $(VBOX_LNX_ADD_DBG_MOD_DIR) \
81 $(VBOX_LNX_ADD_INST_STAGE_DIR)
82 PACKING += \
83 $(PATH_BIN)/additions/VBoxLinuxAdditions.run \
84 $(VBOX_LNX_ADD_INST_STAGE_DIR)VBoxGuestAdditions.tar.bz2 \
85 $(PATH_BIN)/additions/VBoxGuestAdditions-dbg.tar.bz2
86 OTHER_CLEAN += $(PACKING)
87 # OSE only contains the source code for this
88 VBOX_SELINUX_CMPLD := $(PATH_SUB_CURRENT)/selinux-fedora/vbox_x11.pp
89endif
90
91
92#
93# Files to install
94#
95VBOX_ADD_STRIP_BIN += \
96 VBoxControl
97
98VBOX_ADD_STRIP_BIN.linux += \
99 VBoxClient
100
101VBOX_ADD_BIN.linux += \
102 VBoxClient-all
103
104VBOX_ADD_STRIP_SBIN += \
105 VBoxService
106
107VBOX_ADD_STRIP_LIB += \
108 VBoxOGLarrayspu.so \
109 VBoxOGLcrutil.so \
110 VBoxOGLerrorspu.so \
111 VBoxOGLfeedbackspu.so \
112 VBoxOGLpackspu.so \
113 VBoxOGLpassthroughspu.so \
114 VBoxOGL.so
115
116VBOX_ADD_STRIP_MOD.linux = \
117 vboxmouse_drv_70.so \
118 vboxmouse_drv_71.so \
119 vboxmouse_drv_13.so \
120 vboxmouse_drv_14.so \
121 vboxmouse_drv_15.so \
122 vboxmouse_drv_16.so \
123 vboxmouse_drv_17.so \
124 vboxmouse_drv_18.so \
125 vboxvideo_drv_70.so \
126 vboxvideo_drv_71.so \
127 vboxvideo_drv_13.so \
128 vboxvideo_drv_14.so \
129 vboxvideo_drv_15.so \
130 vboxvideo_drv_16.so \
131 vboxvideo_drv_17.so \
132 vboxvideo_drv_18.so \
133 pam_vbox.so \
134 mount.vboxsf
135
136VBOX_ADD_MOD.linux = \
137 98vboxadd-xclient \
138 x11config-new.pl
139
140VBOX_ADD_STRIP_OBJ.linux = \
141 vboxmouse_drv.o \
142 vboxvideo_drv.o
143
144VBOX_ADD_KMOD = \
145 vboxguest
146
147VBOX_ADD_KMOD.linux = \
148 vboxsf \
149 vboxvideo
150
151VBOX_ADD_INIT.linux = \
152 vboxadd \
153 vboxadd-service \
154 vboxadd-x11
155
156VBOX_LNX_ADD_STRIP_BIN = $(VBOX_ADD_STRIP_BIN) $(VBOX_ADD_STRIP_BIN.linux)
157VBOX_LNX_ADD_BIN = $(VBOX_ADD_BIN) $(VBOX_ADD_BIN.linux)
158VBOX_LNX_ADD_STRIP_SBIN= $(VBOX_ADD_STRIP_SBIN) $(VBOX_ADD_STRIP_SBIN.linux)
159VBOX_LNX_ADD_STRIP_LIB = $(VBOX_ADD_STRIP_LIB) $(VBOX_ADD_STRIP_LIB.linux)
160VBOX_LNX_ADD_STRIP_MOD = $(VBOX_ADD_STRIP_MOD) $(VBOX_ADD_STRIP_MOD.linux)
161VBOX_LNX_ADD_MOD = $(VBOX_ADD_MOD) $(VBOX_ADD_MOD.linux)
162VBOX_LNX_ADD_STRIP_OBJ = $(VBOX_ADD_STRIP_OBJ) $(VBOX_ADD_STRIP_OBJ.linux)
163VBOX_LNX_ADD_KMOD = $(VBOX_ADD_KMOD) $(VBOX_ADD_KMOD.linux)
164VBOX_LNX_ADD_INIT = $(VBOX_ADD_INIT) $(VBOX_ADD_INIT.linux)
165
166VBOX_LNX_ADD_KMOD_VERSIONED := $(addsuffix -$(VBOX_VERSION_STRING),$(VBOX_LNX_ADD_KMOD))
167
168#
169# All the files that go into the archive
170#
171VBOX_LNX_ADD_INST_FILES := \
172 $(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)) \
173 $(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_BIN)) \
174 $(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)) \
175 $(addprefix $(VBOX_LNX_ADD_INST_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)) \
176 $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_STRIP_MOD)) \
177 $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_MOD)) \
178 $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_STRIP_OBJ)) \
179 $(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR),$(VBOX_LNX_ADD_KMOD_VERSIONED)) \
180 $(addprefix $(VBOX_LNX_ADD_INST_INIT_DIR),$(VBOX_LNX_ADD_INIT)) \
181 $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_INIT))
182
183VBOX_LNX_ADD_DBG_FILES := \
184 $(addprefix $(VBOX_LNX_ADD_DBG_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)) \
185 $(addprefix $(VBOX_LNX_ADD_DBG_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)) \
186 $(addprefix $(VBOX_LNX_ADD_DBG_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)) \
187 $(addprefix $(VBOX_LNX_ADD_DBG_MOD_DIR),$(VBOX_LNX_ADD_STRIP_MOD))
188
189# Cleanup of the the installer directory files
190OTHER_CLEAN += $(VBOX_LNX_ADD_INST_FILES) $(VBOX_LNX_ADD_DEBUG_FILES)
191
192# pattern rules for copying the debug info from the VBOX_LNX_ADD_STRIP_* files to the installation directory
193$(addprefix $(VBOX_LNX_ADD_DBG_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)): \
194 $(VBOX_LNX_ADD_DBG_BIN_DIR)% : $(PATH_BIN)/additions/% | $$(dir $$@)
195 $(call MSG_TOOL,copydbg,$<,$@)
196 $(QUIET)objcopy --only-keep-debug $< $@
197
198$(addprefix $(VBOX_LNX_ADD_DBG_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)): \
199 $(VBOX_LNX_ADD_DBG_SBIN_DIR)% : $(PATH_BIN)/additions/% | $$(dir $$@)
200 $(call MSG_TOOL,copydbg,$<,$@)
201 $(QUIET)objcopy --only-keep-debug $< $@
202
203$(addprefix $(VBOX_LNX_ADD_DBG_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)): \
204 $(VBOX_LNX_ADD_DBG_LIB_DIR)% : $(PATH_BIN)/additions/% | $$(dir $$@)
205 $(call MSG_TOOL,copydbg,$<,$@)
206 $(QUIET)objcopy --only-keep-debug $< $@
207
208$(addprefix $(VBOX_LNX_ADD_DBG_MOD_DIR),$(VBOX_LNX_ADD_STRIP_MOD)): \
209 $(VBOX_LNX_ADD_DBG_MOD_DIR)% : $(PATH_BIN)/additions/% | $$(dir $$@)
210 $(call MSG_TOOL,copydbg,$<,$@)
211 $(QUIET)objcopy --only-keep-debug $< $@
212
213# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_BIN files to the installation directory
214$(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)): \
215 $(VBOX_LNX_ADD_INST_BIN_DIR)% : $(PATH_BIN)/additions/% \
216 $(VBOX_LNX_ADD_DBG_BIN_DIR)% \
217 | $$(dir $$@)
218 $(call MSG_INST_FILE,$<,$@)
219 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
220 $(QUIET)objcopy --add-gnu-debuglink=$@ $@
221
222# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_SBIN files to the installation directory
223$(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)): \
224 $(VBOX_LNX_ADD_INST_SBIN_DIR)% : $(PATH_BIN)/additions/% \
225 $(VBOX_LNX_ADD_DBG_SBIN_DIR)% \
226 | $$(dir $$@)
227 $(call MSG_INST_FILE,$<,$@)
228 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
229 $(QUIET)objcopy --add-gnu-debuglink=$@ $@
230
231# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_LIB files to the installation directory
232$(addprefix $(VBOX_LNX_ADD_INST_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)): \
233 $(VBOX_LNX_ADD_INST_LIB_DIR)% : $(PATH_BIN)/additions/% \
234 $(VBOX_LNX_ADD_DBG_LIB_DIR)% \
235 | $$(dir $$@)
236 $(call MSG_INST_FILE,$<,$@)
237 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
238 $(QUIET)objcopy --add-gnu-debuglink=$@ $@
239
240# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_MOD files to the installation directory
241$(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_STRIP_MOD)): \
242 $(VBOX_LNX_ADD_INST_MOD_DIR)% : $(PATH_BIN)/additions/% \
243 $(VBOX_LNX_ADD_DBG_MOD_DIR)% \
244 | $$(dir $$@)
245 $(call MSG_INST_FILE,$<,$@)
246 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
247 $(QUIET)objcopy --add-gnu-debuglink=$@ $@
248
249# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_OBJ files to the installation directory
250$(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_STRIP_OBJ)): \
251 $(VBOX_LNX_ADD_INST_MOD_DIR)% : $(PATH_BIN)/additions/% | $$(dir $$@)
252 $(call MSG_INST_FILE,$<,$@)
253ifeq ($(VBOX_DO_STRIP),)
254 $(QUIET)$(INSTALL) -m 0644 $< $@
255else # strip to temp file because of umask.
256 $(QUIET)objcopy --strip-unneeded -R .comment $< [email protected]
257 $(QUIET)$(INSTALL) -m 0644 [email protected] $@
258 $(QUIET)$(RM) -f -- [email protected]
259endif
260
261# pattern rule for copying the VBOX_LNX_ADD_KMOD files to the installation directory
262$(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR),$(VBOX_LNX_ADD_KMOD_VERSIONED)): \
263 $(VBOX_LNX_ADD_INST_KMOD_DIR)%-$(VBOX_VERSION_STRING) : $(PATH_BIN)/additions/src/% | $(VBOX_LNX_ADD_INST_KMOD_DIR)
264 $(call MSG_INST_DIR,$<,$@)
265# Remove target directories first, otherwise the behaviour of cp will not be
266# what we want if it already exists. See the cp manual page for more details.
267 $(QUIET)$(RM) -Rf $@
268 $(QUIET)cp -af $< $@
269
270# pattern rule for copying the VBOX_LNX_ADD_INIT files to the installation directory
271$(addprefix $(VBOX_LNX_ADD_INST_INIT_DIR),$(VBOX_LNX_ADD_INIT)): \
272 $(VBOX_LNX_ADD_INST_INIT_DIR)% : $(PATH_BIN)/additions/% | $$(dir $$@)
273 $(call MSG_INST_FILE,$<,$@)
274# Remove target directories first, otherwise the behaviour of cp will not be
275# what we want if it already exists. See the cp manual page for more details.
276 $(QUIET)$(RM) -Rf $@
277 $(QUIET)cp -af $< $@
278
279# pattern rule for copying the VBOX_LNX_ADD_INIT files to the module directory
280$(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_INIT)): \
281 $(VBOX_LNX_ADD_INST_MOD_DIR)% : $(PATH_BIN)/additions/% | $$(dir $$@)
282 $(call MSG_INST_FILE,$<,$@)
283# Remove target directories first, otherwise the behaviour of cp will not be
284# what we want if it already exists. See the cp manual page for more details.
285 $(QUIET)$(RM) -Rf $@
286 $(QUIET)cp -af $< $@
287
288
289INSTALLS += GuestDrivers-src
290GuestDrivers-src_INST = bin/additions/src/
291GuestDrivers-src_MODE = a+r,u+w
292GuestDrivers-src_SOURCES = Makefile
293
294
295ifndef VBOX_OSE
296 INSTALLS += lnx_add_inst-exec
297 lnx_add_inst-exec_INST = $(subst $(PATH_TARGET),obj,$(VBOX_LNX_ADD_INST_MOD_DIR))
298 lnx_add_inst-exec_MODE = a+rx,u+w
299 lnx_add_inst-exec_SOURCES = \
300 $(VBOX_REL_X11_ADD_INST)98vboxadd-xclient \
301 $(VBOX_REL_X11_ADD_INST)x11config-new.pl
302
303
304 INSTALLS += lnx_add_inst-noexec
305 lnx_add_inst-noexec_INST = $(subst $(PATH_TARGET),obj,$(VBOX_LNX_ADD_INST_SHARE_DIR)$(VBOX_LNX_ADD_PACKAGE_NAME))/
306 lnx_add_inst-noexec_MODE = a+r,u+w
307 lnx_add_inst-noexec_SOURCES = \
308 $(VBOX_REL_X11_ADD_INST)vboxclient.desktop \
309 $(VBOX_REL_X11_ADD_INST)vboxvideo.ids \
310 $(VBOX_REL_X11_ADD_INST)50-vboxmouse.conf \
311 $(VBOX_REL_LNX_ADD_INST)70-xorg-vboxmouse.rules \
312 $(VBOX_REL_LNX_ADD_INST)90-vboxguest.fdi \
313 selinux-fedora/vbox_x11.pp
314
315
316 INSTALLS += AutoRun-sh
317 AutoRun-sh_INST = bin/additions/
318 AutoRun-sh_MODE = a+rx,u+w
319 AutoRun-sh_SOURCES = $(VBOX_REL_LNX_ADD_INST)autorun.sh
320
321
322 #
323 # Install the sources of our (sanity) test kernel module
324 #
325 INSTALLS += LnxAddTest-src
326 LnxAddTest-src_INST = $(subst $(PATH_TARGET),obj,$(VBOX_LNX_ADD_INST_SHARE_DIR)$(VBOX_LNX_ADD_PACKAGE_NAME))/test/
327 LnxAddTest-src_MODE = a+r,u+w
328 LnxAddTest-src_SOURCES = \
329 $(VBOX_REL_LNX_ADD_INST)Makefile.test=>Makefile \
330 ../../HostDrivers/linux/build_in_tmp \
331 $(VBOX_REL_LNX_ADD_INST)test.c
332
333
334 #
335 # Install the sources of our (sanity) test kernel rendering (DRM) module
336 #
337 INSTALLS += LnxAddDRM-src
338 LnxAddDRM-src_INST = $(subst $(PATH_TARGET),obj,$(VBOX_LNX_ADD_INST_SHARE_DIR)$(VBOX_LNX_ADD_PACKAGE_NAME))/test_drm/
339 LnxAddDRM-src_MODE = a+r,u+w
340 LnxAddDRM-src_SOURCES = \
341 $(VBOX_REL_LNX_ADD_INST)Makefile.include.header \
342 $(VBOX_REL_LNX_ADD_INST)Makefile.include.footer \
343 $(VBOX_REL_LNX_ADD_INST)Makefile.test.drm=>Makefile \
344 ../../HostDrivers/linux/build_in_tmp \
345 $(VBOX_REL_LNX_ADD_INST)test_drm.c
346
347
348 #
349 # We need our routines.sh and the uninstallation scripts in the staging
350 # directory too
351 #
352 INSTALLS += LnxAdd-scripts
353 LnxAdd-scripts_INST = $(subst $(PATH_TARGET),obj,$(VBOX_LNX_ADD_INST_STAGE_DIR))
354 LnxAdd-scripts_MODE = a+rx,u+w
355 LnxAdd-scripts_SOURCES = \
356 $(VBOX_REL_LNX_INST_SRC)routines.sh \
357 $(VBOX_REL_LNX_ADD_INST)vboxadd.sh=>vboxadd \
358 $(VBOX_REL_LNX_ADD_INST)vboxadd-service.sh=>vboxadd-service \
359 $(VBOX_REL_LNX_ADD_INST)vboxadd-x11.sh=>vboxadd-x11 \
360 $(VBOX_REL_LNX_ADD_INST)deffiles
361
362
363 #
364 # VBoxClient-all
365 #
366 INSTALLS += LnxAdd-Nostrip-Bin
367 LnxAdd-Nostrip-Bin_INST = $(subst $(PATH_TARGET),obj,$(VBOX_LNX_ADD_INST_BIN_DIR))
368 LnxAdd-Nostrip-Bin_MODE = a+rx,u+w
369 LnxAdd-Nostrip-Bin_SOURCES = \
370 $(VBOX_REL_X11_ADD_INST)98vboxadd-xclient=>VBoxClient-all
371
372
373 #
374 # And the init scripts
375 #
376 INSTALLS += LnxAdd-init-scripts
377 LnxAdd-init-scripts_INST = bin/additions
378 LnxAdd-init-scripts_MODE = a+rx,u+w
379 LnxAdd-init-scripts_SOURCES = \
380 $(foreach i,$(VBOX_LNX_ADD_INIT), installer/$(i).sh=>$(i))
381endif # ! VBOX_OSE
382
383
384# this file needs editing before it can be included in the generic installer.
385$(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh: \
386 $(VBOX_PATH_LNX_INST_SRC)run-inst.sh | $$(dir $$@)
387 $(QUIET)$(SED) \
388 -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
389 -e "s;_PACKAGE_NAME_;VirtualBox Guest Additions;g" \
390 -e "s;_PACKAGE_;VBoxGuestAdditions;g" \
391 -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
392 -e "s;_BUILD_;$(shell date);g" \
393 -e "s;_OSE_;$(VBOX_OSE);g" \
394 -e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
395 -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
396 -e "s;_UNINSTALL_SCRIPTS_;vboxadd-x11 vboxadd-timesync vboxadd-service vboxadd;g" \
397 --output $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh \
398 $<
399 $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh $@
400 $(QUIET)$(RM) $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh
401OTHERS_CLEAN += \
402 $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh \
403 $(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh
404
405
406include $(KBUILD_PATH)/subfooter.kmk
407
408
409# All the files that go into our archive
410VBOX_LNX_ADD_ARCH_FILES = \
411 $(INSTARGET_lnx_add_inst-noexec) \
412 $(INSTARGET_lnx_add_inst-exec) \
413 $(INSTARGET_LnxAddTest-src) \
414 $(INSTARGET_LnxAddDRM-src) \
415 $(VBOX_LNX_ADD_INST_FILES)
416
417#
418# .tar.bz2 for converting into .run
419#
420$(VBOX_LNX_ADD_INST_STAGE_DIR)VBoxGuestAdditions.tar.bz2: \
421 $(VBOX_LNX_ADD_ARCH_FILES) \
422 $(VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE) \
423 $(VBOX_VERSION_STAMP)
424 $(call MSG_L1,Packing $@)
425 $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
426 $(QUIET)$(MKDIR) -p $(@D)
427ifdef VBOX_USE_PBZIP2
428 $(QUIET)tar --owner 0 --group 0 -cRf $(patsubst %.bz2,%,$@) \
429 -C $(VBOX_LNX_ADD_INST_OUT_DIR) \
430 bin init lib sbin share src \
431 $(if $(filter $(KBUILD_TYPE),debug),debug)
432 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
433else
434 $(QUIET)tar --owner 0 --group 0 --ignore-failed-read -cjRf $@ \
435 -C $(VBOX_LNX_ADD_INST_OUT_DIR) \
436 bin init lib sbin share src \
437 $(if $(filter $(KBUILD_TYPE),debug),debug)
438endif
439 $(QUIET)$(CHMOD) 0644 $@
440
441
442#
443# .tar.bz2 containing the debug information
444#
445$(PATH_BIN)/additions/VBoxGuestAdditions-dbg.tar.bz2: \
446 $(VBOX_LNX_ADD_DBG_FILES) \
447 $(VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE)
448 $(call MSG_L1,Packing $@)
449 $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
450 $(QUIET)$(MKDIR) -p $(@D)
451ifdef VBOX_USE_PBZIP2
452 $(QUIET)tar --owner 0 --group 0 -cRf $(patsubst %.bz2,%,$@) \
453 -C $(VBOX_LNX_ADD_INST_DBG_DIR) \
454 bin lib sbin
455 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
456else
457 $(QUIET)tar --owner 0 --group 0 --ignore-failed-read -cjRf $@ \
458 -C $(VBOX_LNX_ADD_INST_DBG_DIR) \
459 bin lib sbin
460endif
461 $(QUIET)$(CHMOD) 0644 $@
462
463
464#
465# Build the Linux Guest Additions self extracting installer.
466#
467# Note that $(PATH_SUB_CURRENT) was changed by subfooter.kmk above and
468# any references should be made via variables assigned a know value via := .
469#
470$(PATH_BIN)/additions/VBoxLinuxAdditions.run: \
471 $(VBOX_LNX_ADD_INST_STAGE_DIR)VBoxGuestAdditions.tar.bz2 \
472 $(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh \
473 $$(INSTARGET_LnxAdd-scripts) \
474 $(VBOX_VERSION_STAMP)
475 $(QUIET)$(VBOX_MAKESELF) --nocomp $(VBOX_LNX_ADD_INST_STAGE_DIR) $@ \
476 "VirtualBox $(VBOX_VERSION_STRING) Guest Additions for Linux" \
477 /bin/sh ./install.sh "\$$0 1> /dev/null"
478
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