VirtualBox

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

Last change on this file since 83563 was 82968, checked in by vboxsync, 5 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 16.4 KB
Line 
1# $Id: Makefile.kmk 82968 2020-02-04 10:35:17Z vboxsync $
2## @file
3# Makefile for the linux guest additions base directory.
4#
5
6#
7# Copyright (C) 2006-2020 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#
32# Globals
33#
34
35# Basic path components
36VBOX_LNX_ADD_PACKAGE_NAME := VBoxGuestAdditions
37VBOX_LNX_ADD_INST_OUT_DIR := $(PATH_TARGET)/Additions/Installer/linux/
38VBOX_LNX_ADD_INST_DBG_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)debug/
39VBOX_LNX_ADD_INST_STAGE_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)install/
40
41# Installation paths for binaries and files
42VBOX_LNX_ADD_INST_BIN_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)bin/
43VBOX_LNX_ADD_INST_SBIN_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)sbin/
44VBOX_LNX_ADD_INST_LIB_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)lib/
45VBOX_LNX_ADD_INST_OTHER_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)other/
46VBOX_LNX_ADD_INST_KMOD_DIR_BASE := $(VBOX_LNX_ADD_INST_OUT_DIR)src/
47# This is a symbolic link, so no trailing slash.
48VBOX_LNX_ADD_INST_KMOD_PATH := $(VBOX_LNX_ADD_INST_KMOD_DIR_BASE)vboxguest-$(VBOX_VERSION_STRING)
49VBOX_LNX_ADD_INST_INIT_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)init/
50
51VBOX_LNX_ADD_ARCH_INST_DIRS := \
52 $(VBOX_LNX_ADD_INST_OUT_DIR) \
53 $(VBOX_LNX_ADD_INST_BIN_DIR) \
54 $(VBOX_LNX_ADD_INST_SBIN_DIR) \
55 $(VBOX_LNX_ADD_INST_INIT_DIR)
56
57# Installation paths for debug symbols
58VBOX_LNX_ADD_DBG_BIN_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)bin/
59VBOX_LNX_ADD_DBG_SBIN_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)sbin/
60VBOX_LNX_ADD_DBG_LIB_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)lib/
61VBOX_LNX_ADD_DBG_OTHER_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)other/
62
63VBOX_LNX_ADD_DBG_DIRS := \
64 $(VBOX_LNX_ADD_DBG_BIN_DIR) \
65 $(VBOX_LNX_ADD_DBG_SBIN_DIR) \
66 $(VBOX_LNX_ADD_DBG_OTHER_DIR)
67
68# Script source directories
69VBOX_PATH_LNX_ADD_INST := $(PATH_SUB_CURRENT)/installer/
70VBOX_REL_LNX_ADD_INST := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_LNX_ADD_INST))
71VBOX_PATH_X11_ADD_INST := $(PATH_ROOT)/src/VBox/Additions/x11/Installer/
72VBOX_REL_X11_ADD_INST := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_X11_ADD_INST))
73VBOX_PATH_LNX_INST_SRC := $(PATH_ROOT)/src/VBox/Installer/linux/
74VBOX_REL_LNX_INST_SRC := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_LNX_INST_SRC))
75VBOX_PATH_LNX_HOST_DRV := $(PATH_ROOT)/src/VBox/HostDrivers/linux/
76VBOX_REL_LNX_HOST_DRV := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_LNX_HOST_DRV))
77
78# Unset this to speed up things during makefile hacking.
79VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT)
80
81
82#
83# Targets
84#
85VBOX_SELINUX_CMPLD := $(PATH_SUB_CURRENT)/selinux-fedora/vbox_x11.pp
86VBOX_LNX_ADD_ARCHIVE.x86 := $(PATH_OUT_BASE)/linux.x86/$(KBUILD_TYPE)/bin/additions/VBoxGuestAdditions-x86.tar.bz2
87VBOX_LNX_ADD_ARCHIVE.amd64 := $(PATH_OUT_BASE)/linux.amd64/$(KBUILD_TYPE)/bin/additions/VBoxGuestAdditions-amd64.tar.bz2
88ifndef VBOX_WITH_COMBINED_LINUX_GUEST_PACKAGE
89 VBOX_LNX_ADD_ARCHIVES := $(PATH_STAGE_BIN)/additions/VBoxGuestAdditions-$(KBUILD_TARGET_ARCH).tar.bz2
90else
91 VBOX_LNX_ADD_ARCHIVES := \
92 $(VBOX_LNX_ADD_ARCHIVE.x86) \
93 $(VBOX_LNX_ADD_ARCHIVE.amd64)
94endif
95BLDDIRS += \
96 $(VBOX_LNX_ADD_ARCH_INST_DIRS) \
97 $(VBOX_LNX_ADD_DBG_DIRS) \
98 $(VBOX_LNX_ADD_INST_STAGE_DIR)
99
100# Use VBOX_WITHOUT_LINUX_GUEST_PACKAGE to skip building the .run installer.
101# This will only take effect if you also use VBOX_WITHOUT_ADDITIONS_ISO.
102PACKING += \
103 $(if-expr !defined(VBOX_WITHOUT_LINUX_GUEST_PACKAGE), $(PATH_STAGE_BIN)/additions/VBoxLinuxAdditions.run,) \
104 $(VBOX_LNX_ADD_ARCHIVES) \
105 $(PATH_STAGE_BIN)/additions/VBoxGuestAdditions-dbg.tar.bz2
106OTHER_CLEAN += \
107 $(PACKING) \
108 $(VBOX_LNX_ADD_INST_KMOD_PATH) \
109 $(foreach file, $(VBOX_LNX_ADD_ARCHIVES), $(VBOX_LNX_ADD_INST_STAGE_DIR)$(subst -r$(VBOX_SVN_REV),,$(notdir $(file))))
110
111
112#
113# Files to install
114#
115VBOX_LNX_ADD_STRIP_BIN += \
116 VBoxControl \
117 VBoxClient
118
119VBOX_LNX_ADD_STRIP_SBIN += \
120 VBoxService \
121 $(if $(VBOX_WITH_LIGHTDM_GREETER),vbox-greeter)
122
123VBOX_LNX_ADD_STRIP_MOD = \
124 vboxmouse_drv_70.so \
125 vboxmouse_drv_71.so \
126 vboxmouse_drv_13.so \
127 vboxmouse_drv_14.so \
128 vboxmouse_drv_15.so \
129 vboxmouse_drv_16.so \
130 $(addsuffix .so,$(filter-out %_32,$(filter vboxvideo_drv_%,$(DLLS)))) \
131 $(if $(VBOX_WITH_PAM),pam_vbox.so,) \
132 mount.vboxsf
133
134VBOX_LNX_ADD_MOD = \
135 98vboxadd-xclient \
136 x11config.sh
137
138VBOX_LNX_ADD_STRIP_OBJ = \
139 vboxmouse_drv.o \
140 vboxvideo_drv.o
141
142VBOX_LNX_ADD_INIT = \
143 vboxadd \
144 vboxadd-service \
145 vboxadd-x11
146
147#
148# All the files that go into the archive
149#
150VBOX_LNX_ADD_INST_FILES := \
151 $(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)) \
152 $(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_BIN)) \
153 $(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)) \
154 $(addprefix $(VBOX_LNX_ADD_INST_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)) \
155 $(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_MOD)) \
156 $(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_MOD)) \
157 $(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_OBJ)) \
158 $(addprefix $(VBOX_LNX_ADD_INST_INIT_DIR),$(VBOX_LNX_ADD_INIT))
159
160VBOX_LNX_ADD_DBG_FILES := \
161 $(addprefix $(VBOX_LNX_ADD_DBG_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)) \
162 $(addprefix $(VBOX_LNX_ADD_DBG_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)) \
163 $(addprefix $(VBOX_LNX_ADD_DBG_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)) \
164 $(addprefix $(VBOX_LNX_ADD_DBG_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_MOD))
165
166ifdef VBOX_WITH_LIGHTDM_GREETER_PACKING
167VBOX_LNX_ADD_INST_FILES += \
168 $(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),vbox-greeter)
169endif
170
171# Cleanup of the installer directory files
172OTHER_CLEAN += $(VBOX_LNX_ADD_INST_FILES) $(VBOX_LNX_ADD_DBG_FILES)
173
174# pattern rules for copying the debug info from the VBOX_LNX_ADD_STRIP_* files to the installation directory
175$(addprefix $(VBOX_LNX_ADD_DBG_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)): \
176 $(VBOX_LNX_ADD_DBG_BIN_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
177 $(call MSG_TOOL,copydbg,$<,$@)
178 $(QUIET)objcopy --only-keep-debug $< $@
179
180$(addprefix $(VBOX_LNX_ADD_DBG_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)): \
181 $(VBOX_LNX_ADD_DBG_SBIN_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
182 $(call MSG_TOOL,copydbg,$<,$@)
183 $(QUIET)objcopy --only-keep-debug $< $@
184
185$(addprefix $(VBOX_LNX_ADD_DBG_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)): \
186 $(VBOX_LNX_ADD_DBG_LIB_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
187 $(call MSG_TOOL,copydbg,$<,$@)
188 $(QUIET)objcopy --only-keep-debug $< $@
189
190$(addprefix $(VBOX_LNX_ADD_DBG_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_MOD)): \
191 $(VBOX_LNX_ADD_DBG_OTHER_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
192 $(call MSG_TOOL,copydbg,$<,$@)
193 $(QUIET)objcopy --only-keep-debug $< $@
194
195# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_BIN files to the installation directory
196$(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)): \
197 $(VBOX_LNX_ADD_INST_BIN_DIR)% : $(PATH_STAGE_BIN)/additions/% \
198 $(VBOX_LNX_ADD_DBG_BIN_DIR)% \
199 | $$(dir $$@)
200 $(call MSG_INST_FILE,$<,$@)
201 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
202 $(QUIET)objcopy --add-gnu-debuglink=$(subst $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_DBG_BIN_DIR),$@) $@
203
204# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_SBIN files to the installation directory
205$(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),\
206 $(filter-out vbox-greeter,$(VBOX_LNX_ADD_STRIP_SBIN))): \
207 $(VBOX_LNX_ADD_INST_SBIN_DIR)% : $(PATH_STAGE_BIN)/additions/% \
208 $(VBOX_LNX_ADD_DBG_SBIN_DIR)% \
209 | $$(dir $$@)
210 $(call MSG_INST_FILE,$<,$@)
211 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
212 $(QUIET)objcopy --add-gnu-debuglink=$(subst $(VBOX_LNX_ADD_INST_SBIN_DIR),$(VBOX_LNX_ADD_DBG_SBIN_DIR),$@) $@
213
214# pattern rule for stripping and copying vbox-greeter to the installation directory
215$(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),vbox-greeter): \
216 $(VBOX_LNX_ADD_INST_SBIN_DIR)% : $(subst linux.amd64/release,linux.amd64/release/greeter,$(subst linux.x86/release,linux.x86/release/greeter,$(PATH_STAGE_BIN)))/additions/% \
217 | $$(dir $$@)
218 $(call MSG_INST_FILE,$<,$@)
219 $(QUIET)$(INSTALL) -m 0755 $< $@
220
221# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_LIB files to the installation directory
222$(addprefix $(VBOX_LNX_ADD_INST_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)): \
223 $(VBOX_LNX_ADD_INST_LIB_DIR)% : $(PATH_STAGE_BIN)/additions/% \
224 $(VBOX_LNX_ADD_DBG_LIB_DIR)% \
225 | $$(dir $$@)
226 $(call MSG_INST_FILE,$<,$@)
227 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
228 $(QUIET)objcopy --add-gnu-debuglink=$(subst $(VBOX_LNX_ADD_INST_LIB_DIR),$(VBOX_LNX_ADD_DBG_LIB_DIR),$@) $@
229
230# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_MOD files to the installation directory
231$(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_MOD)): \
232 $(VBOX_LNX_ADD_INST_OTHER_DIR)% : $(PATH_STAGE_BIN)/additions/% \
233 $(VBOX_LNX_ADD_DBG_OTHER_DIR)% \
234 | $$(dir $$@)
235 $(call MSG_INST_FILE,$<,$@)
236 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
237 $(QUIET)objcopy --add-gnu-debuglink=$(subst $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_DBG_OTHER_DIR),$@) $@
238
239# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_OBJ files to the installation directory
240$(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_OBJ)): \
241 $(VBOX_LNX_ADD_INST_OTHER_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
242 $(call MSG_INST_FILE,$<,$@)
243ifeq ($(VBOX_DO_STRIP),)
244 $(QUIET)$(INSTALL) -m 0644 $< $@
245else # strip to temp file because of umask.
246 $(QUIET)objcopy --strip-unneeded -R .comment $< $@.tmp
247 $(QUIET)$(INSTALL) -m 0644 $@.tmp $@
248 $(QUIET)$(RM) -f -- $@.tmp
249endif
250
251include $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest
252VBOX_LNX_ADD_INST_FILES_VBOXGUEST=$(patsubst =>%,$(PATH_STAGE_BIN)/additions/src/vboxguest/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(FILES_VBOXGUEST_NOBIN)))))
253include $(PATH_ROOT)/src/VBox/Additions/linux/sharedfolders/files_vboxsf
254VBOX_LNX_ADD_INST_FILES_VBOXSF=$(patsubst =>%,$(PATH_STAGE_BIN)/additions/src/vboxsf/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(FILES_VBOXSF_NOBIN)))))
255include $(PATH_ROOT)/src/VBox/Additions/linux/drm/files_vboxvideo_drv
256VBOX_LNX_ADD_INST_FILES_VBOXVIDEO=$(patsubst =>%,$(PATH_STAGE_BIN)/additions/src/vboxvideo/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(FILES_VBOXVIDEO_DRM_NOBIN)))))
257
258# special rule for the kernel modules
259$(VBOX_LNX_ADD_INST_KMOD_DIR_BASE): \
260 $(PATH_STAGE_BIN)/additions/src/ \
261 $(PATH_ROOT)/Version.kmk \
262 | $(dir $@)
263 $(call MSG_INST_SYM,$<,$@)
264 $(QUIET)$(RM) -Rf $@
265 $(QUIET)$(MKDIR) $@
266 $(QUIET)$(LN_SYMLINK) $< $(VBOX_LNX_ADD_INST_KMOD_PATH)
267
268INSTALLS += GuestDrivers-src
269GuestDrivers-src_INST = $(INST_ADDITIONS)src/
270GuestDrivers-src_MODE = a+r,u+w
271GuestDrivers-src_SOURCES = Makefile
272
273
274INSTALLS += lnx_add_inst-exec
275lnx_add_inst-exec_INST = $(VBOX_LNX_ADD_INST_OTHER_DIR)
276lnx_add_inst-exec_INSTTYPE = stage
277lnx_add_inst-exec_EXEC_SOURCES = \
278 $(VBOX_REL_X11_ADD_INST)98vboxadd-xclient \
279 $(VBOX_REL_X11_ADD_INST)x11config.sh \
280 $(VBOX_REL_LNX_INST_SRC)check_module_dependencies.sh
281
282
283INSTALLS += lnx_add_inst-noexec
284lnx_add_inst-noexec_INST = $(VBOX_LNX_ADD_INST_OTHER_DIR)
285lnx_add_inst-noexec_INSTTYPE = stage
286lnx_add_inst-noexec_SOURCES = \
287 $(VBOX_REL_X11_ADD_INST)vboxclient.desktop \
288 $(VBOX_REL_X11_ADD_INST)vboxvideo.ids \
289 $(if $(VBOX_WITH_LIGHTDM_GREETER_PACKING),lightdm-greeter/vbox-greeter.desktop,) \
290 selinux-fedora/vbox_x11.pp \
291 selinux-fedora/vbox_accel.pp
292
293INSTALLS += lnx_add_inst-license
294lnx_add_inst-license_INST = $(VBOX_LNX_ADD_INST_OUT_DIR)
295lnx_add_inst-license_INSTTYPE = stage
296lnx_add_inst-license_SOURCES = \
297 $(VBOX_BRAND_LICENSE_TXT)=>LICENSE
298
299
300#
301# We need our routines.sh and the uninstallation scripts in the staging
302# directory too
303#
304INSTALLS += LnxAdd-scripts
305LnxAdd-scripts_INST = $(VBOX_LNX_ADD_INST_STAGE_DIR)
306LnxAdd-scripts_INSTTYPE = stage
307LnxAdd-scripts_SOURCES = \
308 $(VBOX_REL_LNX_ADD_INST)deffiles
309LnxAdd-scripts_EXEC_SOURCES = \
310 $(VBOX_REL_LNX_INST_SRC)routines.sh
311
312ifdef VBOX_WITH_LIGHTDM_GREETER_PACKING
313 LnxAdd-scripts_EXEC_SOURCES += \
314 $(VBOX_REL_LNX_ADD_INST)module-autologon.sh=>installer/module-autologon
315endif
316
317
318#
319# And the init scripts
320#
321INSTALLS += LnxAdd-init-scripts
322LnxAdd-init-scripts_INST = $(VBOX_LNX_ADD_INST_INIT_DIR)
323LnxAdd-init-scripts_INSTTYPE = stage
324LnxAdd-init-scripts_EXEC_SOURCES = \
325 $(foreach i,$(VBOX_LNX_ADD_INIT), installer/$(i).sh=>$(i))
326
327# this file needs editing before it can be included in the generic installer.
328$(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh: \
329 $(VBOX_PATH_LNX_ADD_INST)install.sh.in \
330 $(VBOX_VERSION_STAMP) | $$(dir $$@)
331 $(RM) -f -- $@
332 $(QUIET)$(SED) \
333 -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
334 -e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
335 -e "s;_USERNAME_;$(USERNAME);g" \
336 --output $@ \
337 $<
338 $(QUIET)$(CHMOD) 0755 $@
339OTHER_CLEAN += \
340 $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh \
341 $(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh
342
343
344#
345# Build test for the Guest Additions kernel modules (kmk check).
346#
347$(evalcall2 VBOX_LINUX_KMOD_TEST_BUILD_RULE_FN,vboxvideo-src,,)
348
349
350include $(FILE_KBUILD_SUB_FOOTER)
351
352
353# All the files that go into our archive
354VBOX_LNX_ADD_ARCH_FILES = \
355 $(lnx_add_inst-noexec_2_STAGE_TARGETS) \
356 $(lnx_add_inst-exec_2_STAGE_TARGETS) \
357 $(lnx_add_inst-license_2_STAGE_TARGETS) \
358 $(VBOX_LNX_ADD_INST_FILES) \
359 $(VBOX_LNX_ADD_INST_KMOD_DIR_BASE)
360
361VBOX_LNX_ADD_INST_ARCH_DEPS := \
362 $(VBOX_LNX_ADD_ARCH_FILES) \
363 $(VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE) \
364 $(VBOX_VERSION_STAMP) \
365 $(VBOX_LNX_ADD_INST_FILES_VBOXGUEST) \
366 $(VBOX_LNX_ADD_INST_FILES_VBOXSF) \
367 $(VBOX_LNX_ADD_INST_FILES_VBOXVIDEO)
368
369#
370# .tar.bz2 for converting into .run
371#
372$(VBOX_LNX_ADD_ARCHIVE.$(KBUILD_TARGET_ARCH)): \
373 $(VBOX_LNX_ADD_INST_ARCH_DEPS)
374 $(call MSG_L1,Packing $@)
375 $(QUIET)$(RM) -f -- $(wildcard $(dir $@)VBoxGuestAdditions-*r*.tar.bz2)
376 $(QUIET)$(MKDIR) -p $(@D)
377 $(QUIET)$(CHMOD) 0755 $(VBOX_LNX_ADD_ARCH_INST_DIRS)
378ifdef VBOX_USE_PBZIP2
379 $(QUIET)tar --dereference --owner 0 --group 0 -cRf $(patsubst %.bz2,%,$@) \
380 -C $(VBOX_LNX_ADD_INST_OUT_DIR) \
381 LICENSE bin init lib other sbin src \
382 $(if $(filter $(KBUILD_TYPE),debug),debug)
383 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
384else
385 $(QUIET)tar --dereference --owner 0 --group 0 --ignore-failed-read -cjRf $@ \
386 -C $(VBOX_LNX_ADD_INST_OUT_DIR) \
387 LICENSE bin init lib other sbin src \
388 $(if $(filter $(KBUILD_TYPE),debug),debug)
389endif
390 $(QUIET)$(CHMOD) 0644 $@
391
392
393#
394# .tar.bz2 containing the debug information
395#
396$(PATH_STAGE_BIN)/additions/VBoxGuestAdditions-dbg.tar.bz2: \
397 $(VBOX_LNX_ADD_DBG_FILES) \
398 $(VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE)
399 $(call MSG_L1,Packing $@)
400 $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
401 $(QUIET)$(MKDIR) -p $(@D)
402 $(QUIET)$(CHMOD) 0755 $(VBOX_LNX_ADD_DBG_DIRS)
403ifdef VBOX_USE_PBZIP2
404 $(QUIET)tar --dereference --owner 0 --group 0 -cRf $(patsubst %.bz2,%,$@) \
405 -C $(VBOX_LNX_ADD_INST_DBG_DIR) \
406 bin lib sbin
407 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
408else
409 $(QUIET)tar --dereference --owner 0 --group 0 --ignore-failed-read -cjRf $@ \
410 -C $(VBOX_LNX_ADD_INST_DBG_DIR) \
411 bin lib sbin
412endif
413 $(QUIET)$(CHMOD) 0644 $@
414
415
416#
417# Build the Linux Guest Additions self extracting installer.
418#
419# Note that $(PATH_SUB_CURRENT) was changed by subfooter.kmk above and
420# any references should be made via variables assigned a know value via := .
421#
422$(PATH_STAGE_BIN)/additions/VBoxLinuxAdditions.run: \
423 $(VBOX_LNX_ADD_ARCHIVES) \
424 $(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh \
425 $$(LnxAdd-scripts_2_STAGE_TARGETS) \
426 $(VBOX_VERSION_STAMP)
427 # Remove any archives left over from previous builds so that they don't
428 # end up in our installer as well.
429 $(QUIET)$(RM) -f $(foreach file, $(wildcard $(VBOX_LNX_ADD_INST_STAGE_DIR)$(VBOX_LNX_ADD_PACKAGE_NAME)-*.tar.bz2), $(file))
430 $(QUIET)$(foreach file, $(VBOX_LNX_ADD_ARCHIVES), \
431 $(CP) -f $(file) $(VBOX_LNX_ADD_INST_STAGE_DIR)$(subst -r$(VBOX_SVN_REV),,$(notdir $(file)))$(NLTAB) )
432 $(QUIET)$(VBOX_MAKESELF) --nocomp $(VBOX_LNX_ADD_INST_STAGE_DIR) $@ \
433 "VirtualBox $(VBOX_VERSION_STRING) Guest Additions for Linux" \
434 /bin/sh ./install.sh "\$$0"
435
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