# $Id: Makefile.kmk 28800 2010-04-27 08:22:32Z vboxsync $ ## @file # Makefile for the linux guest additions base directory. # # # Copyright (C) 2006-2007 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_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 # ifndef VBOX_OSE 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_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) PACKING += \ $(PATH_BIN)/additions/VBoxLinuxAdditions.run \ $(VBOX_LNX_ADD_INST_STAGE_DIR)VBoxGuestAdditions.tar.bz2 \ $(PATH_BIN)/additions/VBoxGuestAdditions-dbg.tar.bz2 OTHER_CLEAN += $(PACKING) # OSE only contains the source code for this VBOX_SELINUX_CMPLD := $(PATH_SUB_CURRENT)/selinux-fedora/vbox_x11.pp endif # # 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 \ 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 \ pam_vbox.so \ mount.vboxsf VBOX_ADD_MOD.linux = \ 98vboxadd-xclient \ x11config-new.pl VBOX_ADD_STRIP_OBJ.linux = \ vboxmouse_drv.o \ vboxvideo_drv.o VBOX_ADD_KMOD = \ vboxguest VBOX_ADD_KMOD.linux = \ vboxvfs \ vboxvideo 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_ADD_KMOD.linux) VBOX_LNX_ADD_INIT = $(VBOX_ADD_INIT) $(VBOX_ADD_INIT.linux) VBOX_LNX_ADD_KMOD_VERSIONED := $(addsuffix -$(VBOX_VERSION_STRING),$(VBOX_LNX_ADD_KMOD)) # # 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_VERSIONED)) \ $(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_DEBUG_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_VERSIONED)): \ $(VBOX_LNX_ADD_INST_KMOD_DIR)%-$(VBOX_VERSION_STRING) : $(PATH_BIN)/additions/src/% | $(VBOX_LNX_ADD_INST_KMOD_DIR) $(call MSG_INST_DIR,$<,$@) # 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 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 ifndef VBOX_OSE 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-new.pl 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_LNX_ADD_INST)90-vboxguest.fdi \ selinux-fedora/vbox_x11.pp INSTALLS += AutoRun-sh AutoRun-sh_INST = bin/additions/ AutoRun-sh_MODE = a+rx,u+w AutoRun-sh_SOURCES = $(VBOX_REL_LNX_ADD_INST)autorun.sh # # Install the sources of our (sanity) test kernel module # INSTALLS += LnxAddTest-src LnxAddTest-src_INST = $(subst $(PATH_TARGET),obj,$(VBOX_LNX_ADD_INST_SHARE_DIR)$(VBOX_LNX_ADD_PACKAGE_NAME))/test/ LnxAddTest-src_MODE = a+r,u+w LnxAddTest-src_SOURCES = \ $(VBOX_REL_LNX_ADD_INST)Makefile.test=>Makefile \ ../../HostDrivers/linux/build_in_tmp \ $(VBOX_REL_LNX_ADD_INST)test.c # # Install the sources of our (sanity) test kernel rendering (DRM) module # INSTALLS += LnxAddDRM-src LnxAddDRM-src_INST = $(subst $(PATH_TARGET),obj,$(VBOX_LNX_ADD_INST_SHARE_DIR)$(VBOX_LNX_ADD_PACKAGE_NAME))/test_drm/ LnxAddDRM-src_MODE = a+r,u+w LnxAddDRM-src_SOURCES = \ $(VBOX_REL_LNX_ADD_INST)Makefile.include.header \ $(VBOX_REL_LNX_ADD_INST)Makefile.include.footer \ $(VBOX_REL_LNX_ADD_INST)Makefile.test.drm=>Makefile \ ../../HostDrivers/linux/build_in_tmp \ $(VBOX_REL_LNX_ADD_INST)test_drm.c # # 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)) endif # ! VBOX_OSE # 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 OTHERS_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_LnxAddTest-src) \ $(INSTARGET_LnxAddDRM-src) \ $(VBOX_LNX_ADD_INST_FILES) # # .tar.bz2 for converting into .run # $(VBOX_LNX_ADD_INST_STAGE_DIR)VBoxGuestAdditions.tar.bz2: \ $(VBOX_LNX_ADD_ARCH_FILES) \ $(VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE) \ $(VBOX_VERSION_STAMP) $(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_OUT_DIR) \ 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) \ 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_INST_STAGE_DIR)VBoxGuestAdditions.tar.bz2 \ $(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh \ $$(INSTARGET_LnxAdd-scripts) \ $(VBOX_VERSION_STAMP) $(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"