VirtualBox

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

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

Main/OVF: add testcase for host-specific audio drivers

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