VirtualBox

source: vbox/trunk/src/VBox/Main/testcase/Makefile.kmk@ 96407

最後變更 在這個檔案從96407是 96407,由 vboxsync 提交於 3 年 前

scm copyright and license note update

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 8.8 KB
 
1# $Id: Makefile.kmk 96407 2022-08-22 17:43:14Z vboxsync $
2## @file
3# Sub-Makefile for the VBox API testcases.
4#
5
6#
7# Copyright (C) 2004-2022 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.alldomusa.eu.org.
11#
12# This program is free software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License
14# as published by the Free Software Foundation, in version 3 of the
15# License.
16#
17# This program is distributed in the hope that it will be useful, but
18# WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, see <https://www.gnu.org/licenses>.
24#
25# SPDX-License-Identifier: GPL-3.0-only
26#
27
28SUB_DEPTH = ../../../..
29include $(KBUILD_PATH)/subheader.kmk
30
31
32#
33# Target and globals (small mess)
34#
35ifndef VBOX_ONLY_SDK
36 if defined(VBOX_WITH_TESTCASES)
37 PROGRAMS += \
38 tstAPI \
39 tstVBoxAPI \
40 tstVBoxAPIPerf \
41 tstVBoxMultipleVM \
42 $(if $(VBOX_OSE),,tstOVF) \
43 $(if $(VBOX_WITH_XPCOM),tstVBoxAPIXPCOM,tstVBoxAPIWin msiDarwinDescriptorDecoder) \
44 $(if $(VBOX_WITH_RESOURCE_USAGE_API),tstCollector,) \
45 $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlParseBuffer,) \
46 $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlContextID,) \
47 tstMediumLock \
48 tstBstr \
49 tstGuid \
50 tstUnattendedScript \
51 tstVBoxCrypto
52 PROGRAMS.linux += \
53 $(if $(VBOX_WITH_USB),tstUSBProxyLinux,)
54 endif # !VBOX_WITH_TESTCASES
55endif # !VBOX_ONLY_SDK
56if defined(VBOX_ONLY_SDK) || !defined(VBOX_WITH_XPCOM)
57 INSTALLS += samplesMSCOM
58endif
59if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_XPCOM)
60 INSTALLS += samplesXPCOM
61endif
62
63
64#
65# The samples
66#
67samplesMSCOM_MODE = a+r,u+w
68samplesMSCOM_INST = $(INST_SDK)bindings/mscom/samples/
69samplesMSCOM_SOURCES = tstVBoxAPIWin.cpp makefile.tstVBoxAPIWin=>Makefile
70
71samplesXPCOM_MODE = a+r,u+w
72samplesXPCOM_INST = $(INST_SDK)bindings/xpcom/samples/
73samplesXPCOM_SOURCES = tstVBoxAPIXPCOM.cpp makefile.tstVBoxAPIXPCOM=>Makefile
74
75#
76# tstVBoxMultipleVM
77#
78tstVBoxMultipleVM_TEMPLATE = VBOXMAINCLIENTTSTEXE
79tstVBoxMultipleVM_SOURCES = tstVBoxMultipleVM.cpp
80
81#
82# tstAPI
83#
84tstAPI_TEMPLATE = VBOXMAINCLIENTTSTEXE
85#tstAPI_INST = $(INST_SDK)bindings/gluecom/samples/
86tstAPI_SOURCES = tstAPI.cpp
87
88#
89# tstVBoxAPI
90#
91tstVBoxAPI_TEMPLATE = VBOXMAINCLIENTTSTEXE
92tstVBoxAPI_SOURCES = \
93 tstVBoxAPI.cpp
94
95#
96# tstVBoxAPIPerf
97#
98tstVBoxAPIPerf_TEMPLATE = VBOXMAINCLIENTTSTEXE
99tstVBoxAPIPerf_SOURCES = \
100 tstVBoxAPIPerf.cpp
101
102#
103# tstOVF
104#
105tstOVF_TEMPLATE = VBOXMAINCLIENTTSTEXE
106#tstOVF_INST = $(INST_SDK)bindings/gluecom/samples/
107tstOVF_SOURCES = tstOVF.cpp
108
109ifndef VBOX_OSE
110#
111# OVF test data.
112#
113INSTALLS += ovf-testcases
114ovf-testcases_MODE = a+r,u+w
115ovf-testcases_INST = $(INST_TESTCASE)ovf-testcases/
116ovf-testcases_SOURCES = \
117 ovf-dummy.vmdk \
118 ovf-joomla-0.9/joomla-1.1.4-ovf.ovf=>ovf-joomla-0.9/joomla-1.1.4-ovf.ovf \
119 ovf-winhost-audio-nodisks/WinXP.ovf=>ovf-winhost-audio-nodisks/WinXP.ovf \
120 ovf-winxp-vbox-sharedfolders/winxp.ovf=>ovf-winxp-vbox-sharedfolders/winxp.ovf
121endif
122
123
124#
125# tstVBoxAPIXPCOM
126#
127# We only build the testcase here to make sure it builds.
128# It comes with a custom makefile which should be tested as well!
129#
130# Use very generic template to make the build environment similar
131# to the standalone case, to detect if IPRT or glue use sneaks in.
132#
133tstVBoxAPIXPCOM_TEMPLATE = VBOXR3EXE
134tstVBoxAPIXPCOM_INST = $(INST_TESTCASE)
135tstVBoxAPIXPCOM_SOURCES = tstVBoxAPIXPCOM.cpp
136tstVBoxAPIXPCOM_INCS = \
137 $(VBOX_PATH_SDK)/bindings/xpcom/include \
138 $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
139 $(VBOX_PATH_SDK)/bindings/xpcom/include/string \
140 $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
141 $(VBOX_PATH_SDK)/bindings/xpcom/include/ipcd
142tstVBoxAPIXPCOM_LIBS = \
143 $(LIB_XPCOM) \
144 $(LIB_RUNTIME)
145tstVBoxAPIXPCOM_CXXFLAGS = -fshort-wchar
146ifdef VBOX_WITH_RUNPATH
147 tstVBoxAPIXPCOM_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' $(TEMPLATE_VBoxBldProg_LDFLAGS)
148else ifdef VBOX_WITH_RELATIVE_RUNPATH
149 tstVBoxAPIXPCOM_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..' $(TEMPLATE_VBoxBldProg_LDFLAGS)
150endif
151tstVBoxAPIXPCOM_INTERMEDIATES = \
152 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
153ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
154 tstVBoxAPIXPCOM_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
155endif
156
157
158#
159# tstVBoxAPIWin
160#
161# Use very generic template to make the build environment similar
162# to the standalone case, to detect if IPRT or glue use sneaks in.
163#
164tstVBoxAPIWin_TEMPLATE = VBOXR3EXE
165tstVBoxAPIWin_INST = $(INST_TESTCASE)
166tstVBoxAPIWin_SOURCES = \
167 tstVBoxAPIWin.cpp \
168 $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
169tstVBoxAPIWin_INCS = \
170 $(VBOX_PATH_SDK)/bindings/mscom/include
171tstVBoxAPIWin_INTERMEDIATES = \
172 $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
173
174
175#
176# msiDarwinDescriptorDecoder
177#
178# Use very generic template to make the build environment similar
179# to the standalone case, to detect if IPRT or glue use sneaks in.
180#
181msiDarwinDescriptorDecoder_TEMPLATE = VBOXR3EXE
182msiDarwinDescriptorDecoder_INST = $(VBOX_INST_TOOLS)
183msiDarwinDescriptorDecoder_SOURCES = \
184 msiDarwinDescriptorDecoder.cpp
185
186
187#
188# tstCollector
189#
190# Note! VBOX_MAIN_APIWRAPPER_GEN_HDRS is only defined if kmk is executed a
191# parent directory. Since the rules for generating the files listed by
192# the variable lives in the parent makefile, this is not a problem.
193#
194tstCollector_TEMPLATE = VBOXMAINCLIENTTSTEXE
195tstCollector_SOURCES = \
196 tstCollector.cpp \
197 ../src-server/Performance.cpp
198tstCollector_INCS = \
199 ../include \
200 $(VBOX_MAIN_APIWRAPPER_INCS)
201tstCollector_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
202tstCollector_DEFS = VBOX_COLLECTOR_TEST_CASE
203tstCollector_LDFLAGS.darwin = -lproc
204tstCollector_LDFLAGS.solaris = -lkstat -lnvpair
205tstCollector_LDFLAGS.win = psapi.lib powrprof.lib
206
207
208#
209# tstGuestCtrlParseBuffer
210#
211tstGuestCtrlParseBuffer_TEMPLATE = VBOXMAINCLIENTTSTEXE
212tstGuestCtrlParseBuffer_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
213tstGuestCtrlParseBuffer_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL VBOX_GUESTCTRL_TEST_CASE
214tstGuestCtrlParseBuffer_SOURCES = \
215 tstGuestCtrlParseBuffer.cpp \
216 ../src-client/GuestCtrlPrivate.cpp
217tstGuestCtrlParseBuffer_INCS = ../include \
218 $(VBOX_MAIN_APIWRAPPER_INCS)
219
220
221#
222# tstGuestCtrlContextID
223#
224tstGuestCtrlContextID_TEMPLATE = VBOXMAINCLIENTTSTEXE
225tstGuestCtrlContextID_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
226tstGuestCtrlContextID_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL VBOX_GUESTCTRL_TEST_CASE
227tstGuestCtrlContextID_SOURCES = \
228 tstGuestCtrlContextID.cpp \
229 ../src-client/GuestCtrlPrivate.cpp
230tstGuestCtrlContextID_INCS = ../include \
231 $(VBOX_MAIN_APIWRAPPER_INCS)
232
233
234#
235# tstUSBProxyLinux
236#
237tstUSBProxyLinux_TEMPLATE = VBOXMAINCLIENTTSTEXE
238tstUSBProxyLinux_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
239tstUSBProxyLinux_SOURCES = \
240 tstUSBProxyLinux.cpp \
241 ../src-server/linux/USBGetDevices.cpp
242tstUSBProxyLinux_INCS = \
243 . \
244 ../include \
245 $(VBOX_PATH_SDK)/bindings/xpcom/include \
246 $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
247 $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
248 $(VBOX_MAIN_APIWRAPPER_INCS)
249tstUSBProxyLinux_DEFS = \
250 UNIT_TEST \
251 VBOX_WITH_USB \
252 VBOX_USB_WITH_SYSFS \
253 VBOX_WITH_XPCOM
254tstUSBProxyLinux_DEPS = \
255 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
256tstUSBProxyLinux_LIBS += \
257 $(PATH_OUT)/lib/USBLib.a \
258 $(PATH_OUT)/lib/VBoxCOM.a
259
260
261#
262# tstMediumLock
263#
264tstMediumLock_TEMPLATE = VBOXMAINCLIENTTSTEXE
265tstMediumLock_SOURCES = tstMediumLock.cpp
266
267
268#
269# tstBstr
270#
271tstBstr_TEMPLATE = VBOXMAINCLIENTTSTEXE
272tstBstr_SOURCES = tstBstr.cpp
273
274
275#
276# tstGuid
277#
278tstGuid_TEMPLATE = VBOXMAINCLIENTTSTEXE
279tstGuid_SOURCES = tstGuid.cpp
280
281
282#
283# tstUnattendedScript
284#
285tstUnattendedScript_TEMPLATE = VBOXMAINCLIENTTSTEXE
286tstUnattendedScript_DEFS = VBOX_WITH_UNATTENDED IN_VBOXSVC IN_TST_UNATTENDED_SCRIPT
287tstUnattendedScript_INTERMEDIATES = \
288 $(VBOX_MAIN_APIWRAPPER_GEN_HDRS) \
289 $(VBOX_XML_SCHEMADEFS_H)
290tstUnattendedScript_INCS = \
291 ../include \
292 $(VBOX_MAIN_APIWRAPPER_INCS) \
293 $(dir $(VBOX_XML_SCHEMADEFS_H))
294tstUnattendedScript_SOURCES = \
295 tstUnattendedScript.cpp \
296 ../src-server/UnattendedScript.cpp \
297 ../src-all/TextScript.cpp \
298 ../src-all/VirtualBoxBase.cpp \
299 ../src-all/VirtualBoxErrorInfoImpl.cpp \
300 ../src-all/AutoCaller.cpp \
301 ../src-all/GlobalStatusConversion.cpp
302tstUnattendedScript_LIBS = \
303 $(PATH_STAGE_LIB)/VBoxAPIWrap$(VBOX_SUFF_LIB)
304
305INSTALLS += tstUnattendedScriptFiles
306tstUnattendedScriptFiles_TEMPLATE = VBOXMAINTSTEXE
307tstUnattendedScriptFiles_SOURCES = \
308 tstUnattendedScript-1.template \
309 tstUnattendedScript-1.expected
310
311
312#
313# tstVBoxCrypto
314#
315tstVBoxCrypto_TEMPLATE = VBOXMAINCLIENTTSTEXE
316tstVBoxCrypto_SOURCES = tstVBoxCrypto.cpp
317
318
319
320# generate rules.
321include $(FILE_KBUILD_SUB_FOOTER)
322
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette