VirtualBox

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

Last change on this file since 47470 was 47277, checked in by vboxsync, 11 years ago

windows warnings.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.0 KB
Line 
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
18SUB_DEPTH = ../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21
22#
23# Target and globals (small mess)
24#
25ifndef 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
38endif # !VBOX_ONLY_SDK
39if defined(VBOX_ONLY_SDK) || !defined(VBOX_WITH_XPCOM)
40 INSTALLS += samplesMSCOM
41endif
42if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_XPCOM)
43 INSTALLS += samplesXPCOM
44endif
45
46
47#
48# The samples
49#
50samplesMSCOM_MODE = a+r,u+w
51samplesMSCOM_INST = $(INST_SDK)bindings/mscom/samples/
52samplesMSCOM_SOURCES = tstVBoxAPIWin.cpp makefile.tstVBoxAPIWin=>Makefile
53
54samplesXPCOM_MODE = a+r,u+w
55samplesXPCOM_INST = $(INST_SDK)bindings/xpcom/samples/
56samplesXPCOM_SOURCES = tstVBoxAPILinux.cpp makefile.tstVBoxAPILinux=>Makefile
57
58
59#
60# tstAPI
61#
62tstAPI_TEMPLATE = VBOXMAINCLIENTEXE
63#tstAPI_INST = $(INST_SDK)bindings/gluecom/samples/
64tstAPI_SOURCES = tstAPI.cpp
65ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
66tstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
67else
68tstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
69endif
70ifdef VBOX_WITH_RESOURCE_USAGE_API
71tstAPI_DEFS += VBOX_WITH_RESOURCE_USAGE_API
72endif
73
74
75#
76# tstOVF
77#
78tstOVF_TEMPLATE = VBOXMAINCLIENTEXE
79#tstOVF_INST = $(INST_SDK)bindings/gluecom/samples/
80tstOVF_SOURCES = tstOVF.cpp
81ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
82tstOVF_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
83else
84tstOVF_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
85endif
86ifdef VBOX_WITH_RESOURCE_USAGE_API
87tstOVF_DEFS += VBOX_WITH_RESOURCE_USAGE_API
88endif
89
90ifndef VBOX_OSE
91#
92# OVF test data.
93#
94INSTALLS += ovf-testcases
95ovf-testcases_MODE = a+r,u+w
96ovf-testcases_INST = $(INST_BIN)ovf-testcases/
97ovf-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
102endif
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#
111tstVBoxAPILinux_TEMPLATE = VBOXR3EXE
112tstVBoxAPILinux_SOURCES = tstVBoxAPILinux.cpp
113tstVBoxAPILinux_CXXFLAGS = -Wno-non-virtual-dtor -fshort-wchar
114tstVBoxAPILinux_LDFLAGS.solaris += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/../../..'
115ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
116 tstVBoxAPILinux_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
117endif
118tstVBoxAPILinux_DEFS += VBOX_WITH_XPCOM
119tstVBoxAPILinux_INCS = \
120 $(VBOX_XPCOM_INCS) \
121 $(VBOX_PATH_SDK)/bindings/xpcom/include
122tstVBoxAPILinux_LIBPATH = $(LIBPATH_XPCOM)
123tstVBoxAPILinux_LIBS = $(LIB_XPCOM) $(LIB_RUNTIME)
124tstVBoxAPILinux_DEPS = \
125 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
126
127
128#
129# tstVBoxAPIWin
130#
131tstVBoxAPIWin_TEMPLATE = VBOXMAINCLIENTEXE
132tstVBoxAPIWin_SOURCES = \
133 tstVBoxAPIWin.cpp \
134 $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
135tstVBoxAPIWin_DEPS = \
136 $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
137
138
139#
140# tstCollector
141#
142tstCollector_TEMPLATE = VBOXMAINCLIENTEXE
143tstCollector_SOURCES = \
144 tstCollector.cpp \
145 ../src-server/Performance.cpp
146tstCollector_INCS = ../include
147tstCollector_DEFS += VBOX_COLLECTOR_TEST_CASE
148tstCollector_LDFLAGS.darwin += -lproc
149tstCollector_LDFLAGS.solaris += -lkstat -lnvpair
150tstCollector_LDFLAGS.win += psapi.lib powrprof.lib
151
152
153#
154# tstGuestCtrlParseBuffer
155#
156tstGuestCtrlParseBuffer_TEMPLATE = VBOXMAINCLIENTEXE
157tstGuestCtrlParseBuffer_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL VBOX_GUESTCTRL_TEST_CASE
158tstGuestCtrlParseBuffer_SOURCES = \
159 tstGuestCtrlParseBuffer.cpp \
160 ../src-client/GuestCtrlPrivate.cpp
161tstGuestCtrlParseBuffer_INCS = ../include
162ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
163 tstGuestCtrlParseBuffer_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
164else
165 tstGuestCtrlParseBuffer_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
166endif
167
168
169#
170# tstGuestCtrlContextID
171#
172tstGuestCtrlContextID_TEMPLATE = VBOXMAINCLIENTEXE
173tstGuestCtrlContextID_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL VBOX_GUESTCTRL_TEST_CASE
174tstGuestCtrlContextID_SOURCES = \
175 tstGuestCtrlContextID.cpp \
176 ../src-client/GuestCtrlPrivate.cpp
177tstGuestCtrlContextID_INCS = ../include
178ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
179 tstGuestCtrlContextID_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
180else
181 tstGuestCtrlContextID_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
182endif
183
184
185#
186# tstUSBProxyLinux
187#
188tstUSBProxyLinux_TEMPLATE = VBOXR3TSTNPEXE
189tstUSBProxyLinux_SOURCES = \
190 tstUSBProxyLinux.cpp \
191 ../src-server/linux/USBProxyServiceLinux.cpp \
192 ../src-server/linux/USBGetDevices.cpp
193tstUSBProxyLinux_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
199tstUSBProxyLinux_DEFS = \
200 UNIT_TEST \
201 VBOX_WITH_USB \
202 VBOX_USB_WITH_SYSFS \
203 VBOX_WITH_XPCOM
204tstUSBProxyLinux_DEPS = \
205 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
206tstUSBProxyLinux_LIBS += \
207 $(PATH_OUT)/lib/USBLib.a \
208 $(PATH_OUT)/lib/VBoxCOM.a
209
210
211#
212# tstMouseImpl
213#
214tstMouseImpl_TEMPLATE = VBOXMAINTSTEXE
215tstMouseImpl_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)
223tstMouseImpl_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))
228tstMouseImpl_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.
232tstMouseImpl_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
233
234
235# generate rules.
236include $(FILE_KBUILD_SUB_FOOTER)
237
Note: See TracBrowser for help on using the repository browser.

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