VirtualBox

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

Last change on this file since 36420 was 36420, checked in by vboxsync, 14 years ago

Main/USB/Linux: extend environment variables for selecting USB probing method and add skeleton testcase

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