VirtualBox

source: vbox/trunk/src/VBox/Installer/solaris/Makefile.kmk@ 68253

Last change on this file since 68253 was 68057, checked in by vboxsync, 7 years ago

Unattended: Moved the unattended templates into Main where they belong and renamed their installation directory to 'UnattendedTemplates' (was 'unattended_templates'). Added them to the solaris and darwin installers. Corrected the ubuntu template to with a ubiquity/success_command line duplicating preseed/late_command so the commands actually get executed.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 29.2 KB
Line 
1# $Id: Makefile.kmk 68057 2017-07-20 10:38:12Z vboxsync $
2## @file
3# Sub-Makefile for the Solaris installer.
4#
5
6#
7# Copyright (C) 2007-2016 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
18SUB_DEPTH = ../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21ifneq ($(KBUILD_HOST),solaris)
22$(error "The Solaris installer can only be built on Solaris!") # yeah, right.
23endif
24
25
26#
27# Globals
28#
29VBOX_PATH_SOL_INST_SRC := $(PATH_SUB_CURRENT)
30VBOX_PATH_SI_SCRATCH := $(PATH_TARGET)/Installer-solaris
31VBOX_PATH_SI_SCRATCH_PKG := $(PATH_TARGET)/Installer-solaris/pkg
32VBOX_PATH_SI_SCRATCH_DBG := $(PATH_TARGET)/Installer-solaris/DebugPkg
33VBOX_SI_ARCH := $(subst x86,i386,$(KBUILD_TARGET_ARCH))
34VBOX_SI_ICON_TYPES := ova ovf vbox vbox-extpack vdi vmdk vhd hdd
35VBOX_SI_ICON_SIZES := 16 20 24 32 48 64 72 96 128 256
36VBOX_SI_GTAR := /usr/sfw/bin/gtar
37VBOX_SI_OBJCOPY_STRIP := /usr/sfw/bin/gobjcopy --strip-debug -R .comment
38ifeq ($(KBUILD_TARGET_ARCH),amd64)
39 VBOX_SI_OBJCOPY_DBGINFO := /usr/sfw/bin/gobjcopy --only-keep-debug
40else
41 VBOX_SI_OBJCOPY_DBGINFO := $(CP) -p # Solaris ld/gobjcopy(2.15) don't get along on x86, works only on amd64. So just using cp for now.
42endif
43
44# Unset this to speed up things during makefile hacking.
45VBOX_SI_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT)
46
47
48# Base package
49PKGINFO_ARCH = $(shell uname -p)
50PKGINFO_REVSTAMP = $(date %Y.%m.%d.%H.%M)
51PKG_FILENAME := VirtualBox-$(VBOX_VERSION_STRING)-SunOS-$(KBUILD_TARGET_ARCH)-r$(VBOX_SVN_REV)
52
53
54#
55# Targets
56#
57PROGRAMS += VBoxZoneAccess VBoxISAExec
58INSTALLS += solaris-doc solaris-bin solaris-drv-confs solaris-icons
59BLDDIRS += $(VBOX_PATH_SI_SCRATCH)
60PACKING += \
61 $(PATH_STAGE_BIN)/$(PKG_FILENAME).tar.gz \
62 $(PATH_STAGE_BIN)/VirtualBoxDebug.tar.bz2
63OTHER_CLEAN += \
64 $(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).pkg \
65 $(PATH_STAGE_BIN)/$(PKG_FILENAME).tar.gz \
66 $(PATH_STAGE_BIN)/VirtualBoxDebug.tar.bz2
67
68#
69# VBoxZoneAccess
70#
71VBoxZoneAccess_TEMPLATE = VBOXR3EXE
72VBoxZoneAccess_DEPS = $(VBOX_SVN_REV_KMK)
73VBoxZoneAccess_SOURCES = VBoxZoneAccess.c
74VBoxZoneAccess_LIBS = $(LIB_RUNTIME)
75
76#
77# VBoxISAExec
78#
79VBoxISAExec_TEMPLATE = VBOXR3EXE
80VBoxISAExec_DEPS = $(VBOX_SVN_REV_KMK)
81VBoxISAExec_SOURCES = VBoxISAExec.c
82
83#
84# Solaris installs.
85#
86solaris-doc_INST = bin/
87solaris-doc_MODE = a+r,u+w
88solaris-doc_SOURCES = \
89 $(VBOX_BRAND_LICENSE_TXT)=>LICENSE \
90 $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/$(if $(VBOX_OSE),OSE,NonOSE)/VirtualBox_64px.png=>VBox.png \
91 $(PATH_ROOT)/src/VBox/Artwork/$(if $(VBOX_OSE),OSE,NonOSE)/virtualbox-128px.png=>virtualbox.png
92
93solaris-bin_INST = bin/
94solaris-bin_MODE = a+rx,u+w
95solaris-bin_SOURCES = \
96 $(if $(VBOX_WITH_PYTHON),$(PATH_ROOT)/src/VBox/Frontends/VBoxShell/vboxshell.py,) \
97 $(VBOX_PATH_SOL_INST_SRC)/vboxconfig.sh \
98 $(VBOX_PATH_SOL_INST_SRC)/VBox.sh \
99 $(VBOX_PATH_SOL_INST_SRC)/pkginstall.sh \
100 $(VBOX_PATH_SOL_INST_SRC)/smf-vboxballoonctrl.sh \
101 $(VBOX_PATH_SOL_INST_SRC)/smf-vboxautostart.sh \
102 $(if $(VBOX_WITH_WEBSERVICES),$(VBOX_PATH_SOL_INST_SRC)/smf-vboxwebsrv.sh,)
103
104solaris-drv-confs_INST = bin/
105solaris-drv-confs_MODE = a+r,u+w
106solaris-drv-confs_SOURCES = \
107 $(PATH_ROOT)/src/VBox/HostDrivers/Support/solaris/vboxdrv.conf \
108 $(if $(VBOX_WITH_NETFLT),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetFlt/solaris/vboxflt.conf) \
109 $(if $(VBOX_WITH_NETFLT_CROSSBOW),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetFlt/solaris/vboxbow.conf) \
110 $(if $(VBOX_WITH_NETADP),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetAdp/solaris/vboxnet.conf) \
111 $(if $(VBOX_WITH_USB),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/solaris/vboxusbmon.conf) \
112 $(if $(VBOX_WITH_USB),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/solaris/vboxusb.conf)
113
114solaris-icons_INST = bin/icons/
115solaris-icons_MODE = a+r,u+w
116solaris-icons_SOURCES = $(foreach f,$(VBOX_SI_ICON_TYPES), $(foreach s,$(VBOX_SI_ICON_SIZES)\
117 ,$(PATH_ROOT)/src/VBox/Artwork/other/virtualbox-$(f)-$(s)px.png=>$(s)x$(s)/mimetypes/virtualbox-$(f).png))
118
119
120#
121# What follows is various files lists (and a symlink list) that lists various
122# types of files going from/to various places during installation.
123#
124# Each list has the following attributes (used by makefile command and
125# dependency generation):
126# .SUBDIRS := <yes|no>
127# .STRIP := <yes|objcopy|no>
128# .MODE := <0644|0755>
129# .SRC := <Directory to copy the files from>
130# .DST := <Directory to copy the files to>
131#
132
133
134## List of file list variable names.
135SOLARIS_FILE_LIST_VARS :=
136
137## @def SOLARIS_ETC_FILES
138# System-wide configuration files to copy from VBOX_PATH_SOL_INST_SRC to /etc.
139SOLARIS_FILE_LIST_VARS += SOLARIS_ETC_FILES
140SOLARIS_ETC_FILES.SUBDIRS := yes
141SOLARIS_ETC_FILES.STRIP := no
142SOLARIS_ETC_FILES.MODE := 0644
143SOLARIS_ETC_FILES.SRC := $(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetAdp/solaris
144SOLARIS_ETC_FILES.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/etc
145SOLARIS_ETC_FILES := $(if-expr defined(VBOX_WITH_NETADP),hostname.vboxnet0,)
146
147## @def SOLARIS_SMF_FILES
148# Service management facility manifest files to copy from VBOX_PATH_SOL_INST_SRC to /var/svc/manifest/application/virtualbox/.
149SOLARIS_FILE_LIST_VARS += SOLARIS_SMF_FILES
150SOLARIS_SMF_FILES.SUBDIRS := yes
151SOLARIS_SMF_FILES.STRIP := no
152SOLARIS_SMF_FILES.MODE := 0644
153SOLARIS_SMF_FILES.SRC := $(VBOX_PATH_SOL_INST_SRC)
154SOLARIS_SMF_FILES.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/var/svc/manifest/application/virtualbox
155SOLARIS_SMF_FILES = \
156 virtualbox-zoneaccess.xml \
157 virtualbox-balloonctrl.xml \
158 virtualbox-autostart.xml \
159 $(if-expr defined(VBOX_WITH_WEBSERVICES),virtualbox-webservice.xml,)
160
161## @def SOLARIS_MIME_INFO_FILES
162# MIME info files to be copied directly from VBOX_PATH_SOL_INST_SRC to /usr/share/mime-info/.
163SOLARIS_FILE_LIST_VARS += SOLARIS_MIME_INFO_FILES
164SOLARIS_MIME_INFO_FILES.SUBDIRS := yes
165SOLARIS_MIME_INFO_FILES.STRIP := no
166SOLARIS_MIME_INFO_FILES.MODE := 0644
167SOLARIS_MIME_INFO_FILES.SRC := $(VBOX_PATH_SOL_INST_SRC)
168SOLARIS_MIME_INFO_FILES.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/mime-info
169SOLARIS_MIME_INFO_FILES = \
170 virtualbox.keys \
171 virtualbox.mime
172
173## @def SOLARIS_PIXMAP_FILES
174# Bitmap files to copy directly from INST_BIN to /usr/share/pixmaps/.
175SOLARIS_FILE_LIST_VARS += SOLARIS_PIXMAP_FILES
176SOLARIS_PIXMAP_FILES.SUBDIRS = no
177SOLARIS_PIXMAP_FILES.STRIP = no
178SOLARIS_PIXMAP_FILES.MODE = 0644
179SOLARIS_PIXMAP_FILES.SRC = $(PATH_STAGE_BIN)
180SOLARIS_PIXMAP_FILES.DST = $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/pixmaps
181SOLARIS_PIXMAP_FILES = \
182 VBox.png \
183 virtualbox.png
184
185
186## @def SOLARIS_INSTALLER_SCRIPTS
187# Installer shell scripts that gets copied directly from VBOX_PATH_SOL_INST_SRC to VBOX_PATH_SI_SCRATCH_PKG (/).
188SOLARIS_FILE_LIST_VARS += SOLARIS_INSTALLER_SCRIPTS
189SOLARIS_INSTALLER_SCRIPTS.SUBDIRS = no
190SOLARIS_INSTALLER_SCRIPTS.STRIP = no
191SOLARIS_INSTALLER_SCRIPTS.MODE = 0755
192SOLARIS_INSTALLER_SCRIPTS.SRC = $(VBOX_PATH_SOL_INST_SRC)
193SOLARIS_INSTALLER_SCRIPTS.DST = $(VBOX_PATH_SI_SCRATCH_PKG)
194SOLARIS_INSTALLER_SCRIPTS = \
195 postinstall.sh \
196 checkinstall.sh \
197 preremove.sh \
198 makepackage.sh
199
200## @def SOLARIS_INSTALLER_FILES
201# Installer files that gets copied directly from VBOX_PATH_SOL_INST_SRC to VBOX_PATH_SI_SCRATCH_PKG (/).
202SOLARIS_FILE_LIST_VARS += SOLARIS_INSTALLER_FILES
203SOLARIS_INSTALLER_FILES.SUBDIRS = no
204SOLARIS_INSTALLER_FILES.STRIP = no
205SOLARIS_INSTALLER_FILES.MODE = 0644
206SOLARIS_INSTALLER_FILES.SRC = $(VBOX_PATH_SOL_INST_SRC)
207SOLARIS_INSTALLER_FILES.DST = $(VBOX_PATH_SI_SCRATCH_PKG)
208SOLARIS_INSTALLER_FILES = \
209 vbox.space
210
211## @def SOLARIS_DRIVER_BINS
212# List of kernel module files that are copied from INST_BIN to platform/i86pc/kernel/drv/[amd64/] and stripped of debug info.
213SOLARIS_FILE_LIST_VARS += SOLARIS_DRIVER_BINS
214SOLARIS_DRIVER_BINS.SUBDIRS := no
215SOLARIS_DRIVER_BINS.STRIP := no
216SOLARIS_DRIVER_BINS.MODE := 0644
217SOLARIS_DRIVER_BINS.SRC := $(PATH_STAGE_BIN)
218SOLARIS_DRIVER_BINS.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/platform/i86pc/kernel/drv/$(subst x86,,$(KBUILD_TARGET_ARCH))
219SOLARIS_DRIVER_BINS = \
220 vboxdrv \
221 $(if $(VBOX_WITH_NETFLT),vboxflt,) \
222 $(if $(VBOX_WITH_NETFLT_CROSSBOW),vboxbow,) \
223 $(if $(VBOX_WITH_NETADP),vboxnet,) \
224 $(if $(VBOX_WITH_USB),vboxusbmon,) \
225 $(if $(VBOX_WITH_USB),vboxusb,)
226
227## @def SOLARIS_DRIVER_CONFS
228# List of kernel module configuration files that are copied directly from INST_BIN to platform/i86pc/kernel/drv/.
229SOLARIS_FILE_LIST_VARS += SOLARIS_DRIVER_CONFS
230SOLARIS_DRIVER_CONFS.SUBDIRS := no
231SOLARIS_DRIVER_CONFS.STRIP := no
232SOLARIS_DRIVER_CONFS.MODE := 0644
233SOLARIS_DRIVER_CONFS.SRC := $(PATH_STAGE_BIN)
234SOLARIS_DRIVER_CONFS.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/platform/i86pc/kernel/drv
235SOLARIS_DRIVER_CONFS = \
236 vboxdrv.conf \
237 $(if $(VBOX_WITH_NETFLT),vboxflt.conf,) \
238 $(if $(VBOX_WITH_NETFLT_CROSSBOW),vboxbow.conf,) \
239 $(if $(VBOX_WITH_NETADP),vboxnet.conf,) \
240 $(if $(VBOX_WITH_USB),vboxusbmon.conf,) \
241 $(if $(VBOX_WITH_USB),vboxusb.conf,)
242
243## @def SOLARIS_COMMON
244# List of files that are copied directly from INST_BIN to /opt/VirtualBox/.
245SOLARIS_FILE_LIST_VARS += SOLARIS_COMMON
246SOLARIS_COMMON.SUBDIRS := yes
247SOLARIS_COMMON.STRIP := no
248SOLARIS_COMMON.MODE := 0644
249SOLARIS_COMMON.SRC := $(PATH_STAGE_BIN)
250SOLARIS_COMMON.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox
251SOLARIS_COMMON = \
252 LICENSE
253
254## @def SOLARIS_COMMON_EXES
255# List of executable script (and VBoxISAExec) files that are copied directly from INST_BIN to /opt/VirtualBox/.
256SOLARIS_FILE_LIST_VARS += SOLARIS_COMMON_EXES
257SOLARIS_COMMON_EXES.SUBDIRS := no
258SOLARIS_COMMON_EXES.STRIP := no
259SOLARIS_COMMON_EXES.MODE := 0755
260SOLARIS_COMMON_EXES.SRC := $(PATH_STAGE_BIN)
261SOLARIS_COMMON_EXES.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox
262SOLARIS_COMMON_EXES = \
263 VBoxISAExec
264
265## @def SOLARIS_COMMON_BINS
266# List of INST_BIN shared libraries that should be copied into /opt/VirtualBox/ and stripped.
267SOLARIS_FILE_LIST_VARS += SOLARIS_COMMON_STRIP_BINS
268SOLARIS_COMMON_STRIP_BINS.SUBDIRS := yes
269SOLARIS_COMMON_STRIP_BINS.STRIP := yes
270SOLARIS_COMMON_STRIP_BINS.MODE := 0644
271SOLARIS_COMMON_STRIP_BINS.SRC := $(PATH_STAGE_BIN)
272SOLARIS_COMMON_STRIP_BINS.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/
273SOLARIS_COMMON_STRIP_BINS =
274
275## @def SOLARIS_COMMON_64_STRIP_BINS
276# List of INST_BIN shared libraries that should be copied into /opt/VirtualBox/64/ and stripped.
277SOLARIS_FILE_LIST_VARS += SOLARIS_COMMON_64_STRIP_BINS
278SOLARIS_COMMON_64_STRIP_BINS.SUBDIRS := yes
279SOLARIS_COMMON_64_STRIP_BINS.STRIP := yes
280SOLARIS_COMMON_64_STRIP_BINS.MODE := 0644
281SOLARIS_COMMON_64_STRIP_BINS.SRC := $(PATH_STAGE_BIN)
282SOLARIS_COMMON_64_STRIP_BINS.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/64
283SOLARIS_COMMON_64_STRIP_BINS =
284
285
286## @def SOLARIS_STRIP_EXES
287# List of exectuables files that are copied from INST_BIN to /opt/VirtualBox/$(VBOX_SI_ARCH)/ and stripped of debug info.
288SOLARIS_FILE_LIST_VARS += SOLARIS_STRIP_EXES
289SOLARIS_STRIP_EXES.SUBDIRS := no
290SOLARIS_STRIP_EXES.STRIP := yes
291SOLARIS_STRIP_EXES.MODE := 0755
292SOLARIS_STRIP_EXES.SRC := $(PATH_STAGE_BIN)
293SOLARIS_STRIP_EXES.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)
294SOLARIS_STRIP_EXES = \
295 VBoxZoneAccess \
296 $(if $(VBOX_WITH_QTGUI),VirtualBox,) \
297 VBoxManage \
298 $(if $(VBOX_WITH_VBOXSDL),VBoxSDL,) \
299 $(if $(VBOX_WITH_NETADP),VBoxNetAdpCtl,) \
300 VBoxNetDHCP \
301 VBoxNetNAT \
302 $(if $(VBOX_WITH_EXTPACK),VBoxExtPackHelperApp,) \
303 VBoxSVC \
304 $(if $(VBOX_WITH_CROGL),VBoxTestOGL,) \
305 VBoxXPCOMIPCD \
306 $(if $(VBOX_WITH_KCHMVIEWER),kchmviewer,) \
307 $(if $(VBOX_WITH_DTRACE),VBoxDTrace,)
308
309## @def SOLARIS_STRIP_BINS
310# List of shared libraries that are copied from INST_BIN to /opt/VirtualBox/$(VBOX_SI_ARCH)/ and stripped of debug info.
311SOLARIS_FILE_LIST_VARS += SOLARIS_STRIP_BINS
312SOLARIS_STRIP_BINS.SUBDIRS := yes
313SOLARIS_STRIP_BINS.STRIP := yes
314SOLARIS_STRIP_BINS.MODE := 0644
315SOLARIS_STRIP_BINS.SRC := $(PATH_STAGE_BIN)
316SOLARIS_STRIP_BINS.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)
317SOLARIS_STRIP_BINS = \
318 VBoxDD.so \
319 VBoxDD2.so \
320 VBoxREM.so \
321 $(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",VBoxREM32.so VBoxREM64.so,) \
322 VBoxRT.so \
323 VBoxDDU.so \
324 VBoxVMM.so \
325 VBoxXPCOM.so \
326 VBoxXPCOMC.so \
327 $(if $(VBOX_WITH_SHARED_FOLDERS),VBoxSharedFolders.so,) \
328 $(if $(VBOX_WITH_SHARED_CLIPBOARD),VBoxSharedClipboard.so,) \
329 $(if $(VBOX_WITH_DRAG_AND_DROP),VBoxDragAndDropSvc.so,) \
330 $(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestPropSvc.so,) \
331 $(if $(VBOX_WITH_GUEST_CONTROL),VBoxGuestControlSvc.so,) \
332 VBoxHostChannel.so \
333 $(if $(VBOX_WITH_JXPCOM),libvboxjxpcom.so,) \
334 $(if $(VBOX_WITH_QTGUI),\
335 VBoxKeyboard.so) \
336 $(if $(VBOX_WITH_DEBUGGER_GUI),VBoxDbg.so DbgPlugInDiggers.so,) \
337 $(if $(VBOX_WITH_CROGL),\
338 VBoxOGLhostcrutil.so \
339 VBoxOGLhosterrorspu.so \
340 VBoxOGLrenderspu.so \
341 VBoxSharedCrOpenGL.so) \
342 components/VBoxC.so \
343 components/VBoxSVCM.so \
344 components/VBoxXPCOMIPCC.so
345
346ifdef VBOX_WITH_QTGUI
347 ifdef VBOX_WITH_ORACLE_QT
348 SOLARIS_STRIP_BINS += \
349 libQt5CoreVBox.so.5 \
350 libQt5GuiVBox.so.5 \
351 libQt5XcbQpaVBox.so.5 \
352 libQt5PrintSupportVBox.so.5 \
353 libQt5DBusVBox.so.5 \
354 libQt5X11ExtrasVBox.so.5 \
355 libQt5WidgetsVBox.so.5 \
356 plugins/platforms/libqxcb.so \
357 plugins/xcbglintegrations/libqxcb-glx-integration.so \
358 $(if $(VBOX_GUI_USE_QGL),libQt5OpenGLVBox.so.5,)
359 endif
360endif #VBOX_WITH_QTGUI
361
362ifdef VBOX_WITH_32_ON_64_MAIN_API
363 SOLARIS_STRIP_BINS += \
364 VBoxRT-x86.so \
365 VBoxXPCOM-x86.so \
366 components/VBoxClient-x86.so \
367 components/VBoxSVCM-x86.so \
368 components/VBoxXPCOMIPCC-x86.so
369endif
370ifdef VBOX_WITH_HARDENING
371 SOLARIS_STRIP_BINS += \
372 VBoxNetDHCP.so \
373 VBoxNetNAT.so \
374 $(if $(VBOX_WITH_VBOXSDL),VBoxSDL.so,) \
375 $(if $(VBOX_WITH_QTGUI),VirtualBox.so,)
376endif
377
378## @def SOLARIS_STRIP_OBJS
379# List of relocable object files to be copied from INST_BIN to /opt/VirtualBox/$(VBOX_SI_ARCH)/ and carefully
380# stripped of debug info but not relocation information. These are the ring-0 and raw-mode context modules.
381SOLARIS_FILE_LIST_VARS += SOLARIS_STRIP_OBJS
382SOLARIS_STRIP_OBJS.SUBDIRS := no
383SOLARIS_STRIP_OBJS.STRIP := objcopy
384SOLARIS_STRIP_OBJS.MODE := 0644
385SOLARIS_STRIP_OBJS.SRC := $(PATH_STAGE_BIN)
386SOLARIS_STRIP_OBJS.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)
387SOLARIS_STRIP_OBJS = \
388 VBoxDD2RC.rc \
389 VBoxDD2R0.r0 \
390 VBoxDDRC.rc \
391 VBoxDDR0.r0 \
392 VMMRC.rc \
393 VMMR0.r0
394
395## @def SOLARIS_NO_STRIP
396# List of data files that should be copied from INST_BIN to /opt/VirtualBox/$(VBOX_SI_ARCH)/.
397SOLARIS_FILE_LIST_VARS += SOLARIS_NO_STRIP
398SOLARIS_NO_STRIP.SUBDIRS := yes
399SOLARIS_NO_STRIP.STRIP := no
400SOLARIS_NO_STRIP.MODE := 0644
401SOLARIS_NO_STRIP.SRC := $(PATH_STAGE_BIN)
402SOLARIS_NO_STRIP.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)
403SOLARIS_NO_STRIP = \
404 components/VBoxXPCOMBase.xpt \
405 components/VirtualBox_XPCOM.xpt \
406 $(if $(and $(VBOX_LICENSE_FILES),$(VBOX_WITH_QTGUI)),$(VBOX_LICENSE_FILES))
407
408## @def SOLARIS_USRBIN_LINKS
409# List of links to create in /usr/bin to /opt/VirtualBox/VBox.sh.
410# Naturally no subdirectories.
411SOLARIS_USRBIN_LINKS = \
412 $(if $(VBOX_WITH_QTGUI),VirtualBox,) \
413 $(if $(VBOX_WITH_HEADLESS),VBoxHeadless,) \
414 $(if $(VBOX_WITH_VBOXSDL),VBoxSDL,) \
415 VBoxManage \
416 $(if $(VBOX_WITH_DTRACE),VBoxDTrace,)
417
418SOLARIS_COMMON_EXES += \
419 vboxconfig.sh \
420 VBox.sh \
421 pkginstall.sh \
422 $(if $(VBOX_WITH_PYTHON),vboxshell.py,) \
423 smf-vboxballoonctrl.sh \
424 smf-vboxautostart.sh \
425 $(if $(VBOX_WITH_WEBSERVICES),smf-vboxwebsrv.sh,)
426
427
428# Documentation (packed as DOCS as they are arch. neutral)
429ifdef VBOX_WITH_DOCS_PACKING
430 SOLARIS_COMMON += \
431 VirtualBox.chm \
432 UserManual.pdf \
433 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),VirtualBox_$(f).chm UserManual_$(f).pdf)
434endif
435
436# Python XPCOM glue
437ifdef VBOX_WITH_PYTHON
438 SOLARIS_COMMON += \
439 $(VBOXINST_SDK_BINDINGS_XPCOM_PYTHON_FILES) \
440 $(VBOXINST_SDK_INSTALLER_PYTHON_FILES)
441 ifeq ($(KBUILD_TARGET_ARCH),amd64)
442 SOLARIS_PYTHON_32_ON_64_BINS = $(notdir $(wildcard $(PATH_STAGE_BIN)/VBoxPython*_x86.so))
443 ifdef VBOX_WITH_32_ON_64_MAIN_API
444 SOLARIS_COMMON_STRIP_BINS += $(SOLARIS_PYTHON_32_ON_64_BINS)
445 endif
446 SOLARIS_COMMON_64_STRIP_BINS += $(filter-out $(SOLARIS_PYTHON_32_ON_64_BINS), $(notdir $(wildcard $(PATH_STAGE_BIN)/VBoxPython*.so)))
447 else
448 SOLARIS_COMMON_STRIP_BINS += $(notdir $(wildcard $(PATH_STAGE_BIN)/VBoxPython*.so)))
449 endif
450endif
451
452ifdef VBOX_WITH_JXPCOM
453 SOLARIS_COMMON += \
454 sdk/bindings/xpcom/java/vboxjxpcom.jar
455endif
456
457# auth stuff
458SOLARIS_STRIP_BINS += \
459 VBoxAuth.so \
460 VBoxAuthSimple.so
461
462# VRDP
463ifdef VBOX_WITH_VRDP
464 ifndef VBOX_WITH_EXTPACK_PUEL
465 SOLARIS_STRIP_BINS += \
466 VBoxVRDP.so
467 endif
468 SOLARIS_COMMON += \
469 rdesktop-vrdp.tar.gz
470 ifdef VBOX_WITH_VRDP_RDESKTOP
471 SOLARIS_COMMON += $(addprefix rdesktop-vrdp-keymaps/,$(notdir $(wildcard $(PATH_STAGE_BIN)/rdesktop-vrdp-keymaps/*)))
472 SOLARIS_STRIP_EXES += \
473 rdesktop-vrdp
474 endif
475endif
476
477SOLARIS_STRIP_BINS += \
478 $(if $(and $(VBOX_WITH_HARDENING),$(VBOX_WITH_HEADLESS)),VBoxHeadless.so,)
479
480SOLARIS_STRIP_EXES += \
481 $(if $(VBOX_WITH_HEADLESS),VBoxHeadless) \
482 VBoxBugReport \
483 VBoxBalloonCtrl \
484 VBoxAutostart \
485 $(if $(VBOX_WITH_WEBSERVICES),vboxwebsrv) \
486 $(if $(VBOX_WITH_VBOX_IMG)$(VBOX_WITH_TESTCASES),vbox-img)
487
488# Guest Additions
489ifdef VBOX_WITH_ADDITIONS_PACKING
490# SOLARIS_COMMON += \
491# additions/VBoxGuestAdditions.iso
492endif
493
494
495# EFI firmware
496ifdef VBOX_WITH_EFIFW_PACKING
497 SOLARIS_COMMON += \
498 VBoxEFI32.fd \
499 VBoxEFI64.fd
500endif
501
502# Unattended installation template scripts.
503ifdef VBOX_UNATTENDED_TEMPLATES
504 SOLARIS_COMMON += $(addprefix UnattendedTemplates/,$(VBOX_UNATTENDED_TEMPLATES))
505endif
506
507# DTrace library, testcase and scripts (as the rest of this file, this makes bold
508# ASSUMPTIONS about VBPX_INST_XXX variable values).
509ifdef VBOX_WITH_DTRACE
510 SOLARIS_COMMON += \
511 $(addprefix dtrace/lib/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_LIB_ARCH_FILES)) \
512 $(addprefix dtrace/testcase/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_TESTCASE_ARCH_FILES)) \
513 $(addprefix dtrace/scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES))
514endif
515
516
517#
518# End of file lists.
519#
520
521
522
523include $(FILE_KBUILD_SUB_FOOTER)
524
525PATH_S10LIBS.x86 := $(sort $(wildcard $(PATH_DEVTOOLS)/solaris.x86/s10libs/v*))
526ifneq ($(PATH_S10LIBS.x86),)
527 PATH_S10LIBS.x86 := $(call lastword,$(PATH_S10LIBS.x86))
528endif
529PATH_S10LIBS.amd64 := $(sort $(wildcard $(PATH_DEVTOOLS)/solaris.amd64/s10libs/v*))
530ifneq ($(PATH_S10LIBS.amd64),)
531 PATH_S10LIBS.amd64 := $(call lastword,$(PATH_S10LIBS.amd64))
532endif
533
534#
535# Creates the System V style installer package.
536#
537solaris-package:: $(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).pkg
538$(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).pkg: \
539 $(VBOX_VERSION_STAMP) \
540 \
541 $(VBOX_PATH_INST_COMMON_SRC)/virtualbox.desktop.in \
542 $(VBOX_PATH_INST_COMMON_SRC)/virtualbox.xml \
543 $(VBOX_PATH_SOL_INST_SRC)/virtualbox.applications.in \
544 $(VBOX_PATH_SOL_INST_SRC)/vbox.pkginfo \
545 \
546 $(if-expr defined(VBOX_WITH_ADDITIONS_PACKING),$(PATH_STAGE_BIN)/additions/VBoxGuestAdditions.iso,) \
547 $(if-expr !defined(VBOX_OSE) && defined(VBOX_WITH_VBOXSDL), $(PATH_DEVTOOLS_TRG)/libsdl/v1.2.13/lib/libSDL-1.2.so.0.11.2,) \
548 \
549 $(if $(VBOX_OSE),,$(foreach arch, x86 amd64, $(foreach lib, libgcc_s.so.1 libstdc++.so.6, \
550 $(PATH_S10LIBS.$(arch))/$(lib)))) \
551 \
552 $(if $(VBOX_OSE),,$(foreach arch, amd64, $(foreach lib, libxcb.so.1 libX11-xcb.so.1 libX11.so.4 libGL.so, \
553 $(PATH_S10LIBS.$(arch))/$(lib)))) \
554 \
555 $(foreach var, $(SOLARIS_FILE_LIST_VARS),$(foreach file, $($(var)), $($(var).SRC)/$(file))) \
556 \
557 $(foreach size, $(VBOX_SI_ICON_SIZES), $(foreach type, $(VBOX_SI_ICON_TYPES) \
558 ,$(PATH_ROOT)/src/VBox/Artwork/other/virtualbox-$(type)-$(size)px.png)) \
559 \
560 $(VBOX_SI_DEP_ON_MAKEFILE) \
561 | $$(dir $$@)
562 $(call MSG_L1,Creating $(PKG_FILENAME).pkg: Copying files)
563# Start with a clean slate, don't want to pick up random garbage.
564 $(RM) -Rf -- "$(VBOX_PATH_SI_SCRATCH_PKG)/"
565 $(QUIET)$(RM) -f -- "$@"
566
567# Create all the directories we need. We specify each sub directory to make sure the mode is correct.
568 $(MKDIR) -p -m 0755 -- $(sort $(VBOX_PATH_SI_SCRATCH_PKG)/ \
569 $(VBOX_PATH_SI_SCRATCH_PKG)/opt/ \
570 $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/ \
571 $(if $(VBOX_OSE),,$(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/legacy/) \
572 $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/amd64/ \
573 $(if $(VBOX_OSE),,$(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/amd64/legacy/) \
574 $(VBOX_PATH_SI_SCRATCH_PKG)/platform/ \
575 $(VBOX_PATH_SI_SCRATCH_PKG)/platform/i86pc/ \
576 $(VBOX_PATH_SI_SCRATCH_PKG)/platform/i86pc/kernel/ \
577 $(VBOX_PATH_SI_SCRATCH_PKG)/platform/i86pc/kernel/drv/ \
578 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/ \
579 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/bin/ \
580 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/ \
581 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/applications/ \
582 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/application-registry/ \
583 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/icons/ \
584 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/icons/hicolor/ \
585 $(foreach size, $(VBOX_SI_ICON_SIZES) \
586 ,$(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/icons/hicolor/$(size)x$(size)/ \
587 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/icons/hicolor/$(size)x$(size)/mimetypes/) \
588 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/mime/ \
589 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/mime/packages/ \
590 $(VBOX_PATH_SI_SCRATCH_PKG)/var/ \
591 $(VBOX_PATH_SI_SCRATCH_PKG)/var/svc/ \
592 $(VBOX_PATH_SI_SCRATCH_PKG)/var/svc/manifest/ \
593 $(VBOX_PATH_SI_SCRATCH_PKG)/var/svc/manifest/application/ \
594 $(foreach var,$(SOLARIS_FILE_LIST_VARS), $($(var).DST)/) \
595 $(foreach var,$(SOLARIS_FILE_LIST_VARS),$(if-expr "$($(var).SUBDIRS)" == "yes",$(sort $(dir $(addprefix $($(var).DST)/,$($(var))))),)) \
596 )
597
598# Generic copy file lists.
599 $(foreach var, $(SOLARIS_FILE_LIST_VARS), $(foreach file, $($(var)) \
600 ,$(if-expr "$($(var).STRIP)" == "objcopy" && defined(VBOX_DO_STRIP)\
601 ,$(NLTAB)$(VBOX_SI_OBJCOPY_STRIP) "$($(var).SRC)/$(file)" "$($(var).DST)/$(file)" \
602 $(NLTAB)$(CHMOD) "$($(var).MODE)" "$($(var).DST)/$(file)" \
603 ,$(NLTAB)$(INSTALL) -m "$($(var).MODE)" $(if-expr "$($(var).STRIP)" == "yes" && defined(VBOX_DO_STRIP),-s,) \
604 "$($(var).SRC)/$(file)" "$($(var).DST)/$(file)")))
605
606# VirtualBox: Common files.
607 $(if-expr defined(VBOX_WITH_ADDITIONS_PACKING) \
608 ,$(INSTALL) -m 0644 $(PATH_STAGE_BIN)/additions/VBoxGuestAdditions.iso $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/,)
609 $(LN_SYMLINK) -f ./pkginstall.sh $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/ipsinstall.sh
610 $(SED) -e "s/_HARDENED_/$(if $(VBOX_WITH_HARDENED),hardened,)/" \
611 --output $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/vboxconfig.sh \
612 $(VBOX_PATH_SOL_INST_SRC)/vboxconfig.sh
613 $(CHMOD) 0755 $(VBOX_PATH_SOL_INST_SRC)/vboxconfig.sh
614 $(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/vbox.pkgresponse $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/autoresponse
615
616# VirtualBox: Arch specific files.
617 $(if-expr defined(VBOX_WITH_QTGUI) \
618 ,$(NLTAB)$(LN_SYMLINK) ../rdesktop-vrdp-keymaps/ $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)/rdesktop-vrdp-keymaps,)
619
620 $(if-expr defined(VBOX_WITH_ADDITIONS_PACKING) \
621 ,$(NLTAB)$(LN_SYMLINK) ../VBoxGuestAdditions.iso $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)/,)
622
623 $(if-expr !defined(VBOX_OSE) && defined(VBOX_WITH_VBOXSDL) \
624 ,$(INSTALL) -s -m 0644 $(PATH_DEVTOOLS_TRG)/libsdl/v1.2.13/lib/libSDL-1.2.so.0.11.2 \
625 $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)/libSDL-1.2.so.0,)
626
627 $(if $(VBOX_OSE),,$(foreach arch, x86 amd64, $(foreach lib, libgcc_s.so.1 libstdc++.so.6 \
628 ,$(NLTAB)$(INSTALL) -s -m 0644 $(PATH_S10LIBS.$(arch))/$(lib) \
629 $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(if-expr $(arch) == "amd64",amd64/,)legacy/$(lib))))
630
631 $(if $(VBOX_OSE),,$(foreach arch, amd64, $(foreach lib, libxcb.so.1 libX11-xcb.so.1 libX11.so.4 libGL.so \
632 ,$(NLTAB)$(INSTALL) -s -m 0644 $(PATH_S10LIBS.$(arch))/$(lib) \
633 $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(if-expr $(arch) == "amd64",amd64/,)legacy/$(lib))))
634
635 $(if-expr defined(VBOX_WITH_EFIFW_PACKING) \
636 ,$(LN_SYMLINK) ../VBoxEFI32.fd ../VBoxEFI64.fd $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)/,)
637
638# Links to /usr/bin.
639 $(foreach link,$(SOLARIS_USRBIN_LINKS) \
640 ,$(NLTAB)$(LN_SYMLINK) ../../opt/VirtualBox/VBox.sh $(VBOX_PATH_SI_SCRATCH_PKG)/usr/bin/$(link))
641
642# Desktop stuff in /usr/share/applications/.
643 $(SED) -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+" \
644 -e "s+@VBOX_DOC_PATH@+/opt/VirtualBox+" \
645 --output $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/applications/virtualbox.desktop \
646 $(VBOX_PATH_INST_COMMON_SRC)/virtualbox.desktop.in
647 $(CHMOD) 0644 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/applications/virtualbox.desktop
648
649# Desktop stuff in /usr/share/mime/packages/ (S10 cannot deal with icon information in virtualbox.xml).
650 $(SED) -e '/<icon/d' \
651 --output $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/mime/packages/virtualbox.xml \
652 $(VBOX_PATH_INST_COMMON_SRC)/virtualbox.xml
653 $(CHMOD) 0644 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/mime/packages/virtualbox.xml
654
655# Desktop stuff in /usr/share/application-registry.
656 $(SED) -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+" \
657 --output $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/application-registry/virtualbox.applications \
658 $(VBOX_PATH_SOL_INST_SRC)/virtualbox.applications.in
659 $(CHMOD) 0644 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/application-registry/virtualbox.applications
660
661# Icons stuff under /usr/share/icons/hicolor/<size>x<size>/mimetypes/.
662 $(foreach size, $(VBOX_SI_ICON_SIZES), $(foreach type, $(VBOX_SI_ICON_TYPES) \
663 ,$(NLTAB)$(INSTALL) -m 0644 \
664 $(PATH_ROOT)/src/VBox/Artwork/other/virtualbox-$(type)-$(size)px.png \
665 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/icons/hicolor/$(size)x$(size)/mimetypes/virtualbox-$(type).png))
666
667# Files related to package creation.
668 $(SED) -e "s/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g" \
669 -e "s/@VBOX_VENDOR@/$(VBOX_VENDOR)/g" \
670 -e "s/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g" \
671 -e "s/@VBOX_SVN_REV@/$(VBOX_SVN_REV)/g" \
672 -e "s/@VBOX_VERSION_REVSTAMP@/$(PKGINFO_REVSTAMP)/g" \
673 -e "s/@UNAME_P@/$(PKGINFO_ARCH)/g" \
674 --output $(VBOX_PATH_SI_SCRATCH_PKG)/vbox.pkginfo \
675 $(VBOX_PATH_SOL_INST_SRC)/vbox.pkginfo
676 $(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/vbox.pkgresponse $(VBOX_PATH_SI_SCRATCH_PKG)/autoresponse
677
678# Done copying file, create the package!
679 $(call MSG_L1,Creating install package: $(PKG_FILENAME).pkg)
680 $(REDIRECT) -C $(VBOX_PATH_SOL_INST_SRC) -- $(VBOX_PATH_SI_SCRATCH_PKG)/makepackage.sh \
681 $(if-expr defined(VBOX_WITH_HARDENING),--hardened,) \
682 $(VBOX_PATH_SI_SCRATCH_PKG) \
683 $(PKG_FILENAME) \
684 $(KBUILD_TARGET_ARCH) \
685 $(VBOX_SVN_REV)
686 $(MV) -- "$(VBOX_PATH_SI_SCRATCH_PKG)/$(PKG_FILENAME).pkg" "$@"
687 $(RM) -Rf -- "$(VBOX_PATH_SI_SCRATCH_PKG)/"
688
689
690#
691# Creates the tar file containing license, readme and autoresponse file in addition to the system V package.
692#
693solaris-package-tar-gz:: $(PATH_STAGE_BIN)/$(PKG_FILENAME).tar.gz
694$(PATH_STAGE_BIN)/$(PKG_FILENAME).tar.gz: \
695 $(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).pkg \
696 $(PATH_STAGE_BIN)/LICENSE \
697 $(VBOX_PATH_SOL_INST_SRC)/vbox.pkgresponse \
698 $(PATH_ROOT)/doc/ReadMe-Solaris.txt \
699 $(VBOX_SI_DEP_ON_MAKEFILE) \
700 | $(VBOX_PATH_SI_SCRATCH)/
701 $(call MSG_L1,Creating final tar.gz package: $(PKG_FILENAME).tar.gz)
702 $(QUIET)$(RM) -f -- $(VBOX_PATH_SI_SCRATCH)/ReadMe.txt "$@"
703 $(QUIET)$(SED) \
704 -e "s/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g" \
705 -e "s/@VBOX_VENDOR@/$(VBOX_VENDOR)/g" \
706 -e "s/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g" \
707 -e "s/@BUILD_TARGET_ARCH@/$(KBUILD_TARGET_ARCH)/g" \
708 -e "s/@VBOX_SVN_REV@/$(VBOX_SVN_REV)/g" \
709 --output $(VBOX_PATH_SI_SCRATCH)/ReadMe.txt \
710 $(PATH_ROOT)/doc/ReadMe-Solaris.txt
711 $(QUIET)$(VBOX_SI_GTAR) -C $(VBOX_PATH_SI_SCRATCH) -czvf "$@" --show-transformed-name \
712 --xform 's,^.*/,,g' --xform 's,vbox.pkgresponse,autoresponse,' \
713 $(VBOX_PATH_SI_SCRATCH)/ReadMe.txt \
714 $(PATH_STAGE_BIN)/LICENSE \
715 $(VBOX_PATH_SOL_INST_SRC)/vbox.pkgresponse \
716 $(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).pkg
717 $(QUIET)$(RM) -f -- $(VBOX_PATH_SI_SCRATCH)/ReadMe.txt
718 $(call MSG_L1,Packaging $@ is completed.)
719
720
721## List of file list variable names relevant for debug info.
722SOLARIS_FILE_LIST_DBGINFO_VARS := $(foreach var, $(SOLARIS_FILE_LIST_VARS), $(if-expr "$($(var).STRIP)" != "no",$(var),))
723## Adds a .DBGDST property to each of the debug info file lists. Simplifies our job below
724$(foreach var,$(SOLARIS_FILE_LIST_DBGINFO_VARS) \
725 ,$(eval $(var).DBGDST := $(subst $(VBOX_PATH_SI_SCRATCH_PKG)/,$(VBOX_PATH_SI_SCRATCH_DBG)/,$(subst /opt/VirtualBox,,$($(var).DST)))))
726
727#
728# Creates a tar file containing the debug info.
729#
730$(PATH_STAGE_BIN)/VirtualBoxDebug.tar.bz2: \
731 $(VBOX_VERSION_STAMP) \
732 $(VBOX_SI_DEP_ON_MAKEFILE) \
733 $(foreach var, $(SOLARIS_FILE_LIST_DBGINFO_VARS), $(foreach file, $($(var)), $($(var).SRC)/$(file)))
734 $(call MSG_L1,Preparing $@)
735 $(RM) -Rf -- "$(VBOX_PATH_SI_SCRATCH_DBG)/"
736 $(RM) -f -- "$@"
737 $(MKDIR) -p -m 0755 \
738 $(VBOX_PATH_SI_SCRATCH_DBG)/ \
739 $(sort $(foreach var, $(SOLARIS_FILE_LIST_DBGINFO_VARS), $($(var).DBGDST)/ $(if-expr "$($(var).SUBDIRS)" == "yes" \
740 ,$(sort $(dir $(foreach file, $($(var)), $($(var).DBGDST)/$(file)))),)))
741 $(foreach var, $(SOLARIS_FILE_LIST_DBGINFO_VARS),$(foreach file, $($(var)) \
742 ,$(NLTAB)$(VBOX_SI_OBJCOPY_DBGINFO) "$($(var).SRC)/$(file)" "$($(var).DBGDST)/$(file)"))
743 $(call MSG_L1,Packing $@)
744 $(QUIET)$(VBOX_SI_GTAR) --dereference --owner 0 --group 0 \
745 -cvjRhf "$@" -C "$(VBOX_PATH_SI_SCRATCH_DBG)/.." "./$(notdir $(VBOX_PATH_SI_SCRATCH_DBG))/"
746 $(QUIET)$(CHMOD) 0644 $@
747 $(call MSG_L1,Packaging $@ is completed.)
748 $(RM) -Rf "$(VBOX_PATH_SI_SCRATCH_DBG)/"
749
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette