VirtualBox

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

Last change on this file since 76553 was 76553, checked in by vboxsync, 5 years ago

scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.5 KB
Line 
1# $Id: Makefile.kmk 76553 2019-01-01 01:45:53Z vboxsync $
2## @file
3# Sub-Makefile for the Cross Platform Guest Addition Services.
4#
5
6#
7# Copyright (C) 2007-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
21#
22# Incldue testcases.
23#
24include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
25
26#
27# Target lists.
28#
29PROGRAMS += VBoxService
30
31# Enable the timesync service within VBoxService.
32VBOX_WITH_VBOXSERVICE_TIMESYNC := 1
33
34# Busybox-like toolbox, embedded into VBoxService.
35VBOX_WITH_VBOXSERVICE_TOOLBOX := 1
36
37# VM-management functions, like memory ballooning and statistics.
38VBOX_WITH_VBOXSERVICE_MANAGEMENT := 1
39
40if1of ($(KBUILD_TARGET), linux)
41 # CPU hotplugging.
42VBOX_WITH_VBOXSERVICE_CPUHOTPLUG := 1
43endif
44
45# Page Sharing (Page Fusion).
46if1of ($(KBUILD_TARGET), win)
47VBOX_WITH_VBOXSERVICE_PAGE_SHARING := 1
48endif
49
50ifdef VBOX_WITH_GUEST_PROPS
51VBOX_WITH_VBOXSERVICE_VMINFO := 1
52endif
53
54# Guest Control.
55ifdef VBOX_WITH_GUEST_CONTROL
56VBOX_WITH_VBOXSERVICE_CONTROL := 1
57endif
58
59#
60# VBoxService
61#
62if "$(KBUILD_TARGET)" == "win" || defined(VBOX_WITH_MASOCHISTIC_WARNINGS) ## @todo use VBoxGuestR3Exe everywhere
63VBoxService_TEMPLATE = VBoxGuestR3Exe
64else
65VBoxService_TEMPLATE = NewVBoxGuestR3Exe
66endif
67
68# Define features to be activate.
69VBoxService_DEFS += \
70 $(if $(VBOX_WITH_VBOXSERVICE_CONTROL),VBOX_WITH_VBOXSERVICE_CONTROL,) \
71 $(if $(VBOX_WITH_VBOXSERVICE_CPUHOTPLUG),VBOX_WITH_VBOXSERVICE_CPUHOTPLUG,) \
72 $(if $(VBOX_WITH_VBOXSERVICE_MANAGEMENT),VBOX_WITH_VBOXSERVICE_MANAGEMENT,) \
73 $(if $(VBOX_WITH_VBOXSERVICE_PAGE_SHARING),VBOX_WITH_VBOXSERVICE_PAGE_SHARING,) \
74 $(if $(VBOX_WITH_VBOXSERVICE_TIMESYNC),VBOX_WITH_VBOXSERVICE_TIMESYNC,) \
75 $(if $(VBOX_WITH_VBOXSERVICE_TOOLBOX),VBOX_WITH_VBOXSERVICE_TOOLBOX,) \
76 $(if $(VBOX_WITH_VBOXSERVICE_VMINFO),VBOX_WITH_VBOXSERVICE_VMINFO,)
77
78# Import global defines.
79VBoxService_DEFS += \
80 $(if $(VBOX_WITH_DBUS),VBOX_WITH_DBUS,) \
81 $(if $(VBOX_WITH_GUEST_CONTROL),VBOX_WITH_GUEST_CONTROL,) \
82 $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
83 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,)
84
85VBoxService_DEFS += \
86 VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
87VBoxService_DEFS.win += _WIN32_WINNT=0x0501
88VBoxService_DEFS.os2 = VBOX_WITH_HGCM VBOX_WITH_VBOXSERVICE_CLIPBOARD
89
90VBoxService_SOURCES = \
91 VBoxService.cpp \
92 VBoxServiceUtils.cpp \
93 VBoxServiceStats.cpp
94
95ifdef VBOX_WITH_VBOXSERVICE_TIMESYNC
96VBoxService_SOURCES += \
97 VBoxServiceTimeSync.cpp
98endif
99
100ifdef VBOX_WITH_VBOXSERVICE_TOOLBOX
101VBoxService_SOURCES += \
102 VBoxServiceToolBox.cpp
103endif
104
105ifdef VBOX_WITH_VBOXSERVICE_CONTROL
106VBoxService_SOURCES += \
107 VBoxServiceControl.cpp \
108 VBoxServiceControlProcess.cpp \
109 VBoxServiceControlSession.cpp
110endif
111
112ifdef VBOX_WITH_VBOXSERVICE_MANAGEMENT
113VBoxService_SOURCES += \
114 VBoxServiceBalloon.cpp
115 ifdef VBOX_WITH_MEMBALLOON
116VBoxService_DEFS += VBOX_WITH_MEMBALLOON
117 endif
118endif
119
120if1of ($(KBUILD_TARGET), win)
121VBoxService_SOURCES += \
122 VBoxServicePageSharing.cpp
123endif
124
125ifdef VBOX_WITH_VBOXSERVICE_VMINFO
126VBoxService_SOURCES.win += \
127 VBoxServiceVMInfo-win.cpp
128VBoxService_SOURCES += \
129 VBoxServiceVMInfo.cpp \
130 VBoxServicePropCache.cpp
131endif
132
133ifdef VBOX_WITH_VBOXSERVICE_CPUHOTPLUG
134VBoxService_SOURCES += \
135 VBoxServiceCpuHotPlug.cpp
136endif
137
138ifdef VBOX_WITH_SHARED_FOLDERS
139 if1of ($(KBUILD_TARGET), linux os2 solaris win)
140VBoxService_DEFS += VBOX_WITH_SHARED_FOLDERS
141VBoxService_SOURCES += \
142 VBoxServiceAutoMount.cpp
143VBoxService_SOURCES.linux += \
144 ../../linux/sharedfolders/vbsfmount.c
145VBoxService_LIBS.win += \
146 Mpr.Lib
147 endif
148endif
149
150VBoxService_SOURCES.win += \
151 VBoxService-win.rc \
152 VBoxService-win.cpp
153
154VBoxService_SOURCES.os2 = \
155 VBoxService-os2.def \
156 VBoxServiceClipboard-os2.cpp
157
158VBoxService_LDFLAGS.darwin = -framework IOKit
159
160VBoxService_LIBS += \
161 $(VBOX_LIB_IPRT_GUEST_R3) \
162 $(VBOX_LIB_VBGL_R3) \
163 $(VBOX_LIB_IPRT_GUEST_R3) # (The joy of unix linkers.)
164if1of ($(KBUILD_TARGET), linux)
165 VBoxService_LIBS += \
166 crypt
167endif
168ifdef VBOX_WITH_DBUS
169 if1of ($(KBUILD_TARGET), linux solaris) # FreeBSD?
170VBoxService_LIBS += \
171 dl
172 endif
173endif
174ifdef VBOX_WITH_GUEST_PROPS
175VBoxService_LIBS.win += \
176 Secur32.lib \
177 WtsApi32.lib \
178 Psapi.lib
179VBoxService_LIBS.solaris += \
180 nsl \
181 kstat \
182 contract
183endif
184
185VBoxServiceVMInfo.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
186VBoxServiceVMInfo.cpp_DEPS = $(VBOX_SVN_REV_KMK)
187
188VBoxService_USES.win += vboximportchecker
189VBoxService_VBOX_IMPORT_CHECKER.win.x86 = nt31
190VBoxService_VBOX_IMPORT_CHECKER.win.amd64 = xp64
191
192
193#
194# The icon is configurable.
195#
196VBoxService-win.rc_INCS = $(VBoxService_0_OUTDIR)
197VBoxService-win.rc_DEPS = $(VBoxService_0_OUTDIR)/VBoxService-win-icon.rc
198VBoxService-win.rc_CLEAN = $(VBoxService_0_OUTDIR)/VBoxService-win-icon.rc
199
200# Icon include file.
201$$(VBoxService_0_OUTDIR)/VBoxService-win-icon.rc: $(VBOX_WINDOWS_ADDITIONS_ICON_FILE) $$(VBoxService_DEFPATH)/Makefile.kmk | $$(dir $$@)
202 $(RM) -f $@
203 $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ADDITIONS_ICON_FILE))"'
204
205include $(FILE_KBUILD_SUB_FOOTER)
206
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use