1 | # $Id: Makefile.kmk 43791 2012-11-01 13:25:57Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the Cross Platform Guest Addition Services.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2007-2012 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 += VBOX_WITH_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 | VBoxServiceControlThread.cpp
|
---|
77 | endif
|
---|
78 |
|
---|
79 | ifdef VBOX_WITH_MEMBALLOON
|
---|
80 | VBoxService_SOURCES += \
|
---|
81 | VBoxServiceBalloon.cpp
|
---|
82 | endif
|
---|
83 | if1of ($(KBUILD_TARGET), win)
|
---|
84 | VBoxService_SOURCES += \
|
---|
85 | VBoxServicePageSharing.cpp
|
---|
86 | endif
|
---|
87 |
|
---|
88 | ifdef VBOX_WITH_GUEST_PROPS
|
---|
89 | VBoxService_SOURCES.win = \
|
---|
90 | VBoxServiceVMInfo-win.cpp
|
---|
91 | VBoxService_SOURCES += \
|
---|
92 | VBoxServiceVMInfo.cpp \
|
---|
93 | VBoxServicePropCache.cpp
|
---|
94 | endif
|
---|
95 |
|
---|
96 | if1of ($(KBUILD_TARGET), linux)
|
---|
97 | VBoxService_SOURCES += \
|
---|
98 | VBoxServiceCpuHotPlug.cpp
|
---|
99 | endif
|
---|
100 |
|
---|
101 | ifdef VBOX_WITH_SHARED_FOLDERS
|
---|
102 | if1of ($(KBUILD_TARGET), linux solaris)
|
---|
103 | VBoxService_SOURCES += \
|
---|
104 | VBoxServiceAutoMount.cpp
|
---|
105 | VBoxService_SOURCES.linux += \
|
---|
106 | ../../linux/sharedfolders/vbsfmount.c
|
---|
107 | endif
|
---|
108 | endif
|
---|
109 |
|
---|
110 | VBoxService_SOURCES.win += \
|
---|
111 | VBoxService-win.rc \
|
---|
112 | VBoxService-win.cpp
|
---|
113 |
|
---|
114 | VBoxService_SOURCES.os2 = \
|
---|
115 | VBoxService-os2.def \
|
---|
116 | VBoxServiceClipboard-os2.cpp
|
---|
117 |
|
---|
118 | VBoxService_LIBS += \
|
---|
119 | $(VBOX_LIB_IPRT_GUEST_R3) \
|
---|
120 | $(VBOX_LIB_VBGL_R3) \
|
---|
121 | $(VBOX_LIB_IPRT_GUEST_R3) # (The joy of unix linkers.)
|
---|
122 | if1of ($(KBUILD_TARGET), linux)
|
---|
123 | VBoxService_LIBS += \
|
---|
124 | crypt
|
---|
125 | endif
|
---|
126 | ifdef VBOX_WITH_DBUS
|
---|
127 | if1of ($(KBUILD_TARGET), linux solaris) # FreeBSD?
|
---|
128 | VBoxService_LIBS += \
|
---|
129 | dl
|
---|
130 | endif
|
---|
131 | endif
|
---|
132 | ifdef VBOX_WITH_GUEST_PROPS
|
---|
133 | VBoxService_LIBS.win += \
|
---|
134 | Secur32.lib \
|
---|
135 | WtsApi32.lib \
|
---|
136 | Psapi.lib
|
---|
137 | VBoxService_LIBS.solaris += \
|
---|
138 | nsl \
|
---|
139 | kstat \
|
---|
140 | contract
|
---|
141 | endif
|
---|
142 |
|
---|
143 | #
|
---|
144 | # VBoxServiceNT - NT4 version of VBoxService.
|
---|
145 | #
|
---|
146 | VBoxServiceNT_TEMPLATE = NewVBoxGuestR3Exe
|
---|
147 | VBoxServiceNT_EXTENDS = VBoxService
|
---|
148 | VBoxServiceNT_DEFS.win = _WIN32_WINNT=0x0400 TARGET_NT4 VBOXSERVICE_MANAGEMENT
|
---|
149 |
|
---|
150 | VBoxServiceVMInfo.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
151 | VBoxServiceVMInfo.cpp_DEPS = $(VBOX_SVN_REV_KMK)
|
---|
152 |
|
---|
153 | #
|
---|
154 | # The icon is configurable.
|
---|
155 | #
|
---|
156 | VBoxService-win.rc_INCS = $(VBoxService_0_OUTDIR)
|
---|
157 | VBoxService-win.rc_DEPS = $(VBoxService_0_OUTDIR)/VBoxService-win-icon.rc
|
---|
158 | VBoxService-win.rc_CLEAN = $(VBoxService_0_OUTDIR)/VBoxService-win-icon.rc
|
---|
159 |
|
---|
160 | # Icon include file.
|
---|
161 | $$(VBoxService_0_OUTDIR)/VBoxService-win-icon.rc: $(VBOX_WINDOWS_ADDITIONS_ICON_FILE) $$(VBoxService_DEFPATH)/Makefile.kmk | $$(dir $$@)
|
---|
162 | $(RM) -f $@
|
---|
163 | $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ADDITIONS_ICON_FILE))"'
|
---|
164 |
|
---|
165 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
166 |
|
---|