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