1 | # $Id: Makefile.kmk 42239 2012-07-19 20:40:31Z 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_GUEST_PROPS
|
---|
42 | VBoxService_DEFS += VBOX_WITH_GUEST_PROPS VBOXSERVICE_VMINFO
|
---|
43 | endif
|
---|
44 | ifdef VBOX_WITH_GUEST_CONTROL
|
---|
45 | VBoxService_DEFS += VBOX_WITH_GUEST_CONTROL VBOXSERVICE_CONTROL
|
---|
46 | endif
|
---|
47 | ifdef VBOX_WITH_MEMBALLOON
|
---|
48 | VBoxService_DEFS += VBOX_WITH_MEMBALLOON
|
---|
49 | endif
|
---|
50 | if1of ($(KBUILD_TARGET), win)
|
---|
51 | VBoxService_DEFS += VBOX_WITH_PAGE_SHARING
|
---|
52 | endif
|
---|
53 | if1of ($(KBUILD_TARGET), linux)
|
---|
54 | VBoxService_DEFS += VBOXSERVICE_CPUHOTPLUG
|
---|
55 | endif
|
---|
56 | ifdef VBOX_WITH_SHARED_FOLDERS
|
---|
57 | # darwin freebsd
|
---|
58 | if1of ($(KBUILD_TARGET), linux solaris)
|
---|
59 | VBoxService_DEFS += VBOX_WITH_SHARED_FOLDERS
|
---|
60 | endif
|
---|
61 | endif
|
---|
62 |
|
---|
63 | VBoxService_SOURCES = \
|
---|
64 | VBoxService.cpp \
|
---|
65 | VBoxServiceTimeSync.cpp \
|
---|
66 | VBoxServiceUtils.cpp \
|
---|
67 | VBoxServiceStats.cpp \
|
---|
68 | VBoxServiceToolBox.cpp
|
---|
69 |
|
---|
70 | ifdef VBOX_WITH_GUEST_CONTROL
|
---|
71 | VBoxService_SOURCES += \
|
---|
72 | VBoxServiceControl.cpp \
|
---|
73 | VBoxServiceControlThread.cpp
|
---|
74 | endif
|
---|
75 |
|
---|
76 | ifdef VBOX_WITH_MEMBALLOON
|
---|
77 | VBoxService_SOURCES += \
|
---|
78 | VBoxServiceBalloon.cpp
|
---|
79 | endif
|
---|
80 | if1of ($(KBUILD_TARGET), win)
|
---|
81 | VBoxService_SOURCES += \
|
---|
82 | VBoxServicePageSharing.cpp
|
---|
83 | endif
|
---|
84 |
|
---|
85 | ifdef VBOX_WITH_GUEST_PROPS
|
---|
86 | VBoxService_SOURCES.win = \
|
---|
87 | VBoxServiceVMInfo-win.cpp
|
---|
88 | VBoxService_SOURCES += \
|
---|
89 | VBoxServiceVMInfo.cpp \
|
---|
90 | VBoxServicePropCache.cpp
|
---|
91 | endif
|
---|
92 |
|
---|
93 | if1of ($(KBUILD_TARGET), linux)
|
---|
94 | VBoxService_SOURCES += \
|
---|
95 | VBoxServiceCpuHotPlug.cpp
|
---|
96 | endif
|
---|
97 |
|
---|
98 | ifdef VBOX_WITH_SHARED_FOLDERS
|
---|
99 | if1of ($(KBUILD_TARGET), linux solaris)
|
---|
100 | VBoxService_SOURCES += \
|
---|
101 | VBoxServiceAutoMount.cpp
|
---|
102 | VBoxService_SOURCES.linux += \
|
---|
103 | ../../linux/sharedfolders/vbsfmount.c
|
---|
104 | endif
|
---|
105 | endif
|
---|
106 |
|
---|
107 | VBoxService_SOURCES.win += \
|
---|
108 | VBoxService-win.rc \
|
---|
109 | VBoxService-win.cpp
|
---|
110 |
|
---|
111 | VBoxService_SOURCES.os2 = \
|
---|
112 | VBoxService-os2.def \
|
---|
113 | VBoxServiceClipboard-os2.cpp
|
---|
114 |
|
---|
115 | if1of ($(KBUILD_TARGET), linux)
|
---|
116 | VBoxService_LIBS += \
|
---|
117 | crypt
|
---|
118 | endif
|
---|
119 | ifdef VBOX_WITH_GUEST_PROPS
|
---|
120 | VBoxService_LIBS.win += \
|
---|
121 | Secur32.lib \
|
---|
122 | WtsApi32.lib \
|
---|
123 | Psapi.lib
|
---|
124 | VBoxService_LIBS.solaris += \
|
---|
125 | nsl kstat contract
|
---|
126 | endif
|
---|
127 |
|
---|
128 | #
|
---|
129 | # VBoxServiceNT - NT4 version of VBoxService.
|
---|
130 | #
|
---|
131 | VBoxServiceNT_TEMPLATE = NewVBoxGuestR3Exe
|
---|
132 | VBoxServiceNT_EXTENDS = VBoxService
|
---|
133 | VBoxServiceNT_DEFS.win = _WIN32_WINNT=0x0400 TARGET_NT4 VBOXSERVICE_MANAGEMENT
|
---|
134 |
|
---|
135 | VBoxServiceVMInfo.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
136 | VBoxServiceVMInfo.cpp_DEPS = $(VBOX_SVN_REV_KMK)
|
---|
137 |
|
---|
138 | #
|
---|
139 | # The icon is configurable.
|
---|
140 | #
|
---|
141 | VBoxService-win.rc_INCS = $(VBoxService_0_OUTDIR)
|
---|
142 | VBoxService-win.rc_DEPS = $(VBoxService_0_OUTDIR)/VBoxService-win-icon.rc
|
---|
143 | VBoxService-win.rc_CLEAN = $(VBoxService_0_OUTDIR)/VBoxService-win-icon.rc
|
---|
144 |
|
---|
145 | # Icon include file.
|
---|
146 | $$(VBoxService_0_OUTDIR)/VBoxService-win-icon.rc: $(VBOX_WINDOWS_ADDITIONS_ICON_FILE) $$(VBoxService_DEFPATH)/Makefile.kmk | $$(dir $$@)
|
---|
147 | $(RM) -f $@
|
---|
148 | $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ADDITIONS_ICON_FILE))"'
|
---|
149 |
|
---|
150 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
151 |
|
---|