# $Id: Makefile.kmk 18377 2009-03-27 10:44:02Z vboxsync $ ## @file # Makefile for the linux guest additions base directory. # # # Copyright (C) 2006-2007 Sun Microsystems, Inc. # # 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. # # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa # Clara, CA 95054 USA or visit http://www.sun.com if you need # additional information or have any questions. # SUB_DEPTH = ../../../.. include $(KBUILD_PATH)/subheader.kmk # # Include sub-makefiles. # include $(PATH_SUB_CURRENT)/module/Makefile.kmk include $(PATH_SUB_CURRENT)/daemon/Makefile.kmk include $(PATH_SUB_CURRENT)/sharedfolders/Makefile.kmk include $(PATH_SUB_CURRENT)/drm/Makefile.kmk # # Targets # ifndef VBOX_OSE PACKING += $(PATH_BIN)/additions/VBoxLinuxAdditions.run OTHER_CLEAN += $(PACKING) # OSE only contains the source code for this VBOX_SELINUX_CMPLD := $(PATH_SUB_CURRENT)/selinux-fedora/vbox_x11.pp endif # # Globals # VBOX_LNX_ADD_INS_OUT_DIR := $(PATH_TARGET)/Additions/Installer/linux BLDDIRS += $(VBOX_LNX_ADD_INS_OUT_DIR) VBOX_PATH_LINUX_ADDITION_INSTALLER := $(PATH_SUB_CURRENT)/installer VBOX_PATH_X11_ADDITION_INSTALLER := $(PATH_ROOT)/src/VBox/Additions/x11/Installer ifeq ($(KBUILD_TYPE),debug) VBOX_LNX_ADD_BIN_COPY = $(CP) -f VBOX_LNX_ADD_BIN_COPY_SYMBOLS = $(CP) -f else VBOX_LNX_ADD_BIN_COPY = objcopy -S -R .comment VBOX_LNX_ADD_BIN_COPY_SYMBOLS = objcopy -g -R .comment endif INSTALLS += GuestDrivers-src GuestDrivers-src_INST = bin/additions/src/ GuestDrivers-src_MODE = a+r,u+w GuestDrivers-src_SOURCES = Makefile INSTALLS += AutoRun-sh AutoRun-sh_INST = bin/additions/ AutoRun-sh_MODE = a+rx,u+w AutoRun-sh_SOURCES = $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/autorun.sh include $(KBUILD_PATH)/subfooter.kmk # # 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 := . # # We need to depend on all source files for the additions and shared # folders kernel modules. ## @todo Replace the wildcard stuff by the correct file lists now that # we've got everything included. # $(PATH_BIN)/additions/VBoxLinuxAdditions.run: \ $(INSTARGET_vboxmod-bin) \ $(PATH_BIN)/additions/vboxadd-timesync \ $(PATH_BIN)/additions/VBoxClient \ $(PATH_BIN)/additions/VBoxControl \ $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh \ $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd-timesync.sh \ $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient \ $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxclient.desktop \ $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd.sh \ $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/install.sh \ $(PATH_ROOT)/src/VBox/Installer/linux/routines.sh \ $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxvideo.ids \ $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl \ $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config15.pl \ $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config15suse.pl \ $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.test \ $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/test.c \ $(PATH_BIN)/additions/vboxmouse_drv.o \ $(PATH_BIN)/additions/vboxmouse_drv_70.so \ $(PATH_BIN)/additions/vboxmouse_drv_71.so \ $(PATH_BIN)/additions/vboxmouse_drv_14.so \ $(PATH_BIN)/additions/vboxmouse_drv_15.so \ $(PATH_BIN)/additions/vboxmouse_drv_16.so \ $(PATH_BIN)/additions/vboxvideo_drv.o \ $(PATH_BIN)/additions/vboxvideo_drv_70.so \ $(PATH_BIN)/additions/vboxvideo_drv_71.so \ $(PATH_BIN)/additions/vboxvideo_drv_13.so \ $(PATH_BIN)/additions/vboxvideo_drv_14.so \ $(PATH_BIN)/additions/vboxvideo_drv_15.so \ $(PATH_BIN)/additions/vboxvideo_drv_16.so \ $(PATH_BIN)/additions/mountvboxsf \ $(PATH_BIN)/additions/VBoxOGLarrayspu.so \ $(PATH_BIN)/additions/VBoxOGLcrutil.so \ $(PATH_BIN)/additions/VBoxOGLerrorspu.so \ $(PATH_BIN)/additions/VBoxOGLfeedbackspu.so \ $(PATH_BIN)/additions/VBoxOGLpackspu.so \ $(PATH_BIN)/additions/VBoxOGLpassthroughspu.so \ $(PATH_BIN)/additions/VBoxOGL.so \ $(VBOX_SELINUX_CMPLD) \ $(wildcard $(PATH_BIN)/additions/src/*) \ $(wildcard $(PATH_BIN)/additions/src/*/*) \ $(wildcard $(PATH_BIN)/additions/src/*/*/*) \ $(wildcard $(PATH_BIN)/additions/src/*/*/*/*) \ $(VBOX_VERSION_STAMP) $(call MSG_L1,Creating $@) $(QUIET)$(MKDIR) -p $(VBOX_LNX_ADD_INS_OUT_DIR) # Remove target directory 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 -- $(VBOX_LNX_ADD_INS_OUT_DIR)/module $(QUIET)cp -af $(PATH_BIN)/additions/src $(VBOX_LNX_ADD_INS_OUT_DIR)/module $(QUIET)$(MKDIR) -p $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.test $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test/Makefile $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/test.c $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test/ $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxadd-timesync $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxadd-timesync $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxClient $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxClient $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxControl $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxControl $(QUIET)$(SED) \ -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" \ --output $(VBOX_LNX_ADD_INS_OUT_DIR)/install_.sh \ $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/install.sh $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_ADD_INS_OUT_DIR)/install_.sh $(VBOX_LNX_ADD_INS_OUT_DIR)/install.sh $(QUIET)$(RM) $(VBOX_LNX_ADD_INS_OUT_DIR)/install_.sh $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh $(VBOX_LNX_ADD_INS_OUT_DIR) $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd-timesync.sh $(VBOX_LNX_ADD_INS_OUT_DIR) $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient $(VBOX_LNX_ADD_INS_OUT_DIR) $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxclient.desktop $(VBOX_LNX_ADD_INS_OUT_DIR) $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd.sh $(VBOX_LNX_ADD_INS_OUT_DIR) $(QUIET)$(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Installer/linux/routines.sh $(VBOX_LNX_ADD_INS_OUT_DIR) $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxvideo.ids $(VBOX_LNX_ADD_INS_OUT_DIR) $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl $(VBOX_LNX_ADD_INS_OUT_DIR) $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config15.pl $(VBOX_LNX_ADD_INS_OUT_DIR) $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config15suse.pl $(VBOX_LNX_ADD_INS_OUT_DIR) $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/90-vboxguest.fdi $(VBOX_LNX_ADD_INS_OUT_DIR) $(QUIET)$(VBOX_LNX_ADD_BIN_COPY_SYMBOLS) $(PATH_BIN)/additions/vboxmouse_drv.o $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv.o $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_70.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_70.so $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_71.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_71.so $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_14.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_14.so $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_15.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_15.so $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_16.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_16.so $(QUIET)$(VBOX_LNX_ADD_BIN_COPY_SYMBOLS) $(PATH_BIN)/additions/vboxvideo_drv.o $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv.o $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_70.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_70.so $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_71.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_71.so $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_13.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_13.so $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_14.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_14.so $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_15.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_15.so $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_16.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_16.so $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/mountvboxsf $(VBOX_LNX_ADD_INS_OUT_DIR)/mount.vboxsf $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGLarrayspu.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGLarrayspu.so $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGLcrutil.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGLcrutil.so $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGLerrorspu.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGLerrorspu.so $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGLfeedbackspu.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGLfeedbackspu.so $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGLpackspu.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGLpackspu.so $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGLpassthroughspu.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGLpassthroughspu.so $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGL.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGL.so ifdef VBOX_SELINUX_CMPLD $(QUIET)$(INSTALL) -m 0755 $(VBOX_SELINUX_CMPLD) $(VBOX_LNX_ADD_INS_OUT_DIR) endif $(QUIET)$(VBOX_MAKESELF) $(VBOX_LNX_ADD_INS_OUT_DIR) $@ \ "VirtualBox $(VBOX_VERSION_STRING) Guest Additions for Linux installation" /bin/sh ./install.sh "> /dev/null"