# $Id: Makefile.kmk 37104 2011-05-16 13:59:49Z vboxsync $ ## @file # Makefile for the linux guest additions base directory. # # # Copyright (C) 2006-2010 Oracle Corporation # # This file is part of VirtualBox Open Source Edition (OSE), as # available from http://www.virtualbox.org. This file is free software; # you can redistribute it and/or modify it under the terms of the GNU # General Public License (GPL) as published by the Free Software # Foundation, in version 2 as it comes in the "COPYING" file of the # VirtualBox OSE distribution. VirtualBox OSE is distributed in the # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. # SUB_DEPTH = ../../../.. include $(KBUILD_PATH)/subheader.kmk # # Include sub-makefiles. # include $(PATH_SUB_CURRENT)/sharedfolders/Makefile.kmk include $(PATH_SUB_CURRENT)/drm/Makefile.kmk # # Globals # # Basic path components VBOX_LNX_ADD_PACKAGE_NAME := VBoxGuestAdditions VBOX_LNX_ADD_INST_OUT_DIR := $(PATH_TARGET)/Additions/Installer/linux/ VBOX_LNX_ADD_INST_DBG_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)debug/ VBOX_LNX_ADD_INST_STAGE_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)install/ # Installation paths for binaries and files VBOX_LNX_ADD_INST_BIN_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)bin/ VBOX_LNX_ADD_INST_SBIN_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)sbin/ VBOX_LNX_ADD_INST_LIB_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)lib/ VBOX_LNX_ADD_INST_SHARE_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)share/ VBOX_LNX_ADD_INST_MOD_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)lib/$(VBOX_LNX_ADD_PACKAGE_NAME)/ VBOX_LNX_ADD_INST_KMOD_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)src/ VBOX_LNX_ADD_INST_KMOD_DIR_MOD := $(VBOX_LNX_ADD_INST_OUT_DIR)src/vboxguest-$(VBOX_VERSION_STRING)/ VBOX_LNX_ADD_INST_INIT_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)init/ # Installation paths for debug symbols VBOX_LNX_ADD_DBG_BIN_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)bin/ VBOX_LNX_ADD_DBG_SBIN_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)sbin/ VBOX_LNX_ADD_DBG_LIB_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)lib/ VBOX_LNX_ADD_DBG_MOD_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)lib/$(VBOX_LNX_ADD_PACKAGE_NAME)/ # Script source directories VBOX_PATH_LNX_ADD_INST := $(PATH_SUB_CURRENT)/installer/ VBOX_REL_LNX_ADD_INST := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_LNX_ADD_INST)) VBOX_PATH_X11_ADD_INST := $(PATH_ROOT)/src/VBox/Additions/x11/Installer/ VBOX_REL_X11_ADD_INST := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_X11_ADD_INST)) VBOX_PATH_LNX_INST_SRC := $(PATH_ROOT)/src/VBox/Installer/linux/ VBOX_REL_LNX_INST_SRC := $(subst $(PATH_ROOT)/src/VBox, ../..,$(VBOX_PATH_LNX_INST_SRC)) # Unset this to speed up things during makefile hacking. VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT) # # Targets # VBOX_SELINUX_CMPLD := $(PATH_SUB_CURRENT)/selinux-fedora/vbox_x11.pp VBOX_LNX_ADD_ARCHIVE.x86 := $(PATH_OUT_BASE)/linux.x86/$(KBUILD_TYPE)/bin/additions/VBoxGuestAdditions-x86-r$(VBOX_SVN_REV).tar.bz2 VBOX_LNX_ADD_ARCHIVE.amd64 := $(PATH_OUT_BASE)/linux.amd64/$(KBUILD_TYPE)/bin/additions/VBoxGuestAdditions-amd64-r$(VBOX_SVN_REV).tar.bz2 ifndef VBOX_WITH_COMBINED_LINUX_GUEST_PACKAGE VBOX_LNX_ADD_ARCHIVES := $(PATH_BIN)/additions/VBoxGuestAdditions-$(KBUILD_TARGET_ARCH)-r$(VBOX_SVN_REV).tar.bz2 else VBOX_LNX_ADD_ARCHIVES := \ $(VBOX_LNX_ADD_ARCHIVE.x86) \ $(VBOX_LNX_ADD_ARCHIVE.amd64) endif BLDDIRS += \ $(VBOX_LNX_ADD_INST_OUT_DIR) \ $(VBOX_LNX_ADD_INST_BIN_DIR) \ $(VBOX_LNX_ADD_INST_SBIN_DIR) \ $(VBOX_LNX_ADD_INST_LIB_DIR) \ $(VBOX_LNX_ADD_INST_MOD_DIR) \ $(VBOX_LNX_ADD_INST_KMOD_DIR) \ $(VBOX_LNX_ADD_INST_KMOD_DIR_MOD) \ $(VBOX_LNX_ADD_INST_INIT_DIR) \ $(VBOX_LNX_ADD_INST_DBG_DIR) \ $(VBOX_LNX_ADD_DBG_BIN_DIR) \ $(VBOX_LNX_ADD_DBG_SBIN_DIR) \ $(VBOX_LNX_ADD_DBG_LIB_DIR) \ $(VBOX_LNX_ADD_DBG_MOD_DIR) \ $(VBOX_LNX_ADD_INST_STAGE_DIR) # Use VBOX_WITHOUT_LINUX_GUEST_PACKAGE to skip building the .run installer. # This will only take effect if you also use VBOX_WITHOUT_ADDITIONS_ISO. PACKING += \ $(if-expr !defined(VBOX_WITHOUT_LINUX_GUEST_PACKAGE), $(PATH_BIN)/additions/VBoxLinuxAdditions.run,) \ $(VBOX_LNX_ADD_ARCHIVES) \ $(PATH_BIN)/additions/VBoxGuestAdditions-dbg.tar.bz2 OTHER_CLEAN += \ $(PACKING) \ $(foreach file, $(VBOX_LNX_ADD_ARCHIVES), $(VBOX_LNX_ADD_INST_STAGE_DIR)$(subst -r$(VBOX_SVN_REV),,$(notdir $(file)))) # # Files to install # VBOX_ADD_STRIP_BIN += \ VBoxControl VBOX_ADD_STRIP_BIN.linux += \ VBoxClient VBOX_ADD_BIN.linux += \ VBoxClient-all VBOX_ADD_STRIP_SBIN += \ VBoxService VBOX_ADD_STRIP_LIB += \ VBoxOGLarrayspu.so \ VBoxOGLcrutil.so \ VBoxOGLerrorspu.so \ VBoxOGLfeedbackspu.so \ VBoxOGLpackspu.so \ VBoxOGLpassthroughspu.so \ VBoxOGL.so VBOX_ADD_STRIP_MOD.linux = \ vboxmouse_drv_70.so \ vboxmouse_drv_71.so \ vboxmouse_drv_13.so \ vboxmouse_drv_14.so \ vboxmouse_drv_15.so \ vboxmouse_drv_16.so \ vboxmouse_drv_17.so \ vboxmouse_drv_18.so \ vboxmouse_drv_19.so \ vboxmouse_drv_110.so \ vboxvideo_drv_70.so \ vboxvideo_drv_71.so \ vboxvideo_drv_13.so \ vboxvideo_drv_14.so \ vboxvideo_drv_15.so \ vboxvideo_drv_16.so \ vboxvideo_drv_17.so \ vboxvideo_drv_18.so \ vboxvideo_drv_19.so \ vboxvideo_drv_110.so \ pam_vbox.so \ mount.vboxsf VBOX_ADD_MOD.linux = \ 98vboxadd-xclient \ x11config.sh VBOX_ADD_STRIP_OBJ.linux = \ vboxmouse_drv.o \ vboxvideo_drv.o VBOX_ADD_KMOD = \ $(addprefix vboxguest-$(VBOX_VERSION_STRING)/,\ vboxguest vboxsf vboxvideo Makefile dkms.conf do_dkms) VBOX_ADD_INIT.linux = \ vboxadd \ vboxadd-service \ vboxadd-x11 VBOX_LNX_ADD_STRIP_BIN = $(VBOX_ADD_STRIP_BIN) $(VBOX_ADD_STRIP_BIN.linux) VBOX_LNX_ADD_BIN = $(VBOX_ADD_BIN) $(VBOX_ADD_BIN.linux) VBOX_LNX_ADD_STRIP_SBIN= $(VBOX_ADD_STRIP_SBIN) $(VBOX_ADD_STRIP_SBIN.linux) VBOX_LNX_ADD_STRIP_LIB = $(VBOX_ADD_STRIP_LIB) $(VBOX_ADD_STRIP_LIB.linux) VBOX_LNX_ADD_STRIP_MOD = $(VBOX_ADD_STRIP_MOD) $(VBOX_ADD_STRIP_MOD.linux) VBOX_LNX_ADD_MOD = $(VBOX_ADD_MOD) $(VBOX_ADD_MOD.linux) VBOX_LNX_ADD_STRIP_OBJ = $(VBOX_ADD_STRIP_OBJ) $(VBOX_ADD_STRIP_OBJ.linux) VBOX_LNX_ADD_KMOD = $(VBOX_ADD_KMOD) VBOX_LNX_ADD_INIT = $(VBOX_ADD_INIT) $(VBOX_ADD_INIT.linux) # # All the files that go into the archive # VBOX_LNX_ADD_INST_FILES := \ $(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)) \ $(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_BIN)) \ $(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)) \ $(addprefix $(VBOX_LNX_ADD_INST_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)) \ $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_STRIP_MOD)) \ $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_MOD)) \ $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_STRIP_OBJ)) \ $(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR),$(VBOX_LNX_ADD_KMOD)) \ $(addprefix $(VBOX_LNX_ADD_INST_INIT_DIR),$(VBOX_LNX_ADD_INIT)) \ $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_INIT)) VBOX_LNX_ADD_DBG_FILES := \ $(addprefix $(VBOX_LNX_ADD_DBG_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)) \ $(addprefix $(VBOX_LNX_ADD_DBG_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)) \ $(addprefix $(VBOX_LNX_ADD_DBG_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)) \ $(addprefix $(VBOX_LNX_ADD_DBG_MOD_DIR),$(VBOX_LNX_ADD_STRIP_MOD)) # Cleanup of the the installer directory files OTHER_CLEAN += $(VBOX_LNX_ADD_INST_FILES) $(VBOX_LNX_ADD_DBG_FILES) # pattern rules for copying the debug info from the VBOX_LNX_ADD_STRIP_* files to the installation directory $(addprefix $(VBOX_LNX_ADD_DBG_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)): \ $(VBOX_LNX_ADD_DBG_BIN_DIR)% : $(PATH_BIN)/additions/% | $$(dir $$@) $(call MSG_TOOL,copydbg,$<,$@) $(QUIET)objcopy --only-keep-debug $< $@ $(addprefix $(VBOX_LNX_ADD_DBG_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)): \ $(VBOX_LNX_ADD_DBG_SBIN_DIR)% : $(PATH_BIN)/additions/% | $$(dir $$@) $(call MSG_TOOL,copydbg,$<,$@) $(QUIET)objcopy --only-keep-debug $< $@ $(addprefix $(VBOX_LNX_ADD_DBG_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)): \ $(VBOX_LNX_ADD_DBG_LIB_DIR)% : $(PATH_BIN)/additions/% | $$(dir $$@) $(call MSG_TOOL,copydbg,$<,$@) $(QUIET)objcopy --only-keep-debug $< $@ $(addprefix $(VBOX_LNX_ADD_DBG_MOD_DIR),$(VBOX_LNX_ADD_STRIP_MOD)): \ $(VBOX_LNX_ADD_DBG_MOD_DIR)% : $(PATH_BIN)/additions/% | $$(dir $$@) $(call MSG_TOOL,copydbg,$<,$@) $(QUIET)objcopy --only-keep-debug $< $@ # pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_BIN files to the installation directory $(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR),$(VBOX_LNX_ADD_STRIP_BIN)): \ $(VBOX_LNX_ADD_INST_BIN_DIR)% : $(PATH_BIN)/additions/% \ $(VBOX_LNX_ADD_DBG_BIN_DIR)% \ | $$(dir $$@) $(call MSG_INST_FILE,$<,$@) $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@ $(QUIET)objcopy --add-gnu-debuglink=$@ $@ # pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_SBIN files to the installation directory $(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)): \ $(VBOX_LNX_ADD_INST_SBIN_DIR)% : $(PATH_BIN)/additions/% \ $(VBOX_LNX_ADD_DBG_SBIN_DIR)% \ | $$(dir $$@) $(call MSG_INST_FILE,$<,$@) $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@ $(QUIET)objcopy --add-gnu-debuglink=$@ $@ # pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_LIB files to the installation directory $(addprefix $(VBOX_LNX_ADD_INST_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)): \ $(VBOX_LNX_ADD_INST_LIB_DIR)% : $(PATH_BIN)/additions/% \ $(VBOX_LNX_ADD_DBG_LIB_DIR)% \ | $$(dir $$@) $(call MSG_INST_FILE,$<,$@) $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@ $(QUIET)objcopy --add-gnu-debuglink=$@ $@ # pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_MOD files to the installation directory $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_STRIP_MOD)): \ $(VBOX_LNX_ADD_INST_MOD_DIR)% : $(PATH_BIN)/additions/% \ $(VBOX_LNX_ADD_DBG_MOD_DIR)% \ | $$(dir $$@) $(call MSG_INST_FILE,$<,$@) $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@ $(QUIET)objcopy --add-gnu-debuglink=$@ $@ # pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_OBJ files to the installation directory $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_STRIP_OBJ)): \ $(VBOX_LNX_ADD_INST_MOD_DIR)% : $(PATH_BIN)/additions/% | $$(dir $$@) $(call MSG_INST_FILE,$<,$@) ifeq ($(VBOX_DO_STRIP),) $(QUIET)$(INSTALL) -m 0644 $< $@ else # strip to temp file because of umask. $(QUIET)objcopy --strip-unneeded -R .comment $< $@.tmp $(QUIET)$(INSTALL) -m 0644 $@.tmp $@ $(QUIET)$(RM) -f -- $@.tmp endif # pattern rule for copying the VBOX_LNX_ADD_KMOD files to the installation directory $(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR),$(VBOX_LNX_ADD_KMOD)): \ $(VBOX_LNX_ADD_INST_KMOD_DIR_MOD)% : $(PATH_BIN)/additions/src/% | $$(dir $$@) $(call MSG_INST_DIR,$<,$@) $(QUIET)$(RM) -Rf $@ $(QUIET)cp -af $< $@ # pattern rule for copying the VBOX_LNX_ADD_INIT files to the installation directory $(addprefix $(VBOX_LNX_ADD_INST_INIT_DIR),$(VBOX_LNX_ADD_INIT)): \ $(VBOX_LNX_ADD_INST_INIT_DIR)% : $(PATH_BIN)/additions/% | $$(dir $$@) $(call MSG_INST_FILE,$<,$@) # Remove target directories first, otherwise the behaviour of cp will not be # what we want if it already exists. See the cp manual page for more details. $(QUIET)$(RM) -Rf $@ $(QUIET)cp -af $< $@ # pattern rule for copying the VBOX_LNX_ADD_INIT files to the module directory $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_INIT)): \ $(VBOX_LNX_ADD_INST_MOD_DIR)% : $(PATH_BIN)/additions/% | $$(dir $$@) $(call MSG_INST_FILE,$<,$@) # Remove target directories first, otherwise the behaviour of cp will not be # what we want if it already exists. See the cp manual page for more details. $(QUIET)$(RM) -Rf $@ $(QUIET)cp -af $< $@ INSTALLS += GuestDrivers-src GuestDrivers-src_INST = bin/additions/src/ GuestDrivers-src_MODE = a+r,u+w GuestDrivers-src_SOURCES = Makefile INSTALLS += lnx_add_inst-exec lnx_add_inst-exec_INST = $(subst $(PATH_TARGET),obj,$(VBOX_LNX_ADD_INST_MOD_DIR)) lnx_add_inst-exec_MODE = a+rx,u+w lnx_add_inst-exec_SOURCES = \ $(VBOX_REL_X11_ADD_INST)98vboxadd-xclient \ $(VBOX_REL_X11_ADD_INST)x11config.sh INSTALLS += lnx_add_inst-noexec lnx_add_inst-noexec_INST = $(subst $(PATH_TARGET),obj,$(VBOX_LNX_ADD_INST_SHARE_DIR)$(VBOX_LNX_ADD_PACKAGE_NAME))/ lnx_add_inst-noexec_MODE = a+r,u+w lnx_add_inst-noexec_SOURCES = \ $(VBOX_REL_X11_ADD_INST)vboxclient.desktop \ $(VBOX_REL_X11_ADD_INST)vboxvideo.ids \ $(VBOX_REL_X11_ADD_INST)50-vboxmouse.conf \ $(VBOX_REL_LNX_ADD_INST)70-xorg-vboxmouse.rules \ $(VBOX_REL_LNX_ADD_INST)90-vboxguest.fdi \ selinux-fedora/vbox_x11.pp \ selinux-fedora/vbox_accel.pp INSTALLS += lnx_add_inst-license lnx_add_inst-license_INST = $(subst $(PATH_TARGET),obj,$(VBOX_LNX_ADD_INST_OUT_DIR))/ lnx_add_inst-license_MODE = a+r,u+w lnx_add_inst-license_SOURCES = \ $(VBOX_BRAND_LICENSE_TXT)=>LICENSE # # We need our routines.sh and the uninstallation scripts in the staging # directory too # INSTALLS += LnxAdd-scripts LnxAdd-scripts_INST = $(subst $(PATH_TARGET),obj,$(VBOX_LNX_ADD_INST_STAGE_DIR)) LnxAdd-scripts_MODE = a+rx,u+w LnxAdd-scripts_SOURCES = \ $(VBOX_REL_LNX_INST_SRC)routines.sh \ $(VBOX_REL_LNX_ADD_INST)vboxadd.sh=>vboxadd \ $(VBOX_REL_LNX_ADD_INST)vboxadd-service.sh=>vboxadd-service \ $(VBOX_REL_LNX_ADD_INST)vboxadd-x11.sh=>vboxadd-x11 \ $(VBOX_REL_LNX_ADD_INST)deffiles # # VBoxClient-all # INSTALLS += LnxAdd-Nostrip-Bin LnxAdd-Nostrip-Bin_INST = $(subst $(PATH_TARGET),obj,$(VBOX_LNX_ADD_INST_BIN_DIR)) LnxAdd-Nostrip-Bin_MODE = a+rx,u+w LnxAdd-Nostrip-Bin_SOURCES = \ $(VBOX_REL_X11_ADD_INST)98vboxadd-xclient=>VBoxClient-all # # And the init scripts # INSTALLS += LnxAdd-init-scripts LnxAdd-init-scripts_INST = bin/additions LnxAdd-init-scripts_MODE = a+rx,u+w LnxAdd-init-scripts_SOURCES = \ $(foreach i,$(VBOX_LNX_ADD_INIT), installer/$(i).sh=>$(i)) # this file needs editing before it can be included in the generic installer. $(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh: \ $(VBOX_PATH_LNX_INST_SRC)run-inst.sh | $$(dir $$@) $(QUIET)$(SED) \ -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \ -e "s;_PACKAGE_NAME_;VirtualBox Guest Additions;g" \ -e "s;_PACKAGE_;VBoxGuestAdditions;g" \ -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \ -e "s;_BUILD_;$(shell date);g" \ -e "s;_OSE_;$(VBOX_OSE);g" \ -e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \ -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \ -e "s;_UNINSTALL_SCRIPTS_;vboxadd-x11 vboxadd-timesync vboxadd-service vboxadd;g" \ --output $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh \ $< $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh $@ $(QUIET)$(RM) $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh OTHER_CLEAN += \ $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh \ $(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh include $(KBUILD_PATH)/subfooter.kmk # All the files that go into our archive VBOX_LNX_ADD_ARCH_FILES = \ $(INSTARGET_lnx_add_inst-noexec) \ $(INSTARGET_lnx_add_inst-exec) \ $(INSTARGET_lnx_add_inst-license) \ $(INSTARGET_LnxAddTest-src) \ $(INSTARGET_LnxAddDRM-src) \ $(VBOX_LNX_ADD_INST_FILES) # # .tar.bz2 for converting into .run # $(VBOX_LNX_ADD_ARCHIVE.$(KBUILD_TARGET_ARCH)): \ $(VBOX_LNX_ADD_ARCH_FILES) \ $(VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE) \ $(VBOX_VERSION_STAMP) $(call MSG_L1,Packing $@) $(QUIET)$(RM) -f -- $(wildcard $(dir $@)VBoxGuestAdditions-*r*.tar.bz2) $(QUIET)$(MKDIR) -p $(@D) ifdef VBOX_USE_PBZIP2 $(QUIET)tar --owner 0 --group 0 -cRf $(patsubst %.bz2,%,$@) \ -C $(VBOX_LNX_ADD_INST_OUT_DIR) \ LICENSE bin init lib sbin share src \ $(if $(filter $(KBUILD_TYPE),debug),debug) $(QUIET)pbzip2 $(patsubst %.bz2,%,$@) else $(QUIET)tar --owner 0 --group 0 --ignore-failed-read -cjRf $@ \ -C $(VBOX_LNX_ADD_INST_OUT_DIR) \ LICENSE bin init lib sbin share src \ $(if $(filter $(KBUILD_TYPE),debug),debug) endif $(QUIET)$(CHMOD) 0644 $@ # # .tar.bz2 containing the debug information # $(PATH_BIN)/additions/VBoxGuestAdditions-dbg.tar.bz2: \ $(VBOX_LNX_ADD_DBG_FILES) \ $(VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE) $(call MSG_L1,Packing $@) $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@) $(QUIET)$(MKDIR) -p $(@D) ifdef VBOX_USE_PBZIP2 $(QUIET)tar --owner 0 --group 0 -cRf $(patsubst %.bz2,%,$@) \ -C $(VBOX_LNX_ADD_INST_DBG_DIR) \ bin lib sbin $(QUIET)pbzip2 $(patsubst %.bz2,%,$@) else $(QUIET)tar --owner 0 --group 0 --ignore-failed-read -cjRf $@ \ -C $(VBOX_LNX_ADD_INST_DBG_DIR) \ bin lib sbin endif $(QUIET)$(CHMOD) 0644 $@ # # Build the Linux Guest Additions self extracting installer. # # Note that $(PATH_SUB_CURRENT) was changed by subfooter.kmk above and # any references should be made via variables assigned a know value via := . # $(PATH_BIN)/additions/VBoxLinuxAdditions.run: \ $(VBOX_LNX_ADD_ARCHIVES) \ $(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh \ $$(INSTARGET_LnxAdd-scripts) \ $(VBOX_VERSION_STAMP) # Remove any archives left over from previous builds so that they don't # end up in our installer as well. $(QUIET)$(RM) -f $(foreach file, $(wildcard $(VBOX_LNX_ADD_INST_STAGE_DIR)$(VBOX_LNX_ADD_PACKAGE_NAME)-*.tar.bz2), $(file)) $(QUIET)$(foreach file, $(VBOX_LNX_ADD_ARCHIVES), \ $(CP) -f $(file) $(VBOX_LNX_ADD_INST_STAGE_DIR)$(subst -r$(VBOX_SVN_REV),,$(notdir $(file)))$(NLTAB) ) $(QUIET)$(VBOX_MAKESELF) --nocomp $(VBOX_LNX_ADD_INST_STAGE_DIR) $@ \ "VirtualBox $(VBOX_VERSION_STRING) Guest Additions for Linux" \ /bin/sh ./install.sh "\$$0 1> /dev/null"