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