1 | # $Id: Makefile.kmk 52045 2014-07-16 08:37:43Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the VBox API testcases.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2004-2014 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 | #
|
---|
23 | # Target and globals (small mess)
|
---|
24 | #
|
---|
25 | ifndef VBOX_ONLY_SDK
|
---|
26 | if defined(VBOX_WITH_TESTCASES)
|
---|
27 | PROGRAMS += \
|
---|
28 | tstAPI \
|
---|
29 | tstVBoxAPI \
|
---|
30 | tstVBoxAPIPerf \
|
---|
31 | $(if $(VBOX_OSE),,tstOVF) \
|
---|
32 | $(if $(VBOX_WITH_XPCOM),tstVBoxAPIXPCOM,tstVBoxAPIWin) \
|
---|
33 | $(if $(VBOX_WITH_RESOURCE_USAGE_API),tstCollector,) \
|
---|
34 | $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlParseBuffer,) \
|
---|
35 | $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlContextID,) \
|
---|
36 | tstMediumLock \
|
---|
37 | tstMouseImpl \
|
---|
38 | tstGuid
|
---|
39 | PROGRAMS.linux += \
|
---|
40 | $(if $(VBOX_WITH_USB),tstUSBProxyLinux,)
|
---|
41 | endif # !VBOX_WITH_TESTCASES
|
---|
42 | endif # !VBOX_ONLY_SDK
|
---|
43 | if defined(VBOX_ONLY_SDK) || !defined(VBOX_WITH_XPCOM)
|
---|
44 | INSTALLS += samplesMSCOM
|
---|
45 | endif
|
---|
46 | if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_XPCOM)
|
---|
47 | INSTALLS += samplesXPCOM
|
---|
48 | endif
|
---|
49 |
|
---|
50 |
|
---|
51 | #
|
---|
52 | # The samples
|
---|
53 | #
|
---|
54 | samplesMSCOM_MODE = a+r,u+w
|
---|
55 | samplesMSCOM_INST = $(INST_SDK)bindings/mscom/samples/
|
---|
56 | samplesMSCOM_SOURCES = tstVBoxAPIWin.cpp makefile.tstVBoxAPIWin=>Makefile
|
---|
57 |
|
---|
58 | samplesXPCOM_MODE = a+r,u+w
|
---|
59 | samplesXPCOM_INST = $(INST_SDK)bindings/xpcom/samples/
|
---|
60 | samplesXPCOM_SOURCES = tstVBoxAPIXPCOM.cpp makefile.tstVBoxAPIXPCOM=>Makefile
|
---|
61 |
|
---|
62 |
|
---|
63 | #
|
---|
64 | # tstAPI
|
---|
65 | #
|
---|
66 | tstAPI_TEMPLATE = VBOXMAINCLIENTTSTEXE
|
---|
67 | #tstAPI_INST = $(INST_SDK)bindings/gluecom/samples/
|
---|
68 | tstAPI_SOURCES = tstAPI.cpp
|
---|
69 |
|
---|
70 | #
|
---|
71 | # tstVBoxAPI
|
---|
72 | #
|
---|
73 | tstVBoxAPI_TEMPLATE = VBOXMAINCLIENTTSTEXE
|
---|
74 | tstVBoxAPI_SOURCES = \
|
---|
75 | tstVBoxAPI.cpp
|
---|
76 |
|
---|
77 | #
|
---|
78 | # tstVBoxAPIPerf
|
---|
79 | #
|
---|
80 | tstVBoxAPIPerf_TEMPLATE = VBOXMAINCLIENTTSTEXE
|
---|
81 | tstVBoxAPIPerf_SOURCES = \
|
---|
82 | tstVBoxAPIPerf.cpp
|
---|
83 |
|
---|
84 | #
|
---|
85 | # tstOVF
|
---|
86 | #
|
---|
87 | tstOVF_TEMPLATE = VBOXMAINCLIENTTSTEXE
|
---|
88 | #tstOVF_INST = $(INST_SDK)bindings/gluecom/samples/
|
---|
89 | tstOVF_SOURCES = tstOVF.cpp
|
---|
90 |
|
---|
91 | ifndef VBOX_OSE
|
---|
92 | #
|
---|
93 | # OVF test data.
|
---|
94 | #
|
---|
95 | INSTALLS += ovf-testcases
|
---|
96 | ovf-testcases_MODE = a+r,u+w
|
---|
97 | ovf-testcases_INST = $(INST_TESTCASE)ovf-testcases/
|
---|
98 | ovf-testcases_SOURCES = \
|
---|
99 | ovf-dummy.vmdk \
|
---|
100 | ovf-joomla-0.9/joomla-1.1.4-ovf.ovf=>ovf-joomla-0.9/joomla-1.1.4-ovf.ovf \
|
---|
101 | ovf-winhost-audio-nodisks/WinXP.ovf=>ovf-winhost-audio-nodisks/WinXP.ovf \
|
---|
102 | ovf-winxp-vbox-sharedfolders/winxp.ovf=>ovf-winxp-vbox-sharedfolders/winxp.ovf
|
---|
103 | endif
|
---|
104 |
|
---|
105 |
|
---|
106 | #
|
---|
107 | # tstVBoxAPIXPCOM
|
---|
108 | #
|
---|
109 | # We only build the testcase here to make sure it builds.
|
---|
110 | # It comes with a custom makefile which should be tested as well!
|
---|
111 | #
|
---|
112 | # Use very generic template to make the build environment similar
|
---|
113 | # to the standalone case, to detect if IPRT or glue use sneaks in.
|
---|
114 | #
|
---|
115 | tstVBoxAPIXPCOM_TEMPLATE = VBOXR3EXE
|
---|
116 | tstVBoxAPIXPCOM_INST = $(INST_TESTCASE)
|
---|
117 | tstVBoxAPIXPCOM_SOURCES = tstVBoxAPIXPCOM.cpp
|
---|
118 | tstVBoxAPIXPCOM_INCS = \
|
---|
119 | $(VBOX_PATH_SDK)/bindings/xpcom/include \
|
---|
120 | $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
|
---|
121 | $(VBOX_PATH_SDK)/bindings/xpcom/include/string \
|
---|
122 | $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
|
---|
123 | $(VBOX_PATH_SDK)/bindings/xpcom/include/ipcd
|
---|
124 | tstVBoxAPIXPCOM_LIBS = \
|
---|
125 | $(LIB_XPCOM)
|
---|
126 | tstVBoxAPIXPCOM_CXXFLAGS = -fshort-wchar
|
---|
127 | ifdef VBOX_WITH_RUNPATH
|
---|
128 | tstVBoxAPIXPCOM_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' $(TEMPLATE_VBoxBldProg_LDFLAGS)
|
---|
129 | else ifdef VBOX_WITH_RELATIVE_RUNPATH
|
---|
130 | tstVBoxAPIXPCOM_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..' $(TEMPLATE_VBoxBldProg_LDFLAGS)
|
---|
131 | endif
|
---|
132 | tstVBoxAPIXPCOM_INTERMEDIATES = \
|
---|
133 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
134 | ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
|
---|
135 | tstVBoxAPIXPCOM_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
|
---|
136 | endif
|
---|
137 |
|
---|
138 |
|
---|
139 | #
|
---|
140 | # tstVBoxAPIWin
|
---|
141 | #
|
---|
142 | # Use very generic template to make the build environment similar
|
---|
143 | # to the standalone case, to detect if IPRT or glue use sneaks in.
|
---|
144 | #
|
---|
145 | tstVBoxAPIWin_TEMPLATE = VBoxBldProg
|
---|
146 | tstVBoxAPIWin_INST = $(INST_TESTCASE)
|
---|
147 | tstVBoxAPIWin_SOURCES = \
|
---|
148 | tstVBoxAPIWin.cpp \
|
---|
149 | $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
|
---|
150 | tstVBoxAPIWin_INCS = \
|
---|
151 | $(VBOX_PATH_SDK)/bindings/mscom/include
|
---|
152 | tstVBoxAPIWin_INTERMEDIATES = \
|
---|
153 | $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
154 |
|
---|
155 |
|
---|
156 | #
|
---|
157 | # tstCollector
|
---|
158 | #
|
---|
159 | # Note! VBOX_MAIN_APIWRAPPER_GEN_HDRS is only defined if kmk is executed a
|
---|
160 | # parent directory. Since the rules for generating the files listed by
|
---|
161 | # the variable lives in the parent makefile, this is not a problem.
|
---|
162 | #
|
---|
163 | tstCollector_TEMPLATE = VBOXMAINCLIENTTSTEXE
|
---|
164 | tstCollector_SOURCES = \
|
---|
165 | tstCollector.cpp \
|
---|
166 | ../src-server/Performance.cpp
|
---|
167 | tstCollector_INCS = \
|
---|
168 | ../include \
|
---|
169 | $(VBOX_MAIN_APIWRAPPER_INCS)
|
---|
170 | tstCollector_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
|
---|
171 | tstCollector_DEFS = VBOX_COLLECTOR_TEST_CASE
|
---|
172 | tstCollector_LDFLAGS.darwin = -lproc
|
---|
173 | tstCollector_LDFLAGS.solaris = -lkstat -lnvpair
|
---|
174 | tstCollector_LDFLAGS.win = psapi.lib powrprof.lib
|
---|
175 |
|
---|
176 |
|
---|
177 | #
|
---|
178 | # tstGuestCtrlParseBuffer
|
---|
179 | #
|
---|
180 | tstGuestCtrlParseBuffer_TEMPLATE = VBOXMAINCLIENTTSTEXE
|
---|
181 | tstGuestCtrlParseBuffer_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
|
---|
182 | tstGuestCtrlParseBuffer_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL VBOX_GUESTCTRL_TEST_CASE
|
---|
183 | tstGuestCtrlParseBuffer_SOURCES = \
|
---|
184 | tstGuestCtrlParseBuffer.cpp \
|
---|
185 | ../src-client/GuestCtrlPrivate.cpp
|
---|
186 | tstGuestCtrlParseBuffer_INCS = ../include \
|
---|
187 | $(VBOX_MAIN_APIWRAPPER_INCS)
|
---|
188 |
|
---|
189 |
|
---|
190 | #
|
---|
191 | # tstGuestCtrlContextID
|
---|
192 | #
|
---|
193 | tstGuestCtrlContextID_TEMPLATE = VBOXMAINCLIENTTSTEXE
|
---|
194 | tstGuestCtrlContextID_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
|
---|
195 | tstGuestCtrlContextID_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL VBOX_GUESTCTRL_TEST_CASE
|
---|
196 | tstGuestCtrlContextID_SOURCES = \
|
---|
197 | tstGuestCtrlContextID.cpp \
|
---|
198 | ../src-client/GuestCtrlPrivate.cpp
|
---|
199 | tstGuestCtrlContextID_INCS = ../include \
|
---|
200 | $(VBOX_MAIN_APIWRAPPER_INCS)
|
---|
201 |
|
---|
202 |
|
---|
203 | #
|
---|
204 | # tstUSBProxyLinux
|
---|
205 | #
|
---|
206 | tstUSBProxyLinux_TEMPLATE = VBOXMAINCLIENTTSTEXE
|
---|
207 | tstUSBProxyLinux_SOURCES = \
|
---|
208 | tstUSBProxyLinux.cpp \
|
---|
209 | ../src-server/linux/USBProxyServiceLinux.cpp \
|
---|
210 | ../src-server/linux/USBGetDevices.cpp
|
---|
211 | tstUSBProxyLinux_INCS = \
|
---|
212 | . \
|
---|
213 | ../include \
|
---|
214 | $(VBOX_PATH_SDK)/bindings/xpcom/include \
|
---|
215 | $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
|
---|
216 | $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
|
---|
217 | $(VBOX_MAIN_APIWRAPPER_INCS)
|
---|
218 | tstUSBProxyLinux_DEFS = \
|
---|
219 | UNIT_TEST \
|
---|
220 | VBOX_WITH_USB \
|
---|
221 | VBOX_USB_WITH_SYSFS \
|
---|
222 | VBOX_WITH_XPCOM
|
---|
223 | tstUSBProxyLinux_DEPS = \
|
---|
224 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
225 | tstUSBProxyLinux_LIBS += \
|
---|
226 | $(PATH_OUT)/lib/USBLib.a \
|
---|
227 | $(PATH_OUT)/lib/VBoxCOM.a
|
---|
228 |
|
---|
229 |
|
---|
230 | #
|
---|
231 | # tstMediumLock
|
---|
232 | #
|
---|
233 | tstMediumLock_TEMPLATE = VBOXMAINCLIENTTSTEXE
|
---|
234 | tstMediumLock_SOURCES = tstMediumLock.cpp
|
---|
235 |
|
---|
236 |
|
---|
237 | #
|
---|
238 | # tstMouseImpl
|
---|
239 | #
|
---|
240 | tstMouseImpl_TEMPLATE = VBOXMAINTSTEXE
|
---|
241 | tstMouseImpl_SOURCES = \
|
---|
242 | tstMouseImpl.cpp \
|
---|
243 | ../src-client/MouseImpl.cpp \
|
---|
244 | ../src-all/EventImpl.cpp \
|
---|
245 | ../src-all/AutoCaller.cpp \
|
---|
246 | ../src-all/VirtualBoxBase.cpp \
|
---|
247 | ../src-all/VirtualBoxErrorInfoImpl.cpp \
|
---|
248 | $(VBOX_AUTOGEN_EVENT_CPP) \
|
---|
249 | $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
250 | tstMouseImpl_INCS = ../include \
|
---|
251 | $(VBOX_PATH_SDK)/bindings/xpcom/include \
|
---|
252 | $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
|
---|
253 | $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
|
---|
254 | $(dir $(VBOX_XML_SCHEMADEFS_H)) \
|
---|
255 | $(VBOX_MAIN_APIWRAPPER_INCS)
|
---|
256 | tstMouseImpl_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
|
---|
257 |
|
---|
258 | tstMouseImpl_LIBS = \
|
---|
259 | $(PATH_STAGE_LIB)/VBoxAPIWrap$(VBOX_SUFF_LIB) \
|
---|
260 | $(LIB_VMM)
|
---|
261 | # Super ugly hack to make the code work well enough without having ATL/COM
|
---|
262 | # completely initialized, without it there are crashes caused by ComObjPtr
|
---|
263 | # and many other pieces of glue code, as the inproc code path is more picky.
|
---|
264 | tstMouseImpl_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
|
---|
265 |
|
---|
266 |
|
---|
267 | #
|
---|
268 | # tstGuid
|
---|
269 | #
|
---|
270 | tstGuid_TEMPLATE = VBOXMAINCLIENTTSTEXE
|
---|
271 | tstGuid_SOURCES = tstGuid.cpp
|
---|
272 |
|
---|
273 |
|
---|
274 | # generate rules.
|
---|
275 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
276 |
|
---|