1 | # $Id: Makefile.kmk 76553 2019-01-01 01:45:53Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the linux guest additions base directory.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2019 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 | $(if $(VBOX_WITH_CROGL),$(VBOX_LNX_ADD_INST_LIB_DIR),) \
|
---|
56 | $(VBOX_LNX_ADD_INST_INIT_DIR)
|
---|
57 |
|
---|
58 | # Installation paths for debug symbols
|
---|
59 | VBOX_LNX_ADD_DBG_BIN_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)bin/
|
---|
60 | VBOX_LNX_ADD_DBG_SBIN_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)sbin/
|
---|
61 | VBOX_LNX_ADD_DBG_LIB_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)lib/
|
---|
62 | VBOX_LNX_ADD_DBG_OTHER_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)other/
|
---|
63 |
|
---|
64 | VBOX_LNX_ADD_DBG_DIRS := \
|
---|
65 | $(VBOX_LNX_ADD_DBG_BIN_DIR) \
|
---|
66 | $(VBOX_LNX_ADD_DBG_SBIN_DIR) \
|
---|
67 | $(if $(VBOX_WITH_CROGL),$(VBOX_LNX_ADD_DBG_LIB_DIR),) \
|
---|
68 | $(VBOX_LNX_ADD_DBG_OTHER_DIR)
|
---|
69 |
|
---|
70 | # Script source directories
|
---|
71 | VBOX_PATH_LNX_ADD_INST := $(PATH_SUB_CURRENT)/installer/
|
---|
72 | VBOX_REL_LNX_ADD_INST := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_LNX_ADD_INST))
|
---|
73 | VBOX_PATH_X11_ADD_INST := $(PATH_ROOT)/src/VBox/Additions/x11/Installer/
|
---|
74 | VBOX_REL_X11_ADD_INST := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_X11_ADD_INST))
|
---|
75 | VBOX_PATH_LNX_INST_SRC := $(PATH_ROOT)/src/VBox/Installer/linux/
|
---|
76 | VBOX_REL_LNX_INST_SRC := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_LNX_INST_SRC))
|
---|
77 | VBOX_PATH_LNX_HOST_DRV := $(PATH_ROOT)/src/VBox/HostDrivers/linux/
|
---|
78 | VBOX_REL_LNX_HOST_DRV := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_LNX_HOST_DRV))
|
---|
79 |
|
---|
80 | # Unset this to speed up things during makefile hacking.
|
---|
81 | VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT)
|
---|
82 |
|
---|
83 |
|
---|
84 | #
|
---|
85 | # Targets
|
---|
86 | #
|
---|
87 | VBOX_SELINUX_CMPLD := $(PATH_SUB_CURRENT)/selinux-fedora/vbox_x11.pp
|
---|
88 | VBOX_LNX_ADD_ARCHIVE.x86 := $(PATH_OUT_BASE)/linux.x86/$(KBUILD_TYPE)/bin/additions/VBoxGuestAdditions-x86.tar.bz2
|
---|
89 | VBOX_LNX_ADD_ARCHIVE.amd64 := $(PATH_OUT_BASE)/linux.amd64/$(KBUILD_TYPE)/bin/additions/VBoxGuestAdditions-amd64.tar.bz2
|
---|
90 | ifndef VBOX_WITH_COMBINED_LINUX_GUEST_PACKAGE
|
---|
91 | VBOX_LNX_ADD_ARCHIVES := $(PATH_STAGE_BIN)/additions/VBoxGuestAdditions-$(KBUILD_TARGET_ARCH).tar.bz2
|
---|
92 | else
|
---|
93 | VBOX_LNX_ADD_ARCHIVES := \
|
---|
94 | $(VBOX_LNX_ADD_ARCHIVE.x86) \
|
---|
95 | $(VBOX_LNX_ADD_ARCHIVE.amd64)
|
---|
96 | endif
|
---|
97 | BLDDIRS += \
|
---|
98 | $(VBOX_LNX_ADD_ARCH_INST_DIRS) \
|
---|
99 | $(VBOX_LNX_ADD_DBG_DIRS) \
|
---|
100 | $(VBOX_LNX_ADD_INST_STAGE_DIR)
|
---|
101 |
|
---|
102 | # Use VBOX_WITHOUT_LINUX_GUEST_PACKAGE to skip building the .run installer.
|
---|
103 | # This will only take effect if you also use VBOX_WITHOUT_ADDITIONS_ISO.
|
---|
104 | PACKING += \
|
---|
105 | $(if-expr !defined(VBOX_WITHOUT_LINUX_GUEST_PACKAGE), $(PATH_STAGE_BIN)/additions/VBoxLinuxAdditions.run,) \
|
---|
106 | $(VBOX_LNX_ADD_ARCHIVES) \
|
---|
107 | $(PATH_STAGE_BIN)/additions/VBoxGuestAdditions-dbg.tar.bz2
|
---|
108 | OTHER_CLEAN += \
|
---|
109 | $(PACKING) \
|
---|
110 | $(VBOX_LNX_ADD_INST_KMOD_PATH) \
|
---|
111 | $(foreach file, $(VBOX_LNX_ADD_ARCHIVES), $(VBOX_LNX_ADD_INST_STAGE_DIR)$(subst -r$(VBOX_SVN_REV),,$(notdir $(file))))
|
---|
112 |
|
---|
113 |
|
---|
114 | #
|
---|
115 | # Files to install
|
---|
116 | #
|
---|
117 | VBOX_LNX_ADD_STRIP_BIN += \
|
---|
118 | VBoxControl \
|
---|
119 | VBoxClient
|
---|
120 |
|
---|
121 | VBOX_LNX_ADD_STRIP_SBIN += \
|
---|
122 | VBoxService \
|
---|
123 | $(if $(VBOX_WITH_LIGHTDM_GREETER),vbox-greeter)
|
---|
124 |
|
---|
125 | ifdef VBOX_WITH_CROGL
|
---|
126 | VBOX_LNX_ADD_STRIP_LIB += \
|
---|
127 | VBoxOGLarrayspu.so \
|
---|
128 | VBoxOGLcrutil.so \
|
---|
129 | VBoxOGLerrorspu.so \
|
---|
130 | VBoxOGLfeedbackspu.so \
|
---|
131 | VBoxOGLpackspu.so \
|
---|
132 | VBoxOGLpassthroughspu.so \
|
---|
133 | VBoxOGL.so \
|
---|
134 | VBoxEGL.so
|
---|
135 | endif
|
---|
136 |
|
---|
137 | VBOX_LNX_ADD_STRIP_MOD = \
|
---|
138 | vboxmouse_drv_70.so \
|
---|
139 | vboxmouse_drv_71.so \
|
---|
140 | vboxmouse_drv_13.so \
|
---|
141 | vboxmouse_drv_14.so \
|
---|
142 | vboxmouse_drv_15.so \
|
---|
143 | vboxmouse_drv_16.so \
|
---|
144 | $(addsuffix .so,$(filter-out %_32,$(filter vboxvideo_drv_%,$(DLLS)))) \
|
---|
145 | $(if $(VBOX_WITH_PAM),pam_vbox.so,) \
|
---|
146 | mount.vboxsf
|
---|
147 |
|
---|
148 | VBOX_LNX_ADD_MOD = \
|
---|
149 | 98vboxadd-xclient \
|
---|
150 | x11config.sh
|
---|
151 |
|
---|
152 | VBOX_LNX_ADD_STRIP_OBJ = \
|
---|
153 | vboxmouse_drv.o \
|
---|
154 | vboxvideo_drv.o
|
---|
155 |
|
---|
156 | VBOX_LNX_ADD_INIT = \
|
---|
157 | vboxadd \
|
---|
158 | vboxadd-service \
|
---|
159 | vboxadd-x11
|
---|
160 |
|
---|
161 | #
|
---|
162 | # All the files that go into the archive
|
---|
163 | #
|
---|
164 | VBOX_LNX_ADD_INST_FILES := \
|
---|
165 | $(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)) \
|
---|
166 | $(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_BIN)) \
|
---|
167 | $(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)) \
|
---|
168 | $(addprefix $(VBOX_LNX_ADD_INST_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)) \
|
---|
169 | $(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_MOD)) \
|
---|
170 | $(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_MOD)) \
|
---|
171 | $(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_OBJ)) \
|
---|
172 | $(addprefix $(VBOX_LNX_ADD_INST_INIT_DIR),$(VBOX_LNX_ADD_INIT))
|
---|
173 |
|
---|
174 | VBOX_LNX_ADD_DBG_FILES := \
|
---|
175 | $(addprefix $(VBOX_LNX_ADD_DBG_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)) \
|
---|
176 | $(addprefix $(VBOX_LNX_ADD_DBG_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)) \
|
---|
177 | $(addprefix $(VBOX_LNX_ADD_DBG_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)) \
|
---|
178 | $(addprefix $(VBOX_LNX_ADD_DBG_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_MOD))
|
---|
179 |
|
---|
180 | ifdef VBOX_WITH_LIGHTDM_GREETER_PACKING
|
---|
181 | VBOX_LNX_ADD_INST_FILES += \
|
---|
182 | $(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),vbox-greeter)
|
---|
183 | endif
|
---|
184 |
|
---|
185 | # Cleanup of the installer directory files
|
---|
186 | OTHER_CLEAN += $(VBOX_LNX_ADD_INST_FILES) $(VBOX_LNX_ADD_DBG_FILES)
|
---|
187 |
|
---|
188 | # pattern rules for copying the debug info from the VBOX_LNX_ADD_STRIP_* files to the installation directory
|
---|
189 | $(addprefix $(VBOX_LNX_ADD_DBG_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)): \
|
---|
190 | $(VBOX_LNX_ADD_DBG_BIN_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
|
---|
191 | $(call MSG_TOOL,copydbg,$<,$@)
|
---|
192 | $(QUIET)objcopy --only-keep-debug $< $@
|
---|
193 |
|
---|
194 | $(addprefix $(VBOX_LNX_ADD_DBG_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)): \
|
---|
195 | $(VBOX_LNX_ADD_DBG_SBIN_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
|
---|
196 | $(call MSG_TOOL,copydbg,$<,$@)
|
---|
197 | $(QUIET)objcopy --only-keep-debug $< $@
|
---|
198 |
|
---|
199 | $(addprefix $(VBOX_LNX_ADD_DBG_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)): \
|
---|
200 | $(VBOX_LNX_ADD_DBG_LIB_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
|
---|
201 | $(call MSG_TOOL,copydbg,$<,$@)
|
---|
202 | $(QUIET)objcopy --only-keep-debug $< $@
|
---|
203 |
|
---|
204 | $(addprefix $(VBOX_LNX_ADD_DBG_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_MOD)): \
|
---|
205 | $(VBOX_LNX_ADD_DBG_OTHER_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
|
---|
206 | $(call MSG_TOOL,copydbg,$<,$@)
|
---|
207 | $(QUIET)objcopy --only-keep-debug $< $@
|
---|
208 |
|
---|
209 | # pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_BIN files to the installation directory
|
---|
210 | $(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)): \
|
---|
211 | $(VBOX_LNX_ADD_INST_BIN_DIR)% : $(PATH_STAGE_BIN)/additions/% \
|
---|
212 | $(VBOX_LNX_ADD_DBG_BIN_DIR)% \
|
---|
213 | | $$(dir $$@)
|
---|
214 | $(call MSG_INST_FILE,$<,$@)
|
---|
215 | $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
|
---|
216 | $(QUIET)objcopy --add-gnu-debuglink=$(subst $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_DBG_BIN_DIR),$@) $@
|
---|
217 |
|
---|
218 | # pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_SBIN files to the installation directory
|
---|
219 | $(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),\
|
---|
220 | $(filter-out vbox-greeter,$(VBOX_LNX_ADD_STRIP_SBIN))): \
|
---|
221 | $(VBOX_LNX_ADD_INST_SBIN_DIR)% : $(PATH_STAGE_BIN)/additions/% \
|
---|
222 | $(VBOX_LNX_ADD_DBG_SBIN_DIR)% \
|
---|
223 | | $$(dir $$@)
|
---|
224 | $(call MSG_INST_FILE,$<,$@)
|
---|
225 | $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
|
---|
226 | $(QUIET)objcopy --add-gnu-debuglink=$(subst $(VBOX_LNX_ADD_INST_SBIN_DIR),$(VBOX_LNX_ADD_DBG_SBIN_DIR),$@) $@
|
---|
227 |
|
---|
228 | # pattern rule for stripping and copying vbox-greeter to the installation directory
|
---|
229 | $(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),vbox-greeter): \
|
---|
230 | $(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/% \
|
---|
231 | | $$(dir $$@)
|
---|
232 | $(call MSG_INST_FILE,$<,$@)
|
---|
233 | $(QUIET)$(INSTALL) -m 0755 $< $@
|
---|
234 |
|
---|
235 | # pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_LIB files to the installation directory
|
---|
236 | $(addprefix $(VBOX_LNX_ADD_INST_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)): \
|
---|
237 | $(VBOX_LNX_ADD_INST_LIB_DIR)% : $(PATH_STAGE_BIN)/additions/% \
|
---|
238 | $(VBOX_LNX_ADD_DBG_LIB_DIR)% \
|
---|
239 | | $$(dir $$@)
|
---|
240 | $(call MSG_INST_FILE,$<,$@)
|
---|
241 | $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
|
---|
242 | $(QUIET)objcopy --add-gnu-debuglink=$(subst $(VBOX_LNX_ADD_INST_LIB_DIR),$(VBOX_LNX_ADD_DBG_LIB_DIR),$@) $@
|
---|
243 |
|
---|
244 | # pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_MOD files to the installation directory
|
---|
245 | $(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_MOD)): \
|
---|
246 | $(VBOX_LNX_ADD_INST_OTHER_DIR)% : $(PATH_STAGE_BIN)/additions/% \
|
---|
247 | $(VBOX_LNX_ADD_DBG_OTHER_DIR)% \
|
---|
248 | | $$(dir $$@)
|
---|
249 | $(call MSG_INST_FILE,$<,$@)
|
---|
250 | $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
|
---|
251 | $(QUIET)objcopy --add-gnu-debuglink=$(subst $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_DBG_OTHER_DIR),$@) $@
|
---|
252 |
|
---|
253 | # pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_OBJ files to the installation directory
|
---|
254 | $(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_OBJ)): \
|
---|
255 | $(VBOX_LNX_ADD_INST_OTHER_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
|
---|
256 | $(call MSG_INST_FILE,$<,$@)
|
---|
257 | ifeq ($(VBOX_DO_STRIP),)
|
---|
258 | $(QUIET)$(INSTALL) -m 0644 $< $@
|
---|
259 | else # strip to temp file because of umask.
|
---|
260 | $(QUIET)objcopy --strip-unneeded -R .comment $< [email protected]
|
---|
261 | $(QUIET)$(INSTALL) -m 0644 [email protected] $@
|
---|
262 | $(QUIET)$(RM) -f -- [email protected]
|
---|
263 | endif
|
---|
264 |
|
---|
265 | include $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest
|
---|
266 | VBOX_LNX_ADD_INST_FILES_VBOXGUEST=$(patsubst =>%,$(PATH_STAGE_BIN)/additions/src/vboxguest/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(FILES_VBOXGUEST_NOBIN)))))
|
---|
267 | include $(PATH_ROOT)/src/VBox/Additions/linux/sharedfolders/files_vboxsf
|
---|
268 | VBOX_LNX_ADD_INST_FILES_VBOXSF=$(patsubst =>%,$(PATH_STAGE_BIN)/additions/src/vboxsf/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(FILES_VBOXSF_NOBIN)))))
|
---|
269 | include $(PATH_ROOT)/src/VBox/Additions/linux/drm/files_vboxvideo_drv
|
---|
270 | VBOX_LNX_ADD_INST_FILES_VBOXVIDEO=$(patsubst =>%,$(PATH_STAGE_BIN)/additions/src/vboxvideo/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(FILES_VBOXVIDEO_DRM_NOBIN)))))
|
---|
271 |
|
---|
272 | # special rule for the kernel modules
|
---|
273 | $(VBOX_LNX_ADD_INST_KMOD_DIR_BASE): \
|
---|
274 | $(PATH_STAGE_BIN)/additions/src/ \
|
---|
275 | $(PATH_ROOT)/Version.kmk \
|
---|
276 | | $(dir $@)
|
---|
277 | $(call MSG_INST_SYM,$<,$@)
|
---|
278 | $(QUIET)$(RM) -Rf $@
|
---|
279 | $(QUIET)$(MKDIR) $@
|
---|
280 | $(QUIET)$(LN_SYMLINK) $< $(VBOX_LNX_ADD_INST_KMOD_PATH)
|
---|
281 |
|
---|
282 | INSTALLS += GuestDrivers-src
|
---|
283 | GuestDrivers-src_INST = $(INST_ADDITIONS)src/
|
---|
284 | GuestDrivers-src_MODE = a+r,u+w
|
---|
285 | GuestDrivers-src_SOURCES = Makefile
|
---|
286 |
|
---|
287 |
|
---|
288 | INSTALLS += lnx_add_inst-exec
|
---|
289 | lnx_add_inst-exec_INST = $(VBOX_LNX_ADD_INST_OTHER_DIR)
|
---|
290 | lnx_add_inst-exec_INSTTYPE = stage
|
---|
291 | lnx_add_inst-exec_EXEC_SOURCES = \
|
---|
292 | $(VBOX_REL_X11_ADD_INST)98vboxadd-xclient \
|
---|
293 | $(VBOX_REL_X11_ADD_INST)x11config.sh \
|
---|
294 | $(VBOX_REL_LNX_INST_SRC)check_module_dependencies.sh
|
---|
295 |
|
---|
296 |
|
---|
297 | INSTALLS += lnx_add_inst-noexec
|
---|
298 | lnx_add_inst-noexec_INST = $(VBOX_LNX_ADD_INST_OTHER_DIR)
|
---|
299 | lnx_add_inst-noexec_INSTTYPE = stage
|
---|
300 | lnx_add_inst-noexec_SOURCES = \
|
---|
301 | $(VBOX_REL_X11_ADD_INST)vboxclient.desktop \
|
---|
302 | $(VBOX_REL_X11_ADD_INST)vboxvideo.ids \
|
---|
303 | $(if $(VBOX_WITH_LIGHTDM_GREETER_PACKING),lightdm-greeter/vbox-greeter.desktop,) \
|
---|
304 | selinux-fedora/vbox_x11.pp \
|
---|
305 | selinux-fedora/vbox_accel.pp
|
---|
306 |
|
---|
307 | INSTALLS += lnx_add_inst-license
|
---|
308 | lnx_add_inst-license_INST = $(VBOX_LNX_ADD_INST_OUT_DIR)
|
---|
309 | lnx_add_inst-license_INSTTYPE = stage
|
---|
310 | lnx_add_inst-license_SOURCES = \
|
---|
311 | $(VBOX_BRAND_LICENSE_TXT)=>LICENSE
|
---|
312 |
|
---|
313 |
|
---|
314 | #
|
---|
315 | # We need our routines.sh and the uninstallation scripts in the staging
|
---|
316 | # directory too
|
---|
317 | #
|
---|
318 | INSTALLS += LnxAdd-scripts
|
---|
319 | LnxAdd-scripts_INST = $(VBOX_LNX_ADD_INST_STAGE_DIR)
|
---|
320 | LnxAdd-scripts_INSTTYPE = stage
|
---|
321 | LnxAdd-scripts_SOURCES = \
|
---|
322 | $(VBOX_REL_LNX_ADD_INST)deffiles
|
---|
323 | LnxAdd-scripts_EXEC_SOURCES = \
|
---|
324 | $(VBOX_REL_LNX_INST_SRC)routines.sh
|
---|
325 |
|
---|
326 | ifdef VBOX_WITH_LIGHTDM_GREETER_PACKING
|
---|
327 | LnxAdd-scripts_EXEC_SOURCES += \
|
---|
328 | $(VBOX_REL_LNX_ADD_INST)module-autologon.sh=>installer/module-autologon
|
---|
329 | endif
|
---|
330 |
|
---|
331 |
|
---|
332 | #
|
---|
333 | # And the init scripts
|
---|
334 | #
|
---|
335 | INSTALLS += LnxAdd-init-scripts
|
---|
336 | LnxAdd-init-scripts_INST = $(VBOX_LNX_ADD_INST_INIT_DIR)
|
---|
337 | LnxAdd-init-scripts_INSTTYPE = stage
|
---|
338 | LnxAdd-init-scripts_EXEC_SOURCES = \
|
---|
339 | $(foreach i,$(VBOX_LNX_ADD_INIT), installer/$(i).sh=>$(i))
|
---|
340 |
|
---|
341 | # this file needs editing before it can be included in the generic installer.
|
---|
342 | $(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh: \
|
---|
343 | $(VBOX_PATH_LNX_ADD_INST)install.sh.in \
|
---|
344 | $(VBOX_VERSION_STAMP) | $$(dir $$@)
|
---|
345 | $(RM) -f -- $@
|
---|
346 | $(QUIET)$(SED) \
|
---|
347 | -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
|
---|
348 | -e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
|
---|
349 | -e "s;_USERNAME_;$(USERNAME);g" \
|
---|
350 | --output $@ \
|
---|
351 | $<
|
---|
352 | $(QUIET)$(CHMOD) 0755 $@
|
---|
353 | OTHER_CLEAN += \
|
---|
354 | $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh \
|
---|
355 | $(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh
|
---|
356 |
|
---|
357 |
|
---|
358 | #
|
---|
359 | # Build test for the Guest Additions kernel modules (kmk check).
|
---|
360 | #
|
---|
361 | $(evalcall2 VBOX_LINUX_KMOD_TEST_BUILD_RULE_FN,vboxsf-src,vboxguest-src,)
|
---|
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 $(VBOX_LNX_ADD_INST_STAGE_DIR) $@ \
|
---|
448 | "VirtualBox $(VBOX_VERSION_STRING) Guest Additions for Linux" \
|
---|
449 | /bin/sh ./install.sh "\$$0 1> /dev/null"
|
---|
450 |
|
---|