VirtualBox

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

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

Linux Additions: rename the vboxvfs module to vboxsf to make it load by demand of the Linux kernel

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 16.7 KB
Line 
1# $Id: Makefile.kmk 28998 2010-05-04 09:44:57Z 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 $< $@.tmp
257 $(QUIET)$(INSTALL) -m 0644 $@.tmp $@
258 $(QUIET)$(RM) -f -- $@.tmp
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_LNX_ADD_INST)90-vboxguest.fdi \
311 selinux-fedora/vbox_x11.pp
312
313
314 INSTALLS += AutoRun-sh
315 AutoRun-sh_INST = bin/additions/
316 AutoRun-sh_MODE = a+rx,u+w
317 AutoRun-sh_SOURCES = $(VBOX_REL_LNX_ADD_INST)autorun.sh
318
319
320 #
321 # Install the sources of our (sanity) test kernel module
322 #
323 INSTALLS += LnxAddTest-src
324 LnxAddTest-src_INST = $(subst $(PATH_TARGET),obj,$(VBOX_LNX_ADD_INST_SHARE_DIR)$(VBOX_LNX_ADD_PACKAGE_NAME))/test/
325 LnxAddTest-src_MODE = a+r,u+w
326 LnxAddTest-src_SOURCES = \
327 $(VBOX_REL_LNX_ADD_INST)Makefile.test=>Makefile \
328 ../../HostDrivers/linux/build_in_tmp \
329 $(VBOX_REL_LNX_ADD_INST)test.c
330
331
332 #
333 # Install the sources of our (sanity) test kernel rendering (DRM) module
334 #
335 INSTALLS += LnxAddDRM-src
336 LnxAddDRM-src_INST = $(subst $(PATH_TARGET),obj,$(VBOX_LNX_ADD_INST_SHARE_DIR)$(VBOX_LNX_ADD_PACKAGE_NAME))/test_drm/
337 LnxAddDRM-src_MODE = a+r,u+w
338 LnxAddDRM-src_SOURCES = \
339 $(VBOX_REL_LNX_ADD_INST)Makefile.include.header \
340 $(VBOX_REL_LNX_ADD_INST)Makefile.include.footer \
341 $(VBOX_REL_LNX_ADD_INST)Makefile.test.drm=>Makefile \
342 ../../HostDrivers/linux/build_in_tmp \
343 $(VBOX_REL_LNX_ADD_INST)test_drm.c
344
345
346 #
347 # We need our routines.sh and the uninstallation scripts in the staging
348 # directory too
349 #
350 INSTALLS += LnxAdd-scripts
351 LnxAdd-scripts_INST = $(subst $(PATH_TARGET),obj,$(VBOX_LNX_ADD_INST_STAGE_DIR))
352 LnxAdd-scripts_MODE = a+rx,u+w
353 LnxAdd-scripts_SOURCES = \
354 $(VBOX_REL_LNX_INST_SRC)routines.sh \
355 $(VBOX_REL_LNX_ADD_INST)vboxadd.sh=>vboxadd \
356 $(VBOX_REL_LNX_ADD_INST)vboxadd-service.sh=>vboxadd-service \
357 $(VBOX_REL_LNX_ADD_INST)vboxadd-x11.sh=>vboxadd-x11 \
358 $(VBOX_REL_LNX_ADD_INST)deffiles
359
360
361 #
362 # VBoxClient-all
363 #
364 INSTALLS += LnxAdd-Nostrip-Bin
365 LnxAdd-Nostrip-Bin_INST = $(subst $(PATH_TARGET),obj,$(VBOX_LNX_ADD_INST_BIN_DIR))
366 LnxAdd-Nostrip-Bin_MODE = a+rx,u+w
367 LnxAdd-Nostrip-Bin_SOURCES = \
368 $(VBOX_REL_X11_ADD_INST)98vboxadd-xclient=>VBoxClient-all
369
370
371 #
372 # And the init scripts
373 #
374 INSTALLS += LnxAdd-init-scripts
375 LnxAdd-init-scripts_INST = bin/additions
376 LnxAdd-init-scripts_MODE = a+rx,u+w
377 LnxAdd-init-scripts_SOURCES = \
378 $(foreach i,$(VBOX_LNX_ADD_INIT), installer/$(i).sh=>$(i))
379endif # ! VBOX_OSE
380
381
382# this file needs editing before it can be included in the generic installer.
383$(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh: \
384 $(VBOX_PATH_LNX_INST_SRC)run-inst.sh | $$(dir $$@)
385 $(QUIET)$(SED) \
386 -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
387 -e "s;_PACKAGE_NAME_;VirtualBox Guest Additions;g" \
388 -e "s;_PACKAGE_;VBoxGuestAdditions;g" \
389 -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
390 -e "s;_BUILD_;$(shell date);g" \
391 -e "s;_OSE_;$(VBOX_OSE);g" \
392 -e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
393 -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
394 -e "s;_UNINSTALL_SCRIPTS_;vboxadd-x11 vboxadd-timesync vboxadd-service vboxadd;g" \
395 --output $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh \
396 $<
397 $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh $@
398 $(QUIET)$(RM) $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh
399OTHERS_CLEAN += \
400 $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh \
401 $(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh
402
403
404include $(KBUILD_PATH)/subfooter.kmk
405
406
407# All the files that go into our archive
408VBOX_LNX_ADD_ARCH_FILES = \
409 $(INSTARGET_lnx_add_inst-noexec) \
410 $(INSTARGET_lnx_add_inst-exec) \
411 $(INSTARGET_LnxAddTest-src) \
412 $(INSTARGET_LnxAddDRM-src) \
413 $(VBOX_LNX_ADD_INST_FILES)
414
415#
416# .tar.bz2 for converting into .run
417#
418$(VBOX_LNX_ADD_INST_STAGE_DIR)VBoxGuestAdditions.tar.bz2: \
419 $(VBOX_LNX_ADD_ARCH_FILES) \
420 $(VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE) \
421 $(VBOX_VERSION_STAMP)
422 $(call MSG_L1,Packing $@)
423 $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
424 $(QUIET)$(MKDIR) -p $(@D)
425ifdef VBOX_USE_PBZIP2
426 $(QUIET)tar --owner 0 --group 0 -cRf $(patsubst %.bz2,%,$@) \
427 -C $(VBOX_LNX_ADD_INST_OUT_DIR) \
428 bin init lib sbin share src \
429 $(if $(filter $(KBUILD_TYPE),debug),debug)
430 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
431else
432 $(QUIET)tar --owner 0 --group 0 --ignore-failed-read -cjRf $@ \
433 -C $(VBOX_LNX_ADD_INST_OUT_DIR) \
434 bin init lib sbin share src \
435 $(if $(filter $(KBUILD_TYPE),debug),debug)
436endif
437 $(QUIET)$(CHMOD) 0644 $@
438
439
440#
441# .tar.bz2 containing the debug information
442#
443$(PATH_BIN)/additions/VBoxGuestAdditions-dbg.tar.bz2: \
444 $(VBOX_LNX_ADD_DBG_FILES) \
445 $(VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE)
446 $(call MSG_L1,Packing $@)
447 $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
448 $(QUIET)$(MKDIR) -p $(@D)
449ifdef VBOX_USE_PBZIP2
450 $(QUIET)tar --owner 0 --group 0 -cRf $(patsubst %.bz2,%,$@) \
451 -C $(VBOX_LNX_ADD_INST_DBG_DIR) \
452 bin lib sbin
453 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
454else
455 $(QUIET)tar --owner 0 --group 0 --ignore-failed-read -cjRf $@ \
456 -C $(VBOX_LNX_ADD_INST_DBG_DIR) \
457 bin lib sbin
458endif
459 $(QUIET)$(CHMOD) 0644 $@
460
461
462#
463# Build the Linux Guest Additions self extracting installer.
464#
465# Note that $(PATH_SUB_CURRENT) was changed by subfooter.kmk above and
466# any references should be made via variables assigned a know value via := .
467#
468$(PATH_BIN)/additions/VBoxLinuxAdditions.run: \
469 $(VBOX_LNX_ADD_INST_STAGE_DIR)VBoxGuestAdditions.tar.bz2 \
470 $(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh \
471 $$(INSTARGET_LnxAdd-scripts) \
472 $(VBOX_VERSION_STAMP)
473 $(QUIET)$(VBOX_MAKESELF) --nocomp $(VBOX_LNX_ADD_INST_STAGE_DIR) $@ \
474 "VirtualBox $(VBOX_VERSION_STRING) Guest Additions for Linux" \
475 /bin/sh ./install.sh "\$$0 1> /dev/null"
476
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