VirtualBox

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

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

Main: Added testcase for guest control output buffer parsing.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.0 KB
Line 
1# $Id: Makefile.kmk 37883 2011-07-12 09:53:58Z vboxsync $
2## @file
3# Sub-Makefile for the VBox API testcases.
4#
5
6#
7# Copyright (C) 2006-2011 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 $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlParseBuffer,)
32 PROGRAMS.linux += \
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# tstGuestCtrlParseBuffer
148#
149tstGuestCtrlParseBuffer_TEMPLATE = VBOXR3TSTNPEXE
150tstGuestCtrlParseBuffer_SOURCES = tstGuestCtrlParseBuffer.cpp
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
176
177# generate rules.
178include $(KBUILD_PATH)/subfooter.kmk
179
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