VirtualBox

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

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

Linux installer: properly handle VBoxExtPackHelperApp

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