[3655] | 1 | # $Id: Makefile.kmk 98613 2023-02-17 01:05:30Z vboxsync $
|
---|
| 2 | ## @file
|
---|
[10129] | 3 | # Sub-Makefile for the Cross Platform Guest Addition Services.
|
---|
[3655] | 4 | #
|
---|
| 5 |
|
---|
| 6 | #
|
---|
[98103] | 7 | # Copyright (C) 2007-2023 Oracle and/or its affiliates.
|
---|
[5999] | 8 | #
|
---|
[96407] | 9 | # This file is part of VirtualBox base platform packages, as
|
---|
| 10 | # available from https://www.virtualbox.org.
|
---|
[5999] | 11 | #
|
---|
[96407] | 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 | #
|
---|
[3655] | 27 |
|
---|
[10129] | 28 | SUB_DEPTH = ../../../../..
|
---|
[41477] | 29 | include $(KBUILD_PATH)/subheader.kmk
|
---|
[6361] | 30 |
|
---|
[21250] | 31 | #
|
---|
[32634] | 32 | # Incldue testcases.
|
---|
| 33 | #
|
---|
[41477] | 34 | include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
|
---|
[32634] | 35 |
|
---|
[98195] | 36 |
|
---|
[32634] | 37 | #
|
---|
[21250] | 38 | # Target lists.
|
---|
| 39 | #
|
---|
| 40 | PROGRAMS += VBoxService
|
---|
[21246] | 41 |
|
---|
[98195] | 42 |
|
---|
| 43 | #
|
---|
| 44 | # Globals?
|
---|
| 45 | #
|
---|
[60583] | 46 | # Enable the timesync service within VBoxService.
|
---|
| 47 | VBOX_WITH_VBOXSERVICE_TIMESYNC := 1
|
---|
| 48 |
|
---|
| 49 | # Busybox-like toolbox, embedded into VBoxService.
|
---|
[98613] | 50 | ifdef VBOX_WITH_GSTCTL_TOOLBOX_SUPPORT
|
---|
[98526] | 51 | VBOX_WITH_VBOXSERVICE_TOOLBOX := 1
|
---|
| 52 | endif
|
---|
[60583] | 53 |
|
---|
| 54 | # VM-management functions, like memory ballooning and statistics.
|
---|
| 55 | VBOX_WITH_VBOXSERVICE_MANAGEMENT := 1
|
---|
| 56 |
|
---|
| 57 | if1of ($(KBUILD_TARGET), linux)
|
---|
| 58 | # CPU hotplugging.
|
---|
[98416] | 59 | VBOX_WITH_VBOXSERVICE_CPUHOTPLUG := 1
|
---|
[60583] | 60 | endif
|
---|
| 61 |
|
---|
[75407] | 62 | # Page Sharing (Page Fusion).
|
---|
[60583] | 63 | if1of ($(KBUILD_TARGET), win)
|
---|
[98416] | 64 | VBOX_WITH_VBOXSERVICE_PAGE_SHARING := 1
|
---|
[60583] | 65 | endif
|
---|
| 66 |
|
---|
| 67 | ifdef VBOX_WITH_GUEST_PROPS
|
---|
[98416] | 68 | VBOX_WITH_VBOXSERVICE_VMINFO := 1
|
---|
[60583] | 69 | endif
|
---|
| 70 |
|
---|
[75407] | 71 | # Guest Control.
|
---|
[60583] | 72 | ifdef VBOX_WITH_GUEST_CONTROL
|
---|
[98416] | 73 | VBOX_WITH_VBOXSERVICE_CONTROL := 1
|
---|
[60583] | 74 | endif
|
---|
| 75 |
|
---|
[78449] | 76 | # Shared Clipboard.
|
---|
| 77 | ifdef VBOX_WITH_SHARED_CLIPBOARD
|
---|
[98416] | 78 | VBOX_WITH_VBOXSERVICE_CLIPBOARD := 1
|
---|
[78449] | 79 | endif
|
---|
| 80 |
|
---|
[86823] | 81 | # DRM Resize.
|
---|
[86828] | 82 | if "$(KBUILD_TARGET)" == "linux" && defined(VBOX_WITH_GUEST_PROPS)
|
---|
[86823] | 83 | # The DRM resizing code needs guest properties.
|
---|
| 84 | VBOX_WITH_VBOXSERVICE_DRMRESIZE := 1
|
---|
| 85 | endif
|
---|
| 86 |
|
---|
[98195] | 87 |
|
---|
[3655] | 88 | #
|
---|
[21246] | 89 | # VBoxService
|
---|
[3655] | 90 | #
|
---|
[63108] | 91 | VBoxService_TEMPLATE = VBoxGuestR3Exe
|
---|
[60583] | 92 |
|
---|
[98195] | 93 | VBoxService_DEFS = \
|
---|
[75407] | 94 | $(if $(VBOX_WITH_VBOXSERVICE_CONTROL),VBOX_WITH_VBOXSERVICE_CONTROL,) \
|
---|
| 95 | $(if $(VBOX_WITH_VBOXSERVICE_CPUHOTPLUG),VBOX_WITH_VBOXSERVICE_CPUHOTPLUG,) \
|
---|
[86823] | 96 | $(if $(VBOX_WITH_VBOXSERVICE_DRMRESIZE),VBOX_WITH_VBOXSERVICE_DRMRESIZE,) \
|
---|
[75407] | 97 | $(if $(VBOX_WITH_VBOXSERVICE_MANAGEMENT),VBOX_WITH_VBOXSERVICE_MANAGEMENT,) \
|
---|
[60583] | 98 | $(if $(VBOX_WITH_VBOXSERVICE_PAGE_SHARING),VBOX_WITH_VBOXSERVICE_PAGE_SHARING,) \
|
---|
[75407] | 99 | $(if $(VBOX_WITH_VBOXSERVICE_TIMESYNC),VBOX_WITH_VBOXSERVICE_TIMESYNC,) \
|
---|
| 100 | $(if $(VBOX_WITH_VBOXSERVICE_TOOLBOX),VBOX_WITH_VBOXSERVICE_TOOLBOX,) \
|
---|
[98195] | 101 | $(if $(VBOX_WITH_VBOXSERVICE_VMINFO),VBOX_WITH_VBOXSERVICE_VMINFO,) \
|
---|
[75407] | 102 | $(if $(VBOX_WITH_DBUS),VBOX_WITH_DBUS,) \
|
---|
[60583] | 103 | $(if $(VBOX_WITH_GUEST_CONTROL),VBOX_WITH_GUEST_CONTROL,) \
|
---|
[75407] | 104 | $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
|
---|
[98526] | 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,)
|
---|
[84540] | 108 | ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
|
---|
[98416] | 109 | VBoxService_DEFS += VBOX_BUILD_TARGET="$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)"
|
---|
[83822] | 110 | else
|
---|
[98416] | 111 | VBoxService_DEFS += VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
|
---|
[83822] | 112 | endif
|
---|
[33256] | 113 | VBoxService_DEFS.win += _WIN32_WINNT=0x0501
|
---|
[78448] | 114 | VBoxService_DEFS.os2 = VBOX_WITH_HGCM
|
---|
[60583] | 115 |
|
---|
[75407] | 116 | VBoxService_SOURCES = \
|
---|
| 117 | VBoxService.cpp \
|
---|
[26901] | 118 | VBoxServiceUtils.cpp \
|
---|
[60583] | 119 | VBoxServiceStats.cpp
|
---|
| 120 |
|
---|
| 121 | ifdef VBOX_WITH_VBOXSERVICE_TIMESYNC
|
---|
[98416] | 122 | VBoxService_SOURCES += \
|
---|
| 123 | VBoxServiceTimeSync.cpp
|
---|
[60583] | 124 | endif
|
---|
| 125 |
|
---|
[78449] | 126 | ifdef VBOX_WITH_VBOXSERVICE_CLIPBOARD
|
---|
| 127 | VBoxService_DEFS.os2 += VBOX_WITH_VBOXSERVICE_CLIPBOARD VBOX_WITH_SHARED_CLIPBOARD
|
---|
| 128 | VBoxService_SOURCES.os2 += \
|
---|
[98416] | 129 | VBoxServiceClipboard-os2.cpp \
|
---|
| 130 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp
|
---|
[78449] | 131 | endif
|
---|
| 132 |
|
---|
[60583] | 133 | ifdef VBOX_WITH_VBOXSERVICE_TOOLBOX
|
---|
[98416] | 134 | VBoxService_SOURCES += \
|
---|
| 135 | VBoxServiceToolBox.cpp
|
---|
[60583] | 136 | endif
|
---|
[31202] | 137 |
|
---|
[60583] | 138 | ifdef VBOX_WITH_VBOXSERVICE_CONTROL
|
---|
[98416] | 139 | VBoxService_SOURCES += \
|
---|
| 140 | VBoxServiceControl.cpp \
|
---|
| 141 | VBoxServiceControlProcess.cpp \
|
---|
| 142 | VBoxServiceControlSession.cpp
|
---|
[26698] | 143 | endif
|
---|
[31202] | 144 |
|
---|
[60583] | 145 | ifdef VBOX_WITH_VBOXSERVICE_MANAGEMENT
|
---|
[93022] | 146 | ifdef VBOX_WITH_MEMBALLOON
|
---|
| 147 | VBoxService_SOURCES += \
|
---|
[98416] | 148 | VBoxServiceBalloon.cpp
|
---|
[93022] | 149 | VBoxService_DEFS += VBOX_WITH_MEMBALLOON
|
---|
[75407] | 150 | endif
|
---|
[28736] | 151 | endif
|
---|
[60583] | 152 |
|
---|
[29531] | 153 | if1of ($(KBUILD_TARGET), win)
|
---|
[98416] | 154 | VBoxService_SOURCES += \
|
---|
[29026] | 155 | VBoxServicePageSharing.cpp
|
---|
[28251] | 156 | endif
|
---|
[31202] | 157 |
|
---|
[60583] | 158 | ifdef VBOX_WITH_VBOXSERVICE_VMINFO
|
---|
[98416] | 159 | VBoxService_SOURCES.win += \
|
---|
[22551] | 160 | VBoxServiceVMInfo-win.cpp
|
---|
[98416] | 161 | VBoxService_SOURCES += \
|
---|
| 162 | VBoxServiceVMInfo.cpp \
|
---|
| 163 | VBoxServicePropCache.cpp
|
---|
[19644] | 164 | endif
|
---|
[31202] | 165 |
|
---|
[60583] | 166 | ifdef VBOX_WITH_VBOXSERVICE_CPUHOTPLUG
|
---|
[98416] | 167 | VBoxService_SOURCES += \
|
---|
| 168 | VBoxServiceCpuHotPlug.cpp
|
---|
[26061] | 169 | endif
|
---|
[31202] | 170 |
|
---|
| 171 | ifdef VBOX_WITH_SHARED_FOLDERS
|
---|
[75469] | 172 | if1of ($(KBUILD_TARGET), linux os2 solaris win)
|
---|
[98416] | 173 | VBoxService_DEFS += VBOX_WITH_SHARED_FOLDERS
|
---|
| 174 | VBoxService_SOURCES += \
|
---|
| 175 | VBoxServiceAutoMount.cpp
|
---|
| 176 | VBoxService_SOURCES.linux += \
|
---|
| 177 | ../../linux/sharedfolders/vbsfmount.c
|
---|
| 178 | VBoxService_LIBS.win += \
|
---|
| 179 | Mpr.Lib
|
---|
[31202] | 180 | endif
|
---|
| 181 | endif
|
---|
| 182 |
|
---|
[19644] | 183 | VBoxService_SOURCES.win += \
|
---|
[33257] | 184 | VBoxService-win.cpp
|
---|
[26292] | 185 |
|
---|
[78451] | 186 | VBoxService_SOURCES.os2 += \
|
---|
[78448] | 187 | VBoxService-os2.def
|
---|
[25975] | 188 |
|
---|
[45459] | 189 | VBoxService_LDFLAGS.darwin = -framework IOKit
|
---|
| 190 |
|
---|
[75407] | 191 | VBoxService_LIBS += \
|
---|
[49643] | 192 | $(VBOX_LIB_IPRT_GUEST_R3) \
|
---|
| 193 | $(VBOX_LIB_VBGL_R3) \
|
---|
| 194 | $(VBOX_LIB_IPRT_GUEST_R3) # (The joy of unix linkers.)
|
---|
[43791] | 195 | ifdef VBOX_WITH_DBUS
|
---|
| 196 | if1of ($(KBUILD_TARGET), linux solaris) # FreeBSD?
|
---|
[98416] | 197 | VBoxService_LIBS += \
|
---|
| 198 | dl
|
---|
[43791] | 199 | endif
|
---|
| 200 | endif
|
---|
[80716] | 201 | VBoxService_LIBS.netbsd += crypt
|
---|
[19327] | 202 | ifdef VBOX_WITH_GUEST_PROPS
|
---|
[98416] | 203 | VBoxService_LIBS.win += \
|
---|
| 204 | Secur32.lib \
|
---|
| 205 | WtsApi32.lib \
|
---|
| 206 | Psapi.lib
|
---|
| 207 | VBoxService_LIBS.solaris += \
|
---|
| 208 | nsl \
|
---|
| 209 | kstat \
|
---|
| 210 | contract
|
---|
[19327] | 211 | endif
|
---|
[12446] | 212 |
|
---|
[86823] | 213 | ifdef VBOX_WITH_VBOXSERVICE_VMINFO
|
---|
| 214 | VBoxServiceVMInfo.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
| 215 | VBoxServiceVMInfo.cpp_DEPS = $(VBOX_SVN_REV_KMK)
|
---|
| 216 | endif
|
---|
[21941] | 217 |
|
---|
[70330] | 218 | VBoxService_USES.win += vboximportchecker
|
---|
[70346] | 219 | VBoxService_VBOX_IMPORT_CHECKER.win.x86 = nt31
|
---|
[70330] | 220 | VBoxService_VBOX_IMPORT_CHECKER.win.amd64 = xp64
|
---|
| 221 |
|
---|
[82749] | 222 | $(call VBOX_SET_VER_INFO_EXE,VBoxService,VirtualBox Guest Additions Service,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
|
---|
[70330] | 223 |
|
---|
[41477] | 224 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|