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