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 |
|
---|
18 | SUB_DEPTH = ../../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 | #
|
---|
22 | # Include sub-makefiles.
|
---|
23 | #
|
---|
24 | include $(PATH_SUB_CURRENT)/sharedfolders/Makefile.kmk
|
---|
25 | include $(PATH_SUB_CURRENT)/drm/Makefile.kmk
|
---|
26 | ifdef VBOX_WITH_LIGHTDM_GREETER
|
---|
27 | include $(PATH_SUB_CURRENT)/lightdm-greeter/Makefile.kmk
|
---|
28 | endif
|
---|
29 |
|
---|
30 |
|
---|
31 | #
|
---|
32 | # Globals
|
---|
33 | #
|
---|
34 |
|
---|
35 | # Basic path components
|
---|
36 | VBOX_LNX_ADD_PACKAGE_NAME := VBoxGuestAdditions
|
---|
37 | VBOX_LNX_ADD_INST_OUT_DIR := $(PATH_TARGET)/Additions/Installer/linux/
|
---|
38 | VBOX_LNX_ADD_INST_DBG_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)debug/
|
---|
39 | VBOX_LNX_ADD_INST_STAGE_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)install/
|
---|
40 |
|
---|
41 | # Installation paths for binaries and files
|
---|
42 | VBOX_LNX_ADD_INST_BIN_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)bin/
|
---|
43 | VBOX_LNX_ADD_INST_SBIN_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)sbin/
|
---|
44 | VBOX_LNX_ADD_INST_LIB_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)lib/
|
---|
45 | VBOX_LNX_ADD_INST_OTHER_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)other/
|
---|
46 | VBOX_LNX_ADD_INST_KMOD_DIR_BASE := $(VBOX_LNX_ADD_INST_OUT_DIR)src/
|
---|
47 | # This is a symbolic link, so no trailing slash.
|
---|
48 | VBOX_LNX_ADD_INST_KMOD_PATH := $(VBOX_LNX_ADD_INST_KMOD_DIR_BASE)vboxguest-$(VBOX_VERSION_STRING)
|
---|
49 | VBOX_LNX_ADD_INST_INIT_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)init/
|
---|
50 |
|
---|
51 | VBOX_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
|
---|
58 | VBOX_LNX_ADD_DBG_BIN_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)bin/
|
---|
59 | VBOX_LNX_ADD_DBG_SBIN_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)sbin/
|
---|
60 | VBOX_LNX_ADD_DBG_LIB_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)lib/
|
---|
61 | VBOX_LNX_ADD_DBG_OTHER_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)other/
|
---|
62 |
|
---|
63 | VBOX_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
|
---|
69 | VBOX_PATH_LNX_ADD_INST := $(PATH_SUB_CURRENT)/installer/
|
---|
70 | VBOX_REL_LNX_ADD_INST := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_LNX_ADD_INST))
|
---|
71 | VBOX_PATH_X11_ADD_INST := $(PATH_ROOT)/src/VBox/Additions/x11/Installer/
|
---|
72 | VBOX_REL_X11_ADD_INST := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_X11_ADD_INST))
|
---|
73 | VBOX_PATH_LNX_INST_SRC := $(PATH_ROOT)/src/VBox/Installer/linux/
|
---|
74 | VBOX_REL_LNX_INST_SRC := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_LNX_INST_SRC))
|
---|
75 | VBOX_PATH_LNX_HOST_DRV := $(PATH_ROOT)/src/VBox/HostDrivers/linux/
|
---|
76 | VBOX_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.
|
---|
79 | VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT)
|
---|
80 |
|
---|
81 |
|
---|
82 | #
|
---|
83 | # Targets
|
---|
84 | #
|
---|
85 | VBOX_SELINUX_CMPLD := $(PATH_SUB_CURRENT)/selinux-fedora/vbox_x11.pp
|
---|
86 | VBOX_LNX_ADD_ARCHIVE.x86 := $(PATH_OUT_BASE)/linux.x86/$(KBUILD_TYPE)/bin/additions/VBoxGuestAdditions-x86.tar.bz2
|
---|
87 | VBOX_LNX_ADD_ARCHIVE.amd64 := $(PATH_OUT_BASE)/linux.amd64/$(KBUILD_TYPE)/bin/additions/VBoxGuestAdditions-amd64.tar.bz2
|
---|
88 | ifndef VBOX_WITH_COMBINED_LINUX_GUEST_PACKAGE
|
---|
89 | VBOX_LNX_ADD_ARCHIVES := $(PATH_STAGE_BIN)/additions/VBoxGuestAdditions-$(KBUILD_TARGET_ARCH).tar.bz2
|
---|
90 | else
|
---|
91 | VBOX_LNX_ADD_ARCHIVES := \
|
---|
92 | $(VBOX_LNX_ADD_ARCHIVE.x86) \
|
---|
93 | $(VBOX_LNX_ADD_ARCHIVE.amd64)
|
---|
94 | endif
|
---|
95 | BLDDIRS += \
|
---|
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.
|
---|
102 | PACKING += \
|
---|
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
|
---|
106 | OTHER_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 | #
|
---|
115 | VBOX_LNX_ADD_STRIP_BIN += \
|
---|
116 | VBoxControl \
|
---|
117 | VBoxDRMClient \
|
---|
118 | VBoxClient
|
---|
119 |
|
---|
120 | VBOX_LNX_ADD_STRIP_SBIN += \
|
---|
121 | VBoxService \
|
---|
122 | $(if $(VBOX_WITH_LIGHTDM_GREETER),vbox-greeter)
|
---|
123 |
|
---|
124 | VBOX_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 |
|
---|
135 | VBOX_LNX_ADD_MOD = \
|
---|
136 | 98vboxadd-xclient \
|
---|
137 | x11config.sh
|
---|
138 |
|
---|
139 | VBOX_LNX_ADD_STRIP_OBJ = \
|
---|
140 | vboxmouse_drv.o \
|
---|
141 | vboxvideo_drv.o
|
---|
142 |
|
---|
143 | VBOX_LNX_ADD_INIT = \
|
---|
144 | vboxadd \
|
---|
145 | vboxadd-service \
|
---|
146 | vboxadd-x11
|
---|
147 |
|
---|
148 | #
|
---|
149 | # All the files that go into the archive
|
---|
150 | #
|
---|
151 | VBOX_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 |
|
---|
161 | VBOX_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 |
|
---|
167 | ifdef VBOX_WITH_LIGHTDM_GREETER_PACKING
|
---|
168 | VBOX_LNX_ADD_INST_FILES += \
|
---|
169 | $(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),vbox-greeter)
|
---|
170 | endif
|
---|
171 |
|
---|
172 | # Cleanup of the installer directory files
|
---|
173 | OTHER_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,$<,$@)
|
---|
244 | ifeq ($(VBOX_DO_STRIP),)
|
---|
245 | $(QUIET)$(INSTALL) -m 0644 $< $@
|
---|
246 | else # 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]
|
---|
250 | endif
|
---|
251 |
|
---|
252 | include $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest
|
---|
253 | VBOX_LNX_ADD_INST_FILES_VBOXGUEST=$(patsubst =>%,$(PATH_STAGE_BIN)/additions/src/vboxguest/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(FILES_VBOXGUEST_NOBIN)))))
|
---|
254 | include $(PATH_ROOT)/src/VBox/Additions/linux/sharedfolders/files_vboxsf
|
---|
255 | VBOX_LNX_ADD_INST_FILES_VBOXSF=$(patsubst =>%,$(PATH_STAGE_BIN)/additions/src/vboxsf/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(FILES_VBOXSF_NOBIN)))))
|
---|
256 | include $(PATH_ROOT)/src/VBox/Additions/linux/drm/files_vboxvideo_drv
|
---|
257 | VBOX_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 |
|
---|
269 | INSTALLS += GuestDrivers-src
|
---|
270 | GuestDrivers-src_INST = $(INST_ADDITIONS)src/
|
---|
271 | GuestDrivers-src_MODE = a+r,u+w
|
---|
272 | GuestDrivers-src_SOURCES = Makefile
|
---|
273 |
|
---|
274 |
|
---|
275 | INSTALLS += lnx_add_inst-exec
|
---|
276 | lnx_add_inst-exec_INST = $(VBOX_LNX_ADD_INST_OTHER_DIR)
|
---|
277 | lnx_add_inst-exec_INSTTYPE = stage
|
---|
278 | lnx_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 |
|
---|
284 | INSTALLS += lnx_add_inst-noexec
|
---|
285 | lnx_add_inst-noexec_INST = $(VBOX_LNX_ADD_INST_OTHER_DIR)
|
---|
286 | lnx_add_inst-noexec_INSTTYPE = stage
|
---|
287 | lnx_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 |
|
---|
294 | INSTALLS += lnx_add_inst-license
|
---|
295 | lnx_add_inst-license_INST = $(VBOX_LNX_ADD_INST_OUT_DIR)
|
---|
296 | lnx_add_inst-license_INSTTYPE = stage
|
---|
297 | lnx_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 | #
|
---|
305 | INSTALLS += LnxAdd-scripts
|
---|
306 | LnxAdd-scripts_INST = $(VBOX_LNX_ADD_INST_STAGE_DIR)
|
---|
307 | LnxAdd-scripts_INSTTYPE = stage
|
---|
308 | LnxAdd-scripts_SOURCES = \
|
---|
309 | $(VBOX_REL_LNX_ADD_INST)deffiles
|
---|
310 | LnxAdd-scripts_EXEC_SOURCES = \
|
---|
311 | $(VBOX_REL_LNX_INST_SRC)routines.sh
|
---|
312 |
|
---|
313 | ifdef VBOX_WITH_LIGHTDM_GREETER_PACKING
|
---|
314 | LnxAdd-scripts_EXEC_SOURCES += \
|
---|
315 | $(VBOX_REL_LNX_ADD_INST)module-autologon.sh=>installer/module-autologon
|
---|
316 | endif
|
---|
317 |
|
---|
318 |
|
---|
319 | #
|
---|
320 | # And the init scripts
|
---|
321 | #
|
---|
322 | INSTALLS += LnxAdd-init-scripts
|
---|
323 | LnxAdd-init-scripts_INST = $(VBOX_LNX_ADD_INST_INIT_DIR)
|
---|
324 | LnxAdd-init-scripts_INSTTYPE = stage
|
---|
325 | LnxAdd-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 $@
|
---|
340 | OTHER_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 |
|
---|
351 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
352 |
|
---|
353 |
|
---|
354 | # All the files that go into our archive
|
---|
355 | VBOX_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 |
|
---|
362 | VBOX_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)
|
---|
379 | ifdef 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,%,$@)
|
---|
385 | else
|
---|
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)
|
---|
390 | endif
|
---|
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)
|
---|
404 | ifdef 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,%,$@)
|
---|
409 | else
|
---|
410 | $(QUIET)tar --dereference --owner 0 --group 0 --ignore-failed-read -cjRf $@ \
|
---|
411 | -C $(VBOX_LNX_ADD_INST_DBG_DIR) \
|
---|
412 | bin lib sbin
|
---|
413 | endif
|
---|
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 |
|
---|