VirtualBox

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

Last change on this file since 86708 was 84561, checked in by vboxsync, 5 years ago

bugref:9637. Adding the crm client to GA installation.

  • 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 84561 2020-05-27 13:33:38Z 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 VBoxDRMClient \
118 VBoxClient
119
120VBOX_LNX_ADD_STRIP_SBIN += \
121 VBoxService \
122 $(if $(VBOX_WITH_LIGHTDM_GREETER),vbox-greeter)
123
124VBOX_LNX_ADD_STRIP_MOD = \
125 vboxmouse_drv_70.so \
126 vboxmouse_drv_71.so \
127 vboxmouse_drv_13.so \
128 vboxmouse_drv_14.so \
129 vboxmouse_drv_15.so \
130 vboxmouse_drv_16.so \
131 $(addsuffix .so,$(filter-out %_32,$(filter vboxvideo_drv_%,$(DLLS)))) \
132 $(if $(VBOX_WITH_PAM),pam_vbox.so,) \
133 mount.vboxsf
134
135VBOX_LNX_ADD_MOD = \
136 98vboxadd-xclient \
137 x11config.sh
138
139VBOX_LNX_ADD_STRIP_OBJ = \
140 vboxmouse_drv.o \
141 vboxvideo_drv.o
142
143VBOX_LNX_ADD_INIT = \
144 vboxadd \
145 vboxadd-service \
146 vboxadd-x11
147
148#
149# All the files that go into the archive
150#
151VBOX_LNX_ADD_INST_FILES := \
152 $(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)) \
153 $(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_BIN)) \
154 $(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)) \
155 $(addprefix $(VBOX_LNX_ADD_INST_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)) \
156 $(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_MOD)) \
157 $(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_MOD)) \
158 $(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_OBJ)) \
159 $(addprefix $(VBOX_LNX_ADD_INST_INIT_DIR),$(VBOX_LNX_ADD_INIT))
160
161VBOX_LNX_ADD_DBG_FILES := \
162 $(addprefix $(VBOX_LNX_ADD_DBG_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)) \
163 $(addprefix $(VBOX_LNX_ADD_DBG_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)) \
164 $(addprefix $(VBOX_LNX_ADD_DBG_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)) \
165 $(addprefix $(VBOX_LNX_ADD_DBG_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_MOD))
166
167ifdef VBOX_WITH_LIGHTDM_GREETER_PACKING
168VBOX_LNX_ADD_INST_FILES += \
169 $(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),vbox-greeter)
170endif
171
172# Cleanup of the installer directory files
173OTHER_CLEAN += $(VBOX_LNX_ADD_INST_FILES) $(VBOX_LNX_ADD_DBG_FILES)
174
175# pattern rules for copying the debug info from the VBOX_LNX_ADD_STRIP_* files to the installation directory
176$(addprefix $(VBOX_LNX_ADD_DBG_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)): \
177 $(VBOX_LNX_ADD_DBG_BIN_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
178 $(call MSG_TOOL,copydbg,$<,$@)
179 $(QUIET)objcopy --only-keep-debug $< $@
180
181$(addprefix $(VBOX_LNX_ADD_DBG_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)): \
182 $(VBOX_LNX_ADD_DBG_SBIN_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
183 $(call MSG_TOOL,copydbg,$<,$@)
184 $(QUIET)objcopy --only-keep-debug $< $@
185
186$(addprefix $(VBOX_LNX_ADD_DBG_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)): \
187 $(VBOX_LNX_ADD_DBG_LIB_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
188 $(call MSG_TOOL,copydbg,$<,$@)
189 $(QUIET)objcopy --only-keep-debug $< $@
190
191$(addprefix $(VBOX_LNX_ADD_DBG_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_MOD)): \
192 $(VBOX_LNX_ADD_DBG_OTHER_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
193 $(call MSG_TOOL,copydbg,$<,$@)
194 $(QUIET)objcopy --only-keep-debug $< $@
195
196# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_BIN files to the installation directory
197$(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)): \
198 $(VBOX_LNX_ADD_INST_BIN_DIR)% : $(PATH_STAGE_BIN)/additions/% \
199 $(VBOX_LNX_ADD_DBG_BIN_DIR)% \
200 | $$(dir $$@)
201 $(call MSG_INST_FILE,$<,$@)
202 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
203 $(QUIET)objcopy --add-gnu-debuglink=$(subst $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_DBG_BIN_DIR),$@) $@
204
205# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_SBIN files to the installation directory
206$(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),\
207 $(filter-out vbox-greeter,$(VBOX_LNX_ADD_STRIP_SBIN))): \
208 $(VBOX_LNX_ADD_INST_SBIN_DIR)% : $(PATH_STAGE_BIN)/additions/% \
209 $(VBOX_LNX_ADD_DBG_SBIN_DIR)% \
210 | $$(dir $$@)
211 $(call MSG_INST_FILE,$<,$@)
212 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
213 $(QUIET)objcopy --add-gnu-debuglink=$(subst $(VBOX_LNX_ADD_INST_SBIN_DIR),$(VBOX_LNX_ADD_DBG_SBIN_DIR),$@) $@
214
215# pattern rule for stripping and copying vbox-greeter to the installation directory
216$(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),vbox-greeter): \
217 $(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/% \
218 | $$(dir $$@)
219 $(call MSG_INST_FILE,$<,$@)
220 $(QUIET)$(INSTALL) -m 0755 $< $@
221
222# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_LIB files to the installation directory
223$(addprefix $(VBOX_LNX_ADD_INST_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)): \
224 $(VBOX_LNX_ADD_INST_LIB_DIR)% : $(PATH_STAGE_BIN)/additions/% \
225 $(VBOX_LNX_ADD_DBG_LIB_DIR)% \
226 | $$(dir $$@)
227 $(call MSG_INST_FILE,$<,$@)
228 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
229 $(QUIET)objcopy --add-gnu-debuglink=$(subst $(VBOX_LNX_ADD_INST_LIB_DIR),$(VBOX_LNX_ADD_DBG_LIB_DIR),$@) $@
230
231# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_MOD files to the installation directory
232$(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_MOD)): \
233 $(VBOX_LNX_ADD_INST_OTHER_DIR)% : $(PATH_STAGE_BIN)/additions/% \
234 $(VBOX_LNX_ADD_DBG_OTHER_DIR)% \
235 | $$(dir $$@)
236 $(call MSG_INST_FILE,$<,$@)
237 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
238 $(QUIET)objcopy --add-gnu-debuglink=$(subst $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_DBG_OTHER_DIR),$@) $@
239
240# pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_OBJ files to the installation directory
241$(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_OBJ)): \
242 $(VBOX_LNX_ADD_INST_OTHER_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
243 $(call MSG_INST_FILE,$<,$@)
244ifeq ($(VBOX_DO_STRIP),)
245 $(QUIET)$(INSTALL) -m 0644 $< $@
246else # strip to temp file because of umask.
247 $(QUIET)objcopy --strip-unneeded -R .comment $< [email protected]
248 $(QUIET)$(INSTALL) -m 0644 [email protected] $@
249 $(QUIET)$(RM) -f -- [email protected]
250endif
251
252include $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest
253VBOX_LNX_ADD_INST_FILES_VBOXGUEST=$(patsubst =>%,$(PATH_STAGE_BIN)/additions/src/vboxguest/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(FILES_VBOXGUEST_NOBIN)))))
254include $(PATH_ROOT)/src/VBox/Additions/linux/sharedfolders/files_vboxsf
255VBOX_LNX_ADD_INST_FILES_VBOXSF=$(patsubst =>%,$(PATH_STAGE_BIN)/additions/src/vboxsf/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(FILES_VBOXSF_NOBIN)))))
256include $(PATH_ROOT)/src/VBox/Additions/linux/drm/files_vboxvideo_drv
257VBOX_LNX_ADD_INST_FILES_VBOXVIDEO=$(patsubst =>%,$(PATH_STAGE_BIN)/additions/src/vboxvideo/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(FILES_VBOXVIDEO_DRM_NOBIN)))))
258
259# special rule for the kernel modules
260$(VBOX_LNX_ADD_INST_KMOD_DIR_BASE): \
261 $(PATH_STAGE_BIN)/additions/src/ \
262 $(PATH_ROOT)/Version.kmk \
263 | $(dir $@)
264 $(call MSG_INST_SYM,$<,$@)
265 $(QUIET)$(RM) -Rf $@
266 $(QUIET)$(MKDIR) $@
267 $(QUIET)$(LN_SYMLINK) $< $(VBOX_LNX_ADD_INST_KMOD_PATH)
268
269INSTALLS += GuestDrivers-src
270GuestDrivers-src_INST = $(INST_ADDITIONS)src/
271GuestDrivers-src_MODE = a+r,u+w
272GuestDrivers-src_SOURCES = Makefile
273
274
275INSTALLS += lnx_add_inst-exec
276lnx_add_inst-exec_INST = $(VBOX_LNX_ADD_INST_OTHER_DIR)
277lnx_add_inst-exec_INSTTYPE = stage
278lnx_add_inst-exec_EXEC_SOURCES = \
279 $(VBOX_REL_X11_ADD_INST)98vboxadd-xclient \
280 $(VBOX_REL_X11_ADD_INST)x11config.sh \
281 $(VBOX_REL_LNX_INST_SRC)check_module_dependencies.sh
282
283
284INSTALLS += lnx_add_inst-noexec
285lnx_add_inst-noexec_INST = $(VBOX_LNX_ADD_INST_OTHER_DIR)
286lnx_add_inst-noexec_INSTTYPE = stage
287lnx_add_inst-noexec_SOURCES = \
288 $(VBOX_REL_X11_ADD_INST)vboxclient.desktop \
289 $(VBOX_REL_X11_ADD_INST)vboxvideo.ids \
290 $(if $(VBOX_WITH_LIGHTDM_GREETER_PACKING),lightdm-greeter/vbox-greeter.desktop,) \
291 selinux-fedora/vbox_x11.pp \
292 selinux-fedora/vbox_accel.pp
293
294INSTALLS += lnx_add_inst-license
295lnx_add_inst-license_INST = $(VBOX_LNX_ADD_INST_OUT_DIR)
296lnx_add_inst-license_INSTTYPE = stage
297lnx_add_inst-license_SOURCES = \
298 $(VBOX_BRAND_LICENSE_TXT)=>LICENSE
299
300
301#
302# We need our routines.sh and the uninstallation scripts in the staging
303# directory too
304#
305INSTALLS += LnxAdd-scripts
306LnxAdd-scripts_INST = $(VBOX_LNX_ADD_INST_STAGE_DIR)
307LnxAdd-scripts_INSTTYPE = stage
308LnxAdd-scripts_SOURCES = \
309 $(VBOX_REL_LNX_ADD_INST)deffiles
310LnxAdd-scripts_EXEC_SOURCES = \
311 $(VBOX_REL_LNX_INST_SRC)routines.sh
312
313ifdef VBOX_WITH_LIGHTDM_GREETER_PACKING
314 LnxAdd-scripts_EXEC_SOURCES += \
315 $(VBOX_REL_LNX_ADD_INST)module-autologon.sh=>installer/module-autologon
316endif
317
318
319#
320# And the init scripts
321#
322INSTALLS += LnxAdd-init-scripts
323LnxAdd-init-scripts_INST = $(VBOX_LNX_ADD_INST_INIT_DIR)
324LnxAdd-init-scripts_INSTTYPE = stage
325LnxAdd-init-scripts_EXEC_SOURCES = \
326 $(foreach i,$(VBOX_LNX_ADD_INIT), installer/$(i).sh=>$(i))
327
328# this file needs editing before it can be included in the generic installer.
329$(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh: \
330 $(VBOX_PATH_LNX_ADD_INST)install.sh.in \
331 $(VBOX_VERSION_STAMP) | $$(dir $$@)
332 $(RM) -f -- $@
333 $(QUIET)$(SED) \
334 -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
335 -e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
336 -e "s;_USERNAME_;$(USERNAME);g" \
337 --output $@ \
338 $<
339 $(QUIET)$(CHMOD) 0755 $@
340OTHER_CLEAN += \
341 $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh \
342 $(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh
343
344
345#
346# Build test for the Guest Additions kernel modules (kmk check).
347#
348$(evalcall2 VBOX_LINUX_KMOD_TEST_BUILD_RULE_FN,vboxvideo-src,,)
349
350
351include $(FILE_KBUILD_SUB_FOOTER)
352
353
354# All the files that go into our archive
355VBOX_LNX_ADD_ARCH_FILES = \
356 $(lnx_add_inst-noexec_2_STAGE_TARGETS) \
357 $(lnx_add_inst-exec_2_STAGE_TARGETS) \
358 $(lnx_add_inst-license_2_STAGE_TARGETS) \
359 $(VBOX_LNX_ADD_INST_FILES) \
360 $(VBOX_LNX_ADD_INST_KMOD_DIR_BASE)
361
362VBOX_LNX_ADD_INST_ARCH_DEPS := \
363 $(VBOX_LNX_ADD_ARCH_FILES) \
364 $(VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE) \
365 $(VBOX_VERSION_STAMP) \
366 $(VBOX_LNX_ADD_INST_FILES_VBOXGUEST) \
367 $(VBOX_LNX_ADD_INST_FILES_VBOXSF) \
368 $(VBOX_LNX_ADD_INST_FILES_VBOXVIDEO)
369
370#
371# .tar.bz2 for converting into .run
372#
373$(VBOX_LNX_ADD_ARCHIVE.$(KBUILD_TARGET_ARCH)): \
374 $(VBOX_LNX_ADD_INST_ARCH_DEPS)
375 $(call MSG_L1,Packing $@)
376 $(QUIET)$(RM) -f -- $(wildcard $(dir $@)VBoxGuestAdditions-*r*.tar.bz2)
377 $(QUIET)$(MKDIR) -p $(@D)
378 $(QUIET)$(CHMOD) 0755 $(VBOX_LNX_ADD_ARCH_INST_DIRS)
379ifdef VBOX_USE_PBZIP2
380 $(QUIET)tar --dereference --owner 0 --group 0 -cRf $(patsubst %.bz2,%,$@) \
381 -C $(VBOX_LNX_ADD_INST_OUT_DIR) \
382 LICENSE bin init lib other sbin src \
383 $(if $(filter $(KBUILD_TYPE),debug),debug)
384 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
385else
386 $(QUIET)tar --dereference --owner 0 --group 0 --ignore-failed-read -cjRf $@ \
387 -C $(VBOX_LNX_ADD_INST_OUT_DIR) \
388 LICENSE bin init lib other sbin src \
389 $(if $(filter $(KBUILD_TYPE),debug),debug)
390endif
391 $(QUIET)$(CHMOD) 0644 $@
392
393
394#
395# .tar.bz2 containing the debug information
396#
397$(PATH_STAGE_BIN)/additions/VBoxGuestAdditions-dbg.tar.bz2: \
398 $(VBOX_LNX_ADD_DBG_FILES) \
399 $(VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE)
400 $(call MSG_L1,Packing $@)
401 $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
402 $(QUIET)$(MKDIR) -p $(@D)
403 $(QUIET)$(CHMOD) 0755 $(VBOX_LNX_ADD_DBG_DIRS)
404ifdef VBOX_USE_PBZIP2
405 $(QUIET)tar --dereference --owner 0 --group 0 -cRf $(patsubst %.bz2,%,$@) \
406 -C $(VBOX_LNX_ADD_INST_DBG_DIR) \
407 bin lib sbin
408 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
409else
410 $(QUIET)tar --dereference --owner 0 --group 0 --ignore-failed-read -cjRf $@ \
411 -C $(VBOX_LNX_ADD_INST_DBG_DIR) \
412 bin lib sbin
413endif
414 $(QUIET)$(CHMOD) 0644 $@
415
416
417#
418# Build the Linux Guest Additions self extracting installer.
419#
420# Note that $(PATH_SUB_CURRENT) was changed by subfooter.kmk above and
421# any references should be made via variables assigned a know value via := .
422#
423$(PATH_STAGE_BIN)/additions/VBoxLinuxAdditions.run: \
424 $(VBOX_LNX_ADD_ARCHIVES) \
425 $(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh \
426 $$(LnxAdd-scripts_2_STAGE_TARGETS) \
427 $(VBOX_VERSION_STAMP)
428 # Remove any archives left over from previous builds so that they don't
429 # end up in our installer as well.
430 $(QUIET)$(RM) -f $(foreach file, $(wildcard $(VBOX_LNX_ADD_INST_STAGE_DIR)$(VBOX_LNX_ADD_PACKAGE_NAME)-*.tar.bz2), $(file))
431 $(QUIET)$(foreach file, $(VBOX_LNX_ADD_ARCHIVES), \
432 $(CP) -f $(file) $(VBOX_LNX_ADD_INST_STAGE_DIR)$(subst -r$(VBOX_SVN_REV),,$(notdir $(file)))$(NLTAB) )
433 $(QUIET)$(VBOX_MAKESELF) --nocomp $(VBOX_LNX_ADD_INST_STAGE_DIR) $@ \
434 "VirtualBox $(VBOX_VERSION_STRING) Guest Additions for Linux" \
435 /bin/sh ./install.sh "\$$0"
436
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