VirtualBox

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

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

Installer/linux: packaging and service scripts for VBoxBalloonCtrl

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 16.1 KB
 
1# $Id: Makefile.kmk 36688 2011-04-15 16:48:33Z 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)
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
284#
285# All the bin files that goes into the archives.
286#
287VBOX_LNX_ARCH_FILES := $(VBOX_LNX_STRIP_BIN) $(VBOX_LNX_STRIP_OBJ) $(VBOX_LNX_NO_STRIP) src
288
289# Cleanup of the files we copy/symlink from bin.
290OTHER_CLEAN += $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_ARCH_FILES)) \
291 $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN))
292
293
294#
295# The generic installer.
296#
297$(PATH_BIN)/$(VBOX_LNX_PACKAGE_NAME): \
298 $(VBOX_LNX_INST_STAGE_DIR)/VirtualBox.tar.bz2 \
299 $(VBOX_VERSION_STAMP) \
300 $(VBOX_PATH_LNX_INST_SRC)/routines.sh \
301 $(VBOX_PATH_LNX_INST_SRC)/deffiles \
302 $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)) \
303 $(VBOX_LNX_INST_OUT_DIR)/vboxballoonctrl-service.sh \
304 $(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh \
305 $(VBOX_LNX_INST_OUT_DIR)/vboxweb-service.sh \
306 $(VBOX_LNX_INST_OUT_DIR)/install.sh \
307 $(VBOX_PATH_LNX_INST_SRC)/vboxdrv-pardus.py \
308 $(VBOX_PATH_LNX_INST_SRC)/uninstall.sh \
309 $(wildcard $(PATH_BIN)/src/*) \
310 $(wildcard $(PATH_BIN)/src/*/*) \
311 $(wildcard $(PATH_BIN)/src/*/*/*) \
312 $(wildcard $(PATH_BIN)/src/*/*/*/*)
313 $(call MSG_TOOL,makeself,,$@)
314 $(QUIET)$(RM) -f $(wildcard $(PATH_BIN)/VirtualBox-*.run)
315 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/routines.sh $(VBOX_LNX_INST_STAGE_DIR)/
316 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/deffiles $(VBOX_LNX_INST_STAGE_DIR)/
317 $(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(VBOX_BRAND_LICENSE_TXT) $(VBOX_LNX_INST_STAGE_DIR)/LICENSE)
318 $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/vboxballoonctrl-service.sh $(VBOX_LNX_INST_STAGE_DIR)/
319 $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh $(VBOX_LNX_INST_STAGE_DIR)/
320 $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/vboxweb-service.sh $(VBOX_LNX_INST_STAGE_DIR)/
321 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/vboxdrv-pardus.py $(VBOX_LNX_INST_STAGE_DIR)/
322 $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/install.sh $(VBOX_LNX_INST_STAGE_DIR)/
323 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/uninstall.sh $(VBOX_LNX_INST_STAGE_DIR)/
324 $(QUIET)$(RM) -f $@
325 $(QUIET)$(VBOX_MAKESELF) --follow --nocomp $(VBOX_LNX_INST_STAGE_DIR) $@ \
326 "VirtualBox for Linux installation" ./install.sh "\$$0 1> /dev/null"
327
328# files that needs editing before they can be included in the generic installer.
329$(VBOX_LNX_INST_OUT_DIR)/vboxballoonctrl-service.sh: $(VBOX_PATH_LNX_INST_SRC)/vboxballoonctrl-service.sh.in | $$(dir $$@)
330 $(QUIET)$(SED_EXT) \
331 -e "s|%NOLSB%|yes|g" \
332 -e "s|%DEBIAN%||g" \
333 -e "s|%PACKAGE%|virtualbox|g" \
334 --output $@ \
335 $<
336
337$(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh: $(VBOX_PATH_LNX_INST_SRC)/vboxdrv.sh.in | $$(dir $$@)
338 $(QUIET)$(SED_EXT) \
339 -e "s|%NOLSB%|yes|g" \
340 -e "s|%DEBIAN%||g" \
341 -e "s|%PACKAGE%|virtualbox|g" \
342 -e "s|%GROUP%|$(if $(VBOX_WITHOUT_HARDENING),vboxusers,root)|g" \
343 --output $@ \
344 $<
345
346$(VBOX_LNX_INST_OUT_DIR)/vboxweb-service.sh: $(VBOX_PATH_LNX_INST_SRC)/vboxweb-service.sh.in | $$(dir $$@)
347 $(QUIET)$(SED_EXT) \
348 -e "s|%NOLSB%|yes|g" \
349 -e "s|%DEBIAN%||g" \
350 -e "s|%PACKAGE%|virtualbox|g" \
351 --output $@ \
352 $<
353
354$(VBOX_LNX_INST_OUT_DIR)/install.sh: $(VBOX_PATH_LNX_INST_SRC)/install.sh $(VBOX_VERSION_STAMP) $(VBOX_SVN_REV_KMK).ts | $$(dir $$@)
355 $(QUIET)$(SED) \
356 -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
357 -e "s;_SVNREV_;$(VBOX_SVN_REV);g" \
358 -e "s;_BUILD_;$(date-utc );g" \
359 -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
360 -e "s;_HARDENED_;$(VBOX_WITH_HARDENING);g" \
361 -e "s;_PYTHON_;$(VBOX_WITH_PYTHON);g" \
362 --output $@ \
363 $<
364
365#
366# .tar.bz2 for converting into .run
367#
368$(VBOX_LNX_INST_STAGE_DIR)/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 -- $@ $(patsubst %.bz2,%,$@)
374 $(QUIET)$(MKDIR) -p $(@D)
375ifdef VBOX_USE_PBZIP2
376 $(QUIET)tar --owner 0 --group 0 -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR)/archive $(VBOX_LNX_ARCH_FILES)
377 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
378else
379 $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR)/archive $(VBOX_LNX_ARCH_FILES)
380endif
381 $(QUIET)$(CHMOD) 0644 $@
382
383#
384# .tar.bz2 for distribution with the files under VirtualBox-<ver>/.
385#
386$(PATH_BIN)/VirtualBox.tar.bz2: \
387 $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/, $(VBOX_LNX_ARCH_FILES)) \
388 $(VBOX_LNX_INST_DEP_ON_MAKEFILE) \
389 $(VBOX_VERSION_STAMP)
390 $(call MSG_L1,Packing $@)
391 $(QUIET)$(RM) -f -- $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING) $@ $(patsubst %.bz2,%,$@)
392 $(QUIET)$(LN_SYMLINK) $(VBOX_LNX_INST_OUT_DIR)/archive/ $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING)
393ifdef VBOX_USE_PBZIP2
394 $(QUIET)tar --owner 0 --group 0 -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR) \
395 $(addprefix VirtualBox-$(VBOX_VERSION_STRING)/,$(VBOX_LNX_ARCH_FILES))
396 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
397else
398 $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR) \
399 $(addprefix VirtualBox-$(VBOX_VERSION_STRING)/,$(VBOX_LNX_ARCH_FILES))
400endif
401 $(QUIET)$(RM) -f -- $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING)
402
403
404# pattern rule for stripping and copying the VBOX_LNX_STRIP_BIN files to archive/
405$(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_STRIP_BIN)): \
406 $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_BIN)/% \
407 $(if $(VBOX_NO_LINUX_RUN_INSTALLER),,\
408 $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/%) \
409 | $$(dir $$@)
410 $(call MSG_INST_FILE,$<,$@)
411 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
412 $(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),$@) $@)
413
414# pattern rule for striping and copying the VBOX_LNX_STRIP_OBJ files to archive/
415$(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_STRIP_OBJ)): \
416 $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_BIN)/% | $$(dir $$@)
417 $(call MSG_INST_FILE,$<,$@)
418ifeq ($(VBOX_DO_STRIP),)
419 $(QUIET)$(INSTALL) -m 0644 $< $@
420else # strip to temp file because of umask.
421 $(QUIET)objcopy --strip-unneeded -R .comment $< [email protected]
422 $(QUIET)$(INSTALL) -m 0644 [email protected] $@
423 $(QUIET)$(RM) -f -- [email protected]
424endif
425
426# special rule for the kernel modules
427$(VBOX_LNX_INST_OUT_DIR)/archive/src: $(PATH_BIN)/src | $(dir $@)
428 $(call MSG_INST_SYM,$<,$@)
429 $(QUIET)$(RM) -Rf $@
430 $(QUIET)$(MKDIR) $@
431 $(QUIET)$(LN_SYMLINK) $< $@/vboxhost
432
433# pattern rule for linking the VBOX_LNX_NO_STRIP into archive/
434$(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_NO_STRIP)): \
435 $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_BIN)/% | $$(dir $$@)
436 $(call MSG_INST_SYM,$<,$@)
437 $(QUIET)$(RM) -f $@
438 $(QUIET)$(LN_SYMLINK) $< $@
439
440# rules for creating directories in archive (the pattern rules depends on these). ## @todo use BLDDIRS
441BLDDIRS += $(foreach d,\
442 archive \
443 archive/components \
444 archive/nls \
445 $(if $(VBOX_WITH_QT4_SUN),archive/accessible,) \
446 $(if $(VBOX_WITH_PYTHON),\
447 archive/sdk/installer \
448 archive/sdk/installer/vboxapi \
449 archive/sdk/bindings/xpcom/python/xpcom \
450 archive/sdk/bindings/xpcom/python/xpcom/client \
451 archive/sdk/bindings/xpcom/python/xpcom/server,) \
452 $(if $(VBOX_WITH_JXPCOM),\
453 archive/sdk/bindings/xpcom/java,) \
454 archive/additions \
455 install\
456,$(VBOX_LNX_INST_OUT_DIR)/$(d)/)
457
458
459#
460# .tar.bz2 for with the debug info.
461#
462$(PATH_BIN)/VirtualBox-dbg.tar.bz2: \
463 $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/, $(VBOX_LNX_STRIP_BIN))
464 $(call MSG_L1,Packing $@)
465 $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
466ifdef VBOX_USE_PBZIP2
467 $(QUIET)tar --owner 0 --group 0 -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR)/archive-dbg \
468 $(addprefix $(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN))
469 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
470else
471 $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR)/archive-dbg \
472 $(addprefix $(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN))
473endif
474
475# pattern rule for copying the debug info from the VBOX_LNX_STRIP_BIN files into archive-dbg/$(VBOX_LNX_DBG_PATH)/
476$(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN)): \
477 $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/% : $(PATH_BIN)/% | $$(dir $$@)
478 $(call MSG_TOOL,copydbg,$<,$@)
479 $(QUIET)objcopy --only-keep-debug $< $@
480
481# rules for creating directories in archive-dbg (the pattern rules depends on these). ## @todo use BLDDIRS
482BLDDIRS += $(foreach d,\
483 $(VBOX_LNX_DBG_PATH) \
484 $(VBOX_LNX_DBG_PATH)/components \
485,$(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(d)/)
486
487include $(KBUILD_PATH)/subfooter.kmk
488
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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