VirtualBox

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

Last change on this file since 79840 was 78408, checked in by vboxsync, 6 years ago

Additions,GuestHost/OpenGL,HostServices/SharedOpenGL: Get rid of the individual SPU shared libraries and merge them into the VBoxSharedCrOpenGL shared libraries on the host and VBoxOGL{,-x86} shared libraries for the guest additions, bugref:9435

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.5 KB
Line 
1# $Id: Makefile.kmk 78408 2019-05-06 21:31:01Z 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 VBoxOGL.so
71
72VBOX_FBSD_ADD_MODULES = \
73 vboxguest \
74 vboxvideo_drm
75
76#
77# All the bin files that go into the archives.
78#
79VBOX_FBSD_ADD_DBG_SYM_FILES := $(addsuffix .dbgsym,$(VBOX_FBSD_ADD_STRIP_BIN))
80VBOX_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))
81VBOX_FBSD_ADD_INS_MODULES := $(addprefix $(VBOX_FBSD_ADD_INS_OUT_DIR)/module/,$(VBOX_FBSD_ADD_MODULES))
82
83# Cleanup of the installer directory files
84OTHER_CLEAN += $(VBOX_FBSD_ADD_INS_FILES)) $(VBOX_FBSD_ADD_INS_MODULES)
85
86# pattern rule for copying the debug info from the VBOX_FBSD_ADD_STRIP_BIN files to the installation directory
87$(addprefix $(VBOX_FBSD_ADD_INS_OUT_DIR)/,$(VBOX_FBSD_ADD_DBG_SYM_FILES)): \
88 $(VBOX_FBSD_ADD_INS_OUT_DIR)/%.dbgsym : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
89 $(call MSG_TOOL,copydbg,$<,$@)
90 $(QUIET)objcopy --only-keep-debug $< $@
91
92# pattern rule for stripping and copying the VBOX_FBSD_ADD_STRIP_BIN files to the installation directory
93$(addprefix $(VBOX_FBSD_ADD_INS_OUT_DIR)/,$(VBOX_FBSD_ADD_STRIP_BIN)): \
94 $(VBOX_FBSD_ADD_INS_OUT_DIR)/% : $(PATH_STAGE_BIN)/additions/% \
95 $(VBOX_FBSD_ADD_INS_OUT_DIR)/%.dbgsym \
96 | $$(dir $$@)
97 $(call MSG_INST_FILE,$<,$@)
98 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
99 $(QUIET)objcopy --add-gnu-debuglink=$(addsuffix .dbgsym,$@) $@
100
101# pattern rule for stripping and copying the VBOX_FBSD_ADD_STRIP_OBJ files to the installation directory
102$(addprefix $(VBOX_FBSD_ADD_INS_OUT_DIR)/,$(VBOX_FBSD_ADD_STRIP_OBJ)): \
103 $(VBOX_FBSD_ADD_INS_OUT_DIR)/% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
104 $(call MSG_INST_FILE,$<,$@)
105ifeq ($(VBOX_DO_STRIP),)
106 $(QUIET)$(INSTALL) -m 0644 $< $@
107else # strip to temp file because of umask.
108 $(QUIET)objcopy --strip-unneeded -R .comment $< [email protected]
109 $(QUIET)$(INSTALL) -m 0644 [email protected] $@
110 $(QUIET)$(RM) -f -- [email protected]
111endif
112
113# pattern rule for copying the VBOX_FBSD_ADD_MODULES files to the installation directory
114$(VBOX_FBSD_ADD_INS_MODULES): \
115 $(VBOX_FBSD_ADD_INS_OUT_DIR)/module/% : $(PATH_STAGE_BIN)/additions/src/% | $(VBOX_FBSD_ADD_INS_OUT_DIR)/module/
116 $(call MSG_INST_FILE,$<,$@)
117# Remove target directories 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 $@
120 $(QUIET)cp -af $< $(VBOX_FBSD_ADD_INS_OUT_DIR)/module
121
122
123INSTALLS += $(if $(VBOX_OSE),, fbsd_add_inst-nobin)
124fbsd_add_inst-nobin_INST = obj/Additions/Installer/freebsd
125fbsd_add_inst-nobin_MODE = a+r,u+w
126fbsd_add_inst-nobin_SOURCES = \
127 ../x11/Installer/98vboxadd-xclient \
128 ../x11/Installer/vboxclient.desktop \
129 ../x11/Installer/vboxvideo.ids \
130 ../x11/Installer/x11config.pl \
131 ../x11/Installer/x11config15.pl
132
133
134INSTALLS += GuestDrivers-src
135GuestDrivers-src_INST = bin/additions/src/
136GuestDrivers-src_MODE = a+r,u+w
137GuestDrivers-src_SOURCES = Makefile
138
139# this file needs editing before it can be included in the generic installer.
140$(VBOX_FBSD_ADD_INS_OUT_DIR)/install.sh: \
141 $(VBOX_PATH_FREEBSD_ADDITION_INSTALLER)/install.sh | $$(dir $$@)
142 $(QUIET)$(SED) \
143 -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
144 -e "s;_BUILD_;$(shell date);g" \
145 -e "s;_OSE_;$(VBOX_OSE);g" \
146 -e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
147 -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
148 --output $(VBOX_FBSD_ADD_INS_OUT_DIR)/install_.sh \
149 $<
150 $(QUIET)$(INSTALL) -m 0755 $(VBOX_FBSD_ADD_INS_OUT_DIR)/install_.sh $@
151 $(QUIET)$(RM) $(VBOX_FBSD_ADD_INS_OUT_DIR)/install_.sh
152OTHERS_CLEAN += $(VBOX_FBSD_ADD_INS_OUT_DIR)/install.sh
153
154
155include $(FILE_KBUILD_SUB_FOOTER)
156
157
158#
159# Build the FreeBSD Guest Additions installer package.
160#
161# Note that $(PATH_SUB_CURRENT) was changed by subfooter.kmk above and
162# any references should be made via variables assigned a know value via := .
163#
164# We need to depend on all source files for the additions and shared
165# folders kernel modules.
166## @todo Replace the wildcard stuff by the correct file lists now that
167# we've got everything included.
168#
169$(PATH_STAGE_BIN)/additions/VBoxFreeBSDAdditions.tbz: \
170 $$(fbsd_add_inst-nobin_2_STAGE_TARGETS) \
171 $$(fbsd_add_inst-bin_2_STAGE_TARGETS) \
172 $(VBOX_FBSD_ADD_INS_FILES) \
173 $(VBOX_FBSD_ADD_INS_MODULES) \
174 $(VBOX_FBSD_ADD_INS_OUT_DIR)/install.sh \
175 $(wildcard $(PATH_STAGE_BIN)/additions/src/*) \
176 $(wildcard $(PATH_STAGE_BIN)/additions/src/*/*) \
177 $(wildcard $(PATH_STAGE_BIN)/additions/src/*/*/*) \
178 $(wildcard $(PATH_STAGE_BIN)/additions/src/*/*/*/*) \
179 $(VBOX_VERSION_STAMP) $(VBOX_SVN_REV_HEADER)
180 pkg_create \
181 -I $(VBOX_PATH_FREEBSD_ADDITION_INSTALLER)/install.sh \
182 -c $(VBOX_PATH_FREEBSD_ADDITION_INSTALLER)/pkg-comment \
183 -d $(VBOX_PATH_FREEBSD_ADDITION_INSTALLER)/pkg-descr \
184 -f $(VBOX_PATH_FREEBSD_ADDITION_INSTALLER)/pkg-plist \
185 $@
186
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