1 | # $Id: Makefile.kmk 89669 2021-06-14 08:57:18Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the Linux installer.
|
---|
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 | # Include sub-makefiles.
|
---|
22 |
|
---|
23 | # We do not install VBoxHeadlessXOrg.sh any more, so this is not needed.
|
---|
24 | #
|
---|
25 | # ifdef VBOX_WITH_TESTCASES
|
---|
26 | # include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
|
---|
27 | # endif
|
---|
28 |
|
---|
29 | ifneq ($(KBUILD_HOST),linux)
|
---|
30 | $(error "The Linux installer can only be built on Linux!")
|
---|
31 | endif
|
---|
32 |
|
---|
33 | #
|
---|
34 | # Globals and targets.
|
---|
35 | #
|
---|
36 | VBOX_LNX_APP_PRIVATE := $(if $(VBOX_PATH_APP_PRIVATE),$(VBOX_PATH_APP_PRIVATE),/opt/VirtualBox)
|
---|
37 | VBOX_LNX_APP_DOCS := $(if $(VBOX_PATH_PACKAGE_DOCS),$(VBOX_PATH_PACKAGE_DOCS),\
|
---|
38 | $(if $(VBOX_PATH_APP_DOCS),$(VBOX_PATH_APP_DOCS),/opt/VirtualBox))
|
---|
39 | VBOX_PATH_LNX_INST_SRC := $(PATH_SUB_CURRENT)
|
---|
40 | VBOX_LNX_INST_OUT_DIR := $(PATH_TARGET)/Installer/linux
|
---|
41 | VBOX_LNX_INST_STAGE_DIR := $(PATH_TARGET)/Installer/linux/install
|
---|
42 | VBOX_LNX_INST_STAGE_DIR_REL := obj/Installer/linux/install
|
---|
43 | VBOX_LNX_DBG_PATH := usr/lib/debug/$(VBOX_LNX_APP_PRIVATE)
|
---|
44 | VBOX_LNX_PACKAGE_NAME = VirtualBox-$(VBOX_VERSION_STRING)-r$(VBOX_SVN_REV).run
|
---|
45 |
|
---|
46 | # Unset this to speed up things during makefile hacking.
|
---|
47 | VBOX_LNX_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT)
|
---|
48 |
|
---|
49 | BLDDIRS += $(VBOX_LNX_INST_OUT_DIR) $(VBOX_LNX_INST_STAGE_DIR)
|
---|
50 | if !defined(VBOX_NO_LINUX_RUN_INSTALLER)
|
---|
51 | PACKING += $(PATH_STAGE_BIN)/$(VBOX_LNX_PACKAGE_NAME) \
|
---|
52 | $(PATH_STAGE_BIN)/VirtualBox-dbg.tar.bz2
|
---|
53 | else
|
---|
54 | PACKING += $(PATH_STAGE_BIN)/VirtualBox.tar
|
---|
55 | endif
|
---|
56 |
|
---|
57 | OTHER_CLEAN += \
|
---|
58 | $(addprefix $(VBOX_LNX_INST_STAGE_DIR)/,\
|
---|
59 | install.sh \
|
---|
60 | VirtualBox.tar.bz2 \
|
---|
61 | LICENSE) \
|
---|
62 | $(wildcard $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-*) \
|
---|
63 | $(VBOX_LNX_INST_OUT_DIR)/install.sh
|
---|
64 |
|
---|
65 | #
|
---|
66 | # Linux installs.
|
---|
67 | #
|
---|
68 | INSTALLS += linux-bin
|
---|
69 | linux-bin_INST = bin/
|
---|
70 | linux-bin_MODE = a+rx,u+w
|
---|
71 | linux-bin_SOURCES = \
|
---|
72 | check_module_dependencies.sh \
|
---|
73 | postinst-common.sh \
|
---|
74 | prerm-common.sh \
|
---|
75 | routines.sh \
|
---|
76 | VBoxSysInfo.sh \
|
---|
77 | vboxautostart-service.sh \
|
---|
78 | vboxballoonctrl-service.sh \
|
---|
79 | VBoxCreateUSBNode.sh \
|
---|
80 | vboxdrv.sh \
|
---|
81 | vboxweb-service.sh \
|
---|
82 | VBox.sh=>VBox.sh \
|
---|
83 | $(if $(VBOX_WITH_PYTHON),$(PATH_ROOT)/src/VBox/Frontends/VBoxShell/vboxshell.py=>vboxshell.py,)
|
---|
84 |
|
---|
85 | INSTALLS += linux-scripts
|
---|
86 | linux-scripts_INST = $(VBOX_LNX_INST_STAGE_DIR_REL)/
|
---|
87 | linux-scripts_MODE = a+rx,u+w
|
---|
88 | linux-scripts_SOURCES = \
|
---|
89 | deffiles \
|
---|
90 | postinst-common.sh \
|
---|
91 | prerm-common.sh \
|
---|
92 | routines.sh \
|
---|
93 | uninstall.sh \
|
---|
94 | vboxautostart-service.sh \
|
---|
95 | vboxballoonctrl-service.sh \
|
---|
96 | vboxdrv.sh \
|
---|
97 | vboxweb-service.sh
|
---|
98 |
|
---|
99 | INSTALLS += linux-misc
|
---|
100 | linux-misc_INST = bin/
|
---|
101 | linux-misc_MODE = a+r,u+w
|
---|
102 | linux-misc_SOURCES = \
|
---|
103 | $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/$(if $(VBOX_OSE),OSE,NonOSE)/VirtualBox_32px.png=>VBox.png \
|
---|
104 | $(VBOX_PATH_INST_COMMON_SRC)/virtualbox.xml \
|
---|
105 | $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)=>LICENSE) \
|
---|
106 | $(linux-misc_0_OUTDIR)/generated.sh=>scripts/generated.sh \
|
---|
107 | $(if $(VBOX_WITH_QTGUI),$(linux-misc_0_OUTDIR)/virtualbox.desktop,)
|
---|
108 | ifeq ($(KBUILD_TYPE),asan)
|
---|
109 | linux-misc_SOURCES += $(foreach lib,$(VBOX_GCC_SANITIZER_SO_FILES) \
|
---|
110 | ,$(lib)=>$(notdir $(lib)) $(lib)=>testcase/$(notdir $(lib)) $(lib)=>tools/$(notdir $(lib)) )
|
---|
111 | endif
|
---|
112 | linux-misc_CLEAN = \
|
---|
113 | $(linux-misc_0_OUTDIR)/generated.sh \
|
---|
114 | $(linux-misc_0_OUTDIR)/virtualbox.desktop
|
---|
115 |
|
---|
116 | $$(linux-misc_0_OUTDIR)/generated.sh: $(VBOX_VERSION_STAMP) $(VBOX_LNX_INST_DEP_ON_MAKEFILE) | $$(dir $$@)
|
---|
117 | $(call MSG_GENERATE,,$@,$<)
|
---|
118 | $(QUIET)$(RM) -f '$@'
|
---|
119 | $(QUIET)$(APPEND) '$@' 'VBOX_PRODUCT="$(VBOX_PRODUCT)"'
|
---|
120 | $(QUIET)$(APPEND) '$@' 'VBOX_VERSION_STRING="$(VBOX_VERSION_STRING)"'
|
---|
121 | $(QUIET)$(APPEND) '$@' 'VBOX_C_YEAR="$(VBOX_C_YEAR)"'
|
---|
122 | $(QUIET)$(APPEND) '$@' 'VBOX_VENDOR="$(VBOX_VENDOR)"'
|
---|
123 |
|
---|
124 | $$(linux-misc_0_OUTDIR)/virtualbox.desktop: $(VBOX_PATH_INST_COMMON_SRC)/virtualbox.desktop.in $(VBOX_VERSION_STAMP) | $$(dir $$@)
|
---|
125 | $(call MSG_GENERATE,,$@,$<)
|
---|
126 | $(QUIET)$(SED) -e "s+@VBOX_DOC_PATH@+$(VBOX_LNX_APP_DOCS)+" \
|
---|
127 | -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+" \
|
---|
128 | --output $@ $<
|
---|
129 |
|
---|
130 | INSTALLS += linux-icons
|
---|
131 | linux-icons_INST = bin/icons/
|
---|
132 | linux-icons_MODE = a+r,u+w
|
---|
133 | linux-icons_SOURCES = $(VBOX_MIME_ICONS) $(VBOX_DESKTOP_ICONS)
|
---|
134 |
|
---|
135 |
|
---|
136 | #
|
---|
137 | # The files residing in bin/ that we'll ship.
|
---|
138 | #
|
---|
139 |
|
---|
140 | # Strip these binaries
|
---|
141 | VBOX_LNX_STRIP_BIN = \
|
---|
142 | VBoxDD.so \
|
---|
143 | VBoxDD2.so \
|
---|
144 | VBoxDDU.so \
|
---|
145 | VBoxVMM.so \
|
---|
146 | VBoxRT.so \
|
---|
147 | $(if $(VBOX_WITH_VBOXSDL),VBoxSDL $(if $(VBOX_WITH_HARDENING),VBoxSDL.so),) \
|
---|
148 | $(if $(VBOX_WITH_SHARED_CLIPBOARD), VBoxSharedClipboard.so,) \
|
---|
149 | $(if $(VBOX_WITH_SHARED_FOLDERS), VBoxSharedFolders.so,) \
|
---|
150 | $(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestPropSvc.so,) \
|
---|
151 | $(if $(VBOX_WITH_GUEST_CONTROL),VBoxGuestControlSvc.so,) \
|
---|
152 | VBoxHostChannel.so \
|
---|
153 | $(if $(VBOX_WITH_DRAG_AND_DROP),VBoxDragAndDropSvc.so,) \
|
---|
154 | $(if $(VBOX_WITH_MAIN), \
|
---|
155 | VBoxAutostart \
|
---|
156 | VBoxBalloonCtrl \
|
---|
157 | VBoxBugReport \
|
---|
158 | VBoxManage \
|
---|
159 | VBoxNetDHCP $(if $(VBOX_WITH_HARDENING),VBoxNetDHCP.so,) \
|
---|
160 | $(if $(VBOX_WITH_LWIP_NAT),VBoxNetNAT $(if $(VBOX_WITH_HARDENING),VBoxNetNAT.so,),) \
|
---|
161 | VBoxNetAdpCtl \
|
---|
162 | $(if $(VBOX_WITH_DEVMAPPER),VBoxVolInfo,) \
|
---|
163 | VBoxSVC \
|
---|
164 | VBoxXPCOM.so \
|
---|
165 | VBoxXPCOMC.so \
|
---|
166 | VBoxXPCOMIPCD \
|
---|
167 | components/VBoxXPCOMIPCC.so \
|
---|
168 | components/VBoxSVCM.so \
|
---|
169 | components/VBoxC.so,) \
|
---|
170 | $(if $(VBOX_WITH_QTGUI),VBoxTestOGL,) \
|
---|
171 | $(if $(VBOX_WITH_VMSVGA3D),VBoxSVGA3D.so,) \
|
---|
172 | $(if $(VBOX_WITH_PYTHON),$(notdir $(wildcard $(PATH_STAGE_BIN)/VBoxPython*.so)),) \
|
---|
173 | $(if $(VBOX_WITH_JXPCOM),libvboxjxpcom.so,) \
|
---|
174 | $(if $(and $(VBOX_WITH_EXTPACK_VNC),$(VBOX_WITHOUT_EXTPACK_VNC_PACKING)), \
|
---|
175 | ExtensionPacks/VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/VBoxVNC.so \
|
---|
176 | ExtensionPacks/VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/VBoxVNCMain.so,) \
|
---|
177 | $(if $(VBOX_WITH_DTRACE),VBoxDTrace,)\
|
---|
178 | $(if $(VBOX_WITH_HOST_SHIPPING_AUDIO_TEST),VBoxAudioTest,) \
|
---|
179 | VBoxTunctl
|
---|
180 |
|
---|
181 | # Do not remove relocation information of these binaries
|
---|
182 | VBOX_LNX_STRIP_OBJ = \
|
---|
183 | VBoxDDR0.r0 \
|
---|
184 | VMMR0.r0
|
---|
185 | ifdef VBOX_NO_LINUX_RUN_INSTALLER
|
---|
186 | VBOX_LNX_STRIP_OBJ += \
|
---|
187 | VBoxDDR0.debug \
|
---|
188 | VMMR0.debug
|
---|
189 | else
|
---|
190 | VBOX_LNX_DBG_BIN = \
|
---|
191 | VBoxDDR0.debug \
|
---|
192 | VMMR0.debug
|
---|
193 | endif
|
---|
194 |
|
---|
195 | ifdef VBOX_WITH_RAW_MODE
|
---|
196 | VBOX_LNX_STRIP_OBJ += \
|
---|
197 | VBoxDDRC.rc \
|
---|
198 | VMMRC.rc
|
---|
199 | ifdef VBOX_NO_LINUX_RUN_INSTALLER
|
---|
200 | VBOX_LNX_STRIP_OBJ += \
|
---|
201 | VBoxDDRC.debug \
|
---|
202 | VMMRC.debug
|
---|
203 | else
|
---|
204 | VBOX_LNX_DBG_BIN += \
|
---|
205 | VBoxDDRC.debug \
|
---|
206 | VMMRC.debug
|
---|
207 | endif
|
---|
208 | endif
|
---|
209 |
|
---|
210 | # Do not strip anything of these files
|
---|
211 | VBOX_LNX_NO_STRIP = \
|
---|
212 | $(if $(VBOX_OSE),,LICENSE) \
|
---|
213 | $(if $(VBOX_WITH_MAIN), \
|
---|
214 | components/VBoxXPCOMBase.xpt \
|
---|
215 | components/VirtualBox_XPCOM.xpt) \
|
---|
216 | $(if $(VBOX_WITH_PYTHON),vboxshell.py,) \
|
---|
217 | $(if $(and $(VBOX_WITH_EXTPACK_VNC),$(VBOX_WITHOUT_EXTPACK_VNC_PACKING)), \
|
---|
218 | ExtensionPacks/VNC/ExtPack.xml \
|
---|
219 | ExtensionPacks/VNC/ExtPack-license.html \
|
---|
220 | ExtensionPacks/VNC/ExtPack-license.rtf \
|
---|
221 | ExtensionPacks/VNC/ExtPack-license.txt,) \
|
---|
222 | check_module_dependencies.sh \
|
---|
223 | postinst-common.sh \
|
---|
224 | prerm-common.sh \
|
---|
225 | routines.sh \
|
---|
226 | VBoxSysInfo.sh \
|
---|
227 | vboxautostart-service.sh \
|
---|
228 | vboxballoonctrl-service.sh \
|
---|
229 | VBoxCreateUSBNode.sh \
|
---|
230 | vboxdrv.sh \
|
---|
231 | VBox.sh \
|
---|
232 | vboxweb-service.sh \
|
---|
233 | VBox.png \
|
---|
234 | $(addprefix UnattendedTemplates/,$(VBOX_UNATTENDED_TEMPLATES))
|
---|
235 |
|
---|
236 | ifdef VBOX_WITH_EXTPACK
|
---|
237 | VBOX_LNX_STRIP_BIN += \
|
---|
238 | VBoxExtPackHelperApp
|
---|
239 | endif
|
---|
240 |
|
---|
241 | # Qt GUI
|
---|
242 | ifdef VBOX_WITH_QTGUI
|
---|
243 | include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
|
---|
244 | VBOX_LNX_STRIP_BIN += \
|
---|
245 | VBoxKeyboard.so \
|
---|
246 | VirtualBox \
|
---|
247 | VirtualBoxVM \
|
---|
248 | UICommon.so \
|
---|
249 | $(if $(VBOX_WITH_DEBUGGER_GUI),VBoxDbg.so DbgPlugInDiggers.so)
|
---|
250 | ifdef VBOX_WITH_HARDENING
|
---|
251 | VBOX_LNX_STRIP_BIN += \
|
---|
252 | VirtualBoxVM.so
|
---|
253 | endif
|
---|
254 | VBOX_LNX_NO_STRIP += \
|
---|
255 | virtualbox.desktop \
|
---|
256 | virtualbox.xml \
|
---|
257 | $(VBOX_LICENSE_FILES) \
|
---|
258 | $(if $(VBOX_WITH_ORACLE_QT),$(notdir $(wildcard $(PATH_STAGE_BIN)/lib*VBox*)),) \
|
---|
259 | $(if $(VBOX_WITH_ORACLE_QT),$(VBOX_QT_PLUGINS)) \
|
---|
260 | $(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES),nls/VirtualBox_$(f).qm nls/qt_$(f).qm) \
|
---|
261 | icons
|
---|
262 | endif
|
---|
263 |
|
---|
264 | # Guest Additions
|
---|
265 | ifdef VBOX_WITH_ADDITIONS_PACKING
|
---|
266 | VBOX_LNX_NO_STRIP += \
|
---|
267 | additions/VBoxGuestAdditions.iso
|
---|
268 | endif
|
---|
269 |
|
---|
270 | # Documentation
|
---|
271 | ifdef VBOX_WITH_DOCS_PACKING
|
---|
272 | VBOX_LNX_NO_STRIP += \
|
---|
273 | UserManual.pdf \
|
---|
274 | $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),UserManual_$(f).pdf)
|
---|
275 | ifdef VBOX_WITH_DOCS_CHM_PACKING
|
---|
276 | VBOX_LNX_NO_STRIP += \
|
---|
277 | VirtualBox.chm \
|
---|
278 | $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),VirtualBox_$(f).chm)
|
---|
279 | endif
|
---|
280 | VBOX_LNX_STRIP_BIN += \
|
---|
281 | $(if $(VBOX_WITH_KCHMVIEWER),kchmviewer,)
|
---|
282 | endif
|
---|
283 |
|
---|
284 | # auth stuff
|
---|
285 | VBOX_LNX_STRIP_BIN += \
|
---|
286 | $(if $(VBOX_WITH_PAM),VBoxAuth.so,) \
|
---|
287 | VBoxAuthSimple.so
|
---|
288 |
|
---|
289 | # VRDP
|
---|
290 | ifdef VBOX_WITH_VRDP
|
---|
291 | ifndef VBOX_WITH_EXTPACK_PUEL
|
---|
292 | VBOX_LNX_STRIP_BIN += \
|
---|
293 | VBoxVRDP.so
|
---|
294 | endif
|
---|
295 | endif
|
---|
296 | ifdef VBOX_WITH_VRDP_RDESKTOP
|
---|
297 | VBOX_LNX_NO_STRIP += \
|
---|
298 | rdesktop-vrdp.tar.gz
|
---|
299 | VBOX_LNX_NO_STRIP += \
|
---|
300 | rdesktop-vrdp-keymaps
|
---|
301 | VBOX_LNX_STRIP_BIN += \
|
---|
302 | rdesktop-vrdp
|
---|
303 | endif
|
---|
304 |
|
---|
305 | # Python XPCOM glue
|
---|
306 | ifdef VBOX_WITH_PYTHON
|
---|
307 | VBOX_LNX_NO_STRIP += \
|
---|
308 | $(VBOXINST_SDK_BINDINGS_XPCOM_PYTHON_FILES) \
|
---|
309 | $(VBOXINST_SDK_INSTALLER_PYTHON_FILES)
|
---|
310 | endif
|
---|
311 |
|
---|
312 | # Java XPCOM bridge
|
---|
313 | ifdef VBOX_WITH_JXPCOM
|
---|
314 | VBOX_LNX_NO_STRIP += \
|
---|
315 | sdk/bindings/xpcom/java/vboxjxpcom.jar
|
---|
316 | endif
|
---|
317 |
|
---|
318 | # Headless
|
---|
319 | ifdef VBOX_WITH_HEADLESS
|
---|
320 | VBOX_LNX_STRIP_BIN += \
|
---|
321 | VBoxHeadless \
|
---|
322 | $(if $(VBOX_WITH_HARDENING),VBoxHeadless.so)
|
---|
323 | endif
|
---|
324 |
|
---|
325 | # Webservices
|
---|
326 | ifdef VBOX_WITH_WEBSERVICES
|
---|
327 | VBOX_LNX_STRIP_BIN += \
|
---|
328 | vboxwebsrv
|
---|
329 | endif
|
---|
330 |
|
---|
331 | # vbox-img
|
---|
332 | if defined(VBOX_WITH_TESTCASES) || defined(VBOX_WITH_VBOX_IMG)
|
---|
333 | VBOX_LNX_STRIP_BIN += \
|
---|
334 | vbox-img
|
---|
335 | endif
|
---|
336 |
|
---|
337 | # vboximg-mount
|
---|
338 | if defined(VBOX_WITH_VBOXIMGMOUNT)
|
---|
339 | VBOX_LNX_STRIP_BIN += \
|
---|
340 | vboximg-mount
|
---|
341 | endif
|
---|
342 |
|
---|
343 | # EFI firmware
|
---|
344 | ifdef VBOX_WITH_EFIFW_PACKING
|
---|
345 | VBOX_LNX_NO_STRIP += \
|
---|
346 | VBoxEFI32.fd \
|
---|
347 | VBoxEFI64.fd
|
---|
348 | endif
|
---|
349 |
|
---|
350 | # DTrace library and scripts.
|
---|
351 | ifdef VBOX_WITH_DTRACE
|
---|
352 | VBOX_LNX_NO_STRIP += \
|
---|
353 | $(addprefix dtrace/lib/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_LIB_ARCH_FILES)) \
|
---|
354 | $(addprefix dtrace/testcase/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_TESTCASE_ARCH_FILES)) \
|
---|
355 | $(addprefix dtrace/scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES))
|
---|
356 | endif
|
---|
357 |
|
---|
358 | # The sanitizer shared objects match the compiler we're using (HACK).
|
---|
359 | ifeq ($(KBUILD_TYPE),asan)
|
---|
360 | VBOX_LNX_NO_STRIP += $(notdir $(VBOX_GCC_SANITIZER_SO_FILES))
|
---|
361 | endif
|
---|
362 |
|
---|
363 | # Icons
|
---|
364 | VBOX_MIME_ICONS = \
|
---|
365 | $(addprefix $(PATH_ROOT)/src/VBox/Artwork/other/,\
|
---|
366 | $(foreach f,ova ovf vbox vbox-extpack vdi vmdk vhd hdd, \
|
---|
367 | $(foreach s,16 20 24 32 48 64 72 96 128 256,\
|
---|
368 | virtualbox-$(f)-$(s)px.png=>$(s)x$(s)/virtualbox-$(f).png)))
|
---|
369 |
|
---|
370 | VBOX_DESKTOP_ICONS = \
|
---|
371 | $(addprefix $(PATH_ROOT)/src/VBox/Artwork/$(if $(VBOX_OSE),OSE,NonOSE)/,\
|
---|
372 | $(foreach s,16 20 32 40 48 64 128,\
|
---|
373 | virtualbox-$(s)px.png=>$(s)x$(s)/virtualbox.png) \
|
---|
374 | virtualbox.svg=>scalable/virtualbox.svg)
|
---|
375 |
|
---|
376 | #
|
---|
377 | # All the bin files that goes into the archives.
|
---|
378 | #
|
---|
379 | VBOX_LNX_ARCH_FILES := $(VBOX_LNX_STRIP_BIN) $(VBOX_LNX_STRIP_OBJ) $(VBOX_LNX_NO_STRIP) src
|
---|
380 |
|
---|
381 | # Cleanup of the files we copy/symlink from bin.
|
---|
382 | OTHER_CLEAN += $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(filter-out src,$(VBOX_LNX_ARCH_FILES)) src/vboxhost) \
|
---|
383 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,\
|
---|
384 | $(VBOX_LNX_STRIP_BIN) $(VBOX_LNX_DBG_BIN))
|
---|
385 |
|
---|
386 | #
|
---|
387 | # The generic installer.
|
---|
388 | #
|
---|
389 | $(PATH_STAGE_BIN)/$(VBOX_LNX_PACKAGE_NAME): \
|
---|
390 | $(VBOX_LNX_INST_STAGE_DIR)/VirtualBox.tar.bz2 \
|
---|
391 | $(VBOX_VERSION_STAMP) \
|
---|
392 | $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)) \
|
---|
393 | $(VBOX_LNX_INST_OUT_DIR)/install.sh \
|
---|
394 | $$(linux-scripts_2_STAGE_TARGETS)
|
---|
395 | $(call MSG_TOOL,makeself,,$@)
|
---|
396 | $(QUIET)$(RM) -f $(wildcard $(PATH_STAGE_BIN)/VirtualBox-*.run)
|
---|
397 | $(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(VBOX_BRAND_LICENSE_TXT) $(VBOX_LNX_INST_STAGE_DIR)/LICENSE)
|
---|
398 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/install.sh $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
399 | $(QUIET)$(RM) -f $@
|
---|
400 | $(QUIET)$(VBOX_MAKESELF) --follow --nocomp $(VBOX_LNX_INST_STAGE_DIR) $@ \
|
---|
401 | "VirtualBox for Linux installation" ./install.sh "\$$0 1> /dev/null"
|
---|
402 |
|
---|
403 | $(VBOX_LNX_INST_OUT_DIR)/install.sh: $(VBOX_PATH_LNX_INST_SRC)/install.sh $(VBOX_VERSION_STAMP) $(wildcard $(VBOX_SVN_REV_KMK).ts) | $$(dir $$@)
|
---|
404 | $(QUIET)$(SED) \
|
---|
405 | -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
|
---|
406 | -e "s;_SVNREV_;$(VBOX_SVN_REV);g" \
|
---|
407 | -e "s;_BUILD_;$(date-utc );g" \
|
---|
408 | -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
|
---|
409 | -e "s;_HARDENED_;$(VBOX_WITH_HARDENING);g" \
|
---|
410 | -e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
|
---|
411 | -e "s;_USERNAME_;$(USERNAME);g" \
|
---|
412 | -e "s;_INSTALLATION_DIR_;$(VBOX_LNX_APP_PRIVATE);g" \
|
---|
413 | -e "s;_PYTHON_;$(VBOX_WITH_PYTHON);g" \
|
---|
414 | --output $@ \
|
---|
415 | $<
|
---|
416 |
|
---|
417 | #
|
---|
418 | # The files that the tar archives depend on.
|
---|
419 | #
|
---|
420 |
|
---|
421 | include $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/files_vboxdrv
|
---|
422 | VBOX_LNX_INST_FILES_VBOXDRV=$(patsubst =>%,$(PATH_STAGE_BIN)/src/vboxdrv/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(FILES_VBOXDRV_NOBIN)))))
|
---|
423 | include $(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetFlt/linux/files_vboxnetflt
|
---|
424 | VBOX_LNX_INST_FILES_VBOXNETFLT=$(patsubst =>%,$(PATH_STAGE_BIN)/src/vboxnetflt/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(VBOX_VBOXNETFLT_SOURCES)))))
|
---|
425 | include $(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetAdp/linux/files_vboxnetadp
|
---|
426 | VBOX_LNX_INST_FILES_VBOXNETADP=$(patsubst =>%,$(PATH_STAGE_BIN)/src/vboxnetadp/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(VBOX_VBOXNETADP_SOURCES)))))
|
---|
427 |
|
---|
428 | ifdef VBOX_WITH_PCI_PASSTHROUGH
|
---|
429 | include $(PATH_ROOT)/src/VBox/HostDrivers/VBoxPci/linux/files_vboxpci
|
---|
430 | VBOX_LNX_INST_FILES_VBOXPCI=$(patsubst =>%,$(PATH_STAGE_BIN)/src/vboxpci/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(VBOX_VBOXPCI_SOURCES)))))
|
---|
431 | endif
|
---|
432 |
|
---|
433 | VBOX_LNX_INST_ARCH_DEPS := \
|
---|
434 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/, $(VBOX_LNX_ARCH_FILES)) \
|
---|
435 | $(VBOX_LNX_INST_DEP_ON_MAKEFILE) \
|
---|
436 | $(VBOX_VERSION_STAMP) \
|
---|
437 | $(VBOX_LNX_INST_FILES_VBOXDRV) \
|
---|
438 | $(VBOX_LNX_INST_FILES_VBOXNETFLT) \
|
---|
439 | $(VBOX_LNX_INST_FILES_VBOXNETADP) \
|
---|
440 | $(if $(VBOX_WITH_PCI_PASSTHROUGH),$(VBOX_LNX_INST_FILES_VBOXPCI),)
|
---|
441 |
|
---|
442 | #
|
---|
443 | # .tar.bz2 for converting into .run
|
---|
444 | #
|
---|
445 | $(VBOX_LNX_INST_STAGE_DIR)/VirtualBox.tar.bz2: $(VBOX_LNX_INST_ARCH_DEPS)
|
---|
446 | $(call MSG_L1,Packing $@)
|
---|
447 | $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
|
---|
448 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
449 | ifdef VBOX_USE_PBZIP2
|
---|
450 | $(QUIET)tar --dereference --owner 0 --group 0 \
|
---|
451 | -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR)/archive $(VBOX_LNX_ARCH_FILES)
|
---|
452 | $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
|
---|
453 | else
|
---|
454 | $(QUIET)tar --dereference --owner 0 --group 0 \
|
---|
455 | -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR)/archive $(VBOX_LNX_ARCH_FILES)
|
---|
456 | endif
|
---|
457 | $(QUIET)$(CHMOD) 0644 $@
|
---|
458 |
|
---|
459 | #
|
---|
460 | # .tar for distribution with the files under VirtualBox-<ver>/.
|
---|
461 | #
|
---|
462 | $(PATH_STAGE_BIN)/VirtualBox.tar: $(VBOX_LNX_INST_ARCH_DEPS)
|
---|
463 | $(call MSG_L1,Packing $@)
|
---|
464 | $(QUIET)$(RM) -f -- $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING) $@ $(patsubst %.bz2,%,$@)
|
---|
465 | $(QUIET)$(LN_SYMLINK) $(VBOX_LNX_INST_OUT_DIR)/archive/ $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING)
|
---|
466 | $(QUIET)tar --dereference --owner 0 --group 0 \
|
---|
467 | -cRhf $@ -C $(VBOX_LNX_INST_OUT_DIR) \
|
---|
468 | $(addprefix VirtualBox-$(VBOX_VERSION_STRING)/,$(VBOX_LNX_ARCH_FILES))
|
---|
469 | $(QUIET)$(RM) -f -- $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING)
|
---|
470 |
|
---|
471 |
|
---|
472 | # pattern rule for stripping and copying the VBOX_LNX_STRIP_BIN files to archive/
|
---|
473 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_STRIP_BIN)): \
|
---|
474 | $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_STAGE_BIN)/% \
|
---|
475 | $(if $(VBOX_NO_LINUX_RUN_INSTALLER),,\
|
---|
476 | $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/%) \
|
---|
477 | | $$(dir $$@)
|
---|
478 | $(call MSG_INST_FILE,$<,$@)
|
---|
479 | $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
|
---|
480 | $(QUIET)$(if $(VBOX_NO_LINUX_RUN_INSTALLER),,objcopy --add-gnu-debuglink=$(subst $(VBOX_LNX_INST_OUT_DIR)/archive,$(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH),$@) $@)
|
---|
481 |
|
---|
482 | # pattern rule for copying VBOX_LNX_DBG_BIN files to archive-dbg/
|
---|
483 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_DBG_BIN)): \
|
---|
484 | $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/% : $(PATH_STAGE_BIN)/% | $$(dir $$@)
|
---|
485 | $(call MSG_INST_FILE,$<,$@)
|
---|
486 | $(QUIET)$(CP) $< $@
|
---|
487 |
|
---|
488 | # pattern rule for striping and copying the VBOX_LNX_STRIP_OBJ files to archive/
|
---|
489 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_STRIP_OBJ)): \
|
---|
490 | $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_STAGE_BIN)/% | $$(dir $$@)
|
---|
491 | $(call MSG_INST_FILE,$<,$@)
|
---|
492 | ifeq ($(VBOX_DO_STRIP),)
|
---|
493 | $(QUIET)$(INSTALL) -m 0644 $< $@
|
---|
494 | else # strip to temp file because of umask.
|
---|
495 | $(QUIET)objcopy --strip-unneeded -R .comment $< $@.tmp
|
---|
496 | $(QUIET)$(INSTALL) -m 0644 $@.tmp $@
|
---|
497 | $(QUIET)$(RM) -f -- $@.tmp
|
---|
498 | endif
|
---|
499 |
|
---|
500 | # pattern rule for linking the VBOX_LNX_NO_STRIP into archive/
|
---|
501 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_NO_STRIP)): \
|
---|
502 | $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_STAGE_BIN)/% | $$(dir $$@)
|
---|
503 | $(call MSG_INST_SYM,$<,$@)
|
---|
504 | $(QUIET)$(RM) -f $@
|
---|
505 | $(QUIET)$(LN_SYMLINK) $< $@
|
---|
506 |
|
---|
507 | # special rule for the kernel modules
|
---|
508 | $(VBOX_LNX_INST_OUT_DIR)/archive/src: $(PATH_STAGE_BIN)/src | $(dir $@)
|
---|
509 | $(call MSG_INST_SYM,$<,$@)
|
---|
510 | $(QUIET)$(RM) -Rf $@
|
---|
511 | $(QUIET)$(MKDIR) $@
|
---|
512 | $(QUIET)$(LN_SYMLINK) $< $@/vboxhost
|
---|
513 |
|
---|
514 | # rules for creating directories in archive (the pattern rules depends on these).
|
---|
515 | BLDDIRS += $(foreach d,\
|
---|
516 | archive \
|
---|
517 | archive/components \
|
---|
518 | archive/nls \
|
---|
519 | $(if $(VBOX_WITH_UNATTENDED),archive/unattended_templates,) \
|
---|
520 | $(if $(VBOX_WITH_ORACLE_QT), \
|
---|
521 | archive/plugins/platforms \
|
---|
522 | archive/plugins/platformthemes \
|
---|
523 | archive/plugins/sqldrivers \
|
---|
524 | archive/plugins/styles \
|
---|
525 | archive/plugins/xcbglintegrations,) \
|
---|
526 | $(if $(VBOX_WITH_PYTHON),\
|
---|
527 | archive/sdk/installer \
|
---|
528 | archive/sdk/installer/vboxapi \
|
---|
529 | archive/sdk/bindings/xpcom/python/xpcom \
|
---|
530 | archive/sdk/bindings/xpcom/python/xpcom/client \
|
---|
531 | archive/sdk/bindings/xpcom/python/xpcom/server,) \
|
---|
532 | $(if $(VBOX_WITH_JXPCOM),\
|
---|
533 | archive/sdk/bindings/xpcom/java,) \
|
---|
534 | $(if $(and $(VBOX_WITH_EXTPACK_VNC),$(VBOX_WITHOUT_EXTPACK_VNC_PACKING)), \
|
---|
535 | archive/ExtensionPacks/VNC \
|
---|
536 | archive/ExtensionPacks/VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),) \
|
---|
537 | archive/additions \
|
---|
538 | $(if-expr defined(VBOX_UNATTENDED_TEMPLATES),archive/UnattendedTemplates,) \
|
---|
539 | install \
|
---|
540 | $(if $(VBOX_WITH_DTRACE),\
|
---|
541 | archive/dtrace \
|
---|
542 | archive/dtrace/lib \
|
---|
543 | archive/dtrace/lib/$(KBUILD_TARGET_ARCH) \
|
---|
544 | archive/dtrace/testcase/ \
|
---|
545 | archive/dtrace/testcase/$(KBUILD_TARGET_ARCH) \
|
---|
546 | archive/dtrace/scripts,) \
|
---|
547 | ,$(VBOX_LNX_INST_OUT_DIR)/$(d)/)
|
---|
548 |
|
---|
549 |
|
---|
550 | #
|
---|
551 | # .tar.bz2 for with the debug info.
|
---|
552 | #
|
---|
553 | $(PATH_STAGE_BIN)/VirtualBox-dbg.tar.bz2: \
|
---|
554 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,\
|
---|
555 | $(VBOX_LNX_STRIP_BIN) $(VBOX_LNX_DBG_BIN))
|
---|
556 | $(call MSG_L1,Packing $@)
|
---|
557 | $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
|
---|
558 | ifdef VBOX_USE_PBZIP2
|
---|
559 | $(QUIET)tar --dereference --owner 0 --group 0 \
|
---|
560 | -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR)/archive-dbg \
|
---|
561 | $(addprefix $(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN) $(VBOX_LNX_DBG_BIN))
|
---|
562 | $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
|
---|
563 | else
|
---|
564 | $(QUIET)tar --dereference --owner 0 --group 0 \
|
---|
565 | -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR)/archive-dbg \
|
---|
566 | $(addprefix $(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN) $(VBOX_LNX_DBG_BIN))
|
---|
567 | endif
|
---|
568 |
|
---|
569 | # pattern rule for copying the debug info from the VBOX_LNX_STRIP_BIN files into archive-dbg/$(VBOX_LNX_DBG_PATH)/
|
---|
570 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN)): \
|
---|
571 | $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/% : $(PATH_STAGE_BIN)/% | $$(dir $$@)
|
---|
572 | $(call MSG_TOOL,copydbg,$<,$@)
|
---|
573 | $(QUIET)objcopy --only-keep-debug $< $@
|
---|
574 |
|
---|
575 | # rules for creating directories in archive-dbg (the pattern rules depends on these).
|
---|
576 | BLDDIRS += $(foreach d,\
|
---|
577 | $(VBOX_LNX_DBG_PATH) \
|
---|
578 | $(VBOX_LNX_DBG_PATH)/components \
|
---|
579 | ,$(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(d)/)
|
---|
580 |
|
---|
581 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
582 |
|
---|