VirtualBox

source: vbox/trunk/src/VBox/Additions/common/VBoxService/Makefile.kmk@ 106246

Last change on this file since 106246 was 106061, checked in by vboxsync, 2 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.2 KB
Line 
1# $Id: Makefile.kmk 106061 2024-09-16 14:03:52Z vboxsync $
2## @file
3# Sub-Makefile for the Cross Platform Guest Addition Services.
4#
5
6#
7# Copyright (C) 2007-2024 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.virtualbox.org.
11#
12# This program is free software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License
14# as published by the Free Software Foundation, in version 3 of the
15# License.
16#
17# This program is distributed in the hope that it will be useful, but
18# WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, see <https://www.gnu.org/licenses>.
24#
25# SPDX-License-Identifier: GPL-3.0-only
26#
27
28SUB_DEPTH = ../../../../..
29include $(KBUILD_PATH)/subheader.kmk
30
31#
32# Incldue testcases.
33#
34include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
35
36
37#
38# Target lists.
39#
40PROGRAMS += VBoxService
41
42
43#
44# Globals?
45#
46# Enable the timesync service within VBoxService.
47VBOX_WITH_VBOXSERVICE_TIMESYNC := 1
48
49# Busybox-like toolbox, embedded into VBoxService.
50ifdef VBOX_WITH_GSTCTL_TOOLBOX_SUPPORT
51 VBOX_WITH_VBOXSERVICE_TOOLBOX := 1
52endif
53
54# VM-management functions, like memory ballooning and statistics.
55VBOX_WITH_VBOXSERVICE_MANAGEMENT := 1
56
57if1of ($(KBUILD_TARGET), linux)
58 # CPU hotplugging.
59 VBOX_WITH_VBOXSERVICE_CPUHOTPLUG := 1
60endif
61
62# Page Sharing (Page Fusion).
63if1of ($(KBUILD_TARGET), win)
64 VBOX_WITH_VBOXSERVICE_PAGE_SHARING := 1
65endif
66
67ifdef VBOX_WITH_GUEST_PROPS
68 VBOX_WITH_VBOXSERVICE_VMINFO := 1
69endif
70
71# Guest Control.
72ifdef VBOX_WITH_GUEST_CONTROL
73 VBOX_WITH_VBOXSERVICE_CONTROL := 1
74endif
75
76# Shared Clipboard.
77ifdef VBOX_WITH_SHARED_CLIPBOARD
78 VBOX_WITH_VBOXSERVICE_CLIPBOARD := 1
79endif
80
81# DRM Resize.
82if "$(KBUILD_TARGET)" == "linux" && defined(VBOX_WITH_GUEST_PROPS)
83 # The DRM resizing code needs guest properties.
84 VBOX_WITH_VBOXSERVICE_DRMRESIZE := 1
85endif
86
87
88#
89# VBoxService
90#
91VBoxService_TEMPLATE = VBoxGuestR3Exe
92
93VBoxService_DEFS = \
94 $(if $(VBOX_WITH_VBOXSERVICE_CONTROL),VBOX_WITH_VBOXSERVICE_CONTROL,) \
95 $(if $(VBOX_WITH_VBOXSERVICE_CPUHOTPLUG),VBOX_WITH_VBOXSERVICE_CPUHOTPLUG,) \
96 $(if $(VBOX_WITH_VBOXSERVICE_DRMRESIZE),VBOX_WITH_VBOXSERVICE_DRMRESIZE,) \
97 $(if $(VBOX_WITH_VBOXSERVICE_MANAGEMENT),VBOX_WITH_VBOXSERVICE_MANAGEMENT,) \
98 $(if $(VBOX_WITH_VBOXSERVICE_PAGE_SHARING),VBOX_WITH_VBOXSERVICE_PAGE_SHARING,) \
99 $(if $(VBOX_WITH_VBOXSERVICE_TIMESYNC),VBOX_WITH_VBOXSERVICE_TIMESYNC,) \
100 $(if $(VBOX_WITH_VBOXSERVICE_TOOLBOX),VBOX_WITH_VBOXSERVICE_TOOLBOX,) \
101 $(if $(VBOX_WITH_VBOXSERVICE_VMINFO),VBOX_WITH_VBOXSERVICE_VMINFO,) \
102 $(if $(VBOX_WITH_DBUS),VBOX_WITH_DBUS,) \
103 $(if $(VBOX_WITH_GUEST_CONTROL),VBOX_WITH_GUEST_CONTROL,) \
104 $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
105 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
106 $(if $(VBOX_WITH_GSTCTL_TOOLBOX_SUPPORT),VBOX_WITH_GSTCTL_TOOLBOX_SUPPORT,) \
107 $(if $(VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS),VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS,)
108ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
109 VBoxService_DEFS += VBOX_BUILD_TARGET="$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)"
110else
111 VBoxService_DEFS += VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
112endif
113VBoxService_DEFS.win += _WIN32_WINNT=0x0501
114VBoxService_DEFS.os2 = VBOX_WITH_HGCM
115
116VBoxService_SOURCES = \
117 VBoxService.cpp \
118 VBoxServiceUtils.cpp \
119 VBoxServiceStats.cpp
120
121ifdef VBOX_WITH_VBOXSERVICE_TIMESYNC
122 VBoxService_SOURCES += \
123 VBoxServiceTimeSync.cpp
124endif
125
126ifdef VBOX_WITH_VBOXSERVICE_CLIPBOARD
127 VBoxService_DEFS.os2 += VBOX_WITH_VBOXSERVICE_CLIPBOARD VBOX_WITH_SHARED_CLIPBOARD
128 VBoxService_SOURCES.os2 += \
129 VBoxServiceClipboard-os2.cpp \
130 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp
131endif
132
133ifdef VBOX_WITH_VBOXSERVICE_TOOLBOX
134 VBoxService_SOURCES += \
135 VBoxServiceToolBox.cpp
136endif
137
138ifdef VBOX_WITH_VBOXSERVICE_CONTROL
139 VBoxService_SOURCES += \
140 VBoxServiceControl.cpp \
141 VBoxServiceControlProcess.cpp \
142 VBoxServiceControlSession.cpp
143endif
144
145ifdef VBOX_WITH_VBOXSERVICE_MANAGEMENT
146 ifdef VBOX_WITH_MEMBALLOON
147 VBoxService_SOURCES += \
148 VBoxServiceBalloon.cpp
149 VBoxService_DEFS += VBOX_WITH_MEMBALLOON
150 endif
151endif
152
153if1of ($(KBUILD_TARGET), win)
154 VBoxService_SOURCES += \
155 VBoxServicePageSharing.cpp \
156 VBoxServiceDisplayConfig.cpp
157 VBoxService_INCS += \
158 $(PATH_ROOT)/src/VBox/Additions \
159 $(PATH_ROOT)/include/VBox/Graphics \
160 $(PATH_ROOT)/src/VBox/Additions/WINNT/include
161endif
162
163ifdef VBOX_WITH_VBOXSERVICE_VMINFO
164 VBoxService_SOURCES.win += \
165 VBoxServiceVMInfo-win.cpp
166 VBoxService_SOURCES += \
167 VBoxServiceVMInfo.cpp \
168 VBoxServicePropCache.cpp
169endif
170
171ifdef VBOX_WITH_VBOXSERVICE_CPUHOTPLUG
172 VBoxService_SOURCES += \
173 VBoxServiceCpuHotPlug.cpp
174endif
175
176ifdef VBOX_WITH_SHARED_FOLDERS
177 if1of ($(KBUILD_TARGET), linux os2 solaris win)
178 VBoxService_DEFS += VBOX_WITH_SHARED_FOLDERS
179 VBoxService_SOURCES += \
180 VBoxServiceAutoMount.cpp
181 VBoxService_SOURCES.linux += \
182 ../../linux/sharedfolders/vbsfmount.c
183 VBoxService_LIBS.win += \
184 Mpr.Lib
185 endif
186endif
187
188VBoxService_SOURCES.win += \
189 VBoxService-win.cpp
190
191VBoxService_SOURCES.os2 += \
192 VBoxService-os2.def
193
194VBoxService_LDFLAGS.darwin = -framework IOKit
195
196VBoxService_LIBS += \
197 $(VBOX_LIB_IPRT_GUEST_R3) \
198 $(VBOX_LIB_VBGL_R3) \
199 $(VBOX_LIB_IPRT_GUEST_R3) # (The joy of unix linkers.)
200ifdef VBOX_WITH_DBUS
201 if1of ($(KBUILD_TARGET), linux solaris) # FreeBSD?
202 VBoxService_LIBS += \
203 dl
204 endif
205endif
206VBoxService_LIBS.netbsd += crypt
207ifdef VBOX_WITH_GUEST_PROPS
208 VBoxService_LIBS.win += \
209 Secur32.lib \
210 WtsApi32.lib \
211 Psapi.lib
212 VBoxService_LIBS.solaris += \
213 nsl \
214 kstat \
215 contract
216endif
217
218ifdef VBOX_WITH_VBOXSERVICE_VMINFO
219 VBoxServiceVMInfo.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
220 VBoxServiceVMInfo.cpp_DEPS = $(VBOX_SVN_REV_KMK)
221endif
222
223VBoxService_USES.win += vboximportchecker
224VBoxService_VBOX_IMPORT_CHECKER.win.x86 = nt31
225VBoxService_VBOX_IMPORT_CHECKER.win.amd64 = xp64
226
227$(call VBOX_SET_VER_INFO_EXE,VBoxService,VirtualBox Guest Additions Service,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
228
229include $(FILE_KBUILD_SUB_FOOTER)
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