VirtualBox

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

Last change on this file since 45049 was 44993, checked in by vboxsync, 12 years ago

Linux OSE builds: don't pass SVN revision = 0

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