Makefile.kmk revision 5601bfbc69ea7f9194242feb79e89441d8d241f9
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync# Makefile for the linux guest additions base directory.
b0cec57d51e48736a3303366c728c3f025e8e81bvboxsync# Copyright (C) 2006-2007 Sun Microsystems, Inc.
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync# available from http://www.virtualbox.org. This file is free software;
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync# you can redistribute it and/or modify it under the terms of the GNU
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync# General Public License (GPL) as published by the Free Software
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
78a072e1b56619e3230735ae073668311232ec94vboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
5142b6456c5cec38e0ee291e235201d4ac73f10bvboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
5142b6456c5cec38e0ee291e235201d4ac73f10bvboxsync# additional information or have any questions.
5142b6456c5cec38e0ee291e235201d4ac73f10bvboxsyncSUB_DEPTH = ../../../..
5142b6456c5cec38e0ee291e235201d4ac73f10bvboxsyncinclude $(KBUILD_PATH)/subheader.kmk
5142b6456c5cec38e0ee291e235201d4ac73f10bvboxsync# Include sub-makefiles.
5142b6456c5cec38e0ee291e235201d4ac73f10bvboxsyncinclude $(PATH_SUB_CURRENT)/module/Makefile.kmk
5142b6456c5cec38e0ee291e235201d4ac73f10bvboxsyncinclude $(PATH_SUB_CURRENT)/daemon/Makefile.kmk
5142b6456c5cec38e0ee291e235201d4ac73f10bvboxsyncinclude $(PATH_SUB_CURRENT)/sharedfolders/Makefile.kmk
5142b6456c5cec38e0ee291e235201d4ac73f10bvboxsyncifndef VBOX_OSE
5142b6456c5cec38e0ee291e235201d4ac73f10bvboxsync PACKING += $(PATH_BIN)/additions/VBoxLinuxAdditions.run
5142b6456c5cec38e0ee291e235201d4ac73f10bvboxsync OTHER_CLEAN += $(PACKING)
5142b6456c5cec38e0ee291e235201d4ac73f10bvboxsync # OSE only contains the source code for this
5142b6456c5cec38e0ee291e235201d4ac73f10bvboxsync VBOX_SELINUX_CMPLD := $(PATH_SUB_CURRENT)/selinux-fedora/vbox_x11.pp
78a072e1b56619e3230735ae073668311232ec94vboxsyncVBOX_LNX_ADD_INS_OUT_DIR := $(PATH_TARGET)/Additions/Installer/linux
78a072e1b56619e3230735ae073668311232ec94vboxsyncBLDDIRS += $(VBOX_LNX_ADD_INS_OUT_DIR)
78a072e1b56619e3230735ae073668311232ec94vboxsyncVBOX_PATH_LINUX_ADDITION_INSTALLER := $(PATH_SUB_CURRENT)/installer
78a072e1b56619e3230735ae073668311232ec94vboxsyncVBOX_PATH_X11_ADDITION_INSTALLER := $(PATH_ROOT)/src/VBox/Additions/x11/installer
94c538a65fbdfa1ea06f4fe0a65599c1ab0fed58vboxsyncifeq ($(KBUILD_TYPE),debug)
d0318084c32279bf313f47358242cd61ada858d6vboxsync VBOX_LNX_ADD_BIN_COPY = $(CP) -f
94c538a65fbdfa1ea06f4fe0a65599c1ab0fed58vboxsync VBOX_LNX_ADD_BIN_COPY_SYMBOLS = $(CP) -f
d5d45608052fd506e4114bf112df6efae7fcd8a7vboxsync VBOX_LNX_ADD_BIN_COPY = objcopy -S -R .comment
78a072e1b56619e3230735ae073668311232ec94vboxsync VBOX_LNX_ADD_BIN_COPY_SYMBOLS = objcopy -g -R .comment
78a072e1b56619e3230735ae073668311232ec94vboxsyncinclude $(KBUILD_PATH)/subfooter.kmk
78a072e1b56619e3230735ae073668311232ec94vboxsync# Build the Linux Guest Additions self extracting installer.
78a072e1b56619e3230735ae073668311232ec94vboxsync# Note that $(PATH_SUB_CURRENT) was changed by subfooter.kmk above and
78a072e1b56619e3230735ae073668311232ec94vboxsync# any references should be made via variables assigned a know value via := .
78a072e1b56619e3230735ae073668311232ec94vboxsync# We need to depend on all source files for the additions and shared
78a072e1b56619e3230735ae073668311232ec94vboxsync# folders kernel modules.
78a072e1b56619e3230735ae073668311232ec94vboxsync## @todo Replace the wildcard stuff by the correct file lists now that
78a072e1b56619e3230735ae073668311232ec94vboxsync# we've got everything included.
78a072e1b56619e3230735ae073668311232ec94vboxsync $(INSTARGET_vboxmod-bin) \
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh \
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd-timesync.sh \
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient \
78a072e1b56619e3230735ae073668311232ec94vboxsync $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxclient.desktop \
78a072e1b56619e3230735ae073668311232ec94vboxsync $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd.sh \
78a072e1b56619e3230735ae073668311232ec94vboxsync $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/install.sh \
78a072e1b56619e3230735ae073668311232ec94vboxsync $(PATH_ROOT)/src/VBox/Installer/linux/routines.sh \
78a072e1b56619e3230735ae073668311232ec94vboxsync $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxvideo.ids \
78a072e1b56619e3230735ae073668311232ec94vboxsync $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl \
78a072e1b56619e3230735ae073668311232ec94vboxsync $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config15.pl \
78a072e1b56619e3230735ae073668311232ec94vboxsync $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.test \
78a072e1b56619e3230735ae073668311232ec94vboxsync $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/test.c \
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxvfs.sh $(PATH_BIN)/additions/mountvboxsf \
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(VBOX_SELINUX_CMPLD) \
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync $(wildcard $(PATH_BIN)/additions/src/*) \
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(wildcard $(PATH_BIN)/additions/src/*/*) \
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(wildcard $(PATH_BIN)/additions/src/*/*/*) \
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(wildcard $(PATH_BIN)/additions/src/*/*/*/*) \
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(VBOX_VERSION_STAMP)
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(call MSG_L1,Creating $@)
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(MKDIR) -p $(VBOX_LNX_ADD_INS_OUT_DIR)
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync# Remove target directory first, otherwise the behaviour of cp will not be
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync# what we want if it already exists. See the cp manual page for more details.
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(RM) -Rf -- $(VBOX_LNX_ADD_INS_OUT_DIR)/module
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)cp -af $(PATH_BIN)/additions/src $(VBOX_LNX_ADD_INS_OUT_DIR)/module
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(MKDIR) -p $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.test $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test/Makefile
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/test.c $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test/
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxadd-timesync $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxadd-timesync
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxClient $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxClient
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxControl $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxControl
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(SED) \
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync -e "s;_BUILD_;$(shell date);g" \
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync -e "s;_OSE_;$(VBOX_OSE);g" \
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync -e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync --output $(VBOX_LNX_ADD_INS_OUT_DIR)/install_.sh \
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/install.sh
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_ADD_INS_OUT_DIR)/install_.sh $(VBOX_LNX_ADD_INS_OUT_DIR)/install.sh
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(RM) $(VBOX_LNX_ADD_INS_OUT_DIR)/install_.sh
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh $(VBOX_LNX_ADD_INS_OUT_DIR)
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd-timesync.sh $(VBOX_LNX_ADD_INS_OUT_DIR)
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient $(VBOX_LNX_ADD_INS_OUT_DIR)
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxclient.desktop $(VBOX_LNX_ADD_INS_OUT_DIR)
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd.sh $(VBOX_LNX_ADD_INS_OUT_DIR)
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Installer/linux/routines.sh $(VBOX_LNX_ADD_INS_OUT_DIR)
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxvideo.ids $(VBOX_LNX_ADD_INS_OUT_DIR)
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl $(VBOX_LNX_ADD_INS_OUT_DIR)
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config15.pl $(VBOX_LNX_ADD_INS_OUT_DIR)
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/90-vboxguest.fdi $(VBOX_LNX_ADD_INS_OUT_DIR)
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync $(QUIET)$(VBOX_LNX_ADD_BIN_COPY_SYMBOLS) $(PATH_BIN)/additions/vboxmouse_drv.o $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv.o
223a6730e81629b0bf552ccc31f119a998cc8e27vboxsync $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_70.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_70.so
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_71.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_71.so
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_14.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_14.so
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_15.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_15.so
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync $(QUIET)$(VBOX_LNX_ADD_BIN_COPY_SYMBOLS) $(PATH_BIN)/additions/vboxvideo_drv.o $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv.o
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_70.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_70.so
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_71.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_71.so
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_13.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_13.so
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_14.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_14.so
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_15.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_15.so
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/mountvboxsf $(VBOX_LNX_ADD_INS_OUT_DIR)/mount.vboxsf
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxvfs.sh $(VBOX_LNX_ADD_INS_OUT_DIR)
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsyncifdef VBOX_SELINUX_CMPLD
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync $(QUIET)$(INSTALL) -m 0755 $(VBOX_SELINUX_CMPLD) $(VBOX_LNX_ADD_INS_OUT_DIR)
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync $(QUIET)$(VBOX_MAKESELF) $(VBOX_LNX_ADD_INS_OUT_DIR) $@ \
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync "VirtualBox $(VBOX_VERSION_STRING) Guest Additions for Linux installation" /bin/sh ./install.sh "> /dev/null"