VirtualBox

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

Last change on this file since 72097 was 70346, checked in by vboxsync, 7 years ago

VBoxService: Needed to dynamically resolve two more APIs to make it work on NT 3.1.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.7 KB
Line 
1# $Id: Makefile.kmk 70346 2017-12-26 15:52:28Z vboxsync $
2## @file
3# Sub-Makefile for the Cross Platform Guest Addition Services.
4#
5
6#
7# Copyright (C) 2007-2017 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.
42 VBOX_WITH_VBOXSERVICE_CPUHOTPLUG := 1
43endif
44
45if1of ($(KBUILD_TARGET), win)
46 # Page Sharing (Page Fusion).
47 VBOX_WITH_VBOXSERVICE_PAGE_SHARING := 1
48endif
49
50ifdef VBOX_WITH_GUEST_PROPS
51 VBOX_WITH_VBOXSERVICE_VMINFO := 1
52endif
53
54ifdef VBOX_WITH_GUEST_CONTROL
55 # Guest Control.
56 VBOX_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
90ifdef VBOX_WITH_SHARED_FOLDERS
91 # darwin freebsd
92 if1of ($(KBUILD_TARGET), linux solaris)
93 VBoxService_DEFS += VBOX_WITH_SHARED_FOLDERS
94 endif
95endif
96
97VBoxService_SOURCES = \
98 VBoxService.cpp \
99 VBoxServiceUtils.cpp \
100 VBoxServiceStats.cpp
101
102ifdef VBOX_WITH_VBOXSERVICE_TIMESYNC
103 VBoxService_SOURCES += \
104 VBoxServiceTimeSync.cpp
105endif
106
107ifdef VBOX_WITH_VBOXSERVICE_TOOLBOX
108 VBoxService_SOURCES += \
109 VBoxServiceToolBox.cpp
110endif
111
112ifdef VBOX_WITH_VBOXSERVICE_CONTROL
113 VBoxService_SOURCES += \
114 VBoxServiceControl.cpp \
115 VBoxServiceControlProcess.cpp \
116 VBoxServiceControlSession.cpp
117endif
118
119ifdef VBOX_WITH_VBOXSERVICE_MANAGEMENT
120 VBoxService_SOURCES += \
121 VBoxServiceBalloon.cpp
122 VBoxService_DEFS += $(if $(VBOX_WITH_MEMBALLOON),VBOX_WITH_MEMBALLOON,)
123endif
124
125if1of ($(KBUILD_TARGET), win)
126 VBoxService_SOURCES += \
127 VBoxServicePageSharing.cpp
128endif
129
130ifdef VBOX_WITH_VBOXSERVICE_VMINFO
131 VBoxService_SOURCES.win += \
132 VBoxServiceVMInfo-win.cpp
133 VBoxService_SOURCES += \
134 VBoxServiceVMInfo.cpp \
135 VBoxServicePropCache.cpp
136endif
137
138ifdef VBOX_WITH_VBOXSERVICE_CPUHOTPLUG
139 VBoxService_SOURCES += \
140 VBoxServiceCpuHotPlug.cpp
141endif
142
143ifdef VBOX_WITH_SHARED_FOLDERS
144 if1of ($(KBUILD_TARGET), linux solaris)
145 VBoxService_SOURCES += \
146 VBoxServiceAutoMount.cpp
147 VBoxService_SOURCES.linux += \
148 ../../linux/sharedfolders/vbsfmount.c
149 endif
150endif
151
152VBoxService_SOURCES.win += \
153 VBoxService-win.rc \
154 VBoxService-win.cpp
155
156VBoxService_SOURCES.os2 = \
157 VBoxService-os2.def \
158 VBoxServiceClipboard-os2.cpp
159
160VBoxService_LDFLAGS.darwin = -framework IOKit
161
162VBoxService_LIBS += \
163 $(VBOX_LIB_IPRT_GUEST_R3) \
164 $(VBOX_LIB_VBGL_R3) \
165 $(VBOX_LIB_IPRT_GUEST_R3) # (The joy of unix linkers.)
166if1of ($(KBUILD_TARGET), linux)
167 VBoxService_LIBS += \
168 crypt
169endif
170ifdef VBOX_WITH_DBUS
171 if1of ($(KBUILD_TARGET), linux solaris) # FreeBSD?
172 VBoxService_LIBS += \
173 dl
174 endif
175endif
176ifdef VBOX_WITH_GUEST_PROPS
177 VBoxService_LIBS.win += \
178 Secur32.lib \
179 WtsApi32.lib \
180 Psapi.lib
181 VBoxService_LIBS.solaris += \
182 nsl \
183 kstat \
184 contract
185endif
186
187VBoxServiceVMInfo.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
188VBoxServiceVMInfo.cpp_DEPS = $(VBOX_SVN_REV_KMK)
189
190VBoxService_USES.win += vboximportchecker
191VBoxService_VBOX_IMPORT_CHECKER.win.x86 = nt31
192VBoxService_VBOX_IMPORT_CHECKER.win.amd64 = xp64
193
194
195#
196# The icon is configurable.
197#
198VBoxService-win.rc_INCS = $(VBoxService_0_OUTDIR)
199VBoxService-win.rc_DEPS = $(VBoxService_0_OUTDIR)/VBoxService-win-icon.rc
200VBoxService-win.rc_CLEAN = $(VBoxService_0_OUTDIR)/VBoxService-win-icon.rc
201
202# Icon include file.
203$$(VBoxService_0_OUTDIR)/VBoxService-win-icon.rc: $(VBOX_WINDOWS_ADDITIONS_ICON_FILE) $$(VBoxService_DEFPATH)/Makefile.kmk | $$(dir $$@)
204 $(RM) -f $@
205 $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ADDITIONS_ICON_FILE))"'
206
207include $(FILE_KBUILD_SUB_FOOTER)
208
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