VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/Makefile.kmk@ 8207

Last change on this file since 8207 was 8155, checked in by vboxsync, 17 years ago

The Big Sun Rebranding Header Change

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.9 KB
Line 
1# $Id: Makefile.kmk 8155 2008-04-18 15:16:47Z vboxsync $
2## @file
3# Makefile for the linux guest additions base directory.
4#
5
6#
7# Copyright (C) 2006-2007 Sun Microsystems, Inc.
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22DEPTH ?= ../../../..
23SUB_DEPTH = ..
24include $(PATH_KBUILD)/subheader.kmk
25
26# This can only be built on a real Linux system.
27if1of ($(BUILD_TARGET),linux l4)
28 include $(PATH_SUB_CURRENT)/module/Makefile.kmk
29 include $(PATH_SUB_CURRENT)/daemon/Makefile.kmk
30 include $(PATH_SUB_CURRENT)/sharedfolders/Makefile.kmk
31endif
32
33ifndef VBOX_OSE
34 PACKING += $(PATH_BIN)/additions/VBoxLinuxAdditions.run
35 OTHER_CLEAN += $(PACKING)
36 # OSE only contains the source code for this
37 VBOX_SELINUX_CMPLD := $(PATH_SUB_CURRENT)/selinux-fedora/vbox_x11.pp
38endif
39
40VBOX_PATH_LINUX_ADDITION_INSTALLER := $(PATH_SUB_CURRENT)/installer
41VBOX_PATH_X11_ADDITION_INSTALLER := $(PATH_ROOT)/src/VBox/Additions/x11/installer
42
43include $(PATH_KBUILD)/subfooter.kmk
44
45ifeq ($(BUILD_TYPE),debug)
46 BIN_COPY = $(CP) -f
47 BIN_COPY_SYMBOLS = $(CP) -f
48else
49 BIN_COPY = objcopy -S -R .comment
50 BIN_COPY_SYMBOLS = objcopy -g -R .comment
51endif
52
53#
54# Build the Linux Guest Additions self extracting installer.
55#
56# Note that $(PATH_SUB_CURRENT) was changed by subfooter.kmk above and
57# any references should be made via variables assigned a know value via := .
58#
59# We need to depend on all source files for the additions and shared
60# folders kernel modules.
61## @todo Replace the wildcard stuff by the correct file lists now that
62# we've got everything included.
63#
64$(PATH_BIN)/additions/VBoxLinuxAdditions.run: \
65 $(INSTARGET_vboxmod-bin) \
66 $(PATH_BIN)/additions/vboxadd-timesync \
67 $(PATH_BIN)/additions/VBoxClient \
68 $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh \
69 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd-timesync.sh \
70 $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient \
71 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd.sh \
72 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/install.sh \
73 $(PATH_ROOT)/src/VBox/Installer/linux/routines.sh \
74 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxvideo.ids \
75 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl \
76 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.test \
77 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/test.c \
78 $(PATH_BIN)/additions/vboxmouse_drv.o \
79 $(PATH_BIN)/additions/vboxmouse_drv_70.so \
80 $(PATH_BIN)/additions/vboxmouse_drv_71.so \
81 $(PATH_BIN)/additions/vboxmouse_drv_14.so \
82 $(PATH_BIN)/additions/vboxvideo_drv.o \
83 $(PATH_BIN)/additions/vboxvideo_drv_70.so \
84 $(PATH_BIN)/additions/vboxvideo_drv_71.so \
85 $(PATH_BIN)/additions/vboxvideo_drv_13.so \
86 $(PATH_BIN)/additions/vboxvideo_drv_14.so \
87 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxvfs.sh $(PATH_BIN)/additions/mountvboxsf \
88 $(VBOX_SELINUX_CMPLD) \
89 $(wildcard $(PATH_BIN)/additions/src/*) \
90 $(wildcard $(PATH_BIN)/additions/src/*/*) \
91 $(wildcard $(PATH_BIN)/additions/src/*/*/*) \
92 $(wildcard $(PATH_BIN)/additions/src/*/*/*/*) \
93 $(VBOX_VERSION_STAMP)
94 $(call MSG_L1,Creating $@)
95 $(QUIET)$(MKDIR) -p $(PATH_TARGET)/install
96# Remove target directory first, otherwise the behaviour of cp will not be
97# what we want if it already exists. See the cp manual page for more details.
98 $(QUIET)rm -rf $(PATH_TARGET)/install/module
99 $(QUIET)cp -af $(PATH_BIN)/additions/src $(PATH_TARGET)/install/module
100 $(QUIET)$(MKDIR) -p $(PATH_TARGET)/install/module/test
101 $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.test $(PATH_TARGET)/install/module/test/Makefile
102 $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/test.c $(PATH_TARGET)/install/module/test/
103 $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxadd-timesync $(PATH_TARGET)/install/vboxadd-timesync
104 $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/VBoxClient $(PATH_TARGET)/install/VBoxClient
105 $(QUIET)$(SED) "s;_VERSION_;$(VBOX_VERSION_STRING);g" $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/install.sh \
106 | $(SED) "s;_BUILD_;$(shell date);g" \
107 | $(SED) "s;_OSE_;$(VBOX_OSE);g" \
108 | $(SED) "s;_BUILDTYPE_;$(BUILD_TYPE);g" \
109 > $(PATH_TARGET)/install/install_.sh
110 $(QUIET)$(INSTALL) -m 0755 $(PATH_TARGET)/install/install_.sh $(PATH_TARGET)/install/install.sh
111 $(QUIET)$(RM) $(PATH_TARGET)/install/install_.sh
112 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh $(PATH_TARGET)/install
113 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd-timesync.sh $(PATH_TARGET)/install
114 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient $(PATH_TARGET)/install
115 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd.sh $(PATH_TARGET)/install
116 $(QUIET)$(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Installer/linux/routines.sh $(PATH_TARGET)/install
117 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxvideo.ids $(PATH_TARGET)/install
118 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl $(PATH_TARGET)/install
119 $(QUIET)$(BIN_COPY_SYMBOLS) $(PATH_BIN)/additions/vboxmouse_drv.o $(PATH_TARGET)/install/vboxmouse_drv.o
120 $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_70.so $(PATH_TARGET)/install/vboxmouse_drv_70.so
121 $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_71.so $(PATH_TARGET)/install/vboxmouse_drv_71.so
122 $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_14.so $(PATH_TARGET)/install/vboxmouse_drv_14.so
123 $(QUIET)$(BIN_COPY_SYMBOLS) $(PATH_BIN)/additions/vboxvideo_drv.o $(PATH_TARGET)/install/vboxvideo_drv.o
124 $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_70.so $(PATH_TARGET)/install/vboxvideo_drv_70.so
125 $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_71.so $(PATH_TARGET)/install/vboxvideo_drv_71.so
126 $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_13.so $(PATH_TARGET)/install/vboxvideo_drv_13.so
127 $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_14.so $(PATH_TARGET)/install/vboxvideo_drv_14.so
128 $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/mountvboxsf $(PATH_TARGET)/install/mount.vboxsf
129 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxvfs.sh $(PATH_TARGET)/install
130ifdef VBOX_SELINUX_CMPLD
131 $(QUIET)$(INSTALL) -m 0755 $(VBOX_SELINUX_CMPLD) $(PATH_TARGET)/install
132endif
133 $(QUIET)$(VBOX_MAKESELF) $(PATH_TARGET)/install $@ \
134 "VirtualBox $(VBOX_VERSION_STRING) Guest Additions for Linux installation" /bin/sh ./install.sh "> /dev/null"
135
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette