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