1 | # $Id: Makefile.kmk 56294 2015-06-09 14:26:20Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the Cross Platform Guest Addition Services.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2007-2015 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 | PROGRAMS.win.x86 += VBoxServiceNT
|
---|
31 |
|
---|
32 | #
|
---|
33 | # VBoxService
|
---|
34 | #
|
---|
35 | VBoxService_TEMPLATE = NewVBoxGuestR3Exe
|
---|
36 | VBoxService_DEFS = VBOX_WITH_HGCM VBOXSERVICE_TIMESYNC VBOXSERVICE_MANAGEMENT VBOXSERVICE_TOOLBOX
|
---|
37 | VBoxService_DEFS += \
|
---|
38 | VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
|
---|
39 | VBoxService_DEFS.win += _WIN32_WINNT=0x0501
|
---|
40 | VBoxService_DEFS.os2 = VBOX_WITH_HGCM VBOXSERVICE_CLIPBOARD
|
---|
41 | ifdef VBOX_WITH_DBUS
|
---|
42 | VBoxService_DEFS += VBOX_WITH_DBUS
|
---|
43 | endif
|
---|
44 | ifdef VBOX_WITH_GUEST_PROPS
|
---|
45 | VBoxService_DEFS += VBOX_WITH_GUEST_PROPS VBOXSERVICE_VMINFO
|
---|
46 | endif
|
---|
47 | ifdef VBOX_WITH_GUEST_CONTROL
|
---|
48 | VBoxService_DEFS += VBOX_WITH_GUEST_CONTROL VBOXSERVICE_CONTROL
|
---|
49 | endif
|
---|
50 | ifdef VBOX_WITH_MEMBALLOON
|
---|
51 | VBoxService_DEFS += VBOX_WITH_MEMBALLOON
|
---|
52 | endif
|
---|
53 | if1of ($(KBUILD_TARGET), win)
|
---|
54 | VBoxService_DEFS += VBOXSERVICE_PAGE_SHARING
|
---|
55 | endif
|
---|
56 | if1of ($(KBUILD_TARGET), linux)
|
---|
57 | VBoxService_DEFS += VBOXSERVICE_CPUHOTPLUG
|
---|
58 | endif
|
---|
59 | ifdef VBOX_WITH_SHARED_FOLDERS
|
---|
60 | # darwin freebsd
|
---|
61 | if1of ($(KBUILD_TARGET), linux solaris)
|
---|
62 | VBoxService_DEFS += VBOX_WITH_SHARED_FOLDERS
|
---|
63 | endif
|
---|
64 | endif
|
---|
65 |
|
---|
66 | VBoxService_SOURCES = \
|
---|
67 | VBoxService.cpp \
|
---|
68 | VBoxServiceTimeSync.cpp \
|
---|
69 | VBoxServiceUtils.cpp \
|
---|
70 | VBoxServiceStats.cpp \
|
---|
71 | VBoxServiceToolBox.cpp
|
---|
72 |
|
---|
73 | ifdef VBOX_WITH_GUEST_CONTROL
|
---|
74 | VBoxService_SOURCES += \
|
---|
75 | VBoxServiceControl.cpp \
|
---|
76 | VBoxServiceControlProcess.cpp \
|
---|
77 | VBoxServiceControlSession.cpp
|
---|
78 | endif
|
---|
79 |
|
---|
80 | ifdef VBOX_WITH_MEMBALLOON
|
---|
81 | VBoxService_SOURCES += \
|
---|
82 | VBoxServiceBalloon.cpp
|
---|
83 | endif
|
---|
84 | if1of ($(KBUILD_TARGET), win)
|
---|
85 | VBoxService_SOURCES += \
|
---|
86 | VBoxServicePageSharing.cpp
|
---|
87 | endif
|
---|
88 |
|
---|
89 | ifdef VBOX_WITH_GUEST_PROPS
|
---|
90 | VBoxService_SOURCES.win = \
|
---|
91 | VBoxServiceVMInfo-win.cpp
|
---|
92 | VBoxService_SOURCES += \
|
---|
93 | VBoxServiceVMInfo.cpp \
|
---|
94 | VBoxServicePropCache.cpp
|
---|
95 | endif
|
---|
96 |
|
---|
97 | if1of ($(KBUILD_TARGET), linux)
|
---|
98 | VBoxService_SOURCES += \
|
---|
99 | VBoxServiceCpuHotPlug.cpp
|
---|
100 | endif
|
---|
101 |
|
---|
102 | ifdef VBOX_WITH_SHARED_FOLDERS
|
---|
103 | if1of ($(KBUILD_TARGET), linux solaris)
|
---|
104 | VBoxService_SOURCES += \
|
---|
105 | VBoxServiceAutoMount.cpp
|
---|
106 | VBoxService_SOURCES.linux += \
|
---|
107 | ../../linux/sharedfolders/vbsfmount.c
|
---|
108 | endif
|
---|
109 | endif
|
---|
110 |
|
---|
111 | VBoxService_SOURCES.win += \
|
---|
112 | VBoxService-win.rc \
|
---|
113 | VBoxService-win.cpp
|
---|
114 |
|
---|
115 | VBoxService_SOURCES.os2 = \
|
---|
116 | VBoxService-os2.def \
|
---|
117 | VBoxServiceClipboard-os2.cpp
|
---|
118 |
|
---|
119 | VBoxService_LDFLAGS.darwin = -framework IOKit
|
---|
120 |
|
---|
121 | VBoxService_LIBS += \
|
---|
122 | $(VBOX_LIB_IPRT_GUEST_R3) \
|
---|
123 | $(VBOX_LIB_VBGL_R3) \
|
---|
124 | $(VBOX_LIB_IPRT_GUEST_R3) # (The joy of unix linkers.)
|
---|
125 | if1of ($(KBUILD_TARGET), linux)
|
---|
126 | VBoxService_LIBS += \
|
---|
127 | crypt
|
---|
128 | endif
|
---|
129 | ifdef VBOX_WITH_DBUS
|
---|
130 | if1of ($(KBUILD_TARGET), linux solaris) # FreeBSD?
|
---|
131 | VBoxService_LIBS += \
|
---|
132 | dl
|
---|
133 | endif
|
---|
134 | endif
|
---|
135 | ifdef VBOX_WITH_GUEST_PROPS
|
---|
136 | VBoxService_LIBS.win += \
|
---|
137 | Secur32.lib \
|
---|
138 | WtsApi32.lib \
|
---|
139 | Psapi.lib
|
---|
140 | VBoxService_LIBS.solaris += \
|
---|
141 | nsl \
|
---|
142 | kstat \
|
---|
143 | contract
|
---|
144 | endif
|
---|
145 |
|
---|
146 | #
|
---|
147 | # VBoxServiceNT - NT4 version of VBoxService.
|
---|
148 | #
|
---|
149 | VBoxServiceNT_TEMPLATE = NewVBoxGuestR3Exe
|
---|
150 | VBoxServiceNT_EXTENDS = VBoxService
|
---|
151 | VBoxServiceNT_DEFS.win = _WIN32_WINNT=0x0400 TARGET_NT4 VBOXSERVICE_MANAGEMENT
|
---|
152 |
|
---|
153 | VBoxServiceVMInfo.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
154 | VBoxServiceVMInfo.cpp_DEPS = $(VBOX_SVN_REV_KMK)
|
---|
155 |
|
---|
156 | #
|
---|
157 | # The icon is configurable.
|
---|
158 | #
|
---|
159 | VBoxService-win.rc_INCS = $(VBoxService_0_OUTDIR)
|
---|
160 | VBoxService-win.rc_DEPS = $(VBoxService_0_OUTDIR)/VBoxService-win-icon.rc
|
---|
161 | VBoxService-win.rc_CLEAN = $(VBoxService_0_OUTDIR)/VBoxService-win-icon.rc
|
---|
162 |
|
---|
163 | # Icon include file.
|
---|
164 | $$(VBoxService_0_OUTDIR)/VBoxService-win-icon.rc: $(VBOX_WINDOWS_ADDITIONS_ICON_FILE) $$(VBoxService_DEFPATH)/Makefile.kmk | $$(dir $$@)
|
---|
165 | $(RM) -f $@
|
---|
166 | $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ADDITIONS_ICON_FILE))"'
|
---|
167 |
|
---|
168 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
169 |
|
---|