1 | # $Id: Makefile.kmk 9252 2008-05-30 13:27:13Z 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 | DEPTH ?= ../../../..
|
---|
23 | SUB_DEPTH = ..
|
---|
24 | include $(KBUILD_PATH)/subheader.kmk
|
---|
25 |
|
---|
26 | # This can only be built on a real Linux system.
|
---|
27 | if1of ($(KBUILD_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
|
---|
31 | endif
|
---|
32 |
|
---|
33 | ifndef 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
|
---|
38 | endif
|
---|
39 |
|
---|
40 | VBOX_PATH_LINUX_ADDITION_INSTALLER := $(PATH_SUB_CURRENT)/installer
|
---|
41 | VBOX_PATH_X11_ADDITION_INSTALLER := $(PATH_ROOT)/src/VBox/Additions/x11/installer
|
---|
42 |
|
---|
43 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
44 |
|
---|
45 | ifeq ($(KBUILD_TYPE),debug)
|
---|
46 | BIN_COPY = $(CP) -f
|
---|
47 | BIN_COPY_SYMBOLS = $(CP) -f
|
---|
48 | else
|
---|
49 | BIN_COPY = objcopy -S -R .comment
|
---|
50 | BIN_COPY_SYMBOLS = objcopy -g -R .comment
|
---|
51 | endif
|
---|
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_X11_ADDITION_INSTALLER)/vboxclient.desktop \
|
---|
72 | $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd.sh \
|
---|
73 | $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/install.sh \
|
---|
74 | $(PATH_ROOT)/src/VBox/Installer/linux/routines.sh \
|
---|
75 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxvideo.ids \
|
---|
76 | $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl \
|
---|
77 | $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.test \
|
---|
78 | $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/test.c \
|
---|
79 | $(PATH_BIN)/additions/vboxmouse_drv.o \
|
---|
80 | $(PATH_BIN)/additions/vboxmouse_drv_70.so \
|
---|
81 | $(PATH_BIN)/additions/vboxmouse_drv_71.so \
|
---|
82 | $(PATH_BIN)/additions/vboxmouse_drv_14.so \
|
---|
83 | $(PATH_BIN)/additions/vboxvideo_drv.o \
|
---|
84 | $(PATH_BIN)/additions/vboxvideo_drv_70.so \
|
---|
85 | $(PATH_BIN)/additions/vboxvideo_drv_71.so \
|
---|
86 | $(PATH_BIN)/additions/vboxvideo_drv_13.so \
|
---|
87 | $(PATH_BIN)/additions/vboxvideo_drv_14.so \
|
---|
88 | $(PATH_BIN)/additions/vboxvideo_drv_15.so \
|
---|
89 | $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxvfs.sh $(PATH_BIN)/additions/mountvboxsf \
|
---|
90 | $(VBOX_SELINUX_CMPLD) \
|
---|
91 | $(wildcard $(PATH_BIN)/additions/src/*) \
|
---|
92 | $(wildcard $(PATH_BIN)/additions/src/*/*) \
|
---|
93 | $(wildcard $(PATH_BIN)/additions/src/*/*/*) \
|
---|
94 | $(wildcard $(PATH_BIN)/additions/src/*/*/*/*) \
|
---|
95 | $(VBOX_VERSION_STAMP)
|
---|
96 | $(call MSG_L1,Creating $@)
|
---|
97 | $(QUIET)$(MKDIR) -p $(PATH_TARGET)/install
|
---|
98 | # Remove target directory first, otherwise the behaviour of cp will not be
|
---|
99 | # what we want if it already exists. See the cp manual page for more details.
|
---|
100 | $(QUIET)rm -rf $(PATH_TARGET)/install/module
|
---|
101 | $(QUIET)cp -af $(PATH_BIN)/additions/src $(PATH_TARGET)/install/module
|
---|
102 | $(QUIET)$(MKDIR) -p $(PATH_TARGET)/install/module/test
|
---|
103 | $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/Makefile.test $(PATH_TARGET)/install/module/test/Makefile
|
---|
104 | $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/test.c $(PATH_TARGET)/install/module/test/
|
---|
105 | $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxadd-timesync $(PATH_TARGET)/install/vboxadd-timesync
|
---|
106 | $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/VBoxClient $(PATH_TARGET)/install/VBoxClient
|
---|
107 | $(QUIET)$(SED) "s;_VERSION_;$(VBOX_VERSION_STRING);g" $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/install.sh \
|
---|
108 | | $(SED) "s;_BUILD_;$(shell date);g" \
|
---|
109 | | $(SED) "s;_OSE_;$(VBOX_OSE);g" \
|
---|
110 | | $(SED) "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
|
---|
111 | > $(PATH_TARGET)/install/install_.sh
|
---|
112 | $(QUIET)$(INSTALL) -m 0755 $(PATH_TARGET)/install/install_.sh $(PATH_TARGET)/install/install.sh
|
---|
113 | $(QUIET)$(RM) $(PATH_TARGET)/install/install_.sh
|
---|
114 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh $(PATH_TARGET)/install
|
---|
115 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd-timesync.sh $(PATH_TARGET)/install
|
---|
116 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient $(PATH_TARGET)/install
|
---|
117 | $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxclient.desktop $(PATH_TARGET)/install
|
---|
118 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxadd.sh $(PATH_TARGET)/install
|
---|
119 | $(QUIET)$(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Installer/linux/routines.sh $(PATH_TARGET)/install
|
---|
120 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxvideo.ids $(PATH_TARGET)/install
|
---|
121 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl $(PATH_TARGET)/install
|
---|
122 | $(QUIET)$(BIN_COPY_SYMBOLS) $(PATH_BIN)/additions/vboxmouse_drv.o $(PATH_TARGET)/install/vboxmouse_drv.o
|
---|
123 | $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_70.so $(PATH_TARGET)/install/vboxmouse_drv_70.so
|
---|
124 | $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_71.so $(PATH_TARGET)/install/vboxmouse_drv_71.so
|
---|
125 | $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_14.so $(PATH_TARGET)/install/vboxmouse_drv_14.so
|
---|
126 | $(QUIET)$(BIN_COPY_SYMBOLS) $(PATH_BIN)/additions/vboxvideo_drv.o $(PATH_TARGET)/install/vboxvideo_drv.o
|
---|
127 | $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_70.so $(PATH_TARGET)/install/vboxvideo_drv_70.so
|
---|
128 | $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_71.so $(PATH_TARGET)/install/vboxvideo_drv_71.so
|
---|
129 | $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_13.so $(PATH_TARGET)/install/vboxvideo_drv_13.so
|
---|
130 | $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_14.so $(PATH_TARGET)/install/vboxvideo_drv_14.so
|
---|
131 | $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_15.so $(PATH_TARGET)/install/vboxvideo_drv_15.so
|
---|
132 | $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/mountvboxsf $(PATH_TARGET)/install/mount.vboxsf
|
---|
133 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LINUX_ADDITION_INSTALLER)/vboxvfs.sh $(PATH_TARGET)/install
|
---|
134 | ifdef VBOX_SELINUX_CMPLD
|
---|
135 | $(QUIET)$(INSTALL) -m 0755 $(VBOX_SELINUX_CMPLD) $(PATH_TARGET)/install
|
---|
136 | endif
|
---|
137 | $(QUIET)$(VBOX_MAKESELF) $(PATH_TARGET)/install $@ \
|
---|
138 | "VirtualBox $(VBOX_VERSION_STRING) Guest Additions for Linux installation" /bin/sh ./install.sh "> /dev/null"
|
---|
139 |
|
---|