VirtualBox

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

Last change on this file since 18796 was 18796, checked in by vboxsync, 16 years ago

Additions/Linux/installer: better test for whether the kernel supports direct rendering

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 11.2 KB
Line 
1# $Id: Makefile.kmk 18796 2009-04-07 06:55:31Z 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
22SUB_DEPTH = ../../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25#
26# Include sub-makefiles.
27#
28include $(PATH_SUB_CURRENT)/module/Makefile.kmk
29include $(PATH_SUB_CURRENT)/daemon/Makefile.kmk
30include $(PATH_SUB_CURRENT)/sharedfolders/Makefile.kmk
31include $(PATH_SUB_CURRENT)/drm/Makefile.kmk
32
33#
34# Targets
35#
36ifndef VBOX_OSE
37 PACKING += $(PATH_BIN)/additions/VBoxLinuxAdditions.run
38 OTHER_CLEAN += $(PACKING)
39 # OSE only contains the source code for this
40 VBOX_SELINUX_CMPLD := $(PATH_SUB_CURRENT)/selinux-fedora/vbox_x11.pp
41endif
42
43#
44# Globals
45#
46VBOX_LNX_ADD_INS_OUT_DIR := $(PATH_TARGET)/Additions/Installer/linux
47BLDDIRS += $(VBOX_LNX_ADD_INS_OUT_DIR)
48VBOX_PATH_LINUX_ADDITION_INSTALLER := $(PATH_SUB_CURRENT)/installer
49VBOX_PATH_X11_ADDITION_INSTALLER := $(PATH_ROOT)/src/VBox/Additions/x11/Installer
50
51ifeq ($(KBUILD_TYPE),debug)
52 VBOX_LNX_ADD_BIN_COPY = $(CP) -f
53 VBOX_LNX_ADD_BIN_COPY_SYMBOLS = $(CP) -f
54else
55 VBOX_LNX_ADD_BIN_COPY = objcopy -S -R .comment
56 VBOX_LNX_ADD_BIN_COPY_SYMBOLS = objcopy -g -R .comment
57endif
58
59INSTALLS += GuestDrivers-src
60GuestDrivers-src_INST = bin/additions/src/
61GuestDrivers-src_MODE = a+r,u+w
62GuestDrivers-src_SOURCES = Makefile
63
64INSTALLS += AutoRun-sh
65AutoRun-sh_INST = bin/additions/
66AutoRun-sh_MODE = a+rx,u+w
67AutoRun-sh_SOURCES = $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/autorun.sh
68
69
70include $(KBUILD_PATH)/subfooter.kmk
71
72
73#
74# Build the Linux Guest Additions self extracting installer.
75#
76# Note that $(PATH_SUB_CURRENT) was changed by subfooter.kmk above and
77# any references should be made via variables assigned a know value via := .
78#
79# We need to depend on all source files for the additions and shared
80# folders kernel modules.
81## @todo Replace the wildcard stuff by the correct file lists now that
82# we've got everything included.
83#
84$(PATH_BIN)/additions/VBoxLinuxAdditions.run: \
85 $(INSTARGET_vboxmod-bin) \
86 $(PATH_BIN)/additions/vboxadd-timesync \
87 $(PATH_BIN)/additions/VBoxClient \
88 $(PATH_BIN)/additions/VBoxControl \
89 $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh \
90 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd-timesync.sh \
91 $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient \
92 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxclient.desktop \
93 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd.sh \
94 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/install.sh \
95 $(PATH_ROOT)/src/VBox/Installer/linux/routines.sh \
96 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxvideo.ids \
97 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl \
98 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config15.pl \
99 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config15suse.pl \
100 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.include.header \
101 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.include.footer \
102 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.test \
103 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/test.c \
104 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.test.drm \
105 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/test_drm.c \
106 $(PATH_BIN)/additions/vboxmouse_drv.o \
107 $(PATH_BIN)/additions/vboxmouse_drv_70.so \
108 $(PATH_BIN)/additions/vboxmouse_drv_71.so \
109 $(PATH_BIN)/additions/vboxmouse_drv_14.so \
110 $(PATH_BIN)/additions/vboxmouse_drv_15.so \
111 $(PATH_BIN)/additions/vboxmouse_drv_16.so \
112 $(PATH_BIN)/additions/vboxvideo_drv.o \
113 $(PATH_BIN)/additions/vboxvideo_drv_70.so \
114 $(PATH_BIN)/additions/vboxvideo_drv_71.so \
115 $(PATH_BIN)/additions/vboxvideo_drv_13.so \
116 $(PATH_BIN)/additions/vboxvideo_drv_14.so \
117 $(PATH_BIN)/additions/vboxvideo_drv_15.so \
118 $(PATH_BIN)/additions/vboxvideo_drv_16.so \
119 $(PATH_BIN)/additions/mountvboxsf \
120 $(PATH_BIN)/additions/VBoxOGLarrayspu.so \
121 $(PATH_BIN)/additions/VBoxOGLcrutil.so \
122 $(PATH_BIN)/additions/VBoxOGLerrorspu.so \
123 $(PATH_BIN)/additions/VBoxOGLfeedbackspu.so \
124 $(PATH_BIN)/additions/VBoxOGLpackspu.so \
125 $(PATH_BIN)/additions/VBoxOGLpassthroughspu.so \
126 $(PATH_BIN)/additions/VBoxOGL.so \
127 $(VBOX_SELINUX_CMPLD) \
128 $(wildcard $(PATH_BIN)/additions/src/*) \
129 $(wildcard $(PATH_BIN)/additions/src/*/*) \
130 $(wildcard $(PATH_BIN)/additions/src/*/*/*) \
131 $(wildcard $(PATH_BIN)/additions/src/*/*/*/*) \
132 $(VBOX_VERSION_STAMP)
133 $(call MSG_L1,Creating $@)
134 $(QUIET)$(MKDIR) -p $(VBOX_LNX_ADD_INS_OUT_DIR)
135# Remove target directory first, otherwise the behaviour of cp will not be
136# what we want if it already exists. See the cp manual page for more details.
137 $(QUIET)$(RM) -Rf -- $(VBOX_LNX_ADD_INS_OUT_DIR)/module
138 $(QUIET)cp -af $(PATH_BIN)/additions/src $(VBOX_LNX_ADD_INS_OUT_DIR)/module
139 $(QUIET)$(MKDIR) -p $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test
140 $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.test $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test/Makefile
141 $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/test.c $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test/
142 $(QUIET)$(MKDIR) -p $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test_drm
143 $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.include.header $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test_drm
144 $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.include.footer $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test_drm
145 $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.test.drm $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test_drm/Makefile
146 $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/test_drm.c $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test_drm/
147 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxadd-timesync $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxadd-timesync
148 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxClient $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxClient
149 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxControl $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxControl
150 $(QUIET)$(SED) \
151 -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
152 -e "s;_BUILD_;$(shell date);g" \
153 -e "s;_OSE_;$(VBOX_OSE);g" \
154 -e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
155 -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
156 --output $(VBOX_LNX_ADD_INS_OUT_DIR)/install_.sh \
157 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/install.sh
158 $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_ADD_INS_OUT_DIR)/install_.sh $(VBOX_LNX_ADD_INS_OUT_DIR)/install.sh
159 $(QUIET)$(RM) $(VBOX_LNX_ADD_INS_OUT_DIR)/install_.sh
160 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh $(VBOX_LNX_ADD_INS_OUT_DIR)
161 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd-timesync.sh $(VBOX_LNX_ADD_INS_OUT_DIR)
162 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient $(VBOX_LNX_ADD_INS_OUT_DIR)
163 $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxclient.desktop $(VBOX_LNX_ADD_INS_OUT_DIR)
164 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd.sh $(VBOX_LNX_ADD_INS_OUT_DIR)
165 $(QUIET)$(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Installer/linux/routines.sh $(VBOX_LNX_ADD_INS_OUT_DIR)
166 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxvideo.ids $(VBOX_LNX_ADD_INS_OUT_DIR)
167 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl $(VBOX_LNX_ADD_INS_OUT_DIR)
168 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config15.pl $(VBOX_LNX_ADD_INS_OUT_DIR)
169 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config15suse.pl $(VBOX_LNX_ADD_INS_OUT_DIR)
170 $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/90-vboxguest.fdi $(VBOX_LNX_ADD_INS_OUT_DIR)
171 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY_SYMBOLS) $(PATH_BIN)/additions/vboxmouse_drv.o $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv.o
172 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_70.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_70.so
173 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_71.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_71.so
174 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_14.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_14.so
175 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_15.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_15.so
176 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_16.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_16.so
177 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY_SYMBOLS) $(PATH_BIN)/additions/vboxvideo_drv.o $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv.o
178 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_70.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_70.so
179 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_71.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_71.so
180 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_13.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_13.so
181 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_14.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_14.so
182 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_15.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_15.so
183 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_16.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_16.so
184 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/mountvboxsf $(VBOX_LNX_ADD_INS_OUT_DIR)/mount.vboxsf
185 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGLarrayspu.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGLarrayspu.so
186 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGLcrutil.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGLcrutil.so
187 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGLerrorspu.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGLerrorspu.so
188 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGLfeedbackspu.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGLfeedbackspu.so
189 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGLpackspu.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGLpackspu.so
190 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGLpassthroughspu.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGLpassthroughspu.so
191 $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGL.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGL.so
192ifdef VBOX_SELINUX_CMPLD
193 $(QUIET)$(INSTALL) -m 0755 $(VBOX_SELINUX_CMPLD) $(VBOX_LNX_ADD_INS_OUT_DIR)
194endif
195 $(QUIET)$(VBOX_MAKESELF) $(VBOX_LNX_ADD_INS_OUT_DIR) $@ \
196 "VirtualBox $(VBOX_VERSION_STRING) Guest Additions for Linux installation" /bin/sh ./install.sh "> /dev/null"
197
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