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