VirtualBox

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

Last change on this file since 34868 was 34706, checked in by vboxsync, 14 years ago

Linux additions: add the LICENSE file there as well

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