VirtualBox

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

Last change on this file since 32736 was 32547, checked in by vboxsync, 14 years ago

Linux installer: make install.sh depend on $(VBOX_SVN_REV_KMK).ts to get the correct revision number into the installer when doing depend builds

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 14.8 KB
Line 
1# $Id: Makefile.kmk 32547 2010-09-16 10:24:36Z vboxsync $
2## @file
3# Makefile for the Linux installer.
4#
5
6#
7# Copyright (C) 2006-2010 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
21ifneq ($(KBUILD_HOST),linux)
22 $(error "The Linux installer can only be built on Linux!")
23endif
24
25#
26# Globals and targets.
27#
28VBOX_PATH_LNX_INST_SRC := $(PATH_SUB_CURRENT)
29VBOX_LNX_INST_OUT_DIR := $(PATH_TARGET)/Installer/linux
30VBOX_LNX_INST_STAGE_DIR := $(PATH_TARGET)/Installer/linux/install
31VBOX_LNX_DBG_PATH := usr/lib/debug/opt/VirtualBox
32VBOX_LNX_PACKAGE_NAME = VirtualBox-$(VBOX_VERSION_STRING)-r$(VBOX_SVN_REV).run
33
34# Unset this to speed up things during makefile hacking.
35VBOX_LNX_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT)
36
37BLDDIRS += $(VBOX_LNX_INST_OUT_DIR) $(VBOX_LNX_INST_STAGE_DIR)
38PACKING += $(PATH_BIN)/VirtualBox.tar.bz2
39if !defined(VBOX_NO_LINUX_RUN_INSTALLER)
40 PACKING += $(PATH_BIN)/$(VBOX_LNX_PACKAGE_NAME) \
41 $(PATH_BIN)/VirtualBox-dbg.tar.bz2
42endif
43
44OTHER_CLEAN += \
45 $(addprefix $(VBOX_LNX_INST_STAGE_DIR)/,\
46 install.sh \
47 uninstall.sh \
48 deffiles \
49 routines.sh \
50 vboxdrv.sh \
51 vboxweb-service.sh \
52 VirtualBox.tar.bz2 \
53 LICENSE) \
54 $(wildcard $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-*) \
55 $(addprefix $(VBOX_LNX_INST_OUT_DIR)/,\
56 vboxdrv.sh \
57 vboxweb-service.sh \
58 install.sh)
59
60#
61# Linux installs.
62#
63INSTALLS += linux-bin
64linux-bin_INST = bin/
65linux-bin_MODE = a+rx,u+w
66linux-bin_SOURCES = \
67 VBoxSysInfo.sh \
68 VBox.sh=>VBox.sh \
69 $(if $(VBOX_WITH_PYTHON),$(PATH_ROOT)/src/VBox/Frontends/VBoxShell/vboxshell.py=>vboxshell.py,)
70
71INSTALLS += linux-misc
72linux-misc_INST = bin/
73linux-misc_MODE = a+r,u+w
74linux-misc_SOURCES = \
75 $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/$(if $(VBOX_OSE),OSE,NonOSE)/VirtualBox_32px.png=>VBox.png \
76 $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)=>LICENSE) \
77 $(if $(VBOX_WITH_QTGUI),$(PATH_linux-misc)/virtualbox.desktop,)
78linux-misc_CLEAN = $(PATH_linux-misc)/virtualbox.desktop
79
80$$(PATH_linux-misc)/virtualbox.desktop: $(PATH_SUB_CURRENT)/virtualbox.desktop $(VBOX_VERSION_STAMP) | $$(dir $$@)
81 $(call MSG_GENERATE,,$@,$<)
82ifdef VBOX_PATH_PACKAGE_DOCS
83 $(QUIET)$(SED) -e "s+\$$VBOX_DOC_PATH+$(VBOX_PATH_PACKAGE_DOCS)+" --output $@ $<
84else
85 $(QUIET)$(SED) -e "s+\$$VBOX_DOC_PATH+/opt/VirtualBox+" --output $@ $<
86endif
87
88
89
90#
91# The files residing in bin/ that we'll ship.
92#
93
94# Strip these binaries
95VBOX_LNX_STRIP_BIN = \
96 VBoxDD.so \
97 VBoxDD2.so \
98 VBoxREM.so \
99 VBoxDDU.so \
100 VBoxVMM.so \
101 $(if $(eq $(KBUILD_TARGET_ARCH),x86),VBoxREM32.so,) \
102 $(if $(eq $(KBUILD_TARGET_ARCH),x86),VBoxREM64.so,) \
103 VBoxRT.so \
104 $(if $(VBOX_WITH_VBOXSDL),VBoxSDL $(if $(VBOX_WITH_HARDENING),VBoxSDL.so),) \
105 $(if $(VBOX_WITH_SHARED_CLIPBOARD), VBoxSharedClipboard.so,) \
106 $(if $(VBOX_WITH_SHARED_FOLDERS), VBoxSharedFolders.so,) \
107 $(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestPropSvc.so,) \
108 $(if $(VBOX_WITH_GUEST_CONTROL),VBoxGuestControlSvc.so,) \
109 $(if $(VBOX_WITH_MAIN), \
110 VBoxManage \
111 VBoxNetDHCP $(if $(VBOX_WITH_HARDENING),VBoxNetDHCP.so,) \
112 VBoxNetAdpCtl \
113 VBoxSVC \
114 VBoxXPCOM.so \
115 VBoxXPCOMC.so \
116 VBoxXPCOMIPCD \
117 components/VBoxXPCOMIPCC.so \
118 components/VBoxSVCM.so \
119 components/VBoxC.so,) \
120 $(if $(VBOX_WITH_CROGL),\
121 VBoxOGLhostcrutil.so \
122 VBoxOGLhosterrorspu.so \
123 VBoxOGLrenderspu.so \
124 VBoxTestOGL \
125 VBoxSharedCrOpenGL.so,) \
126 $(if $(VBOX_WITH_PYTHON),$(notdir $(wildcard $(PATH_BIN)/VBoxPython*.so)),) \
127 $(if $(VBOX_WITH_JXPCOM),libvboxjxpcom.so,) \
128 VBoxTunctl
129
130# Do not remove relocation information of these binaries
131VBOX_LNX_STRIP_OBJ = \
132 VBoxDD2GC.gc \
133 VBoxDD2R0.r0 \
134 VBoxDDGC.gc \
135 VBoxDDR0.r0 \
136 VMMGC.gc \
137 VMMR0.r0
138
139# Do not strip anything of these files
140VBOX_LNX_NO_STRIP = \
141 $(if $(VBOX_OSE),,LICENSE) \
142 $(if $(VBOX_WITH_MAIN), \
143 components/VBoxXPCOMBase.xpt \
144 components/VirtualBox_XPCOM.xpt) \
145 $(if $(VBOX_WITH_PYTHON),vboxshell.py,) \
146 VBoxSysInfo.sh \
147 VBox.sh \
148 VBox.png
149
150# Qt4 GUI
151ifdef VBOX_WITH_QTGUI
152 include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
153 VBOX_LNX_STRIP_BIN += \
154 VBoxKeyboard.so \
155 VirtualBox \
156 $(if $(VBOX_WITH_HARDENING),VirtualBox.so) \
157 $(if $(VBOX_WITH_DEBUGGER_GUI),VBoxDbg.so)
158 VBOX_LNX_NO_STRIP += \
159 virtualbox.desktop \
160 $(VBOX_LICENSE_FILES) \
161 $(if $(VBOX_WITH_QT4_SUN),$(notdir $(wildcard $(PATH_BIN)/lib*VBox*)),) \
162 $(if $(VBOX_WITH_QT4_SUN),accessible/libqtaccessiblewidgets.so,) \
163 $(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES),nls/VirtualBox_$(f).qm nls/qt_$(f).qm)
164endif
165
166# Guest Additions
167ifdef VBOX_WITH_ADDITIONS_PACKING
168 VBOX_LNX_NO_STRIP += \
169 additions/VBoxGuestAdditions.iso
170endif
171
172# Documentation
173ifdef VBOX_WITH_DOCS_PACKING
174 VBOX_LNX_NO_STRIP += \
175 UserManual.pdf \
176 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),UserManual_$(f).pdf)
177 ifdef VBOX_WITH_DOCS_CHM
178 VBOX_LNX_NO_STRIP += \
179 VirtualBox.chm \
180 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),VirtualBox_$(f).chm)
181 endif
182 VBOX_LNX_STRIP_BIN += \
183 $(if $(VBOX_WITH_KCHMVIEWER),kchmviewer,)
184endif
185
186# VRDP
187ifdef VBOX_WITH_VRDP
188 VBOX_LNX_STRIP_BIN += \
189 VBoxVRDP.so \
190 VRDPAuth.so \
191 VRDPAuthSimple.so
192 ifdef VBOX_WITH_VRDP_RDESKTOP
193 VBOX_LNX_NO_STRIP += \
194 rdesktop-vrdp.tar.gz
195 VBOX_LNX_NO_STRIP += \
196 rdesktop-vrdp-keymaps
197 VBOX_LNX_STRIP_BIN += \
198 rdesktop-vrdp
199 endif
200endif
201
202# Python XPCOM glue
203ifdef VBOX_WITH_PYTHON
204 VBOX_LNX_NO_STRIP += \
205 $(foreach f,$(notdir $(wildcard $(PATH_BIN)/sdk/bindings/xpcom/python/xpcom/*.py)),sdk/bindings/xpcom/python/xpcom/$(f)) \
206 sdk/bindings/xpcom/python/xpcom/client/__init__.py \
207 sdk/bindings/xpcom/python/xpcom/server/__init__.py \
208 sdk/bindings/xpcom/python/xpcom/server/enumerator.py \
209 sdk/bindings/xpcom/python/xpcom/server/factory.py \
210 sdk/bindings/xpcom/python/xpcom/server/loader.py \
211 sdk/bindings/xpcom/python/xpcom/server/module.py \
212 sdk/bindings/xpcom/python/xpcom/server/policy.py \
213 sdk/installer/vboxapisetup.py \
214 sdk/installer/vboxapi/__init__.py \
215 sdk/installer/vboxapi/VirtualBox_constants.py
216endif
217
218# Java XPCOM bridge
219ifdef VBOX_WITH_JXPCOM
220 VBOX_LNX_NO_STRIP += \
221 sdk/bindings/xpcom/java/vboxjxpcom.jar
222endif
223
224# Headless
225ifdef VBOX_WITH_HEADLESS
226 VBOX_LNX_STRIP_BIN += \
227 VBoxHeadless \
228 $(if $(VBOX_WITH_HARDENING),VBoxHeadless.so)
229endif
230
231# BFE
232ifdef VBOX_WITH_BFE
233 VBOX_LNX_STRIP_BIN += \
234 VBoxBFE \
235 $(if $(VBOX_WITH_HARDENING),VBoxBFE.so)
236endif
237
238# Webservices
239ifdef VBOX_WITH_WEBSERVICES
240 VBOX_LNX_STRIP_BIN += \
241 vboxwebsrv \
242 webtest
243endif
244
245# EFI firmware
246ifdef VBOX_WITH_EFIFW_PACKING
247 VBOX_LNX_NO_STRIP += \
248 VBoxEFI32.fd \
249 VBoxEFI64.fd
250endif
251
252#
253# All the bin files that goes into the archives.
254#
255VBOX_LNX_ARCH_FILES := $(VBOX_LNX_STRIP_BIN) $(VBOX_LNX_STRIP_OBJ) $(VBOX_LNX_NO_STRIP) src
256
257# Cleanup of the files we copy/symlink from bin.
258OTHER_CLEAN += $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_ARCH_FILES)) \
259 $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN))
260
261
262#
263# The generic installer.
264#
265$(PATH_BIN)/$(VBOX_LNX_PACKAGE_NAME): \
266 $(VBOX_LNX_INST_STAGE_DIR)/VirtualBox.tar.bz2 \
267 $(VBOX_VERSION_STAMP) \
268 $(VBOX_PATH_LNX_INST_SRC)/routines.sh \
269 $(VBOX_PATH_LNX_INST_SRC)/deffiles \
270 $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)) \
271 $(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh \
272 $(VBOX_LNX_INST_OUT_DIR)/vboxweb-service.sh \
273 $(VBOX_LNX_INST_OUT_DIR)/install.sh \
274 $(VBOX_PATH_LNX_INST_SRC)/vboxdrv-pardus.py \
275 $(VBOX_PATH_LNX_INST_SRC)/uninstall.sh \
276 $(wildcard $(PATH_BIN)/src/*) \
277 $(wildcard $(PATH_BIN)/src/*/*) \
278 $(wildcard $(PATH_BIN)/src/*/*/*) \
279 $(wildcard $(PATH_BIN)/src/*/*/*/*)
280 $(call MSG_TOOL,makeself,,$@)
281 $(QUIET)$(RM) -f $(wildcard $(PATH_BIN)/VirtualBox-*.run)
282 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/routines.sh $(VBOX_LNX_INST_STAGE_DIR)/
283 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/deffiles $(VBOX_LNX_INST_STAGE_DIR)/
284 $(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(VBOX_BRAND_LICENSE_TXT) $(VBOX_LNX_INST_STAGE_DIR)/LICENSE)
285 $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh $(VBOX_LNX_INST_STAGE_DIR)/
286 $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/vboxweb-service.sh $(VBOX_LNX_INST_STAGE_DIR)/
287 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/vboxdrv-pardus.py $(VBOX_LNX_INST_STAGE_DIR)/
288 $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/install.sh $(VBOX_LNX_INST_STAGE_DIR)/
289 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/uninstall.sh $(VBOX_LNX_INST_STAGE_DIR)/
290 $(QUIET)$(RM) -f $@
291 $(QUIET)$(VBOX_MAKESELF) --follow --nocomp $(VBOX_LNX_INST_STAGE_DIR) $@ \
292 "VirtualBox for Linux installation" ./install.sh "\$$0 1> /dev/null"
293
294# files that needs editing before they can be included in the generic installer.
295$(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh: $(VBOX_PATH_LNX_INST_SRC)/vboxdrv.sh.in | $$(dir $$@)
296 $(QUIET)$(SED_EXT) \
297 -e "s|%NOLSB%|yes|g" \
298 -e "s|%DEBIAN%||g" \
299 -e "s|%PACKAGE%|virtualbox|g" \
300 --output $@ \
301 $<
302
303$(VBOX_LNX_INST_OUT_DIR)/vboxweb-service.sh: $(VBOX_PATH_LNX_INST_SRC)/vboxweb-service.sh.in | $$(dir $$@)
304 $(QUIET)$(SED_EXT) \
305 -e "s|%NOLSB%|yes|g" \
306 -e "s|%DEBIAN%||g" \
307 -e "s|%PACKAGE%|virtualbox|g" \
308 --output $@ \
309 $<
310
311$(VBOX_LNX_INST_OUT_DIR)/install.sh: $(VBOX_PATH_LNX_INST_SRC)/install.sh $(VBOX_VERSION_STAMP) $(VBOX_SVN_REV_KMK).ts | $$(dir $$@)
312 $(QUIET)$(SED) \
313 -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
314 -e "s;_SVNREV_;$(VBOX_SVN_REV);g" \
315 -e "s;_BUILD_;$(date-utc );g" \
316 -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
317 -e "s;_HARDENED_;$(VBOX_WITH_HARDENING);g" \
318 -e "s;_PYTHON_;$(VBOX_WITH_PYTHON);g" \
319 --output $@ \
320 $<
321
322#
323# .tar.bz2 for converting into .run
324#
325$(VBOX_LNX_INST_STAGE_DIR)/VirtualBox.tar.bz2: \
326 $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/, $(VBOX_LNX_ARCH_FILES)) \
327 $(VBOX_LNX_INST_DEP_ON_MAKEFILE) \
328 $(VBOX_VERSION_STAMP)
329 $(call MSG_L1,Packing $@)
330 $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
331 $(QUIET)$(MKDIR) -p $(@D)
332ifdef VBOX_USE_PBZIP2
333 $(QUIET)tar --owner 0 --group 0 -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR)/archive $(VBOX_LNX_ARCH_FILES)
334 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
335else
336 $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR)/archive $(VBOX_LNX_ARCH_FILES)
337endif
338 $(QUIET)$(CHMOD) 0644 $@
339
340#
341# .tar.bz2 for distribution with the files under VirtualBox-<ver>/.
342#
343$(PATH_BIN)/VirtualBox.tar.bz2: \
344 $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/, $(VBOX_LNX_ARCH_FILES)) \
345 $(VBOX_LNX_INST_DEP_ON_MAKEFILE) \
346 $(VBOX_VERSION_STAMP)
347 $(call MSG_L1,Packing $@)
348 $(QUIET)$(RM) -f -- $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING) $@ $(patsubst %.bz2,%,$@)
349 $(QUIET)$(LN_SYMLINK) $(VBOX_LNX_INST_OUT_DIR)/archive/ $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING)
350ifdef VBOX_USE_PBZIP2
351 $(QUIET)tar --owner 0 --group 0 -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR) \
352 $(addprefix VirtualBox-$(VBOX_VERSION_STRING)/,$(VBOX_LNX_ARCH_FILES))
353 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
354else
355 $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR) \
356 $(addprefix VirtualBox-$(VBOX_VERSION_STRING)/,$(VBOX_LNX_ARCH_FILES))
357endif
358 $(QUIET)$(RM) -f -- $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING)
359
360
361# pattern rule for stripping and copying the VBOX_LNX_STRIP_BIN files to archive/
362$(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_STRIP_BIN)): \
363 $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_BIN)/% \
364 $(if $(VBOX_NO_LINUX_RUN_INSTALLER),,\
365 $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/%) \
366 | $$(dir $$@)
367 $(call MSG_INST_FILE,$<,$@)
368 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
369 $(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),$@) $@)
370
371# pattern rule for striping and copying the VBOX_LNX_STRIP_OBJ files to archive/
372$(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_STRIP_OBJ)): \
373 $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_BIN)/% | $$(dir $$@)
374 $(call MSG_INST_FILE,$<,$@)
375ifeq ($(VBOX_DO_STRIP),)
376 $(QUIET)$(INSTALL) -m 0644 $< $@
377else # strip to temp file because of umask.
378 $(QUIET)objcopy --strip-unneeded -R .comment $< $@.tmp
379 $(QUIET)$(INSTALL) -m 0644 $@.tmp $@
380 $(QUIET)$(RM) -f -- $@.tmp
381endif
382
383# special rule for the kernel modules
384$(VBOX_LNX_INST_OUT_DIR)/archive/src: $(PATH_BIN)/src | $(dir $@)
385 $(call MSG_INST_SYM,$<,$@)
386 $(QUIET)$(RM) -Rf $@
387 $(QUIET)$(MKDIR) $@
388 $(QUIET)$(LN_SYMLINK) $< $@/vboxhost
389
390# pattern rule for linking the VBOX_LNX_NO_STRIP into archive/
391$(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_NO_STRIP)): \
392 $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_BIN)/% | $$(dir $$@)
393 $(call MSG_INST_SYM,$<,$@)
394 $(QUIET)$(RM) -f $@
395 $(QUIET)$(LN_SYMLINK) $< $@
396
397# rules for creating directories in archive (the pattern rules depends on these). ## @todo use BLDDIRS
398BLDDIRS += $(foreach d,\
399 archive \
400 archive/components \
401 archive/nls \
402 $(if $(VBOX_WITH_QT4_SUN),archive/accessible,) \
403 $(if $(VBOX_WITH_PYTHON),\
404 archive/sdk/installer \
405 archive/sdk/installer/vboxapi \
406 archive/sdk/bindings/xpcom/python/xpcom \
407 archive/sdk/bindings/xpcom/python/xpcom/client \
408 archive/sdk/bindings/xpcom/python/xpcom/server,) \
409 $(if $(VBOX_WITH_JXPCOM),\
410 archive/sdk/bindings/xpcom/java,) \
411 archive/additions \
412 install\
413,$(VBOX_LNX_INST_OUT_DIR)/$(d)/)
414
415
416#
417# .tar.bz2 for with the debug info.
418#
419$(PATH_BIN)/VirtualBox-dbg.tar.bz2: \
420 $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/, $(VBOX_LNX_STRIP_BIN))
421 $(call MSG_L1,Packing $@)
422 $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
423ifdef VBOX_USE_PBZIP2
424 $(QUIET)tar --owner 0 --group 0 -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR)/archive-dbg \
425 $(addprefix $(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN))
426 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
427else
428 $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR)/archive-dbg \
429 $(addprefix $(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN))
430endif
431
432# pattern rule for copying the debug info from the VBOX_LNX_STRIP_BIN files into archive-dbg/$(VBOX_LNX_DBG_PATH)/
433$(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN)): \
434 $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/% : $(PATH_BIN)/% | $$(dir $$@)
435 $(call MSG_TOOL,copydbg,$<,$@)
436 $(QUIET)objcopy --only-keep-debug $< $@
437
438# rules for creating directories in archive-dbg (the pattern rules depends on these). ## @todo use BLDDIRS
439BLDDIRS += $(foreach d,\
440 $(VBOX_LNX_DBG_PATH) \
441 $(VBOX_LNX_DBG_PATH)/components \
442,$(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(d)/)
443
444include $(KBUILD_PATH)/subfooter.kmk
445
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