VirtualBox

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

Last change on this file since 42412 was 42214, checked in by vboxsync, 12 years ago

Guest Control 2.0: Update.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.0 KB
Line 
1# $Id: Makefile.kmk 42214 2012-07-18 18:02:58Z vboxsync $
2## @file
3# Sub-Makefile for the VBox API testcases.
4#
5
6#
7# Copyright (C) 2004-2012 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# Target and globals (small mess)
23#
24ifndef VBOX_ONLY_SDK
25 if defined(VBOX_WITH_TESTCASES)
26 PROGRAMS += \
27 tstAPI \
28 $(if $(VBOX_OSE),,tstOVF) \
29 $(if $(VBOX_WITH_XPCOM),tstVBoxAPILinux,tstVBoxAPIWin) \
30 $(if $(VBOX_WITH_RESOURCE_USAGE_API),tstCollector,) \
31 $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlParseBuffer,) \
32 $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlContextID,)
33 PROGRAMS.linux += \
34 $(if $(VBOX_WITH_USB),tstUSBProxyLinux,)
35 endif # !VBOX_WITH_TESTCASES
36endif # !VBOX_ONLY_SDK
37if defined(VBOX_ONLY_SDK) || !defined(VBOX_WITH_XPCOM)
38 INSTALLS += samplesMSCOM
39endif
40if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_XPCOM)
41 INSTALLS += samplesXPCOM
42endif
43
44
45#
46# The samples
47#
48samplesMSCOM_MODE = a+r,u+w
49samplesMSCOM_INST = $(INST_SDK)bindings/mscom/samples/
50samplesMSCOM_SOURCES = tstVBoxAPIWin.cpp
51
52samplesXPCOM_MODE = a+r,u+w
53samplesXPCOM_INST = $(INST_SDK)bindings/xpcom/samples/
54samplesXPCOM_SOURCES = tstVBoxAPILinux.cpp makefile.tstVBoxAPILinux=>Makefile
55
56
57#
58# tstAPI
59#
60tstAPI_TEMPLATE = VBOXMAINCLIENTEXE
61#tstAPI_INST = $(INST_SDK)bindings/gluecom/samples/
62tstAPI_SOURCES = tstAPI.cpp
63ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
64tstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
65else
66tstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
67endif
68ifdef VBOX_WITH_RESOURCE_USAGE_API
69tstAPI_DEFS += VBOX_WITH_RESOURCE_USAGE_API
70endif
71
72
73#
74# tstOVF
75#
76tstOVF_TEMPLATE = VBOXMAINCLIENTEXE
77#tstOVF_INST = $(INST_SDK)bindings/gluecom/samples/
78tstOVF_SOURCES = tstOVF.cpp
79ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
80tstOVF_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
81else
82tstOVF_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
83endif
84ifdef VBOX_WITH_RESOURCE_USAGE_API
85tstOVF_DEFS += VBOX_WITH_RESOURCE_USAGE_API
86endif
87
88ifndef VBOX_OSE
89#
90# OVF test data.
91#
92INSTALLS += ovf-testcases
93ovf-testcases_MODE = a+r,u+w
94ovf-testcases_INST = $(INST_BIN)ovf-testcases/
95ovf-testcases_SOURCES = \
96 ovf-dummy.vmdk \
97 ovf-joomla-0.9/joomla-1.1.4-ovf.ovf=>ovf-joomla-0.9/joomla-1.1.4-ovf.ovf \
98 ovf-winhost-audio-nodisks/WinXP.ovf=>ovf-winhost-audio-nodisks/WinXP.ovf \
99 ovf-winxp-vbox-sharedfolders/winxp.ovf=>ovf-winxp-vbox-sharedfolders/winxp.ovf
100endif
101
102
103#
104# tstVBoxAPILinux
105#
106# We only build the testcase here to make sure it builds.
107# It comes with a custom makefile which should be tested as well!
108#
109tstVBoxAPILinux_TEMPLATE = VBOXR3EXE
110tstVBoxAPILinux_SOURCES = tstVBoxAPILinux.cpp
111tstVBoxAPILinux_CXXFLAGS = -Wno-non-virtual-dtor -fshort-wchar
112tstVBoxAPILinux_LDFLAGS.solaris += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/../../..'
113ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
114 tstVBoxAPILinux_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
115endif
116tstVBoxAPILinux_INCS = \
117 $(VBOX_XPCOM_INCS) \
118 $(VBOX_PATH_SDK)/bindings/xpcom/include
119tstVBoxAPILinux_LIBPATH = $(LIBPATH_XPCOM)
120tstVBoxAPILinux_LIBS = $(LIB_XPCOM) $(LIB_RUNTIME)
121tstVBoxAPILinux_DEPS = \
122 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
123
124
125#
126# tstVBoxAPIWin
127#
128tstVBoxAPIWin_TEMPLATE = VBOXMAINCLIENTEXE
129tstVBoxAPIWin_SOURCES = \
130 tstVBoxAPIWin.cpp \
131 $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
132tstVBoxAPIWin_DEPS = \
133 $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
134
135
136#
137# tstCollector
138#
139tstCollector_TEMPLATE = VBOXMAINCLIENTEXE
140tstCollector_SOURCES = \
141 tstCollector.cpp \
142 ../src-server/Performance.cpp
143tstCollector_INCS = ../include
144tstCollector_DEFS += VBOX_COLLECTOR_TEST_CASE
145tstCollector_LDFLAGS.darwin += -lproc
146tstCollector_LDFLAGS.solaris += -lkstat
147tstCollector_LDFLAGS.win += psapi.lib powrprof.lib
148
149
150#
151# tstGuestCtrlParseBuffer
152#
153tstGuestCtrlParseBuffer_TEMPLATE = VBOXMAINCLIENTEXE
154tstGuestCtrlParseBuffer_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL
155tstGuestCtrlParseBuffer_SOURCES = \
156 tstGuestCtrlParseBuffer.cpp \
157 ../src-client/GuestCtrlPrivate.cpp
158tstGuestCtrlParseBuffer_INCS = ../include
159ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
160 tstGuestCtrlParseBuffer_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
161else
162 tstGuestCtrlParseBuffer_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
163endif
164
165
166#
167# tstGuestCtrlContextID
168#
169tstGuestCtrlContextID_TEMPLATE = VBOXMAINCLIENTEXE
170tstGuestCtrlContextID_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL
171tstGuestCtrlContextID_SOURCES = \
172 tstGuestCtrlContextID.cpp \
173 ../src-client/GuestCtrlPrivate.cpp
174tstGuestCtrlContextID_INCS = ../include
175ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
176 tstGuestCtrlContextID_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
177else
178 tstGuestCtrlContextID_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
179endif
180
181
182#
183# tstUSBProxyLinux
184#
185tstUSBProxyLinux_TEMPLATE = VBOXR3TSTNPEXE
186tstUSBProxyLinux_SOURCES = \
187 tstUSBProxyLinux.cpp \
188 ../src-server/linux/USBProxyServiceLinux.cpp \
189 ../src-server/linux/USBGetDevices.cpp
190tstUSBProxyLinux_INCS = \
191 . \
192 ../include \
193 $(VBOX_PATH_SDK)/bindings/xpcom/include \
194 $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
195 $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom
196tstUSBProxyLinux_DEFS = \
197 UNIT_TEST \
198 VBOX_WITH_USB \
199 VBOX_USB_WITH_SYSFS \
200 VBOX_WITH_XPCOM
201tstUSBProxyLinux_DEPS = \
202 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
203tstUSBProxyLinux_LIBS += \
204 $(PATH_OUT)/lib/USBLib.a \
205 $(PATH_OUT)/lib/VBoxCOM.a
206
207
208# generate rules.
209include $(FILE_KBUILD_SUB_FOOTER)
210
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