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