1 | # $Id: Makefile.kmk 47277 2013-07-19 17:49:34Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the VBox API testcases.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2004-2013 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 | $(if $(VBOX_OSE),,tstOVF) \
|
---|
30 | $(if $(VBOX_WITH_XPCOM),tstVBoxAPILinux,tstVBoxAPIWin) \
|
---|
31 | $(if $(VBOX_WITH_RESOURCE_USAGE_API),tstCollector,) \
|
---|
32 | $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlParseBuffer,) \
|
---|
33 | $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlContextID,) \
|
---|
34 | $(if true,tstMouseImpl,)
|
---|
35 | PROGRAMS.linux += \
|
---|
36 | $(if $(VBOX_WITH_USB),tstUSBProxyLinux,)
|
---|
37 | endif # !VBOX_WITH_TESTCASES
|
---|
38 | endif # !VBOX_ONLY_SDK
|
---|
39 | if defined(VBOX_ONLY_SDK) || !defined(VBOX_WITH_XPCOM)
|
---|
40 | INSTALLS += samplesMSCOM
|
---|
41 | endif
|
---|
42 | if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_XPCOM)
|
---|
43 | INSTALLS += samplesXPCOM
|
---|
44 | endif
|
---|
45 |
|
---|
46 |
|
---|
47 | #
|
---|
48 | # The samples
|
---|
49 | #
|
---|
50 | samplesMSCOM_MODE = a+r,u+w
|
---|
51 | samplesMSCOM_INST = $(INST_SDK)bindings/mscom/samples/
|
---|
52 | samplesMSCOM_SOURCES = tstVBoxAPIWin.cpp makefile.tstVBoxAPIWin=>Makefile
|
---|
53 |
|
---|
54 | samplesXPCOM_MODE = a+r,u+w
|
---|
55 | samplesXPCOM_INST = $(INST_SDK)bindings/xpcom/samples/
|
---|
56 | samplesXPCOM_SOURCES = tstVBoxAPILinux.cpp makefile.tstVBoxAPILinux=>Makefile
|
---|
57 |
|
---|
58 |
|
---|
59 | #
|
---|
60 | # tstAPI
|
---|
61 | #
|
---|
62 | tstAPI_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
63 | #tstAPI_INST = $(INST_SDK)bindings/gluecom/samples/
|
---|
64 | tstAPI_SOURCES = tstAPI.cpp
|
---|
65 | ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
|
---|
66 | tstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
67 | else
|
---|
68 | tstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
69 | endif
|
---|
70 | ifdef VBOX_WITH_RESOURCE_USAGE_API
|
---|
71 | tstAPI_DEFS += VBOX_WITH_RESOURCE_USAGE_API
|
---|
72 | endif
|
---|
73 |
|
---|
74 |
|
---|
75 | #
|
---|
76 | # tstOVF
|
---|
77 | #
|
---|
78 | tstOVF_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
79 | #tstOVF_INST = $(INST_SDK)bindings/gluecom/samples/
|
---|
80 | tstOVF_SOURCES = tstOVF.cpp
|
---|
81 | ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
|
---|
82 | tstOVF_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
83 | else
|
---|
84 | tstOVF_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
85 | endif
|
---|
86 | ifdef VBOX_WITH_RESOURCE_USAGE_API
|
---|
87 | tstOVF_DEFS += VBOX_WITH_RESOURCE_USAGE_API
|
---|
88 | endif
|
---|
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_BIN)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 | # tstVBoxAPILinux
|
---|
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 | tstVBoxAPILinux_TEMPLATE = VBOXR3EXE
|
---|
112 | tstVBoxAPILinux_SOURCES = tstVBoxAPILinux.cpp
|
---|
113 | tstVBoxAPILinux_CXXFLAGS = -Wno-non-virtual-dtor -fshort-wchar
|
---|
114 | tstVBoxAPILinux_LDFLAGS.solaris += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/../../..'
|
---|
115 | ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
|
---|
116 | tstVBoxAPILinux_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
|
---|
117 | endif
|
---|
118 | tstVBoxAPILinux_DEFS += VBOX_WITH_XPCOM
|
---|
119 | tstVBoxAPILinux_INCS = \
|
---|
120 | $(VBOX_XPCOM_INCS) \
|
---|
121 | $(VBOX_PATH_SDK)/bindings/xpcom/include
|
---|
122 | tstVBoxAPILinux_LIBPATH = $(LIBPATH_XPCOM)
|
---|
123 | tstVBoxAPILinux_LIBS = $(LIB_XPCOM) $(LIB_RUNTIME)
|
---|
124 | tstVBoxAPILinux_DEPS = \
|
---|
125 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
126 |
|
---|
127 |
|
---|
128 | #
|
---|
129 | # tstVBoxAPIWin
|
---|
130 | #
|
---|
131 | tstVBoxAPIWin_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
132 | tstVBoxAPIWin_SOURCES = \
|
---|
133 | tstVBoxAPIWin.cpp \
|
---|
134 | $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
|
---|
135 | tstVBoxAPIWin_DEPS = \
|
---|
136 | $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
137 |
|
---|
138 |
|
---|
139 | #
|
---|
140 | # tstCollector
|
---|
141 | #
|
---|
142 | tstCollector_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
143 | tstCollector_SOURCES = \
|
---|
144 | tstCollector.cpp \
|
---|
145 | ../src-server/Performance.cpp
|
---|
146 | tstCollector_INCS = ../include
|
---|
147 | tstCollector_DEFS += VBOX_COLLECTOR_TEST_CASE
|
---|
148 | tstCollector_LDFLAGS.darwin += -lproc
|
---|
149 | tstCollector_LDFLAGS.solaris += -lkstat -lnvpair
|
---|
150 | tstCollector_LDFLAGS.win += psapi.lib powrprof.lib
|
---|
151 |
|
---|
152 |
|
---|
153 | #
|
---|
154 | # tstGuestCtrlParseBuffer
|
---|
155 | #
|
---|
156 | tstGuestCtrlParseBuffer_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
157 | tstGuestCtrlParseBuffer_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL VBOX_GUESTCTRL_TEST_CASE
|
---|
158 | tstGuestCtrlParseBuffer_SOURCES = \
|
---|
159 | tstGuestCtrlParseBuffer.cpp \
|
---|
160 | ../src-client/GuestCtrlPrivate.cpp
|
---|
161 | tstGuestCtrlParseBuffer_INCS = ../include
|
---|
162 | ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
|
---|
163 | tstGuestCtrlParseBuffer_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
164 | else
|
---|
165 | tstGuestCtrlParseBuffer_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
166 | endif
|
---|
167 |
|
---|
168 |
|
---|
169 | #
|
---|
170 | # tstGuestCtrlContextID
|
---|
171 | #
|
---|
172 | tstGuestCtrlContextID_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
173 | tstGuestCtrlContextID_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL VBOX_GUESTCTRL_TEST_CASE
|
---|
174 | tstGuestCtrlContextID_SOURCES = \
|
---|
175 | tstGuestCtrlContextID.cpp \
|
---|
176 | ../src-client/GuestCtrlPrivate.cpp
|
---|
177 | tstGuestCtrlContextID_INCS = ../include
|
---|
178 | ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
|
---|
179 | tstGuestCtrlContextID_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
180 | else
|
---|
181 | tstGuestCtrlContextID_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
182 | endif
|
---|
183 |
|
---|
184 |
|
---|
185 | #
|
---|
186 | # tstUSBProxyLinux
|
---|
187 | #
|
---|
188 | tstUSBProxyLinux_TEMPLATE = VBOXR3TSTNPEXE
|
---|
189 | tstUSBProxyLinux_SOURCES = \
|
---|
190 | tstUSBProxyLinux.cpp \
|
---|
191 | ../src-server/linux/USBProxyServiceLinux.cpp \
|
---|
192 | ../src-server/linux/USBGetDevices.cpp
|
---|
193 | tstUSBProxyLinux_INCS = \
|
---|
194 | . \
|
---|
195 | ../include \
|
---|
196 | $(VBOX_PATH_SDK)/bindings/xpcom/include \
|
---|
197 | $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
|
---|
198 | $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom
|
---|
199 | tstUSBProxyLinux_DEFS = \
|
---|
200 | UNIT_TEST \
|
---|
201 | VBOX_WITH_USB \
|
---|
202 | VBOX_USB_WITH_SYSFS \
|
---|
203 | VBOX_WITH_XPCOM
|
---|
204 | tstUSBProxyLinux_DEPS = \
|
---|
205 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
206 | tstUSBProxyLinux_LIBS += \
|
---|
207 | $(PATH_OUT)/lib/USBLib.a \
|
---|
208 | $(PATH_OUT)/lib/VBoxCOM.a
|
---|
209 |
|
---|
210 |
|
---|
211 | #
|
---|
212 | # tstMouseImpl
|
---|
213 | #
|
---|
214 | tstMouseImpl_TEMPLATE = VBOXMAINTSTEXE
|
---|
215 | tstMouseImpl_SOURCES = \
|
---|
216 | tstMouseImpl.cpp \
|
---|
217 | ../src-client/MouseImpl.cpp \
|
---|
218 | ../src-all/EventImpl.cpp \
|
---|
219 | ../src-all/VirtualBoxBase.cpp \
|
---|
220 | ../src-all/VirtualBoxErrorInfoImpl.cpp \
|
---|
221 | $(VBOX_AUTOGEN_EVENT_CPP) \
|
---|
222 | $(VBOX_XML_SCHEMADEFS_CPP)
|
---|
223 | tstMouseImpl_INCS = ../include \
|
---|
224 | $(VBOX_PATH_SDK)/bindings/xpcom/include \
|
---|
225 | $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
|
---|
226 | $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
|
---|
227 | $(dir $(VBOX_XML_SCHEMADEFS_H))
|
---|
228 | tstMouseImpl_LIBS = $(PATH_STAGE_LIB)/VBoxAPIWrap$(VBOX_SUFF_LIB)
|
---|
229 | # Super ugly hack to make the code work well enough without having ATL/COM
|
---|
230 | # completely initialized, without it there are crashes caused by ComObjPtr
|
---|
231 | # and many other pieces of glue code, as the inproc code path is more picky.
|
---|
232 | tstMouseImpl_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
|
---|
233 |
|
---|
234 |
|
---|
235 | # generate rules.
|
---|
236 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
237 |
|
---|