1 | # $Id: Makefile.kmk 33185 2010-10-18 08:40:50Z 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 |
|
---|
18 | SUB_DEPTH = ../../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 | ifneq ($(KBUILD_HOST),linux)
|
---|
22 | $(error "The Linux installer can only be built on Linux!")
|
---|
23 | endif
|
---|
24 |
|
---|
25 | #
|
---|
26 | # Globals and targets.
|
---|
27 | #
|
---|
28 | VBOX_PATH_LNX_INST_SRC := $(PATH_SUB_CURRENT)
|
---|
29 | VBOX_LNX_INST_OUT_DIR := $(PATH_TARGET)/Installer/linux
|
---|
30 | VBOX_LNX_INST_STAGE_DIR := $(PATH_TARGET)/Installer/linux/install
|
---|
31 | VBOX_LNX_DBG_PATH := usr/lib/debug/opt/VirtualBox
|
---|
32 | VBOX_LNX_PACKAGE_NAME = VirtualBox-$(VBOX_VERSION_STRING)-r$(VBOX_SVN_REV).run
|
---|
33 |
|
---|
34 | # Unset this to speed up things during makefile hacking.
|
---|
35 | VBOX_LNX_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT)
|
---|
36 |
|
---|
37 | BLDDIRS += $(VBOX_LNX_INST_OUT_DIR) $(VBOX_LNX_INST_STAGE_DIR)
|
---|
38 | PACKING += $(PATH_BIN)/VirtualBox.tar.bz2
|
---|
39 | if !defined(VBOX_NO_LINUX_RUN_INSTALLER)
|
---|
40 | PACKING += $(PATH_BIN)/$(VBOX_LNX_PACKAGE_NAME) \
|
---|
41 | $(PATH_BIN)/VirtualBox-dbg.tar.bz2
|
---|
42 | endif
|
---|
43 |
|
---|
44 | OTHER_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 | #
|
---|
63 | INSTALLS += linux-bin
|
---|
64 | linux-bin_INST = bin/
|
---|
65 | linux-bin_MODE = a+rx,u+w
|
---|
66 | linux-bin_SOURCES = \
|
---|
67 | VBoxSysInfo.sh \
|
---|
68 | VBox.sh=>VBox.sh \
|
---|
69 | $(if $(VBOX_WITH_PYTHON),$(PATH_ROOT)/src/VBox/Frontends/VBoxShell/vboxshell.py=>vboxshell.py,)
|
---|
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_QTGUI),$(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+" --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 | VBoxREM.so \
|
---|
99 | VBoxDDU.so \
|
---|
100 | VBoxVMM.so \
|
---|
101 | $(if $(eq $(KBUILD_TARGET_ARCH),x86),VBoxREM32.so,) \
|
---|
102 | $(if $(eq $(KBUILD_TARGET_ARCH),x86),VBoxREM64.so,) \
|
---|
103 | VBoxRT.so \
|
---|
104 | $(if $(VBOX_WITH_VBOXSDL),VBoxSDL $(if $(VBOX_WITH_HARDENING),VBoxSDL.so),) \
|
---|
105 | $(if $(VBOX_WITH_SHARED_CLIPBOARD), VBoxSharedClipboard.so,) \
|
---|
106 | $(if $(VBOX_WITH_SHARED_FOLDERS), VBoxSharedFolders.so,) \
|
---|
107 | $(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestPropSvc.so,) \
|
---|
108 | $(if $(VBOX_WITH_GUEST_CONTROL),VBoxGuestControlSvc.so,) \
|
---|
109 | $(if $(VBOX_WITH_MAIN), \
|
---|
110 | VBoxManage \
|
---|
111 | VBoxNetDHCP $(if $(VBOX_WITH_HARDENING),VBoxNetDHCP.so,) \
|
---|
112 | VBoxNetAdpCtl \
|
---|
113 | VBoxSVC \
|
---|
114 | VBoxXPCOM.so \
|
---|
115 | VBoxXPCOMC.so \
|
---|
116 | VBoxXPCOMIPCD \
|
---|
117 | components/VBoxXPCOMIPCC.so \
|
---|
118 | components/VBoxSVCM.so \
|
---|
119 | components/VBoxC.so,) \
|
---|
120 | $(if $(VBOX_WITH_CROGL),\
|
---|
121 | VBoxOGLhostcrutil.so \
|
---|
122 | VBoxOGLhosterrorspu.so \
|
---|
123 | VBoxOGLrenderspu.so \
|
---|
124 | VBoxTestOGL \
|
---|
125 | VBoxSharedCrOpenGL.so,) \
|
---|
126 | $(if $(VBOX_WITH_PYTHON),$(notdir $(wildcard $(PATH_BIN)/VBoxPython*.so)),) \
|
---|
127 | $(if $(VBOX_WITH_JXPCOM),libvboxjxpcom.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 |
|
---|
150 | # Qt4 GUI
|
---|
151 | ifdef VBOX_WITH_QTGUI
|
---|
152 | include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
|
---|
153 | VBOX_LNX_STRIP_BIN += \
|
---|
154 | VBoxKeyboard.so \
|
---|
155 | VirtualBox \
|
---|
156 | $(if $(VBOX_WITH_HARDENING),VirtualBox.so) \
|
---|
157 | $(if $(VBOX_WITH_DEBUGGER_GUI),VBoxDbg.so)
|
---|
158 | VBOX_LNX_NO_STRIP += \
|
---|
159 | virtualbox.desktop \
|
---|
160 | $(VBOX_LICENSE_FILES) \
|
---|
161 | $(if $(VBOX_WITH_QT4_SUN),$(notdir $(wildcard $(PATH_BIN)/lib*VBox*)),) \
|
---|
162 | $(if $(VBOX_WITH_QT4_SUN),accessible/libqtaccessiblewidgets.so,) \
|
---|
163 | $(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES),nls/VirtualBox_$(f).qm nls/qt_$(f).qm)
|
---|
164 | endif
|
---|
165 |
|
---|
166 | # Guest Additions
|
---|
167 | ifdef VBOX_WITH_ADDITIONS_PACKING
|
---|
168 | VBOX_LNX_NO_STRIP += \
|
---|
169 | additions/VBoxGuestAdditions.iso
|
---|
170 | endif
|
---|
171 |
|
---|
172 | # Documentation
|
---|
173 | ifdef VBOX_WITH_DOCS_PACKING
|
---|
174 | VBOX_LNX_NO_STRIP += \
|
---|
175 | UserManual.pdf \
|
---|
176 | $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),UserManual_$(f).pdf)
|
---|
177 | ifdef VBOX_WITH_DOCS_CHM
|
---|
178 | VBOX_LNX_NO_STRIP += \
|
---|
179 | VirtualBox.chm \
|
---|
180 | $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),VirtualBox_$(f).chm)
|
---|
181 | endif
|
---|
182 | VBOX_LNX_STRIP_BIN += \
|
---|
183 | $(if $(VBOX_WITH_KCHMVIEWER),kchmviewer,)
|
---|
184 | endif
|
---|
185 |
|
---|
186 | # auth stuff
|
---|
187 | VBOX_LNX_STRIP_BIN += \
|
---|
188 | VBoxAuth.so \
|
---|
189 | VBoxAuthSimple.so
|
---|
190 |
|
---|
191 | # VRDP
|
---|
192 | ifdef VBOX_WITH_VRDP
|
---|
193 | VBOX_LNX_STRIP_BIN += \
|
---|
194 | VBoxVRDP.so
|
---|
195 | ifdef VBOX_WITH_VRDP_RDESKTOP
|
---|
196 | VBOX_LNX_NO_STRIP += \
|
---|
197 | rdesktop-vrdp.tar.gz
|
---|
198 | VBOX_LNX_NO_STRIP += \
|
---|
199 | rdesktop-vrdp-keymaps
|
---|
200 | VBOX_LNX_STRIP_BIN += \
|
---|
201 | rdesktop-vrdp
|
---|
202 | endif
|
---|
203 | endif
|
---|
204 |
|
---|
205 | # Python XPCOM glue
|
---|
206 | ifdef VBOX_WITH_PYTHON
|
---|
207 | VBOX_LNX_NO_STRIP += \
|
---|
208 | $(foreach f,$(notdir $(wildcard $(PATH_BIN)/sdk/bindings/xpcom/python/xpcom/*.py)),sdk/bindings/xpcom/python/xpcom/$(f)) \
|
---|
209 | sdk/bindings/xpcom/python/xpcom/client/__init__.py \
|
---|
210 | sdk/bindings/xpcom/python/xpcom/server/__init__.py \
|
---|
211 | sdk/bindings/xpcom/python/xpcom/server/enumerator.py \
|
---|
212 | sdk/bindings/xpcom/python/xpcom/server/factory.py \
|
---|
213 | sdk/bindings/xpcom/python/xpcom/server/loader.py \
|
---|
214 | sdk/bindings/xpcom/python/xpcom/server/module.py \
|
---|
215 | sdk/bindings/xpcom/python/xpcom/server/policy.py \
|
---|
216 | sdk/installer/vboxapisetup.py \
|
---|
217 | sdk/installer/vboxapi/__init__.py \
|
---|
218 | sdk/installer/vboxapi/VirtualBox_constants.py
|
---|
219 | endif
|
---|
220 |
|
---|
221 | # Java XPCOM bridge
|
---|
222 | ifdef VBOX_WITH_JXPCOM
|
---|
223 | VBOX_LNX_NO_STRIP += \
|
---|
224 | sdk/bindings/xpcom/java/vboxjxpcom.jar
|
---|
225 | endif
|
---|
226 |
|
---|
227 | # Headless
|
---|
228 | ifdef VBOX_WITH_HEADLESS
|
---|
229 | VBOX_LNX_STRIP_BIN += \
|
---|
230 | VBoxHeadless \
|
---|
231 | $(if $(VBOX_WITH_HARDENING),VBoxHeadless.so)
|
---|
232 | endif
|
---|
233 |
|
---|
234 | # BFE
|
---|
235 | ifdef VBOX_WITH_BFE
|
---|
236 | VBOX_LNX_STRIP_BIN += \
|
---|
237 | VBoxBFE \
|
---|
238 | $(if $(VBOX_WITH_HARDENING),VBoxBFE.so)
|
---|
239 | endif
|
---|
240 |
|
---|
241 | # Webservices
|
---|
242 | ifdef VBOX_WITH_WEBSERVICES
|
---|
243 | VBOX_LNX_STRIP_BIN += \
|
---|
244 | vboxwebsrv \
|
---|
245 | webtest
|
---|
246 | endif
|
---|
247 |
|
---|
248 | # EFI firmware
|
---|
249 | ifdef VBOX_WITH_EFIFW_PACKING
|
---|
250 | VBOX_LNX_NO_STRIP += \
|
---|
251 | VBoxEFI32.fd \
|
---|
252 | VBoxEFI64.fd
|
---|
253 | endif
|
---|
254 |
|
---|
255 | #
|
---|
256 | # All the bin files that goes into the archives.
|
---|
257 | #
|
---|
258 | VBOX_LNX_ARCH_FILES := $(VBOX_LNX_STRIP_BIN) $(VBOX_LNX_STRIP_OBJ) $(VBOX_LNX_NO_STRIP) src
|
---|
259 |
|
---|
260 | # Cleanup of the files we copy/symlink from bin.
|
---|
261 | OTHER_CLEAN += $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_ARCH_FILES)) \
|
---|
262 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN))
|
---|
263 |
|
---|
264 |
|
---|
265 | #
|
---|
266 | # The generic installer.
|
---|
267 | #
|
---|
268 | $(PATH_BIN)/$(VBOX_LNX_PACKAGE_NAME): \
|
---|
269 | $(VBOX_LNX_INST_STAGE_DIR)/VirtualBox.tar.bz2 \
|
---|
270 | $(VBOX_VERSION_STAMP) \
|
---|
271 | $(VBOX_PATH_LNX_INST_SRC)/routines.sh \
|
---|
272 | $(VBOX_PATH_LNX_INST_SRC)/deffiles \
|
---|
273 | $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)) \
|
---|
274 | $(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh \
|
---|
275 | $(VBOX_LNX_INST_OUT_DIR)/vboxweb-service.sh \
|
---|
276 | $(VBOX_LNX_INST_OUT_DIR)/install.sh \
|
---|
277 | $(VBOX_PATH_LNX_INST_SRC)/vboxdrv-pardus.py \
|
---|
278 | $(VBOX_PATH_LNX_INST_SRC)/uninstall.sh \
|
---|
279 | $(wildcard $(PATH_BIN)/src/*) \
|
---|
280 | $(wildcard $(PATH_BIN)/src/*/*) \
|
---|
281 | $(wildcard $(PATH_BIN)/src/*/*/*) \
|
---|
282 | $(wildcard $(PATH_BIN)/src/*/*/*/*)
|
---|
283 | $(call MSG_TOOL,makeself,,$@)
|
---|
284 | $(QUIET)$(RM) -f $(wildcard $(PATH_BIN)/VirtualBox-*.run)
|
---|
285 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/routines.sh $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
286 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/deffiles $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
287 | $(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(VBOX_BRAND_LICENSE_TXT) $(VBOX_LNX_INST_STAGE_DIR)/LICENSE)
|
---|
288 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
289 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/vboxweb-service.sh $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
290 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/vboxdrv-pardus.py $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
291 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/install.sh $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
292 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/uninstall.sh $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
293 | $(QUIET)$(RM) -f $@
|
---|
294 | $(QUIET)$(VBOX_MAKESELF) --follow --nocomp $(VBOX_LNX_INST_STAGE_DIR) $@ \
|
---|
295 | "VirtualBox for Linux installation" ./install.sh "\$$0 1> /dev/null"
|
---|
296 |
|
---|
297 | # files that needs editing before they can be included in the generic installer.
|
---|
298 | $(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh: $(VBOX_PATH_LNX_INST_SRC)/vboxdrv.sh.in | $$(dir $$@)
|
---|
299 | $(QUIET)$(SED_EXT) \
|
---|
300 | -e "s|%NOLSB%|yes|g" \
|
---|
301 | -e "s|%DEBIAN%||g" \
|
---|
302 | -e "s|%PACKAGE%|virtualbox|g" \
|
---|
303 | --output $@ \
|
---|
304 | $<
|
---|
305 |
|
---|
306 | $(VBOX_LNX_INST_OUT_DIR)/vboxweb-service.sh: $(VBOX_PATH_LNX_INST_SRC)/vboxweb-service.sh.in | $$(dir $$@)
|
---|
307 | $(QUIET)$(SED_EXT) \
|
---|
308 | -e "s|%NOLSB%|yes|g" \
|
---|
309 | -e "s|%DEBIAN%||g" \
|
---|
310 | -e "s|%PACKAGE%|virtualbox|g" \
|
---|
311 | --output $@ \
|
---|
312 | $<
|
---|
313 |
|
---|
314 | $(VBOX_LNX_INST_OUT_DIR)/install.sh: $(VBOX_PATH_LNX_INST_SRC)/install.sh $(VBOX_VERSION_STAMP) $(VBOX_SVN_REV_KMK).ts | $$(dir $$@)
|
---|
315 | $(QUIET)$(SED) \
|
---|
316 | -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
|
---|
317 | -e "s;_SVNREV_;$(VBOX_SVN_REV);g" \
|
---|
318 | -e "s;_BUILD_;$(date-utc );g" \
|
---|
319 | -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
|
---|
320 | -e "s;_HARDENED_;$(VBOX_WITH_HARDENING);g" \
|
---|
321 | -e "s;_PYTHON_;$(VBOX_WITH_PYTHON);g" \
|
---|
322 | --output $@ \
|
---|
323 | $<
|
---|
324 |
|
---|
325 | #
|
---|
326 | # .tar.bz2 for converting into .run
|
---|
327 | #
|
---|
328 | $(VBOX_LNX_INST_STAGE_DIR)/VirtualBox.tar.bz2: \
|
---|
329 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/, $(VBOX_LNX_ARCH_FILES)) \
|
---|
330 | $(VBOX_LNX_INST_DEP_ON_MAKEFILE) \
|
---|
331 | $(VBOX_VERSION_STAMP)
|
---|
332 | $(call MSG_L1,Packing $@)
|
---|
333 | $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
|
---|
334 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
335 | ifdef VBOX_USE_PBZIP2
|
---|
336 | $(QUIET)tar --owner 0 --group 0 -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR)/archive $(VBOX_LNX_ARCH_FILES)
|
---|
337 | $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
|
---|
338 | else
|
---|
339 | $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR)/archive $(VBOX_LNX_ARCH_FILES)
|
---|
340 | endif
|
---|
341 | $(QUIET)$(CHMOD) 0644 $@
|
---|
342 |
|
---|
343 | #
|
---|
344 | # .tar.bz2 for distribution with the files under VirtualBox-<ver>/.
|
---|
345 | #
|
---|
346 | $(PATH_BIN)/VirtualBox.tar.bz2: \
|
---|
347 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/, $(VBOX_LNX_ARCH_FILES)) \
|
---|
348 | $(VBOX_LNX_INST_DEP_ON_MAKEFILE) \
|
---|
349 | $(VBOX_VERSION_STAMP)
|
---|
350 | $(call MSG_L1,Packing $@)
|
---|
351 | $(QUIET)$(RM) -f -- $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING) $@ $(patsubst %.bz2,%,$@)
|
---|
352 | $(QUIET)$(LN_SYMLINK) $(VBOX_LNX_INST_OUT_DIR)/archive/ $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING)
|
---|
353 | ifdef VBOX_USE_PBZIP2
|
---|
354 | $(QUIET)tar --owner 0 --group 0 -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR) \
|
---|
355 | $(addprefix VirtualBox-$(VBOX_VERSION_STRING)/,$(VBOX_LNX_ARCH_FILES))
|
---|
356 | $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
|
---|
357 | else
|
---|
358 | $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR) \
|
---|
359 | $(addprefix VirtualBox-$(VBOX_VERSION_STRING)/,$(VBOX_LNX_ARCH_FILES))
|
---|
360 | endif
|
---|
361 | $(QUIET)$(RM) -f -- $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING)
|
---|
362 |
|
---|
363 |
|
---|
364 | # pattern rule for stripping and copying the VBOX_LNX_STRIP_BIN files to archive/
|
---|
365 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_STRIP_BIN)): \
|
---|
366 | $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_BIN)/% \
|
---|
367 | $(if $(VBOX_NO_LINUX_RUN_INSTALLER),,\
|
---|
368 | $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/%) \
|
---|
369 | | $$(dir $$@)
|
---|
370 | $(call MSG_INST_FILE,$<,$@)
|
---|
371 | $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
|
---|
372 | $(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),$@) $@)
|
---|
373 |
|
---|
374 | # pattern rule for striping and copying the VBOX_LNX_STRIP_OBJ files to archive/
|
---|
375 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_STRIP_OBJ)): \
|
---|
376 | $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_BIN)/% | $$(dir $$@)
|
---|
377 | $(call MSG_INST_FILE,$<,$@)
|
---|
378 | ifeq ($(VBOX_DO_STRIP),)
|
---|
379 | $(QUIET)$(INSTALL) -m 0644 $< $@
|
---|
380 | else # strip to temp file because of umask.
|
---|
381 | $(QUIET)objcopy --strip-unneeded -R .comment $< [email protected]
|
---|
382 | $(QUIET)$(INSTALL) -m 0644 [email protected] $@
|
---|
383 | $(QUIET)$(RM) -f -- [email protected]
|
---|
384 | endif
|
---|
385 |
|
---|
386 | # special rule for the kernel modules
|
---|
387 | $(VBOX_LNX_INST_OUT_DIR)/archive/src: $(PATH_BIN)/src | $(dir $@)
|
---|
388 | $(call MSG_INST_SYM,$<,$@)
|
---|
389 | $(QUIET)$(RM) -Rf $@
|
---|
390 | $(QUIET)$(MKDIR) $@
|
---|
391 | $(QUIET)$(LN_SYMLINK) $< $@/vboxhost
|
---|
392 |
|
---|
393 | # pattern rule for linking the VBOX_LNX_NO_STRIP into archive/
|
---|
394 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_NO_STRIP)): \
|
---|
395 | $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_BIN)/% | $$(dir $$@)
|
---|
396 | $(call MSG_INST_SYM,$<,$@)
|
---|
397 | $(QUIET)$(RM) -f $@
|
---|
398 | $(QUIET)$(LN_SYMLINK) $< $@
|
---|
399 |
|
---|
400 | # rules for creating directories in archive (the pattern rules depends on these). ## @todo use BLDDIRS
|
---|
401 | BLDDIRS += $(foreach d,\
|
---|
402 | archive \
|
---|
403 | archive/components \
|
---|
404 | archive/nls \
|
---|
405 | $(if $(VBOX_WITH_QT4_SUN),archive/accessible,) \
|
---|
406 | $(if $(VBOX_WITH_PYTHON),\
|
---|
407 | archive/sdk/installer \
|
---|
408 | archive/sdk/installer/vboxapi \
|
---|
409 | archive/sdk/bindings/xpcom/python/xpcom \
|
---|
410 | archive/sdk/bindings/xpcom/python/xpcom/client \
|
---|
411 | archive/sdk/bindings/xpcom/python/xpcom/server,) \
|
---|
412 | $(if $(VBOX_WITH_JXPCOM),\
|
---|
413 | archive/sdk/bindings/xpcom/java,) \
|
---|
414 | archive/additions \
|
---|
415 | install\
|
---|
416 | ,$(VBOX_LNX_INST_OUT_DIR)/$(d)/)
|
---|
417 |
|
---|
418 |
|
---|
419 | #
|
---|
420 | # .tar.bz2 for with the debug info.
|
---|
421 | #
|
---|
422 | $(PATH_BIN)/VirtualBox-dbg.tar.bz2: \
|
---|
423 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/, $(VBOX_LNX_STRIP_BIN))
|
---|
424 | $(call MSG_L1,Packing $@)
|
---|
425 | $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
|
---|
426 | ifdef VBOX_USE_PBZIP2
|
---|
427 | $(QUIET)tar --owner 0 --group 0 -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR)/archive-dbg \
|
---|
428 | $(addprefix $(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN))
|
---|
429 | $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
|
---|
430 | else
|
---|
431 | $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR)/archive-dbg \
|
---|
432 | $(addprefix $(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN))
|
---|
433 | endif
|
---|
434 |
|
---|
435 | # pattern rule for copying the debug info from the VBOX_LNX_STRIP_BIN files into archive-dbg/$(VBOX_LNX_DBG_PATH)/
|
---|
436 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN)): \
|
---|
437 | $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/% : $(PATH_BIN)/% | $$(dir $$@)
|
---|
438 | $(call MSG_TOOL,copydbg,$<,$@)
|
---|
439 | $(QUIET)objcopy --only-keep-debug $< $@
|
---|
440 |
|
---|
441 | # rules for creating directories in archive-dbg (the pattern rules depends on these). ## @todo use BLDDIRS
|
---|
442 | BLDDIRS += $(foreach d,\
|
---|
443 | $(VBOX_LNX_DBG_PATH) \
|
---|
444 | $(VBOX_LNX_DBG_PATH)/components \
|
---|
445 | ,$(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(d)/)
|
---|
446 |
|
---|
447 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
448 |
|
---|