# $Id: Makefile.kmk 10129 2008-07-03 03:07:18Z 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. # ifdef VBOX_KBUILD_HACKING SUB_DEPTH = ../../../.. else SUB_DEPTH = .. DEPTH ?= ../../../.. endif include $(KBUILD_PATH)/subheader.kmk include $(PATH_SUB_CURRENT)/module/Makefile.kmk include $(PATH_SUB_CURRENT)/daemon/Makefile.kmk include $(PATH_SUB_CURRENT)/sharedfolders/Makefile.kmk 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 VBOX_PATH_LINUX_ADDITION_INSTALLER := $(PATH_SUB_CURRENT)/installer VBOX_PATH_X11_ADDITION_INSTALLER := $(PATH_ROOT)/src/VBox/Additions/x11/installer include $(KBUILD_PATH)/subfooter.kmk ifeq ($(KBUILD_TYPE),debug) BIN_COPY = $(CP) -f BIN_COPY_SYMBOLS = $(CP) -f else BIN_COPY = objcopy -S -R .comment BIN_COPY_SYMBOLS = objcopy -g -R .comment endif # # 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_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/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 \ $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxvfs.sh $(PATH_BIN)/additions/mountvboxsf \ $(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 $(PATH_TARGET)/install # 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 $(PATH_TARGET)/install/module $(QUIET)cp -af $(PATH_BIN)/additions/src $(PATH_TARGET)/install/module $(QUIET)$(MKDIR) -p $(PATH_TARGET)/install/module/test $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.test $(PATH_TARGET)/install/module/test/Makefile $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/test.c $(PATH_TARGET)/install/module/test/ $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxadd-timesync $(PATH_TARGET)/install/vboxadd-timesync $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/VBoxClient $(PATH_TARGET)/install/VBoxClient $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/VBoxControl $(PATH_TARGET)/install/VBoxControl $(QUIET)$(SED) "s;_VERSION_;$(VBOX_VERSION_STRING);g" $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/install.sh \ | $(SED) "s;_BUILD_;$(shell date);g" \ | $(SED) "s;_OSE_;$(VBOX_OSE);g" \ | $(SED) "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \ > $(PATH_TARGET)/install/install_.sh $(QUIET)$(INSTALL) -m 0755 $(PATH_TARGET)/install/install_.sh $(PATH_TARGET)/install/install.sh $(QUIET)$(RM) $(PATH_TARGET)/install/install_.sh $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh $(PATH_TARGET)/install $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd-timesync.sh $(PATH_TARGET)/install $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient $(PATH_TARGET)/install $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxclient.desktop $(PATH_TARGET)/install $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd.sh $(PATH_TARGET)/install $(QUIET)$(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Installer/linux/routines.sh $(PATH_TARGET)/install $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxvideo.ids $(PATH_TARGET)/install $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl $(PATH_TARGET)/install $(QUIET)$(BIN_COPY_SYMBOLS) $(PATH_BIN)/additions/vboxmouse_drv.o $(PATH_TARGET)/install/vboxmouse_drv.o $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_70.so $(PATH_TARGET)/install/vboxmouse_drv_70.so $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_71.so $(PATH_TARGET)/install/vboxmouse_drv_71.so $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_14.so $(PATH_TARGET)/install/vboxmouse_drv_14.so $(QUIET)$(BIN_COPY_SYMBOLS) $(PATH_BIN)/additions/vboxvideo_drv.o $(PATH_TARGET)/install/vboxvideo_drv.o $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_70.so $(PATH_TARGET)/install/vboxvideo_drv_70.so $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_71.so $(PATH_TARGET)/install/vboxvideo_drv_71.so $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_13.so $(PATH_TARGET)/install/vboxvideo_drv_13.so $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_14.so $(PATH_TARGET)/install/vboxvideo_drv_14.so $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_15.so $(PATH_TARGET)/install/vboxvideo_drv_15.so $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/mountvboxsf $(PATH_TARGET)/install/mount.vboxsf $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxvfs.sh $(PATH_TARGET)/install ifdef VBOX_SELINUX_CMPLD $(QUIET)$(INSTALL) -m 0755 $(VBOX_SELINUX_CMPLD) $(PATH_TARGET)/install endif $(QUIET)$(VBOX_MAKESELF) $(PATH_TARGET)/install $@ \ "VirtualBox $(VBOX_VERSION_STRING) Guest Additions for Linux installation" /bin/sh ./install.sh "> /dev/null"