1 | # $Id: Makefile.kmk 14516 2008-11-24 12:34:59Z 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-$(VBOX_VERSION_STRING)
|
---|
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 | deffiles \
|
---|
52 | routines.sh \
|
---|
53 | vboxdrv.sh \
|
---|
54 | VirtualBox.tar.bz2 \
|
---|
55 | LICENSE) \
|
---|
56 | $(wildcard $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-*) \
|
---|
57 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/,\
|
---|
58 | vboxdrv.sh \
|
---|
59 | install.sh)
|
---|
60 |
|
---|
61 | #
|
---|
62 | # Linux installs.
|
---|
63 | #
|
---|
64 | INSTALLS += linux-bin
|
---|
65 | linux-bin_INST = bin/
|
---|
66 | linux-bin_MODE = a+rx,u+w
|
---|
67 | linux-bin_SOURCES = \
|
---|
68 | VBoxSysInfo.sh \
|
---|
69 | VBox.sh=>VBox.sh
|
---|
70 |
|
---|
71 | INSTALLS += linux-misc
|
---|
72 | linux-misc_INST = bin/
|
---|
73 | linux-misc_MODE = a+r,u+w
|
---|
74 | linux-misc_SOURCES = \
|
---|
75 | $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/$(if $(VBOX_OSE),OSE,NonOSE)/VirtualBox_32px.png=>VBox.png \
|
---|
76 | $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)=>LICENSE) \
|
---|
77 | $(if $(VBOX_WITH_QT4GUI),$(PATH_linux-misc)/VirtualBox.desktop,)
|
---|
78 | linux-misc_CLEAN = $(PATH_linux-misc)/VirtualBox.desktop
|
---|
79 |
|
---|
80 | $$(PATH_linux-misc)/VirtualBox.desktop: $(PATH_SUB_CURRENT)/VirtualBox.desktop $(VBOX_VERSION_STAMP) | $$(dir $$@)
|
---|
81 | $(call MSG_GENERATE,,$@,$<)
|
---|
82 | ifdef VBOX_PATH_PACKAGE_DOCS
|
---|
83 | $(QUIET)$(SED) -e "s+\$$VBOX_DOC_PATH+$(VBOX_PATH_PACKAGE_DOCS)+" --output $@ $<
|
---|
84 | else
|
---|
85 | $(QUIET)$(SED) -e "s+\$$VBOX_DOC_PATH+/opt/VirtualBox-$(VBOX_VERSION_STRING)+" --output $@ $<
|
---|
86 | endif
|
---|
87 |
|
---|
88 |
|
---|
89 |
|
---|
90 | #
|
---|
91 | # The files residing in bin/ that we'll ship.
|
---|
92 | #
|
---|
93 |
|
---|
94 | # Strip these binaries
|
---|
95 | VBOX_LNX_STRIP_BIN = \
|
---|
96 | VBoxDD.so \
|
---|
97 | VBoxDD2.so \
|
---|
98 | VBoxManage \
|
---|
99 | VBoxREM.so \
|
---|
100 | VBoxRT.so \
|
---|
101 | $(if $(VBOX_WITH_VBOXSDL),VBoxSDL $(if $(VBOX_WITH_HARDENING),VBoxSDL.so),) \
|
---|
102 | VBoxSettings.so \
|
---|
103 | VBoxSharedClipboard.so \
|
---|
104 | VBoxSharedFolders.so \
|
---|
105 | $(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestPropSvc.so) \
|
---|
106 | VBoxSVC \
|
---|
107 | VBoxDDU.so \
|
---|
108 | VBoxVMM.so \
|
---|
109 | VBoxXPCOM.so \
|
---|
110 | VBoxXPCOMIPCD \
|
---|
111 | $(if $(VBOX_WITH_CROGL),\
|
---|
112 | VBoxOGLhostcrutil.so \
|
---|
113 | VBoxOGLhosterrorspu.so \
|
---|
114 | VBoxOGLrenderspu.so \
|
---|
115 | VBoxSharedCrOpenGL.so) \
|
---|
116 | $(if $(VBOX_WITH_PYTHON),VBoxPython.so,) \
|
---|
117 | VBoxTunctl \
|
---|
118 | components/VBoxC.so \
|
---|
119 | components/VBoxSVCM.so \
|
---|
120 | components/VBoxXPCOMIPCC.so \
|
---|
121 | $(if $(VBOX_OSE),,VRDPAuth.so)
|
---|
122 |
|
---|
123 |
|
---|
124 | # Do not remove relocation information of these binaries
|
---|
125 | VBOX_LNX_STRIP_OBJ = \
|
---|
126 | VBoxDD2GC.gc \
|
---|
127 | VBoxDD2R0.r0 \
|
---|
128 | VBoxDDGC.gc \
|
---|
129 | VBoxDDR0.r0 \
|
---|
130 | VMMGC.gc \
|
---|
131 | VMMR0.r0
|
---|
132 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
133 | ifndef VBOX_WITH_NEW_RECOMPILER
|
---|
134 | VBOX_LNX_STRIP_OBJ += \
|
---|
135 | VBoxREM2.rel
|
---|
136 | endif
|
---|
137 | endif
|
---|
138 |
|
---|
139 | # Do not strip anything of these files
|
---|
140 | VBOX_LNX_NO_STRIP = \
|
---|
141 | $(if $(VBOX_OSE),,LICENSE) \
|
---|
142 | components/VBoxXPCOMBase.xpt \
|
---|
143 | components/VirtualBox_XPCOM.xpt \
|
---|
144 | VBoxSysInfo.sh \
|
---|
145 | VBox.sh \
|
---|
146 | VBox.png \
|
---|
147 | src
|
---|
148 |
|
---|
149 | # Qt4 GUI
|
---|
150 | ifdef VBOX_WITH_QT4GUI
|
---|
151 | include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox4/nls/ApprovedLanguages.kmk
|
---|
152 | VBOX_LNX_STRIP_BIN += \
|
---|
153 | VBoxKeyboard.so \
|
---|
154 | VirtualBox \
|
---|
155 | $(if $(VBOX_WITH_HARDENING),VirtualBox.so) \
|
---|
156 | $(if $(VBOX_WITH_DEBUGGER_GUI),VBoxDbg.so)
|
---|
157 | VBOX_LNX_NO_STRIP += \
|
---|
158 | VirtualBox.desktop \
|
---|
159 | $(VBOX_LICENSE_FILES) \
|
---|
160 | $(if $(VBOX_WITH_QT4_SUN),$(notdir $(wildcard $(PATH_BIN)/libVBox*)),) \
|
---|
161 | $(if $(VBOX_WITH_QT4_SUN),accessible/libqtaccessiblewidgets.so,) \
|
---|
162 | $(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES),nls/VirtualBox_$(f).qm nls/qt_$(f).qm)
|
---|
163 | endif
|
---|
164 |
|
---|
165 | # Guest Additions
|
---|
166 | ifdef VBOX_WITH_ADDITIONS_PACKING
|
---|
167 | VBOX_LNX_NO_STRIP += \
|
---|
168 | additions/VBoxGuestAdditions.iso
|
---|
169 | endif
|
---|
170 |
|
---|
171 |
|
---|
172 | # Documentation
|
---|
173 | ifdef VBOX_WITH_DOCS_PACKING
|
---|
174 | VBOX_LNX_NO_STRIP += \
|
---|
175 | VirtualBox.chm UserManual.pdf \
|
---|
176 | $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),VirtualBox_$(f).chm UserManual_$(f).pdf)
|
---|
177 | VBOX_LNX_STRIP_BIN += \
|
---|
178 | $(if $(VBOX_WITH_KCHMVIEWER),kchmviewer,)
|
---|
179 | endif
|
---|
180 |
|
---|
181 | # VRDP
|
---|
182 | ifdef VBOX_WITH_VRDP
|
---|
183 | VBOX_LNX_STRIP_BIN += \
|
---|
184 | VBoxVRDP.so
|
---|
185 | VBOX_LNX_NO_STRIP += \
|
---|
186 | rdesktop-vrdp.tar.gz
|
---|
187 | ifdef VBOX_WITH_VRDP_RDESKTOP
|
---|
188 | VBOX_LNX_NO_STRIP += \
|
---|
189 | rdesktop-vrdp-keymaps
|
---|
190 | VBOX_LNX_STRIP_BIN += \
|
---|
191 | rdesktop-vrdp
|
---|
192 | endif
|
---|
193 | endif
|
---|
194 |
|
---|
195 | # Headless
|
---|
196 | ifdef VBOX_WITH_HEADLESS
|
---|
197 | VBOX_LNX_STRIP_BIN += \
|
---|
198 | VBoxHeadless \
|
---|
199 | $(if $(VBOX_WITH_HARDENING),VBoxHeadless.so)
|
---|
200 | endif
|
---|
201 |
|
---|
202 | # Webservices
|
---|
203 | ifdef VBOX_WITH_WEBSERVICES
|
---|
204 | VBOX_LNX_STRIP_BIN += \
|
---|
205 | vboxwebsrv \
|
---|
206 | webtest
|
---|
207 | endif
|
---|
208 |
|
---|
209 | #
|
---|
210 | # All the bin files that goes into the archives.
|
---|
211 | #
|
---|
212 | VBOX_LNX_ARCH_FILES := $(VBOX_LNX_STRIP_BIN) $(VBOX_LNX_STRIP_OBJ) $(VBOX_LNX_NO_STRIP)
|
---|
213 |
|
---|
214 | # Cleanup of the files we copy/symlink from bin.
|
---|
215 | OTHER_CLEAN += $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_ARCH_FILES)) \
|
---|
216 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN))
|
---|
217 |
|
---|
218 |
|
---|
219 | #
|
---|
220 | # The generic installer.
|
---|
221 | #
|
---|
222 | $(PATH_BIN)/$(VBOX_LNX_PACKAGE_NAME): \
|
---|
223 | $(VBOX_LNX_INST_STAGE_DIR)/VirtualBox.tar.bz2 \
|
---|
224 | $(VBOX_VERSION_STAMP) \
|
---|
225 | $(VBOX_PATH_LNX_INST_SRC)/routines.sh \
|
---|
226 | $(VBOX_PATH_LNX_INST_SRC)/deffiles \
|
---|
227 | $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)) \
|
---|
228 | $(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh \
|
---|
229 | $(VBOX_LNX_INST_OUT_DIR)/install.sh \
|
---|
230 | $(wildcard $(PATH_BIN)/src/*) \
|
---|
231 | $(wildcard $(PATH_BIN)/src/*/*) \
|
---|
232 | $(wildcard $(PATH_BIN)/src/*/*/*) \
|
---|
233 | $(wildcard $(PATH_BIN)/src/*/*/*/*)
|
---|
234 | $(call MSG_TOOL,makeself,,$@)
|
---|
235 | $(QUIET)$(RM) -f $(wildcard $(PATH_BIN)/VirtualBox-*.run)
|
---|
236 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/routines.sh $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
237 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/deffiles $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
238 | $(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(VBOX_BRAND_LICENSE_TXT) $(VBOX_LNX_INST_STAGE_DIR)/LICENSE)
|
---|
239 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
240 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/install.sh $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
241 | $(QUIET)$(RM) -f $@
|
---|
242 | $(QUIET)$(VBOX_MAKESELF) --follow --nocomp $(VBOX_LNX_INST_STAGE_DIR) $@ \
|
---|
243 | "VirtualBox for Linux installation" ./install.sh "\$$0 1> /dev/null"
|
---|
244 |
|
---|
245 | # files that needs editing before they can be included in the generic installer.
|
---|
246 | $(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh: $(VBOX_PATH_LNX_INST_SRC)/vboxdrv.sh.in | $$(dir $$@)
|
---|
247 | $(QUIET)$(SED_EXT) \
|
---|
248 | -e "s|%NOLSB%|yes|g" \
|
---|
249 | -e "s|%PACKAGE%|virtualbox|g" \
|
---|
250 | --output $@ \
|
---|
251 | $<
|
---|
252 |
|
---|
253 | $(VBOX_LNX_INST_OUT_DIR)/install.sh: $(VBOX_PATH_LNX_INST_SRC)/install.sh | $$(dir $$@)
|
---|
254 | $(QUIET)$(SED) \
|
---|
255 | -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
|
---|
256 | -e "s;_BUILD_;$(date-utc );g" \
|
---|
257 | -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
|
---|
258 | -e "s;_HARDENED_;$(VBOX_WITH_HARDENING);g" \
|
---|
259 | --output $@ \
|
---|
260 | $<
|
---|
261 |
|
---|
262 | #
|
---|
263 | # .tar.bz2 for converting into .run
|
---|
264 | #
|
---|
265 | $(VBOX_LNX_INST_STAGE_DIR)/VirtualBox.tar.bz2: \
|
---|
266 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/, $(VBOX_LNX_ARCH_FILES)) \
|
---|
267 | $(VBOX_LNX_INST_DEP_ON_MAKEFILE) \
|
---|
268 | $(VBOX_VERSION_STAMP)
|
---|
269 | $(call MSG_L1,Packing $@)
|
---|
270 | $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
|
---|
271 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
272 | ifdef VBOX_USE_PBZIP2
|
---|
273 | $(QUIET)tar --owner 0 --group 0 -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR)/archive $(VBOX_LNX_ARCH_FILES)
|
---|
274 | $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
|
---|
275 | else
|
---|
276 | $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR)/archive $(VBOX_LNX_ARCH_FILES)
|
---|
277 | endif
|
---|
278 | $(QUIET)$(CHMOD) 0644 $@
|
---|
279 |
|
---|
280 | #
|
---|
281 | # .tar.bz2 for distribution with the files under VirtualBox-<ver>/.
|
---|
282 | #
|
---|
283 | $(PATH_BIN)/VirtualBox.tar.bz2: \
|
---|
284 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/, $(VBOX_LNX_ARCH_FILES)) \
|
---|
285 | $(VBOX_LNX_INST_DEP_ON_MAKEFILE) \
|
---|
286 | $(VBOX_VERSION_STAMP)
|
---|
287 | $(call MSG_L1,Packing $@)
|
---|
288 | $(QUIET)$(RM) -f -- $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING) $@ $(patsubst %.bz2,%,$@)
|
---|
289 | $(QUIET)$(LN_SYMLINK) $(VBOX_LNX_INST_OUT_DIR)/archive/ $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING)
|
---|
290 | ifdef VBOX_USE_PBZIP2
|
---|
291 | $(QUIET)tar --owner 0 --group 0 -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR) \
|
---|
292 | $(addprefix VirtualBox-$(VBOX_VERSION_STRING)/,$(VBOX_LNX_ARCH_FILES))
|
---|
293 | $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
|
---|
294 | else
|
---|
295 | $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR) \
|
---|
296 | $(addprefix VirtualBox-$(VBOX_VERSION_STRING)/,$(VBOX_LNX_ARCH_FILES))
|
---|
297 | endif
|
---|
298 | $(QUIET)$(RM) -f -- $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING)
|
---|
299 |
|
---|
300 |
|
---|
301 | # pattern rule for stripping and copying the VBOX_LNX_STRIP_BIN files to archive/
|
---|
302 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_STRIP_BIN)): \
|
---|
303 | $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_BIN)/% \
|
---|
304 | $(if $(VBOX_NO_LINUX_RUN_INSTALLER),,\
|
---|
305 | $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/%) \
|
---|
306 | | $$(dir $$@)
|
---|
307 | $(call MSG_INST_FILE,$<,$@)
|
---|
308 | $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
|
---|
309 | $(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),$@) $@)
|
---|
310 |
|
---|
311 | # pattern rule for striping and copying the VBOX_LNX_STRIP_OBJ files to archive/
|
---|
312 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_STRIP_OBJ)): \
|
---|
313 | $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_BIN)/% | $$(dir $$@)
|
---|
314 | $(call MSG_INST_FILE,$<,$@)
|
---|
315 | ifeq ($(VBOX_DO_STRIP),)
|
---|
316 | $(QUIET)$(INSTALL) -m 0644 $< $@
|
---|
317 | else # strip to temp file because of umask.
|
---|
318 | $(QUIET)objcopy --strip-unneeded -R .comment $< [email protected]
|
---|
319 | $(QUIET)$(INSTALL) -m 0644 [email protected] $@
|
---|
320 | $(QUIET)$(RM) -f -- [email protected]
|
---|
321 | endif
|
---|
322 |
|
---|
323 | # pattern rule for linking the VBOX_LNX_NO_STRIP into archive/
|
---|
324 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_NO_STRIP)): \
|
---|
325 | $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_BIN)/% | $$(dir $$@)
|
---|
326 | $(call MSG_INST_SYM,$<,$@)
|
---|
327 | $(QUIET)$(RM) -f $@
|
---|
328 | $(QUIET)$(LN_SYMLINK) $< $@
|
---|
329 |
|
---|
330 | # rules for creating directories in archive (the pattern rules depends on these). ## @todo use BLDDIRS
|
---|
331 | BLDDIRS += $(foreach d,\
|
---|
332 | archive \
|
---|
333 | archive/components \
|
---|
334 | archive/nls \
|
---|
335 | $(if $(VBOX_WITH_QT4_SUN),archive/accessible,) \
|
---|
336 | archive/additions \
|
---|
337 | install\
|
---|
338 | ,$(VBOX_LNX_INST_OUT_DIR)/$(d)/)
|
---|
339 |
|
---|
340 |
|
---|
341 | #
|
---|
342 | # .tar.bz2 for with the debug info.
|
---|
343 | #
|
---|
344 | $(PATH_BIN)/VirtualBox-dbg.tar.bz2: \
|
---|
345 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/, $(VBOX_LNX_STRIP_BIN))
|
---|
346 | $(call MSG_L1,Packing $@)
|
---|
347 | $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
|
---|
348 | ifdef VBOX_USE_PBZIP2
|
---|
349 | $(QUIET)tar --owner 0 --group 0 -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR)/archive-dbg \
|
---|
350 | $(addprefix $(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN))
|
---|
351 | $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
|
---|
352 | else
|
---|
353 | $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR)/archive-dbg \
|
---|
354 | $(addprefix $(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN))
|
---|
355 | endif
|
---|
356 |
|
---|
357 | # pattern rule for copying the debug info from the VBOX_LNX_STRIP_BIN files into archive-dbg/$(VBOX_LNX_DBG_PATH)/
|
---|
358 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN)): \
|
---|
359 | $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/% : $(PATH_BIN)/% | $$(dir $$@)
|
---|
360 | $(call MSG_TOOL,copydbg,$<,$@)
|
---|
361 | $(QUIET)objcopy --only-keep-debug $< $@
|
---|
362 |
|
---|
363 | # rules for creating directories in archive-dbg (the pattern rules depends on these). ## @todo use BLDDIRS
|
---|
364 | BLDDIRS += $(foreach d,\
|
---|
365 | $(VBOX_LNX_DBG_PATH) \
|
---|
366 | $(VBOX_LNX_DBG_PATH)/components \
|
---|
367 | ,$(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(d)/)
|
---|
368 |
|
---|
369 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
370 |
|
---|