1 | # $Id: Makefile.kmk 18377 2009-03-27 10:44:02Z 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 |
|
---|
22 | SUB_DEPTH = ../../../..
|
---|
23 | include $(KBUILD_PATH)/subheader.kmk
|
---|
24 |
|
---|
25 | #
|
---|
26 | # Include sub-makefiles.
|
---|
27 | #
|
---|
28 | include $(PATH_SUB_CURRENT)/module/Makefile.kmk
|
---|
29 | include $(PATH_SUB_CURRENT)/daemon/Makefile.kmk
|
---|
30 | include $(PATH_SUB_CURRENT)/sharedfolders/Makefile.kmk
|
---|
31 | include $(PATH_SUB_CURRENT)/drm/Makefile.kmk
|
---|
32 |
|
---|
33 | #
|
---|
34 | # Targets
|
---|
35 | #
|
---|
36 | ifndef 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
|
---|
41 | endif
|
---|
42 |
|
---|
43 | #
|
---|
44 | # Globals
|
---|
45 | #
|
---|
46 | VBOX_LNX_ADD_INS_OUT_DIR := $(PATH_TARGET)/Additions/Installer/linux
|
---|
47 | BLDDIRS += $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
48 | VBOX_PATH_LINUX_ADDITION_INSTALLER := $(PATH_SUB_CURRENT)/installer
|
---|
49 | VBOX_PATH_X11_ADDITION_INSTALLER := $(PATH_ROOT)/src/VBox/Additions/x11/Installer
|
---|
50 |
|
---|
51 | ifeq ($(KBUILD_TYPE),debug)
|
---|
52 | VBOX_LNX_ADD_BIN_COPY = $(CP) -f
|
---|
53 | VBOX_LNX_ADD_BIN_COPY_SYMBOLS = $(CP) -f
|
---|
54 | else
|
---|
55 | VBOX_LNX_ADD_BIN_COPY = objcopy -S -R .comment
|
---|
56 | VBOX_LNX_ADD_BIN_COPY_SYMBOLS = objcopy -g -R .comment
|
---|
57 | endif
|
---|
58 |
|
---|
59 | INSTALLS += GuestDrivers-src
|
---|
60 | GuestDrivers-src_INST = bin/additions/src/
|
---|
61 | GuestDrivers-src_MODE = a+r,u+w
|
---|
62 | GuestDrivers-src_SOURCES = Makefile
|
---|
63 |
|
---|
64 | INSTALLS += AutoRun-sh
|
---|
65 | AutoRun-sh_INST = bin/additions/
|
---|
66 | AutoRun-sh_MODE = a+rx,u+w
|
---|
67 | AutoRun-sh_SOURCES = $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/autorun.sh
|
---|
68 |
|
---|
69 |
|
---|
70 | include $(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.test \
|
---|
101 | $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/test.c \
|
---|
102 | $(PATH_BIN)/additions/vboxmouse_drv.o \
|
---|
103 | $(PATH_BIN)/additions/vboxmouse_drv_70.so \
|
---|
104 | $(PATH_BIN)/additions/vboxmouse_drv_71.so \
|
---|
105 | $(PATH_BIN)/additions/vboxmouse_drv_14.so \
|
---|
106 | $(PATH_BIN)/additions/vboxmouse_drv_15.so \
|
---|
107 | $(PATH_BIN)/additions/vboxmouse_drv_16.so \
|
---|
108 | $(PATH_BIN)/additions/vboxvideo_drv.o \
|
---|
109 | $(PATH_BIN)/additions/vboxvideo_drv_70.so \
|
---|
110 | $(PATH_BIN)/additions/vboxvideo_drv_71.so \
|
---|
111 | $(PATH_BIN)/additions/vboxvideo_drv_13.so \
|
---|
112 | $(PATH_BIN)/additions/vboxvideo_drv_14.so \
|
---|
113 | $(PATH_BIN)/additions/vboxvideo_drv_15.so \
|
---|
114 | $(PATH_BIN)/additions/vboxvideo_drv_16.so \
|
---|
115 | $(PATH_BIN)/additions/mountvboxsf \
|
---|
116 | $(PATH_BIN)/additions/VBoxOGLarrayspu.so \
|
---|
117 | $(PATH_BIN)/additions/VBoxOGLcrutil.so \
|
---|
118 | $(PATH_BIN)/additions/VBoxOGLerrorspu.so \
|
---|
119 | $(PATH_BIN)/additions/VBoxOGLfeedbackspu.so \
|
---|
120 | $(PATH_BIN)/additions/VBoxOGLpackspu.so \
|
---|
121 | $(PATH_BIN)/additions/VBoxOGLpassthroughspu.so \
|
---|
122 | $(PATH_BIN)/additions/VBoxOGL.so \
|
---|
123 | $(VBOX_SELINUX_CMPLD) \
|
---|
124 | $(wildcard $(PATH_BIN)/additions/src/*) \
|
---|
125 | $(wildcard $(PATH_BIN)/additions/src/*/*) \
|
---|
126 | $(wildcard $(PATH_BIN)/additions/src/*/*/*) \
|
---|
127 | $(wildcard $(PATH_BIN)/additions/src/*/*/*/*) \
|
---|
128 | $(VBOX_VERSION_STAMP)
|
---|
129 | $(call MSG_L1,Creating $@)
|
---|
130 | $(QUIET)$(MKDIR) -p $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
131 | # Remove target directory first, otherwise the behaviour of cp will not be
|
---|
132 | # what we want if it already exists. See the cp manual page for more details.
|
---|
133 | $(QUIET)$(RM) -Rf -- $(VBOX_LNX_ADD_INS_OUT_DIR)/module
|
---|
134 | $(QUIET)cp -af $(PATH_BIN)/additions/src $(VBOX_LNX_ADD_INS_OUT_DIR)/module
|
---|
135 | $(QUIET)$(MKDIR) -p $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test
|
---|
136 | $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.test $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test/Makefile
|
---|
137 | $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/test.c $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test/
|
---|
138 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxadd-timesync $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxadd-timesync
|
---|
139 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxClient $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxClient
|
---|
140 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxControl $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxControl
|
---|
141 | $(QUIET)$(SED) \
|
---|
142 | -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
|
---|
143 | -e "s;_BUILD_;$(shell date);g" \
|
---|
144 | -e "s;_OSE_;$(VBOX_OSE);g" \
|
---|
145 | -e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
|
---|
146 | -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
|
---|
147 | --output $(VBOX_LNX_ADD_INS_OUT_DIR)/install_.sh \
|
---|
148 | $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/install.sh
|
---|
149 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_ADD_INS_OUT_DIR)/install_.sh $(VBOX_LNX_ADD_INS_OUT_DIR)/install.sh
|
---|
150 | $(QUIET)$(RM) $(VBOX_LNX_ADD_INS_OUT_DIR)/install_.sh
|
---|
151 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
152 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd-timesync.sh $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
153 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
154 | $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxclient.desktop $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
155 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd.sh $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
156 | $(QUIET)$(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Installer/linux/routines.sh $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
157 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxvideo.ids $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
158 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
159 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config15.pl $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
160 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config15suse.pl $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
161 | $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/90-vboxguest.fdi $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
162 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY_SYMBOLS) $(PATH_BIN)/additions/vboxmouse_drv.o $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv.o
|
---|
163 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_70.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_70.so
|
---|
164 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_71.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_71.so
|
---|
165 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_14.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_14.so
|
---|
166 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_15.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_15.so
|
---|
167 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_16.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_16.so
|
---|
168 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY_SYMBOLS) $(PATH_BIN)/additions/vboxvideo_drv.o $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv.o
|
---|
169 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_70.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_70.so
|
---|
170 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_71.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_71.so
|
---|
171 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_13.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_13.so
|
---|
172 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_14.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_14.so
|
---|
173 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_15.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_15.so
|
---|
174 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_16.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_16.so
|
---|
175 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/mountvboxsf $(VBOX_LNX_ADD_INS_OUT_DIR)/mount.vboxsf
|
---|
176 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGLarrayspu.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGLarrayspu.so
|
---|
177 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGLcrutil.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGLcrutil.so
|
---|
178 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGLerrorspu.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGLerrorspu.so
|
---|
179 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGLfeedbackspu.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGLfeedbackspu.so
|
---|
180 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGLpackspu.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGLpackspu.so
|
---|
181 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGLpassthroughspu.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGLpassthroughspu.so
|
---|
182 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxOGL.so $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxOGL.so
|
---|
183 | ifdef VBOX_SELINUX_CMPLD
|
---|
184 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_SELINUX_CMPLD) $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
185 | endif
|
---|
186 | $(QUIET)$(VBOX_MAKESELF) $(VBOX_LNX_ADD_INS_OUT_DIR) $@ \
|
---|
187 | "VirtualBox $(VBOX_VERSION_STRING) Guest Additions for Linux installation" /bin/sh ./install.sh "> /dev/null"
|
---|
188 |
|
---|