VirtualBox

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

Last change on this file since 78376 was 78340, checked in by vboxsync, 6 years ago

Additions: Remove the VBoxOGLarrayspu library as it is unused for a long time already bugref:9435

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