VirtualBox

source: vbox/trunk/src/VBox/Installer/linux/Makefile.kmk@ 61411

Last change on this file since 61411 was 61379, checked in by vboxsync, 9 years ago

Main/webservice: don't ship webtest any longer (to save space) and create a new SDK cpp example instead

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette