VirtualBox

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

最後變更 在這個檔案從36747是 36747,由 vboxsync 提交於 14 年 前

Linux installer: higher resolution icon for the start menu

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

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