VirtualBox

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

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

Installer/linux: /dev/vboxdrv should belong to the group vboxusers in non-hardened builds

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