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