VirtualBox

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

Last change on this file since 49866 was 49803, checked in by vboxsync, 11 years ago

Main: tstCollector need to require the wrapper generated header files to exist in order to avoid it being built before they are generated. This necessitated some changes that lead to some more VBoxApiWrap related cleanups.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.8 KB
Line 
1# $Id: Makefile.kmk 49803 2013-12-06 01:03:32Z 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),tstVBoxAPIXPCOM,tstVBoxAPIWin) \
31 $(if $(VBOX_WITH_RESOURCE_USAGE_API),tstCollector,) \
32 $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlParseBuffer,) \
33 $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlContextID,) \
34 tstMediumLock \
35 tstMouseImpl
36 PROGRAMS.linux += \
37 $(if $(VBOX_WITH_USB),tstUSBProxyLinux,)
38 endif # !VBOX_WITH_TESTCASES
39endif # !VBOX_ONLY_SDK
40if defined(VBOX_ONLY_SDK) || !defined(VBOX_WITH_XPCOM)
41 INSTALLS += samplesMSCOM
42endif
43if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_XPCOM)
44 INSTALLS += samplesXPCOM
45endif
46
47
48#
49# The samples
50#
51samplesMSCOM_MODE = a+r,u+w
52samplesMSCOM_INST = $(INST_SDK)bindings/mscom/samples/
53samplesMSCOM_SOURCES = tstVBoxAPIWin.cpp makefile.tstVBoxAPIWin=>Makefile
54
55samplesXPCOM_MODE = a+r,u+w
56samplesXPCOM_INST = $(INST_SDK)bindings/xpcom/samples/
57samplesXPCOM_SOURCES = tstVBoxAPIXPCOM.cpp makefile.tstVBoxAPIXPCOM=>Makefile
58
59
60#
61# tstAPI
62#
63tstAPI_TEMPLATE = VBOXMAINCLIENTTSTEXE
64#tstAPI_INST = $(INST_SDK)bindings/gluecom/samples/
65tstAPI_SOURCES = tstAPI.cpp
66
67
68#
69# tstOVF
70#
71tstOVF_TEMPLATE = VBOXMAINCLIENTTSTEXE
72#tstOVF_INST = $(INST_SDK)bindings/gluecom/samples/
73tstOVF_SOURCES = tstOVF.cpp
74
75ifndef VBOX_OSE
76#
77# OVF test data.
78#
79INSTALLS += ovf-testcases
80ovf-testcases_MODE = a+r,u+w
81ovf-testcases_INST = $(INST_BIN)ovf-testcases/
82ovf-testcases_SOURCES = \
83 ovf-dummy.vmdk \
84 ovf-joomla-0.9/joomla-1.1.4-ovf.ovf=>ovf-joomla-0.9/joomla-1.1.4-ovf.ovf \
85 ovf-winhost-audio-nodisks/WinXP.ovf=>ovf-winhost-audio-nodisks/WinXP.ovf \
86 ovf-winxp-vbox-sharedfolders/winxp.ovf=>ovf-winxp-vbox-sharedfolders/winxp.ovf
87endif
88
89
90#
91# tstVBoxAPIXPCOM
92#
93# We only build the testcase here to make sure it builds.
94# It comes with a custom makefile which should be tested as well!
95#
96tstVBoxAPIXPCOM_TEMPLATE = VBOXMAINCLIENTTSTEXE
97tstVBoxAPIXPCOM_SOURCES = tstVBoxAPIXPCOM.cpp
98
99
100#
101# tstVBoxAPIWin
102#
103tstVBoxAPIWin_TEMPLATE = VBOXMAINCLIENTTSTEXE
104tstVBoxAPIWin_SOURCES = \
105 tstVBoxAPIWin.cpp \
106 $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
107
108
109#
110# tstCollector
111#
112# Note! VBOX_MAIN_APIWRAPPER_GEN_HDRS is only defined if kmk is executed a
113# parent directory. Since the rules for generating the files listed by
114# the variable lives in the parent makefile, this is not a problem.
115#
116tstCollector_TEMPLATE = VBOXMAINCLIENTTSTEXE
117tstCollector_SOURCES = \
118 tstCollector.cpp \
119 ../src-server/Performance.cpp
120tstCollector_INCS = \
121 ../include \
122 $(VBOX_MAIN_APIWRAPPER_INCS)
123tstCollector_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
124tstCollector_DEFS = VBOX_COLLECTOR_TEST_CASE
125tstCollector_LDFLAGS.darwin = -lproc
126tstCollector_LDFLAGS.solaris = -lkstat -lnvpair
127tstCollector_LDFLAGS.win = psapi.lib powrprof.lib
128
129
130#
131# tstGuestCtrlParseBuffer
132#
133tstGuestCtrlParseBuffer_TEMPLATE = VBOXMAINCLIENTTSTEXE
134tstGuestCtrlParseBuffer_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL VBOX_GUESTCTRL_TEST_CASE
135tstGuestCtrlParseBuffer_SOURCES = \
136 tstGuestCtrlParseBuffer.cpp \
137 ../src-client/GuestCtrlPrivate.cpp
138tstGuestCtrlParseBuffer_INCS = ../include
139
140
141#
142# tstGuestCtrlContextID
143#
144tstGuestCtrlContextID_TEMPLATE = VBOXMAINCLIENTTSTEXE
145tstGuestCtrlContextID_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL VBOX_GUESTCTRL_TEST_CASE
146tstGuestCtrlContextID_SOURCES = \
147 tstGuestCtrlContextID.cpp \
148 ../src-client/GuestCtrlPrivate.cpp
149tstGuestCtrlContextID_INCS = ../include
150
151
152#
153# tstUSBProxyLinux
154#
155tstUSBProxyLinux_TEMPLATE = VBOXR3TSTNPEXE
156tstUSBProxyLinux_SOURCES = \
157 tstUSBProxyLinux.cpp \
158 ../src-server/linux/USBProxyServiceLinux.cpp \
159 ../src-server/linux/USBGetDevices.cpp
160tstUSBProxyLinux_INCS = \
161 . \
162 ../include \
163 $(VBOX_PATH_SDK)/bindings/xpcom/include \
164 $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
165 $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom
166tstUSBProxyLinux_DEFS = \
167 UNIT_TEST \
168 VBOX_WITH_USB \
169 VBOX_USB_WITH_SYSFS \
170 VBOX_WITH_XPCOM
171tstUSBProxyLinux_DEPS = \
172 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
173tstUSBProxyLinux_LIBS += \
174 $(PATH_OUT)/lib/USBLib.a \
175 $(PATH_OUT)/lib/VBoxCOM.a
176
177
178#
179# tstMediumLock
180#
181tstMediumLock_TEMPLATE = VBOXMAINCLIENTTSTEXE
182tstMediumLock_SOURCES = tstMediumLock.cpp
183
184
185#
186# tstMouseImpl
187#
188tstMouseImpl_TEMPLATE = VBOXMAINTSTEXE
189tstMouseImpl_SOURCES = \
190 tstMouseImpl.cpp \
191 ../src-client/MouseImpl.cpp \
192 ../src-all/EventImpl.cpp \
193 ../src-all/VirtualBoxBase.cpp \
194 ../src-all/VirtualBoxErrorInfoImpl.cpp \
195 $(VBOX_AUTOGEN_EVENT_CPP) \
196 $(VBOX_XML_SCHEMADEFS_CPP)
197tstMouseImpl_INCS = ../include \
198 $(VBOX_PATH_SDK)/bindings/xpcom/include \
199 $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
200 $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
201 $(dir $(VBOX_XML_SCHEMADEFS_H))
202tstMouseImpl_LIBS = \
203 $(PATH_STAGE_LIB)/VBoxAPIWrap$(VBOX_SUFF_LIB) \
204 $(LIB_VMM)
205# Super ugly hack to make the code work well enough without having ATL/COM
206# completely initialized, without it there are crashes caused by ComObjPtr
207# and many other pieces of glue code, as the inproc code path is more picky.
208tstMouseImpl_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
209
210
211# generate rules.
212include $(FILE_KBUILD_SUB_FOOTER)
213
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