VirtualBox

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

Last change on this file since 98416 was 98416, checked in by vboxsync, 17 months ago

Additions/*.kmk: Automatic scm cleanups. bugref:10348

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.8 KB
Line 
1# $Id: Makefile.kmk 98416 2023-02-01 16:25:17Z vboxsync $
2## @file
3# Sub-Makefile for the Cross Platform Guest Addition Services.
4#
5
6#
7# Copyright (C) 2007-2023 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.
50VBOX_WITH_VBOXSERVICE_TOOLBOX := 1
51
52# VM-management functions, like memory ballooning and statistics.
53VBOX_WITH_VBOXSERVICE_MANAGEMENT := 1
54
55if1of ($(KBUILD_TARGET), linux)
56 # CPU hotplugging.
57 VBOX_WITH_VBOXSERVICE_CPUHOTPLUG := 1
58endif
59
60# Page Sharing (Page Fusion).
61if1of ($(KBUILD_TARGET), win)
62 VBOX_WITH_VBOXSERVICE_PAGE_SHARING := 1
63endif
64
65ifdef VBOX_WITH_GUEST_PROPS
66 VBOX_WITH_VBOXSERVICE_VMINFO := 1
67endif
68
69# Guest Control.
70ifdef VBOX_WITH_GUEST_CONTROL
71 VBOX_WITH_VBOXSERVICE_CONTROL := 1
72endif
73
74# Shared Clipboard.
75ifdef VBOX_WITH_SHARED_CLIPBOARD
76 VBOX_WITH_VBOXSERVICE_CLIPBOARD := 1
77endif
78
79# DRM Resize.
80if "$(KBUILD_TARGET)" == "linux" && defined(VBOX_WITH_GUEST_PROPS)
81 # The DRM resizing code needs guest properties.
82 VBOX_WITH_VBOXSERVICE_DRMRESIZE := 1
83endif
84
85
86#
87# VBoxService
88#
89VBoxService_TEMPLATE = VBoxGuestR3Exe
90
91VBoxService_DEFS = \
92 $(if $(VBOX_WITH_VBOXSERVICE_CONTROL),VBOX_WITH_VBOXSERVICE_CONTROL,) \
93 $(if $(VBOX_WITH_VBOXSERVICE_CPUHOTPLUG),VBOX_WITH_VBOXSERVICE_CPUHOTPLUG,) \
94 $(if $(VBOX_WITH_VBOXSERVICE_DRMRESIZE),VBOX_WITH_VBOXSERVICE_DRMRESIZE,) \
95 $(if $(VBOX_WITH_VBOXSERVICE_MANAGEMENT),VBOX_WITH_VBOXSERVICE_MANAGEMENT,) \
96 $(if $(VBOX_WITH_VBOXSERVICE_PAGE_SHARING),VBOX_WITH_VBOXSERVICE_PAGE_SHARING,) \
97 $(if $(VBOX_WITH_VBOXSERVICE_TIMESYNC),VBOX_WITH_VBOXSERVICE_TIMESYNC,) \
98 $(if $(VBOX_WITH_VBOXSERVICE_TOOLBOX),VBOX_WITH_VBOXSERVICE_TOOLBOX,) \
99 $(if $(VBOX_WITH_VBOXSERVICE_VMINFO),VBOX_WITH_VBOXSERVICE_VMINFO,) \
100 $(if $(VBOX_WITH_DBUS),VBOX_WITH_DBUS,) \
101 $(if $(VBOX_WITH_GUEST_CONTROL),VBOX_WITH_GUEST_CONTROL,) \
102 $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
103 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,)
104ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
105 VBoxService_DEFS += VBOX_BUILD_TARGET="$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)"
106else
107 VBoxService_DEFS += VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
108endif
109VBoxService_DEFS.win += _WIN32_WINNT=0x0501
110VBoxService_DEFS.os2 = VBOX_WITH_HGCM
111
112VBoxService_SOURCES = \
113 VBoxService.cpp \
114 VBoxServiceUtils.cpp \
115 VBoxServiceStats.cpp
116
117ifdef VBOX_WITH_VBOXSERVICE_TIMESYNC
118 VBoxService_SOURCES += \
119 VBoxServiceTimeSync.cpp
120endif
121
122ifdef VBOX_WITH_VBOXSERVICE_CLIPBOARD
123 VBoxService_DEFS.os2 += VBOX_WITH_VBOXSERVICE_CLIPBOARD VBOX_WITH_SHARED_CLIPBOARD
124 VBoxService_SOURCES.os2 += \
125 VBoxServiceClipboard-os2.cpp \
126 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp
127endif
128
129ifdef VBOX_WITH_VBOXSERVICE_TOOLBOX
130 VBoxService_SOURCES += \
131 VBoxServiceToolBox.cpp
132endif
133
134ifdef VBOX_WITH_VBOXSERVICE_CONTROL
135 VBoxService_SOURCES += \
136 VBoxServiceControl.cpp \
137 VBoxServiceControlProcess.cpp \
138 VBoxServiceControlSession.cpp
139endif
140
141ifdef VBOX_WITH_VBOXSERVICE_MANAGEMENT
142 ifdef VBOX_WITH_MEMBALLOON
143 VBoxService_SOURCES += \
144 VBoxServiceBalloon.cpp
145 VBoxService_DEFS += VBOX_WITH_MEMBALLOON
146 endif
147endif
148
149if1of ($(KBUILD_TARGET), win)
150 VBoxService_SOURCES += \
151 VBoxServicePageSharing.cpp
152endif
153
154ifdef VBOX_WITH_VBOXSERVICE_VMINFO
155 VBoxService_SOURCES.win += \
156 VBoxServiceVMInfo-win.cpp
157 VBoxService_SOURCES += \
158 VBoxServiceVMInfo.cpp \
159 VBoxServicePropCache.cpp
160endif
161
162ifdef VBOX_WITH_VBOXSERVICE_CPUHOTPLUG
163 VBoxService_SOURCES += \
164 VBoxServiceCpuHotPlug.cpp
165endif
166
167ifdef VBOX_WITH_SHARED_FOLDERS
168 if1of ($(KBUILD_TARGET), linux os2 solaris win)
169 VBoxService_DEFS += VBOX_WITH_SHARED_FOLDERS
170 VBoxService_SOURCES += \
171 VBoxServiceAutoMount.cpp
172 VBoxService_SOURCES.linux += \
173 ../../linux/sharedfolders/vbsfmount.c
174 VBoxService_LIBS.win += \
175 Mpr.Lib
176 endif
177endif
178
179VBoxService_SOURCES.win += \
180 VBoxService-win.cpp
181
182VBoxService_SOURCES.os2 += \
183 VBoxService-os2.def
184
185VBoxService_LDFLAGS.darwin = -framework IOKit
186
187VBoxService_LIBS += \
188 $(VBOX_LIB_IPRT_GUEST_R3) \
189 $(VBOX_LIB_VBGL_R3) \
190 $(VBOX_LIB_IPRT_GUEST_R3) # (The joy of unix linkers.)
191ifdef VBOX_WITH_DBUS
192 if1of ($(KBUILD_TARGET), linux solaris) # FreeBSD?
193 VBoxService_LIBS += \
194 dl
195 endif
196endif
197VBoxService_LIBS.netbsd += crypt
198ifdef VBOX_WITH_GUEST_PROPS
199 VBoxService_LIBS.win += \
200 Secur32.lib \
201 WtsApi32.lib \
202 Psapi.lib
203 VBoxService_LIBS.solaris += \
204 nsl \
205 kstat \
206 contract
207endif
208
209ifdef VBOX_WITH_VBOXSERVICE_VMINFO
210 VBoxServiceVMInfo.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
211 VBoxServiceVMInfo.cpp_DEPS = $(VBOX_SVN_REV_KMK)
212endif
213
214VBoxService_USES.win += vboximportchecker
215VBoxService_VBOX_IMPORT_CHECKER.win.x86 = nt31
216VBoxService_VBOX_IMPORT_CHECKER.win.amd64 = xp64
217
218$(call VBOX_SET_VER_INFO_EXE,VBoxService,VirtualBox Guest Additions Service,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
219
220include $(FILE_KBUILD_SUB_FOOTER)
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use