VirtualBox

source: vbox/trunk/src/VBox/Additions/freebsd/Makefile.kmk@ 27901

Last change on this file since 27901 was 27601, checked in by vboxsync, 15 years ago

Additions/x11: VBoxClient now handles dynamic resizing using library calls, not a shell script, and for older server versions too

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.7 KB
Line 
1# $Id: Makefile.kmk 27601 2010-03-22 16:22:13Z vboxsync $
2## @file
3# Sub-Makefile for the FreeBSD guest additions base directory.
4#
5
6#
7# Copyright (C) 2008 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
25ifneq ($(KBUILD_HOST),freebsd)
26$(error "The FreeBSD guest additions installer can only be built on FreeBSD!")
27endif
28
29# Include sub-makefiles.
30#include $(PATH_SUB_CURRENT)/vboxvfs/Makefile.kmk
31include $(PATH_SUB_CURRENT)/drm/Makefile.kmk
32
33#
34# Globals
35#
36VBOX_FBSD_ADD_INS_OUT_DIR := $(PATH_TARGET)/Additions/Installer/freebsd
37BLDDIRS += \
38 $(VBOX_FBSD_ADD_INS_OUT_DIR) \
39 $(VBOX_FBSD_ADD_INS_OUT_DIR)/module
40VBOX_PATH_FREEBSD_ADDITION_INSTALLER := $(PATH_SUB_CURRENT)/Installer
41VBOX_PATH_X11_ADDITION_INSTALLER := $(PATH_ROOT)/src/VBox/Additions/x11/Installer
42
43
44#
45# Targets
46#
47ifndef VBOX_OSE
48 BLDDIRS += $(VBOX_FBSD_ADD_INS_OUT_DIR) $(VBOX_FBSD_ADD_INS_OUT_DIR)/module
49 PACKING += $(PATH_BIN)/additions/VBoxFreeBSDAdditions.tbz
50 OTHER_CLEAN += $(PACKING)
51endif
52
53
54#
55# Files to install
56#
57VBOX_FBSD_ADD_STRIP_BIN = \
58 VBoxService \
59 VBoxClient \
60 VBoxControl \
61 vboxmouse_drv_70.so \
62 vboxmouse_drv_71.so \
63 vboxmouse_drv_14.so \
64 vboxmouse_drv_15.so \
65 vboxmouse_drv_16.so \
66 vboxmouse_drv_17.so \
67 vboxvideo_drv_70.so \
68 vboxvideo_drv_71.so \
69 vboxvideo_drv_13.so \
70 vboxvideo_drv_14.so \
71 vboxvideo_drv_15.so \
72 vboxvideo_drv_16.so \
73 vboxvideo_drv_17.so \
74 VBoxOGLarrayspu.so \
75 VBoxOGLcrutil.so \
76 VBoxOGLerrorspu.so \
77 VBoxOGLfeedbackspu.so \
78 VBoxOGLpackspu.so \
79 VBoxOGLpassthroughspu.so \
80 VBoxOGL.so
81
82VBOX_FBSD_ADD_MODULES = \
83 vboxguest \
84 vboxvideo_drm
85
86#
87# All the bin files that go into the archives.
88#
89VBOX_FBSD_ADD_DBG_SYM_FILES := $(addsuffix .dbgsym,$(VBOX_FBSD_ADD_STRIP_BIN))
90VBOX_FBSD_ADD_INS_FILES := $(addprefix $(VBOX_FBSD_ADD_INS_OUT_DIR)/,$(VBOX_FBSD_ADD_STRIP_BIN) $(VBOX_FBSD_ADD_STRIP_OBJ) $(VBOX_FBSD_ADD_DBG_SYM_FILES))
91VBOX_FBSD_ADD_INS_MODULES := $(addprefix $(VBOX_FBSD_ADD_INS_OUT_DIR)/module/,$(VBOX_FBSD_ADD_MODULES))
92
93# Cleanup of the the installer directory files
94OTHER_CLEAN += $(VBOX_FBSD_ADD_INS_FILES)) $(VBOX_FBSD_ADD_INS_MODULES)
95
96# pattern rule for copying the debug info from the VBOX_FBSD_ADD_STRIP_BIN files to the installation directory
97$(addprefix $(VBOX_FBSD_ADD_INS_OUT_DIR)/,$(VBOX_FBSD_ADD_DBG_SYM_FILES)): \
98 $(VBOX_FBSD_ADD_INS_OUT_DIR)/%.dbgsym : $(PATH_BIN)/additions/% | $$(dir $$@)
99 $(call MSG_TOOL,copydbg,$<,$@)
100 $(QUIET)objcopy --only-keep-debug $< $@
101
102# pattern rule for stripping and copying the VBOX_FBSD_ADD_STRIP_BIN files to the installation directory
103$(addprefix $(VBOX_FBSD_ADD_INS_OUT_DIR)/,$(VBOX_FBSD_ADD_STRIP_BIN)): \
104 $(VBOX_FBSD_ADD_INS_OUT_DIR)/% : $(PATH_BIN)/additions/% \
105 $(VBOX_FBSD_ADD_INS_OUT_DIR)/%.dbgsym \
106 | $$(dir $$@)
107 $(call MSG_INST_FILE,$<,$@)
108 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
109 $(QUIET)objcopy --add-gnu-debuglink=$(addsuffix .dbgsym,$@) $@
110
111# pattern rule for stripping and copying the VBOX_FBSD_ADD_STRIP_OBJ files to the installation directory
112$(addprefix $(VBOX_FBSD_ADD_INS_OUT_DIR)/,$(VBOX_FBSD_ADD_STRIP_OBJ)): \
113 $(VBOX_FBSD_ADD_INS_OUT_DIR)/% : $(PATH_BIN)/additions/% | $$(dir $$@)
114 $(call MSG_INST_FILE,$<,$@)
115ifeq ($(VBOX_DO_STRIP),)
116 $(QUIET)$(INSTALL) -m 0644 $< $@
117else # strip to temp file because of umask.
118 $(QUIET)objcopy --strip-unneeded -R .comment $< [email protected]
119 $(QUIET)$(INSTALL) -m 0644 [email protected] $@
120 $(QUIET)$(RM) -f -- [email protected]
121endif
122
123# pattern rule for copying the VBOX_FBSD_ADD_MODULES files to the installation directory
124$(VBOX_FBSD_ADD_INS_MODULES): \
125 $(VBOX_FBSD_ADD_INS_OUT_DIR)/module/% : $(PATH_BIN)/additions/src/% | $(VBOX_FBSD_ADD_INS_OUT_DIR)/module/
126 $(call MSG_INST_FILE,$<,$@)
127# Remove target directories first, otherwise the behaviour of cp will not be
128# what we want if it already exists. See the cp manual page for more details.
129 $(QUIET)$(RM) -Rf $@
130 $(QUIET)cp -af $< $(VBOX_FBSD_ADD_INS_OUT_DIR)/module
131
132
133INSTALLS += $(if $(VBOX_OSE),, fbsd_add_inst-nobin)
134fbsd_add_inst-nobin_INST = obj/Additions/Installer/freebsd
135fbsd_add_inst-nobin_MODE = a+r,u+w
136fbsd_add_inst-nobin_SOURCES = \
137 ../x11/Installer/98vboxadd-xclient \
138 ../x11/Installer/vboxclient.desktop \
139 ../x11/Installer/vboxvideo.ids \
140 ../x11/Installer/x11config.pl \
141 ../x11/Installer/x11config15.pl
142
143
144INSTALLS += GuestDrivers-src
145GuestDrivers-src_INST = bin/additions/src/
146GuestDrivers-src_MODE = a+r,u+w
147GuestDrivers-src_SOURCES = Makefile
148
149# this file needs editing before it can be included in the generic installer.
150$(VBOX_FBSD_ADD_INS_OUT_DIR)/install.sh: \
151 $(VBOX_PATH_FREEBSD_ADDITION_INSTALLER)/install.sh | $$(dir $$@)
152 $(QUIET)$(SED) \
153 -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
154 -e "s;_BUILD_;$(shell date);g" \
155 -e "s;_OSE_;$(VBOX_OSE);g" \
156 -e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
157 -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
158 --output $(VBOX_FBSD_ADD_INS_OUT_DIR)/install_.sh \
159 $<
160 $(QUIET)$(INSTALL) -m 0755 $(VBOX_FBSD_ADD_INS_OUT_DIR)/install_.sh $@
161 $(QUIET)$(RM) $(VBOX_FBSD_ADD_INS_OUT_DIR)/install_.sh
162OTHERS_CLEAN += $(VBOX_FBSD_ADD_INS_OUT_DIR)/install.sh
163
164
165include $(KBUILD_PATH)/subfooter.kmk
166
167
168#
169# Build the FreeBSD Guest Additions installer package.
170#
171# Note that $(PATH_SUB_CURRENT) was changed by subfooter.kmk above and
172# any references should be made via variables assigned a know value via := .
173#
174# We need to depend on all source files for the additions and shared
175# folders kernel modules.
176## @todo Replace the wildcard stuff by the correct file lists now that
177# we've got everything included.
178#
179$(PATH_BIN)/additions/VBoxFreeBSDAdditions.tbz: \
180 $(INSTARGET_fbsd_add_inst-nobin) \
181 $(INSTARGET_fbsd_add_inst-bin) \
182 $(VBOX_FBSD_ADD_INS_FILES) \
183 $(VBOX_FBSD_ADD_INS_MODULES) \
184 $(VBOX_FBSD_ADD_INS_OUT_DIR)/install.sh \
185 $(wildcard $(PATH_BIN)/additions/src/*) \
186 $(wildcard $(PATH_BIN)/additions/src/*/*) \
187 $(wildcard $(PATH_BIN)/additions/src/*/*/*) \
188 $(wildcard $(PATH_BIN)/additions/src/*/*/*/*) \
189 $(VBOX_VERSION_STAMP)
190 pkg_create \
191 -I $(VBOX_PATH_FREEBSD_ADDITION_INSTALLER)/install.sh \
192 -c $(VBOX_PATH_FREEBSD_ADDITION_INSTALLER)/pkg-comment \
193 -d $(VBOX_PATH_FREEBSD_ADDITION_INSTALLER)/pkg-descr \
194 -f $(VBOX_PATH_FREEBSD_ADDITION_INSTALLER)/pkg-plist \
195 $@
196
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