VirtualBox

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

Last change on this file since 45417 was 45304, checked in by vboxsync, 12 years ago

Additions/linux: fix for r84522 (try to really include all vboxvideo drivers)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 18.8 KB
Line 
1# $Id: Makefile.kmk 45304 2013-04-03 10:36:00Z 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 $(addsuffix .so,$(filter vboxvideo_drv_%,$(DLLS))) \
148 $(if $(VBOX_WITH_PAM),pam_vbox.so,) \
149 mount.vboxsf
150
151VBOX_ADD_MOD.linux = \
152 98vboxadd-xclient \
153 x11config.sh
154
155VBOX_ADD_STRIP_OBJ.linux = \
156 vboxmouse_drv.o \
157 vboxvideo_drv.o
158
159VBOX_ADD_KMOD_FILES = $(addprefix vboxguest-$(VBOX_VERSION_STRING)/, Makefile dkms.conf do_dkms build_in_tmp)
160VBOX_ADD_KMOD_DIRS = $(addprefix vboxguest-$(VBOX_VERSION_STRING)/, vboxguest/ vboxsf/ vboxvideo/)
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_FILES= $(VBOX_ADD_KMOD_FILES)
175VBOX_LNX_ADD_KMOD_DIRS = $(VBOX_ADD_KMOD_DIRS)
176VBOX_LNX_ADD_INIT = $(VBOX_ADD_INIT) $(VBOX_ADD_INIT.linux)
177
178#
179# All the files that go into the archive
180#
181VBOX_LNX_ADD_INST_FILES := \
182 $(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)) \
183 $(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_BIN)) \
184 $(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)) \
185 $(addprefix $(VBOX_LNX_ADD_INST_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)) \
186 $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_STRIP_MOD)) \
187 $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_MOD)) \
188 $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_STRIP_OBJ)) \
189 $(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR),$(VBOX_LNX_ADD_KMOD_FILES)) \
190 $(addprefix $(VBOX_LNX_ADD_INST_INIT_DIR),$(VBOX_LNX_ADD_INIT)) \
191 $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_INIT))
192
193## @todo figure how to clean these... Or maybe rewrite everything here to somehow use install targets?
194VBOX_LNX_ADD_INST_DIRS := \
195 $(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR),$(VBOX_LNX_ADD_KMOD_DIRS))
196
197VBOX_LNX_ADD_DBG_FILES := \
198 $(addprefix $(VBOX_LNX_ADD_DBG_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)) \
199 $(addprefix $(VBOX_LNX_ADD_DBG_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)) \
200 $(addprefix $(VBOX_LNX_ADD_DBG_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)) \
201 $(addprefix $(VBOX_LNX_ADD_DBG_MOD_DIR),$(VBOX_LNX_ADD_STRIP_MOD))
202
203ifdef VBOX_WITH_LIGHTDM_GREETER_PACKING
204VBOX_LNX_ADD_INST_FILES += \
205 $(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),vbox-greeter)
206endif
207
208# Cleanup of the the installer directory files
209OTHER_CLEAN += $(VBOX_LNX_ADD_INST_FILES) $(VBOX_LNX_ADD_DBG_FILES)
210
211# pattern rules for copying the debug info from the VBOX_LNX_ADD_STRIP_* files to the installation directory
212$(addprefix $(VBOX_LNX_ADD_DBG_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)): \
213 $(VBOX_LNX_ADD_DBG_BIN_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
214 $(call MSG_TOOL,copydbg,$<,$@)
215 $(QUIET)objcopy --only-keep-debug $< $@
216
217$(addprefix $(VBOX_LNX_ADD_DBG_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)): \
218 $(VBOX_LNX_ADD_DBG_SBIN_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
219 $(call MSG_TOOL,copydbg,$<,$@)
220 $(QUIET)objcopy --only-keep-debug $< $@
221
222$(addprefix $(VBOX_LNX_ADD_DBG_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)): \
223 $(VBOX_LNX_ADD_DBG_LIB_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
224 $(call MSG_TOOL,copydbg,$<,$@)
225 $(QUIET)objcopy --only-keep-debug $< $@
226
227$(addprefix $(VBOX_LNX_ADD_DBG_MOD_DIR),$(VBOX_LNX_ADD_STRIP_MOD)): \
228 $(VBOX_LNX_ADD_DBG_MOD_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
229 $(call MSG_TOOL,copydbg,$<,$@)
230 $(QUIET)objcopy --only-keep-debug $< $@
231
232# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_BIN files to the installation directory
233$(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)): \
234 $(VBOX_LNX_ADD_INST_BIN_DIR)% : $(PATH_STAGE_BIN)/additions/% \
235 $(VBOX_LNX_ADD_DBG_BIN_DIR)% \
236 | $$(dir $$@)
237 $(call MSG_INST_FILE,$<,$@)
238 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
239 $(QUIET)objcopy --add-gnu-debuglink=$@ $@
240
241# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_SBIN files to the installation directory
242$(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)): \
243 $(VBOX_LNX_ADD_INST_SBIN_DIR)% : $(PATH_STAGE_BIN)/additions/% \
244 $(VBOX_LNX_ADD_DBG_SBIN_DIR)% \
245 | $$(dir $$@)
246 $(call MSG_INST_FILE,$<,$@)
247 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
248 $(QUIET)objcopy --add-gnu-debuglink=$@ $@
249
250# pattern rule for stripping and copying vbox-greeter to the installation directory
251$(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),vbox-greeter): \
252 $(VBOX_LNX_ADD_INST_SBIN_DIR)% : $(subst linux,linux2,$(PATH_STAGE_BIN))/additions/% \
253 | $$(dir $$@)
254 $(call MSG_INST_FILE,$<,$@)
255 $(QUIET)$(INSTALL) -m 0755 $< $@
256
257# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_LIB files to the installation directory
258$(addprefix $(VBOX_LNX_ADD_INST_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)): \
259 $(VBOX_LNX_ADD_INST_LIB_DIR)% : $(PATH_STAGE_BIN)/additions/% \
260 $(VBOX_LNX_ADD_DBG_LIB_DIR)% \
261 | $$(dir $$@)
262 $(call MSG_INST_FILE,$<,$@)
263 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
264 $(QUIET)objcopy --add-gnu-debuglink=$@ $@
265
266# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_MOD files to the installation directory
267$(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_STRIP_MOD)): \
268 $(VBOX_LNX_ADD_INST_MOD_DIR)% : $(PATH_STAGE_BIN)/additions/% \
269 $(VBOX_LNX_ADD_DBG_MOD_DIR)% \
270 | $$(dir $$@)
271 $(call MSG_INST_FILE,$<,$@)
272 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
273 $(QUIET)objcopy --add-gnu-debuglink=$@ $@
274
275# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_OBJ files to the installation directory
276$(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_STRIP_OBJ)): \
277 $(VBOX_LNX_ADD_INST_MOD_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
278 $(call MSG_INST_FILE,$<,$@)
279ifeq ($(VBOX_DO_STRIP),)
280 $(QUIET)$(INSTALL) -m 0644 $< $@
281else # strip to temp file because of umask.
282 $(QUIET)objcopy --strip-unneeded -R .comment $< [email protected]
283 $(QUIET)$(INSTALL) -m 0644 [email protected] $@
284 $(QUIET)$(RM) -f -- [email protected]
285endif
286
287# pattern rules for copying the VBOX_LNX_ADD_KMOD files to the installation directory
288$(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR),$(VBOX_LNX_ADD_KMOD_DIRS)): \
289 $(VBOX_LNX_ADD_INST_KMOD_DIR_MOD)% : \
290 $(PATH_STAGE_BIN)/additions/src/% \
291 $(wildcard $(PATH_STAGE_BIN)/additions/src/%*) \
292 $(wildcard $(PATH_STAGE_BIN)/additions/src/%*/*) \
293 $(wildcard $(PATH_STAGE_BIN)/additions/src/%*/*/*) \
294 $(wildcard $(PATH_STAGE_BIN)/additions/src/%*/*/*/*) \
295 $(wildcard $(PATH_STAGE_BIN)/additions/src/%*/*/*/*/*) \
296 $(VBOX_VERSION_STAMP) \
297 | $$(dir $$(patsubst $$(PERCENT)/,$$(PERCENT),$$@))
298 $(call MSG_INST_DIR,$<,$@)
299 $(QUIET)$(RM) -Rf $(filter-out $(VBOX_LNX_ADD_INST_KMOD_DIR_MOD),$(wildcard $(VBOX_LNX_ADD_INST_KMOD_DIR)*/))
300 $(QUIET)$(CP) -RPf -- $< $@
301
302$(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR),$(VBOX_LNX_ADD_KMOD_FILES)): \
303 $(VBOX_LNX_ADD_INST_KMOD_DIR_MOD)% : \
304 $(PATH_STAGE_BIN)/additions/src/% \
305 | $$(dir $$(patsubst $$(PERCENT)/,$$(PERCENT),$$@))
306 $(call MSG_INST_FILE,$<,$@)
307 $(QUIET)$(CP) -RPf -- $< $@
308
309# pattern rule for copying the VBOX_LNX_ADD_INIT files to the installation directory
310$(addprefix $(VBOX_LNX_ADD_INST_INIT_DIR),$(VBOX_LNX_ADD_INIT)): \
311 $(VBOX_LNX_ADD_INST_INIT_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
312 $(call MSG_INST_FILE,$<,$@)
313# Remove target directories first, otherwise the behaviour of cp will not be
314# what we want if it already exists. See the cp manual page for more details.
315 $(QUIET)$(RM) -Rf $@
316 $(QUIET)$(CP) -RPf -- $< $@
317
318# pattern rule for copying the VBOX_LNX_ADD_INIT files to the module directory
319$(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_INIT)): \
320 $(VBOX_LNX_ADD_INST_MOD_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
321 $(call MSG_INST_FILE,$<,$@)
322# Remove target directories first, otherwise the behaviour of cp will not be
323# what we want if it already exists. See the cp manual page for more details.
324 $(QUIET)$(RM) -Rf $@
325 $(QUIET)$(CP) -RPf -- $< $@
326
327INSTALLS += GuestDrivers-src
328GuestDrivers-src_INST = $(INST_ADDITIONS)src/
329GuestDrivers-src_MODE = a+r,u+w
330GuestDrivers-src_SOURCES = Makefile
331
332
333INSTALLS += lnx_add_inst-exec
334lnx_add_inst-exec_INST = $(VBOX_LNX_ADD_INST_MOD_DIR)
335lnx_add_inst-exec_INSTTYPE = stage
336lnx_add_inst-exec_EXEC_SOURCES = \
337 $(VBOX_REL_X11_ADD_INST)98vboxadd-xclient \
338 $(VBOX_REL_X11_ADD_INST)x11config.sh
339
340
341INSTALLS += lnx_add_inst-noexec
342lnx_add_inst-noexec_INST = $(VBOX_LNX_ADD_INST_SHARE_DIR)$(VBOX_LNX_ADD_PACKAGE_NAME)/
343lnx_add_inst-noexec_INSTTYPE = stage
344lnx_add_inst-noexec_SOURCES = \
345 $(VBOX_REL_X11_ADD_INST)vboxclient.desktop \
346 $(VBOX_REL_X11_ADD_INST)vboxvideo.ids \
347 $(if $(VBOX_WITH_LIGHTDM_GREETER_PACKING),lightdm-greeter/vbox-greeter.desktop,) \
348 selinux-fedora/vbox_x11.pp \
349 selinux-fedora/vbox_accel.pp
350
351INSTALLS += lnx_add_inst-license
352lnx_add_inst-license_INST = $(VBOX_LNX_ADD_INST_OUT_DIR)
353lnx_add_inst-license_INSTTYPE = stage
354lnx_add_inst-license_SOURCES = \
355 $(VBOX_BRAND_LICENSE_TXT)=>LICENSE
356
357
358#
359# We need our routines.sh and the uninstallation scripts in the staging
360# directory too
361#
362INSTALLS += LnxAdd-scripts
363LnxAdd-scripts_INST = $(VBOX_LNX_ADD_INST_STAGE_DIR)
364LnxAdd-scripts_INSTTYPE = stage
365LnxAdd-scripts_SOURCES = \
366 $(VBOX_REL_LNX_ADD_INST)deffiles
367LnxAdd-scripts_EXEC_SOURCES = \
368 $(VBOX_REL_LNX_HOST_DRV)do_dkms \
369 $(VBOX_REL_LNX_INST_SRC)routines.sh \
370 $(VBOX_REL_LNX_ADD_INST)vboxadd.sh=>vboxadd \
371 $(VBOX_REL_LNX_ADD_INST)vboxadd-service.sh=>vboxadd-service \
372 $(VBOX_REL_LNX_ADD_INST)vboxadd-x11.sh=>vboxadd-x11
373
374ifdef VBOX_WITH_LIGHTDM_GREETER_PACKING
375 LnxAdd-scripts_EXEC_SOURCES += \
376 $(VBOX_REL_LNX_ADD_INST)module-autologon.sh=>installer/module-autologon
377endif
378
379#
380# VBoxClient-all
381#
382INSTALLS += LnxAdd-Nostrip-Bin
383LnxAdd-Nostrip-Bin_INST = $(VBOX_LNX_ADD_INST_BIN_DIR)
384LnxAdd-Nostrip-Bin_INSTTYPE = stage
385LnxAdd-Nostrip-Bin_EXEC_SOURCES = \
386 $(VBOX_REL_X11_ADD_INST)98vboxadd-xclient=>VBoxClient-all
387
388
389#
390# And the init scripts
391#
392INSTALLS += LnxAdd-init-scripts
393LnxAdd-init-scripts_INST = $(INST_ADDITIONS)
394LnxAdd-init-scripts_EXEC_SOURCES = \
395 $(foreach i,$(VBOX_LNX_ADD_INIT), installer/$(i).sh=>$(i))
396
397
398# this file needs editing before it can be included in the generic installer.
399$(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh: \
400 $(VBOX_PATH_LNX_INST_SRC)run-inst.sh \
401 $(VBOX_VERSION_STAMP) | $$(dir $$@)
402 $(RM) -f -- $@
403 $(QUIET)$(SED) \
404 -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
405 -e "s;_SVNREV_;$(VBOX_SVN_REV);g" \
406 -e "s;_PACKAGE_NAME_;VirtualBox Guest Additions;g" \
407 -e "s;_PACKAGE_;VBoxGuestAdditions;g" \
408 -e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
409 -e "s;_USERNAME_;$(USERNAME);g" \
410 -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
411 -e "s;_UNINSTALL_SCRIPTS_;vboxadd-x11 vboxvfs vboxadd-timesync vboxadd-service vboxadd;g" \
412 --output $@ \
413 $<
414 $(QUIET)$(CHMOD) 0755 $@
415OTHER_CLEAN += \
416 $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh \
417 $(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh
418
419
420include $(FILE_KBUILD_SUB_FOOTER)
421
422
423# All the files that go into our archive
424VBOX_LNX_ADD_ARCH_FILES = \
425 $(lnx_add_inst-noexec_2_STAGE_TARGETS) \
426 $(lnx_add_inst-exec_2_STAGE_TARGETS) \
427 $(lnx_add_inst-license_2_STAGE_TARGETS) \
428 $(VBOX_LNX_ADD_INST_FILES) \
429 $(VBOX_LNX_ADD_INST_DIRS)
430
431#
432# .tar.bz2 for converting into .run
433#
434$(VBOX_LNX_ADD_ARCHIVE.$(KBUILD_TARGET_ARCH)): \
435 $(VBOX_LNX_ADD_ARCH_FILES) \
436 $(VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE) \
437 $(VBOX_VERSION_STAMP)
438 $(call MSG_L1,Packing $@)
439 $(QUIET)$(RM) -f -- $(wildcard $(dir $@)VBoxGuestAdditions-*r*.tar.bz2)
440 $(QUIET)$(MKDIR) -p $(@D)
441 $(QUIET)$(CHMOD) 0755 $(VBOX_LNX_ADD_ARCH_INST_DIRS)
442ifdef VBOX_USE_PBZIP2
443 $(QUIET)tar --dereference --owner 0 --group 0 -cRf $(patsubst %.bz2,%,$@) \
444 -C $(VBOX_LNX_ADD_INST_OUT_DIR) \
445 LICENSE bin init lib sbin share src \
446 $(if $(filter $(KBUILD_TYPE),debug),debug)
447 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
448else
449 $(QUIET)tar --dereference --owner 0 --group 0 --ignore-failed-read -cjRf $@ \
450 -C $(VBOX_LNX_ADD_INST_OUT_DIR) \
451 LICENSE bin init lib sbin share src \
452 $(if $(filter $(KBUILD_TYPE),debug),debug)
453endif
454 $(QUIET)$(CHMOD) 0644 $@
455
456
457#
458# .tar.bz2 containing the debug information
459#
460$(PATH_STAGE_BIN)/additions/VBoxGuestAdditions-dbg.tar.bz2: \
461 $(VBOX_LNX_ADD_DBG_FILES) \
462 $(VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE)
463 $(call MSG_L1,Packing $@)
464 $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
465 $(QUIET)$(MKDIR) -p $(@D)
466 $(QUIET)$(CHMOD) 0755 $(VBOX_LNX_ADD_DBG_DIRS)
467ifdef VBOX_USE_PBZIP2
468 $(QUIET)tar --dereference --owner 0 --group 0 -cRf $(patsubst %.bz2,%,$@) \
469 -C $(VBOX_LNX_ADD_INST_DBG_DIR) \
470 bin lib sbin
471 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
472else
473 $(QUIET)tar --dereference --owner 0 --group 0 --ignore-failed-read -cjRf $@ \
474 -C $(VBOX_LNX_ADD_INST_DBG_DIR) \
475 bin lib sbin
476endif
477 $(QUIET)$(CHMOD) 0644 $@
478
479
480#
481# Build the Linux Guest Additions self extracting installer.
482#
483# Note that $(PATH_SUB_CURRENT) was changed by subfooter.kmk above and
484# any references should be made via variables assigned a know value via := .
485#
486$(PATH_STAGE_BIN)/additions/VBoxLinuxAdditions.run: \
487 $(VBOX_LNX_ADD_ARCHIVES) \
488 $(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh \
489 $$(LnxAdd-scripts_2_STAGE_TARGETS) \
490 $(VBOX_VERSION_STAMP)
491 # Remove any archives left over from previous builds so that they don't
492 # end up in our installer as well.
493 $(QUIET)$(RM) -f $(foreach file, $(wildcard $(VBOX_LNX_ADD_INST_STAGE_DIR)$(VBOX_LNX_ADD_PACKAGE_NAME)-*.tar.bz2), $(file))
494 $(QUIET)$(foreach file, $(VBOX_LNX_ADD_ARCHIVES), \
495 $(CP) -f $(file) $(VBOX_LNX_ADD_INST_STAGE_DIR)$(subst -r$(VBOX_SVN_REV),,$(notdir $(file)))$(NLTAB) )
496 $(QUIET)$(VBOX_MAKESELF) --nocomp $(VBOX_LNX_ADD_INST_STAGE_DIR) $@ \
497 "VirtualBox $(VBOX_VERSION_STRING) Guest Additions for Linux" \
498 /bin/sh ./install.sh "\$$0 1> /dev/null"
499
500
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