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