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