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