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