1 | # $Id: Makefile.kmk 16521 2009-02-04 18:35:27Z 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 |
|
---|
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 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
64 |
|
---|
65 |
|
---|
66 | #
|
---|
67 | # Build the Linux Guest Additions self extracting installer.
|
---|
68 | #
|
---|
69 | # Note that $(PATH_SUB_CURRENT) was changed by subfooter.kmk above and
|
---|
70 | # any references should be made via variables assigned a know value via := .
|
---|
71 | #
|
---|
72 | # We need to depend on all source files for the additions and shared
|
---|
73 | # folders kernel modules.
|
---|
74 | ## @todo Replace the wildcard stuff by the correct file lists now that
|
---|
75 | # we've got everything included.
|
---|
76 | #
|
---|
77 | $(PATH_BIN)/additions/VBoxLinuxAdditions.run: \
|
---|
78 | $(INSTARGET_vboxmod-bin) \
|
---|
79 | $(PATH_BIN)/additions/vboxadd-timesync \
|
---|
80 | $(PATH_BIN)/additions/VBoxClient \
|
---|
81 | $(PATH_BIN)/additions/VBoxControl \
|
---|
82 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh \
|
---|
83 | $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd-timesync.sh \
|
---|
84 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient \
|
---|
85 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxclient.desktop \
|
---|
86 | $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd.sh \
|
---|
87 | $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/install.sh \
|
---|
88 | $(PATH_ROOT)/src/VBox/Installer/linux/routines.sh \
|
---|
89 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxvideo.ids \
|
---|
90 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl \
|
---|
91 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config15.pl \
|
---|
92 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config15suse.pl \
|
---|
93 | $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.test \
|
---|
94 | $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/test.c \
|
---|
95 | $(PATH_BIN)/additions/vboxmouse_drv.o \
|
---|
96 | $(PATH_BIN)/additions/vboxmouse_drv_70.so \
|
---|
97 | $(PATH_BIN)/additions/vboxmouse_drv_71.so \
|
---|
98 | $(PATH_BIN)/additions/vboxmouse_drv_14.so \
|
---|
99 | $(PATH_BIN)/additions/vboxmouse_drv_15.so \
|
---|
100 | $(PATH_BIN)/additions/vboxmouse_drv_16.so \
|
---|
101 | $(PATH_BIN)/additions/vboxvideo_drv.o \
|
---|
102 | $(PATH_BIN)/additions/vboxvideo_drv_70.so \
|
---|
103 | $(PATH_BIN)/additions/vboxvideo_drv_71.so \
|
---|
104 | $(PATH_BIN)/additions/vboxvideo_drv_13.so \
|
---|
105 | $(PATH_BIN)/additions/vboxvideo_drv_14.so \
|
---|
106 | $(PATH_BIN)/additions/vboxvideo_drv_15.so \
|
---|
107 | $(PATH_BIN)/additions/vboxvideo_drv_16.so \
|
---|
108 | $(PATH_BIN)/additions/mountvboxsf \
|
---|
109 | $(VBOX_SELINUX_CMPLD) \
|
---|
110 | $(wildcard $(PATH_BIN)/additions/src/*) \
|
---|
111 | $(wildcard $(PATH_BIN)/additions/src/*/*) \
|
---|
112 | $(wildcard $(PATH_BIN)/additions/src/*/*/*) \
|
---|
113 | $(wildcard $(PATH_BIN)/additions/src/*/*/*/*) \
|
---|
114 | $(VBOX_VERSION_STAMP)
|
---|
115 | $(call MSG_L1,Creating $@)
|
---|
116 | $(QUIET)$(MKDIR) -p $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
117 | # Remove target directory first, otherwise the behaviour of cp will not be
|
---|
118 | # what we want if it already exists. See the cp manual page for more details.
|
---|
119 | $(QUIET)$(RM) -Rf -- $(VBOX_LNX_ADD_INS_OUT_DIR)/module
|
---|
120 | $(QUIET)cp -af $(PATH_BIN)/additions/src $(VBOX_LNX_ADD_INS_OUT_DIR)/module
|
---|
121 | $(QUIET)$(MKDIR) -p $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test
|
---|
122 | $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.test $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test/Makefile
|
---|
123 | $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/test.c $(VBOX_LNX_ADD_INS_OUT_DIR)/module/test/
|
---|
124 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxadd-timesync $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxadd-timesync
|
---|
125 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxClient $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxClient
|
---|
126 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxControl $(VBOX_LNX_ADD_INS_OUT_DIR)/VBoxControl
|
---|
127 | $(QUIET)$(SED) \
|
---|
128 | -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
|
---|
129 | -e "s;_BUILD_;$(shell date);g" \
|
---|
130 | -e "s;_OSE_;$(VBOX_OSE);g" \
|
---|
131 | -e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
|
---|
132 | -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
|
---|
133 | --output $(VBOX_LNX_ADD_INS_OUT_DIR)/install_.sh \
|
---|
134 | $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/install.sh
|
---|
135 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_ADD_INS_OUT_DIR)/install_.sh $(VBOX_LNX_ADD_INS_OUT_DIR)/install.sh
|
---|
136 | $(QUIET)$(RM) $(VBOX_LNX_ADD_INS_OUT_DIR)/install_.sh
|
---|
137 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
138 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd-timesync.sh $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
139 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
140 | $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxclient.desktop $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
141 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd.sh $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
142 | $(QUIET)$(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Installer/linux/routines.sh $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
143 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxvideo.ids $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
144 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
145 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config15.pl $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
146 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config15suse.pl $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
147 | $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/90-vboxguest.fdi $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
148 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY_SYMBOLS) $(PATH_BIN)/additions/vboxmouse_drv.o $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv.o
|
---|
149 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_70.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_70.so
|
---|
150 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_71.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_71.so
|
---|
151 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_14.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_14.so
|
---|
152 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_15.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_15.so
|
---|
153 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_16.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxmouse_drv_16.so
|
---|
154 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY_SYMBOLS) $(PATH_BIN)/additions/vboxvideo_drv.o $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv.o
|
---|
155 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_70.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_70.so
|
---|
156 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_71.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_71.so
|
---|
157 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_13.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_13.so
|
---|
158 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_14.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_14.so
|
---|
159 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_15.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_15.so
|
---|
160 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_16.so $(VBOX_LNX_ADD_INS_OUT_DIR)/vboxvideo_drv_16.so
|
---|
161 | $(QUIET)$(VBOX_LNX_ADD_BIN_COPY) $(PATH_BIN)/additions/mountvboxsf $(VBOX_LNX_ADD_INS_OUT_DIR)/mount.vboxsf
|
---|
162 | ifdef VBOX_SELINUX_CMPLD
|
---|
163 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_SELINUX_CMPLD) $(VBOX_LNX_ADD_INS_OUT_DIR)
|
---|
164 | endif
|
---|
165 | $(QUIET)$(VBOX_MAKESELF) $(VBOX_LNX_ADD_INS_OUT_DIR) $@ \
|
---|
166 | "VirtualBox $(VBOX_VERSION_STRING) Guest Additions for Linux installation" /bin/sh ./install.sh "> /dev/null"
|
---|
167 |
|
---|