1 | # $Id: Makefile.kmk 41477 2012-05-29 11:43:27Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the Linux installer.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2012 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 | # Include sub-makefile.
|
---|
22 | ifdef VBOX_WITH_TESTCASES
|
---|
23 | include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
|
---|
24 | endif
|
---|
25 |
|
---|
26 | ifneq ($(KBUILD_HOST),linux)
|
---|
27 | $(error "The Linux installer can only be built on Linux!")
|
---|
28 | endif
|
---|
29 |
|
---|
30 | #
|
---|
31 | # Globals and targets.
|
---|
32 | #
|
---|
33 | VBOX_PATH_LNX_INST_SRC := $(PATH_SUB_CURRENT)
|
---|
34 | VBOX_LNX_INST_OUT_DIR := $(PATH_TARGET)/Installer/linux
|
---|
35 | VBOX_LNX_INST_STAGE_DIR := $(PATH_TARGET)/Installer/linux/install
|
---|
36 | VBOX_LNX_DBG_PATH := usr/lib/debug/opt/VirtualBox
|
---|
37 | VBOX_LNX_PACKAGE_NAME = VirtualBox-$(VBOX_VERSION_STRING)-r$(VBOX_SVN_REV).run
|
---|
38 |
|
---|
39 | # Unset this to speed up things during makefile hacking.
|
---|
40 | VBOX_LNX_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT)
|
---|
41 |
|
---|
42 | BLDDIRS += $(VBOX_LNX_INST_OUT_DIR) $(VBOX_LNX_INST_STAGE_DIR)
|
---|
43 | PACKING += $(PATH_STAGE_BIN)/VirtualBox.tar.bz2
|
---|
44 | if !defined(VBOX_NO_LINUX_RUN_INSTALLER)
|
---|
45 | PACKING += $(PATH_STAGE_BIN)/$(VBOX_LNX_PACKAGE_NAME) \
|
---|
46 | $(PATH_STAGE_BIN)/VirtualBox-dbg.tar.bz2
|
---|
47 | endif
|
---|
48 |
|
---|
49 | OTHER_CLEAN += \
|
---|
50 | $(addprefix $(VBOX_LNX_INST_STAGE_DIR)/,\
|
---|
51 | install.sh \
|
---|
52 | uninstall.sh \
|
---|
53 | deffiles \
|
---|
54 | routines.sh \
|
---|
55 | vboxballoonctrl-service.sh \
|
---|
56 | vboxdrv.sh \
|
---|
57 | vboxweb-service.sh \
|
---|
58 | VirtualBox.tar.bz2 \
|
---|
59 | LICENSE) \
|
---|
60 | $(wildcard $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-*) \
|
---|
61 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/,\
|
---|
62 | vboxballoonctrl-service.sh \
|
---|
63 | vboxdrv.sh \
|
---|
64 | vboxweb-service.sh \
|
---|
65 | install.sh)
|
---|
66 |
|
---|
67 | #
|
---|
68 | # Linux installs.
|
---|
69 | #
|
---|
70 | INSTALLS += linux-bin
|
---|
71 | linux-bin_INST = bin/
|
---|
72 | linux-bin_MODE = a+rx,u+w
|
---|
73 | linux-bin_SOURCES = \
|
---|
74 | VBoxSysInfo.sh \
|
---|
75 | VBoxCreateUSBNode.sh \
|
---|
76 | VBox.sh=>VBox.sh \
|
---|
77 | $(if $(VBOX_WITH_PYTHON),$(PATH_ROOT)/src/VBox/Frontends/VBoxShell/vboxshell.py=>vboxshell.py,)
|
---|
78 |
|
---|
79 | INSTALLS += linux-misc
|
---|
80 | linux-misc_INST = bin/
|
---|
81 | linux-misc_MODE = a+r,u+w
|
---|
82 | linux-misc_SOURCES = \
|
---|
83 | $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/$(if $(VBOX_OSE),OSE,NonOSE)/VirtualBox_32px.png=>VBox.png \
|
---|
84 | $(PATH_ROOT)/src/VBox/Installer/common/virtualbox.xml \
|
---|
85 | $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)=>LICENSE) \
|
---|
86 | $(if $(VBOX_WITH_QTGUI),$(linux-misc_0_OUTDIR)/virtualbox.desktop,)
|
---|
87 | linux-misc_CLEAN = $(linux-misc_0_OUTDIR)/virtualbox.desktop
|
---|
88 |
|
---|
89 | $$(linux-misc_0_OUTDIR)/virtualbox.desktop: $(PATH_ROOT)/src/VBox/Installer/common/virtualbox.desktop.in $(VBOX_VERSION_STAMP) | $$(dir $$@)
|
---|
90 | $(call MSG_GENERATE,,$@,$<)
|
---|
91 | ifdef VBOX_PATH_PACKAGE_DOCS
|
---|
92 | $(QUIET)$(SED) -e "s+@VBOX_DOC_PATH@+$(VBOX_PATH_PACKAGE_DOCS)+" \
|
---|
93 | -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+" \
|
---|
94 | --output $@ $<
|
---|
95 | else
|
---|
96 | $(QUIET)$(SED) -e "s+@VBOX_DOC_PATH@+/opt/VirtualBox+" \
|
---|
97 | -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+" \
|
---|
98 | --output $@ $<
|
---|
99 | endif
|
---|
100 |
|
---|
101 | INSTALLS += linux-icons
|
---|
102 | linux-icons_INST = bin/icons/
|
---|
103 | linux-icons_MODE = a+r,u+w
|
---|
104 | linux-icons_SOURCES = $(VBOX_MIME_ICONS) $(VBOX_DESKTOP_ICONS)
|
---|
105 |
|
---|
106 |
|
---|
107 | #
|
---|
108 | # The files residing in bin/ that we'll ship.
|
---|
109 | #
|
---|
110 |
|
---|
111 | # Strip these binaries
|
---|
112 | VBOX_LNX_STRIP_BIN = \
|
---|
113 | VBoxDD.so \
|
---|
114 | VBoxDD2.so \
|
---|
115 | VBoxREM.so \
|
---|
116 | VBoxDDU.so \
|
---|
117 | VBoxVMM.so \
|
---|
118 | $(if $(eq $(KBUILD_TARGET_ARCH),x86),VBoxREM32.so,) \
|
---|
119 | $(if $(eq $(KBUILD_TARGET_ARCH),x86),VBoxREM64.so,) \
|
---|
120 | VBoxRT.so \
|
---|
121 | $(if $(VBOX_WITH_VBOXSDL),VBoxSDL $(if $(VBOX_WITH_HARDENING),VBoxSDL.so),) \
|
---|
122 | $(if $(VBOX_WITH_SHARED_CLIPBOARD), VBoxSharedClipboard.so,) \
|
---|
123 | $(if $(VBOX_WITH_SHARED_FOLDERS), VBoxSharedFolders.so,) \
|
---|
124 | $(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestPropSvc.so,) \
|
---|
125 | $(if $(VBOX_WITH_GUEST_CONTROL),VBoxGuestControlSvc.so,) \
|
---|
126 | $(if $(VBOX_WITH_MAIN), \
|
---|
127 | VBoxBalloonCtrl \
|
---|
128 | VBoxManage \
|
---|
129 | VBoxNetDHCP $(if $(VBOX_WITH_HARDENING),VBoxNetDHCP.so,) \
|
---|
130 | VBoxNetAdpCtl \
|
---|
131 | VBoxSVC \
|
---|
132 | VBoxXPCOM.so \
|
---|
133 | VBoxXPCOMC.so \
|
---|
134 | VBoxXPCOMIPCD \
|
---|
135 | components/VBoxXPCOMIPCC.so \
|
---|
136 | components/VBoxSVCM.so \
|
---|
137 | components/VBoxC.so,) \
|
---|
138 | $(if $(VBOX_WITH_CROGL),\
|
---|
139 | VBoxOGLhostcrutil.so \
|
---|
140 | VBoxOGLhosterrorspu.so \
|
---|
141 | VBoxOGLrenderspu.so \
|
---|
142 | VBoxTestOGL \
|
---|
143 | VBoxSharedCrOpenGL.so,) \
|
---|
144 | $(if $(VBOX_WITH_PYTHON),$(notdir $(wildcard $(PATH_STAGE_BIN)/VBoxPython*.so)),) \
|
---|
145 | $(if $(VBOX_WITH_JXPCOM),libvboxjxpcom.so,) \
|
---|
146 | $(if $(and $(VBOX_WITH_EXTPACK_VNC),$(VBOX_WITHOUT_EXTPACK_VNC_PACKING)), \
|
---|
147 | ExtensionPacks/VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/VBoxVNC.so \
|
---|
148 | ExtensionPacks/VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/VBoxVNCMain.so,) \
|
---|
149 | VBoxTunctl
|
---|
150 |
|
---|
151 | # Do not remove relocation information of these binaries
|
---|
152 | VBOX_LNX_STRIP_OBJ = \
|
---|
153 | VBoxDD2R0.r0 \
|
---|
154 | VBoxDDR0.r0 \
|
---|
155 | VMMR0.r0
|
---|
156 |
|
---|
157 | ifdef VBOX_WITH_RAW_MODE
|
---|
158 | VBOX_LNX_STRIP_OBJ += \
|
---|
159 | VBoxDD2GC.gc \
|
---|
160 | VBoxDDGC.gc \
|
---|
161 | VMMGC.gc
|
---|
162 | endif
|
---|
163 |
|
---|
164 | # Do not strip anything of these files
|
---|
165 | VBOX_LNX_NO_STRIP = \
|
---|
166 | $(if $(VBOX_OSE),,LICENSE) \
|
---|
167 | $(if $(VBOX_WITH_MAIN), \
|
---|
168 | components/VBoxXPCOMBase.xpt \
|
---|
169 | components/VirtualBox_XPCOM.xpt) \
|
---|
170 | $(if $(VBOX_WITH_PYTHON),vboxshell.py,) \
|
---|
171 | $(if $(and $(VBOX_WITH_EXTPACK_VNC),$(VBOX_WITHOUT_EXTPACK_VNC_PACKING)), \
|
---|
172 | ExtensionPacks/VNC/ExtPack.xml \
|
---|
173 | ExtensionPacks/VNC/ExtPack-license.html \
|
---|
174 | ExtensionPacks/VNC/ExtPack-license.rtf \
|
---|
175 | ExtensionPacks/VNC/ExtPack-license.txt,) \
|
---|
176 | VBoxSysInfo.sh \
|
---|
177 | VBoxCreateUSBNode.sh \
|
---|
178 | VBox.sh \
|
---|
179 | VBox.png
|
---|
180 |
|
---|
181 | ifdef VBOX_WITH_EXTPACK
|
---|
182 | VBOX_LNX_STRIP_BIN += \
|
---|
183 | VBoxExtPackHelperApp
|
---|
184 | endif
|
---|
185 |
|
---|
186 | # Qt4 GUI
|
---|
187 | ifdef VBOX_WITH_QTGUI
|
---|
188 | include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
|
---|
189 | VBOX_LNX_STRIP_BIN += \
|
---|
190 | VBoxKeyboard.so \
|
---|
191 | VirtualBox \
|
---|
192 | $(if $(VBOX_WITH_HARDENING),VirtualBox.so) \
|
---|
193 | $(if $(VBOX_WITH_DEBUGGER_GUI),VBoxDbg.so)
|
---|
194 | VBOX_LNX_NO_STRIP += \
|
---|
195 | virtualbox.desktop \
|
---|
196 | virtualbox.xml \
|
---|
197 | $(VBOX_LICENSE_FILES) \
|
---|
198 | $(if $(VBOX_WITH_QT4_SUN),$(notdir $(wildcard $(PATH_STAGE_BIN)/lib*VBox*)),) \
|
---|
199 | $(if $(VBOX_WITH_QT4_SUN),accessible/libqtaccessiblewidgets.so,) \
|
---|
200 | $(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES),nls/VirtualBox_$(f).qm nls/qt_$(f).qm) \
|
---|
201 | icons
|
---|
202 | endif
|
---|
203 |
|
---|
204 | # Guest Additions
|
---|
205 | ifdef VBOX_WITH_ADDITIONS_PACKING
|
---|
206 | VBOX_LNX_NO_STRIP += \
|
---|
207 | additions/VBoxGuestAdditions.iso
|
---|
208 | endif
|
---|
209 |
|
---|
210 | # Documentation
|
---|
211 | ifdef VBOX_WITH_DOCS_PACKING
|
---|
212 | VBOX_LNX_NO_STRIP += \
|
---|
213 | UserManual.pdf \
|
---|
214 | $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),UserManual_$(f).pdf)
|
---|
215 | ifdef VBOX_WITH_DOCS_CHM
|
---|
216 | VBOX_LNX_NO_STRIP += \
|
---|
217 | VirtualBox.chm \
|
---|
218 | $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),VirtualBox_$(f).chm)
|
---|
219 | endif
|
---|
220 | VBOX_LNX_STRIP_BIN += \
|
---|
221 | $(if $(VBOX_WITH_KCHMVIEWER),kchmviewer,)
|
---|
222 | endif
|
---|
223 |
|
---|
224 | # auth stuff
|
---|
225 | VBOX_LNX_STRIP_BIN += \
|
---|
226 | VBoxAuth.so \
|
---|
227 | VBoxAuthSimple.so
|
---|
228 |
|
---|
229 | # VRDP
|
---|
230 | ifdef VBOX_WITH_VRDP
|
---|
231 | ifndef VBOX_WITH_EXTPACK_PUEL
|
---|
232 | VBOX_LNX_STRIP_BIN += \
|
---|
233 | VBoxVRDP.so
|
---|
234 | endif
|
---|
235 | ifdef VBOX_WITH_VRDP_RDESKTOP
|
---|
236 | VBOX_LNX_NO_STRIP += \
|
---|
237 | rdesktop-vrdp.tar.gz
|
---|
238 | VBOX_LNX_NO_STRIP += \
|
---|
239 | rdesktop-vrdp-keymaps
|
---|
240 | VBOX_LNX_STRIP_BIN += \
|
---|
241 | rdesktop-vrdp
|
---|
242 | endif
|
---|
243 | endif
|
---|
244 |
|
---|
245 | # Python XPCOM glue
|
---|
246 | ifdef VBOX_WITH_PYTHON
|
---|
247 | VBOX_LNX_NO_STRIP += \
|
---|
248 | $(foreach f,$(notdir $(wildcard $(PATH_STAGE_BIN)/sdk/bindings/xpcom/python/xpcom/*.py)),sdk/bindings/xpcom/python/xpcom/$(f)) \
|
---|
249 | sdk/bindings/xpcom/python/xpcom/client/__init__.py \
|
---|
250 | sdk/bindings/xpcom/python/xpcom/server/__init__.py \
|
---|
251 | sdk/bindings/xpcom/python/xpcom/server/enumerator.py \
|
---|
252 | sdk/bindings/xpcom/python/xpcom/server/factory.py \
|
---|
253 | sdk/bindings/xpcom/python/xpcom/server/loader.py \
|
---|
254 | sdk/bindings/xpcom/python/xpcom/server/module.py \
|
---|
255 | sdk/bindings/xpcom/python/xpcom/server/policy.py \
|
---|
256 | sdk/installer/vboxapisetup.py \
|
---|
257 | sdk/installer/vboxapi/__init__.py \
|
---|
258 | sdk/installer/vboxapi/VirtualBox_constants.py
|
---|
259 | endif
|
---|
260 |
|
---|
261 | # Java XPCOM bridge
|
---|
262 | ifdef VBOX_WITH_JXPCOM
|
---|
263 | VBOX_LNX_NO_STRIP += \
|
---|
264 | sdk/bindings/xpcom/java/vboxjxpcom.jar
|
---|
265 | endif
|
---|
266 |
|
---|
267 | # Headless
|
---|
268 | ifdef VBOX_WITH_HEADLESS
|
---|
269 | VBOX_LNX_STRIP_BIN += \
|
---|
270 | VBoxHeadless \
|
---|
271 | $(if $(VBOX_WITH_HARDENING),VBoxHeadless.so)
|
---|
272 | endif
|
---|
273 |
|
---|
274 | # BFE
|
---|
275 | ifdef VBOX_WITH_BFE
|
---|
276 | VBOX_LNX_STRIP_BIN += \
|
---|
277 | VBoxBFE \
|
---|
278 | $(if $(VBOX_WITH_HARDENING),VBoxBFE.so)
|
---|
279 | endif
|
---|
280 |
|
---|
281 | # Webservices
|
---|
282 | ifdef VBOX_WITH_WEBSERVICES
|
---|
283 | VBOX_LNX_STRIP_BIN += \
|
---|
284 | vboxwebsrv \
|
---|
285 | webtest
|
---|
286 | endif
|
---|
287 |
|
---|
288 | # EFI firmware
|
---|
289 | ifdef VBOX_WITH_EFIFW_PACKING
|
---|
290 | VBOX_LNX_NO_STRIP += \
|
---|
291 | VBoxEFI32.fd \
|
---|
292 | VBoxEFI64.fd
|
---|
293 | endif
|
---|
294 |
|
---|
295 | VBOX_MIME_ICONS = \
|
---|
296 | $(addprefix $(PATH_ROOT)/src/VBox/Resources/other/,\
|
---|
297 | $(foreach f,ova ovf vbox vbox-extpack vdi vmdk vhd hdd, \
|
---|
298 | $(foreach s,16 20 24 32 48 64 72 96 128 256,\
|
---|
299 | virtualbox-$(f)-$(s)px.png=>$(s)x$(s)/virtualbox-$(f).png)))
|
---|
300 |
|
---|
301 | VBOX_DESKTOP_ICONS = \
|
---|
302 | $(addprefix $(PATH_ROOT)/src/VBox/Resources/$(if $(VBOX_OSE),OSE,NonOSE)/,\
|
---|
303 | $(foreach s,16 20 32 40 48 64 128,\
|
---|
304 | virtualbox-$(s)px.png=>$(s)x$(s)/virtualbox.png))
|
---|
305 |
|
---|
306 | #
|
---|
307 | # All the bin files that goes into the archives.
|
---|
308 | #
|
---|
309 | VBOX_LNX_ARCH_FILES := $(VBOX_LNX_STRIP_BIN) $(VBOX_LNX_STRIP_OBJ) $(VBOX_LNX_NO_STRIP) src
|
---|
310 |
|
---|
311 | # Cleanup of the files we copy/symlink from bin.
|
---|
312 | OTHER_CLEAN += $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_ARCH_FILES)) \
|
---|
313 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN))
|
---|
314 |
|
---|
315 |
|
---|
316 | #
|
---|
317 | # The generic installer.
|
---|
318 | #
|
---|
319 | $(PATH_STAGE_BIN)/$(VBOX_LNX_PACKAGE_NAME): \
|
---|
320 | $(VBOX_LNX_INST_STAGE_DIR)/VirtualBox.tar.bz2 \
|
---|
321 | $(VBOX_VERSION_STAMP) \
|
---|
322 | $(VBOX_PATH_LNX_INST_SRC)/routines.sh \
|
---|
323 | $(VBOX_PATH_LNX_INST_SRC)/deffiles \
|
---|
324 | $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)) \
|
---|
325 | $(VBOX_LNX_INST_OUT_DIR)/vboxballoonctrl-service.sh \
|
---|
326 | $(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh \
|
---|
327 | $(VBOX_LNX_INST_OUT_DIR)/vboxweb-service.sh \
|
---|
328 | $(VBOX_LNX_INST_OUT_DIR)/install.sh \
|
---|
329 | $(VBOX_PATH_LNX_INST_SRC)/installer-common.sh \
|
---|
330 | $(VBOX_PATH_LNX_INST_SRC)/vboxdrv-pardus.py \
|
---|
331 | $(VBOX_PATH_LNX_INST_SRC)/uninstall.sh
|
---|
332 | $(call MSG_TOOL,makeself,,$@)
|
---|
333 | $(QUIET)$(RM) -f $(wildcard $(PATH_STAGE_BIN)/VirtualBox-*.run)
|
---|
334 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/routines.sh $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
335 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/deffiles $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
336 | $(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(VBOX_BRAND_LICENSE_TXT) $(VBOX_LNX_INST_STAGE_DIR)/LICENSE)
|
---|
337 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/vboxballoonctrl-service.sh $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
338 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
339 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/vboxweb-service.sh $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
340 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/vboxdrv-pardus.py $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
341 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/install.sh $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
342 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/uninstall.sh $(VBOX_LNX_INST_STAGE_DIR)/
|
---|
343 | $(QUIET)$(RM) -f $@
|
---|
344 | $(QUIET)$(VBOX_MAKESELF) --follow --nocomp $(VBOX_LNX_INST_STAGE_DIR) $@ \
|
---|
345 | "VirtualBox for Linux installation" ./install.sh "\$$0 1> /dev/null"
|
---|
346 |
|
---|
347 | # files that needs editing before they can be included in the generic installer.
|
---|
348 | $(VBOX_LNX_INST_OUT_DIR)/vboxballoonctrl-service.sh: $(VBOX_PATH_LNX_INST_SRC)/vboxballoonctrl-service.sh.in | $$(dir $$@)
|
---|
349 | $(QUIET)$(SED_EXT) \
|
---|
350 | -e "s|%NOLSB%|yes|g" \
|
---|
351 | -e "s|%DEBIAN%||g" \
|
---|
352 | -e "s|%PACKAGE%|virtualbox|g" \
|
---|
353 | -e "s|%VERSION%|$(VBOX_VERSION_STRING)|g" \
|
---|
354 | --output $@ \
|
---|
355 | $<
|
---|
356 |
|
---|
357 | $(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh: $(VBOX_PATH_LNX_INST_SRC)/vboxdrv.sh.in | $$(dir $$@)
|
---|
358 | $(QUIET)$(SED_EXT) \
|
---|
359 | -e "s|%NOLSB%|yes|g" \
|
---|
360 | -e "s|%DEBIAN%||g" \
|
---|
361 | -e "s|%PACKAGE%|virtualbox|g" \
|
---|
362 | -e "s|%VERSION%|$(VBOX_VERSION_STRING)|g" \
|
---|
363 | -e "s|%GROUP%|$(if $(VBOX_WITHOUT_HARDENING),vboxusers,root)|g" \
|
---|
364 | --output $@ \
|
---|
365 | $<
|
---|
366 |
|
---|
367 | $(VBOX_LNX_INST_OUT_DIR)/vboxweb-service.sh: $(VBOX_PATH_LNX_INST_SRC)/vboxweb-service.sh.in | $$(dir $$@)
|
---|
368 | $(QUIET)$(SED_EXT) \
|
---|
369 | -e "s|%NOLSB%|yes|g" \
|
---|
370 | -e "s|%DEBIAN%||g" \
|
---|
371 | -e "s|%PACKAGE%|virtualbox|g" \
|
---|
372 | --output $@ \
|
---|
373 | $<
|
---|
374 |
|
---|
375 | $(VBOX_LNX_INST_OUT_DIR)/install.sh: $(VBOX_PATH_LNX_INST_SRC)/install.sh $(VBOX_PATH_LNX_INST_SRC)/installer-common.sh $(VBOX_VERSION_STAMP) $(VBOX_SVN_REV_KMK).ts | $$(dir $$@)
|
---|
376 | $(QUIET)$(SED) \
|
---|
377 | -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
|
---|
378 | -e "s;_SVNREV_;$(VBOX_SVN_REV);g" \
|
---|
379 | -e "s;_BUILD_;$(date-utc );g" \
|
---|
380 | -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
|
---|
381 | -e "s;_HARDENED_;$(VBOX_WITH_HARDENING);g" \
|
---|
382 | -e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
|
---|
383 | -e "s;_USERNAME_;$(USERNAME);g" \
|
---|
384 | -e "s;_PYTHON_;$(VBOX_WITH_PYTHON);g" \
|
---|
385 | -e '/#include installer-common.sh/ {' \
|
---|
386 | -e "r $(PATH_ROOT)/src/VBox/Installer/linux/installer-common.sh" \
|
---|
387 | -e 'd' \
|
---|
388 | -e '}' \
|
---|
389 | --output $@ \
|
---|
390 | $<
|
---|
391 |
|
---|
392 | #
|
---|
393 | # The files that the tar archives depend on. The wildcards are ugly, but they
|
---|
394 | # do save us from having to update the makefile whenever something new is added
|
---|
395 | # to the module source directories.
|
---|
396 | #
|
---|
397 | VBOX_LNX_INST_ARCH_DEPS := \
|
---|
398 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/, $(VBOX_LNX_ARCH_FILES)) \
|
---|
399 | $(VBOX_LNX_INST_DEP_ON_MAKEFILE) \
|
---|
400 | $(VBOX_VERSION_STAMP) \
|
---|
401 | $(wildcard $(PATH_STAGE_BIN)/src/*) \
|
---|
402 | $(wildcard $(PATH_STAGE_BIN)/src/*/*) \
|
---|
403 | $(wildcard $(PATH_STAGE_BIN)/src/*/*/*) \
|
---|
404 | $(wildcard $(PATH_STAGE_BIN)/src/*/*/*/*)
|
---|
405 |
|
---|
406 |
|
---|
407 | #
|
---|
408 | # .tar.bz2 for converting into .run
|
---|
409 | #
|
---|
410 | $(VBOX_LNX_INST_STAGE_DIR)/VirtualBox.tar.bz2: $(VBOX_LNX_INST_ARCH_DEPS)
|
---|
411 | $(call MSG_L1,Packing $@)
|
---|
412 | $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
|
---|
413 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
414 | ifdef VBOX_USE_PBZIP2
|
---|
415 | $(QUIET)tar --dereference --owner 0 --group 0 \
|
---|
416 | -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR)/archive $(VBOX_LNX_ARCH_FILES)
|
---|
417 | $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
|
---|
418 | else
|
---|
419 | $(QUIET)tar --dereference --owner 0 --group 0 \
|
---|
420 | -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR)/archive $(VBOX_LNX_ARCH_FILES)
|
---|
421 | endif
|
---|
422 | $(QUIET)$(CHMOD) 0644 $@
|
---|
423 |
|
---|
424 | #
|
---|
425 | # .tar.bz2 for distribution with the files under VirtualBox-<ver>/.
|
---|
426 | #
|
---|
427 | $(PATH_STAGE_BIN)/VirtualBox.tar.bz2: $(VBOX_LNX_INST_ARCH_DEPS)
|
---|
428 | $(call MSG_L1,Packing $@)
|
---|
429 | $(QUIET)$(RM) -f -- $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING) $@ $(patsubst %.bz2,%,$@)
|
---|
430 | $(QUIET)$(LN_SYMLINK) $(VBOX_LNX_INST_OUT_DIR)/archive/ $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING)
|
---|
431 | ifdef VBOX_USE_PBZIP2
|
---|
432 | $(QUIET)tar --dereference --owner 0 --group 0 \
|
---|
433 | -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR) \
|
---|
434 | $(addprefix VirtualBox-$(VBOX_VERSION_STRING)/,$(VBOX_LNX_ARCH_FILES))
|
---|
435 | $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
|
---|
436 | else
|
---|
437 | $(QUIET)tar --dereference --owner 0 --group 0 \
|
---|
438 | -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR) \
|
---|
439 | $(addprefix VirtualBox-$(VBOX_VERSION_STRING)/,$(VBOX_LNX_ARCH_FILES))
|
---|
440 | endif
|
---|
441 | $(QUIET)$(RM) -f -- $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING)
|
---|
442 |
|
---|
443 |
|
---|
444 | # pattern rule for stripping and copying the VBOX_LNX_STRIP_BIN files to archive/
|
---|
445 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_STRIP_BIN)): \
|
---|
446 | $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_STAGE_BIN)/% \
|
---|
447 | $(if $(VBOX_NO_LINUX_RUN_INSTALLER),,\
|
---|
448 | $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/%) \
|
---|
449 | | $$(dir $$@)
|
---|
450 | $(call MSG_INST_FILE,$<,$@)
|
---|
451 | $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
|
---|
452 | $(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),$@) $@)
|
---|
453 |
|
---|
454 | # pattern rule for striping and copying the VBOX_LNX_STRIP_OBJ files to archive/
|
---|
455 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_STRIP_OBJ)): \
|
---|
456 | $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_STAGE_BIN)/% | $$(dir $$@)
|
---|
457 | $(call MSG_INST_FILE,$<,$@)
|
---|
458 | ifeq ($(VBOX_DO_STRIP),)
|
---|
459 | $(QUIET)$(INSTALL) -m 0644 $< $@
|
---|
460 | else # strip to temp file because of umask.
|
---|
461 | $(QUIET)objcopy --strip-unneeded -R .comment $< $@.tmp
|
---|
462 | $(QUIET)$(INSTALL) -m 0644 $@.tmp $@
|
---|
463 | $(QUIET)$(RM) -f -- $@.tmp
|
---|
464 | endif
|
---|
465 |
|
---|
466 | # special rule for the kernel modules
|
---|
467 | $(VBOX_LNX_INST_OUT_DIR)/archive/src: $(PATH_STAGE_BIN)/src | $(dir $@)
|
---|
468 | $(call MSG_INST_SYM,$<,$@)
|
---|
469 | $(QUIET)$(RM) -Rf $@
|
---|
470 | $(QUIET)$(MKDIR) $@
|
---|
471 | $(QUIET)$(LN_SYMLINK) $< $@/vboxhost
|
---|
472 |
|
---|
473 | # pattern rule for linking the VBOX_LNX_NO_STRIP into archive/
|
---|
474 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_NO_STRIP)): \
|
---|
475 | $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_STAGE_BIN)/% | $$(dir $$@)
|
---|
476 | $(call MSG_INST_SYM,$<,$@)
|
---|
477 | $(QUIET)$(RM) -f $@
|
---|
478 | $(QUIET)$(LN_SYMLINK) $< $@
|
---|
479 |
|
---|
480 | # rules for creating directories in archive (the pattern rules depends on these).
|
---|
481 | BLDDIRS += $(foreach d,\
|
---|
482 | archive \
|
---|
483 | archive/components \
|
---|
484 | archive/nls \
|
---|
485 | $(if $(VBOX_WITH_QT4_SUN),archive/accessible,) \
|
---|
486 | $(if $(VBOX_WITH_PYTHON),\
|
---|
487 | archive/sdk/installer \
|
---|
488 | archive/sdk/installer/vboxapi \
|
---|
489 | archive/sdk/bindings/xpcom/python/xpcom \
|
---|
490 | archive/sdk/bindings/xpcom/python/xpcom/client \
|
---|
491 | archive/sdk/bindings/xpcom/python/xpcom/server,) \
|
---|
492 | $(if $(VBOX_WITH_JXPCOM),\
|
---|
493 | archive/sdk/bindings/xpcom/java,) \
|
---|
494 | $(if $(and $(VBOX_WITH_EXTPACK_VNC),$(VBOX_WITHOUT_EXTPACK_VNC_PACKING)), \
|
---|
495 | archive/ExtensionPacks/VNC \
|
---|
496 | archive/ExtensionPacks/VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),) \
|
---|
497 | archive/additions \
|
---|
498 | install\
|
---|
499 | ,$(VBOX_LNX_INST_OUT_DIR)/$(d)/)
|
---|
500 |
|
---|
501 |
|
---|
502 | #
|
---|
503 | # .tar.bz2 for with the debug info.
|
---|
504 | #
|
---|
505 | $(PATH_STAGE_BIN)/VirtualBox-dbg.tar.bz2: \
|
---|
506 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/, $(VBOX_LNX_STRIP_BIN))
|
---|
507 | $(call MSG_L1,Packing $@)
|
---|
508 | $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
|
---|
509 | ifdef VBOX_USE_PBZIP2
|
---|
510 | $(QUIET)tar --dereference --owner 0 --group 0 \
|
---|
511 | -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR)/archive-dbg \
|
---|
512 | $(addprefix $(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN))
|
---|
513 | $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
|
---|
514 | else
|
---|
515 | $(QUIET)tar --dereference --owner 0 --group 0 \
|
---|
516 | -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR)/archive-dbg \
|
---|
517 | $(addprefix $(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN))
|
---|
518 | endif
|
---|
519 |
|
---|
520 | # pattern rule for copying the debug info from the VBOX_LNX_STRIP_BIN files into archive-dbg/$(VBOX_LNX_DBG_PATH)/
|
---|
521 | $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN)): \
|
---|
522 | $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/% : $(PATH_STAGE_BIN)/% | $$(dir $$@)
|
---|
523 | $(call MSG_TOOL,copydbg,$<,$@)
|
---|
524 | $(QUIET)objcopy --only-keep-debug $< $@
|
---|
525 |
|
---|
526 | # rules for creating directories in archive-dbg (the pattern rules depends on these).
|
---|
527 | BLDDIRS += $(foreach d,\
|
---|
528 | $(VBOX_LNX_DBG_PATH) \
|
---|
529 | $(VBOX_LNX_DBG_PATH)/components \
|
---|
530 | ,$(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(d)/)
|
---|
531 |
|
---|
532 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
533 |
|
---|