VirtualBox

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

Last change on this file since 42160 was 42160, checked in by vboxsync, 13 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: 5.4 KB
Line 
1# $Id: Makefile.kmk 42160 2012-07-16 11:41:10Z 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 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#
73# tstOVF
74#
75tstOVF_TEMPLATE = VBOXMAINCLIENTEXE
76#tstOVF_INST = $(INST_SDK)bindings/gluecom/samples/
77tstOVF_SOURCES = tstOVF.cpp
78ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
79tstOVF_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
80else
81tstOVF_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
82endif
83ifdef VBOX_WITH_RESOURCE_USAGE_API
84tstOVF_DEFS += VBOX_WITH_RESOURCE_USAGE_API
85endif
86
87ifndef VBOX_OSE
88#
89# OVF test data.
90#
91INSTALLS += ovf-testcases
92ovf-testcases_MODE = a+r,u+w
93ovf-testcases_INST = $(INST_BIN)ovf-testcases/
94ovf-testcases_SOURCES = \
95 ovf-dummy.vmdk \
96 ovf-joomla-0.9/joomla-1.1.4-ovf.ovf=>ovf-joomla-0.9/joomla-1.1.4-ovf.ovf \
97 ovf-winhost-audio-nodisks/WinXP.ovf=>ovf-winhost-audio-nodisks/WinXP.ovf \
98 ovf-winxp-vbox-sharedfolders/winxp.ovf=>ovf-winxp-vbox-sharedfolders/winxp.ovf
99endif
100
101
102#
103# tstVBoxAPILinux
104#
105# We only build the testcase here to make sure it builds.
106# It comes with a custom makefile which should be tested as well!
107#
108tstVBoxAPILinux_TEMPLATE = VBOXR3EXE
109tstVBoxAPILinux_SOURCES = tstVBoxAPILinux.cpp
110tstVBoxAPILinux_CXXFLAGS = -Wno-non-virtual-dtor -fshort-wchar
111tstVBoxAPILinux_LDFLAGS.solaris += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/../../..'
112ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
113 tstVBoxAPILinux_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
114endif
115tstVBoxAPILinux_INCS = \
116 $(VBOX_XPCOM_INCS) \
117 $(VBOX_PATH_SDK)/bindings/xpcom/include
118tstVBoxAPILinux_LIBPATH = $(LIBPATH_XPCOM)
119tstVBoxAPILinux_LIBS = $(LIB_XPCOM) $(LIB_RUNTIME)
120tstVBoxAPILinux_DEPS = \
121 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
122
123
124#
125# tstVBoxAPIWin
126#
127tstVBoxAPIWin_TEMPLATE = VBOXMAINCLIENTEXE
128tstVBoxAPIWin_SOURCES = \
129 tstVBoxAPIWin.cpp \
130 $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
131tstVBoxAPIWin_DEPS = \
132 $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
133
134
135#
136# tstCollector
137#
138tstCollector_TEMPLATE = VBOXMAINCLIENTEXE
139tstCollector_SOURCES = \
140 tstCollector.cpp \
141 ../src-server/Performance.cpp
142tstCollector_INCS = ../include
143tstCollector_DEFS += VBOX_COLLECTOR_TEST_CASE
144tstCollector_LDFLAGS.darwin += -lproc
145tstCollector_LDFLAGS.solaris += -lkstat
146tstCollector_LDFLAGS.win += psapi.lib powrprof.lib
147
148
149#
150# tstGuestCtrlParseBuffer
151#
152tstGuestCtrlParseBuffer_TEMPLATE = VBOXMAINCLIENTEXE
153tstGuestCtrlParseBuffer_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL
154tstGuestCtrlParseBuffer_SOURCES = \
155 tstGuestCtrlParseBuffer.cpp \
156 ../src-client/GuestCtrlPrivate.cpp
157tstGuestCtrlParseBuffer_INCS = ../include
158ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
159 tstGuestCtrlParseBuffer_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
160else
161 tstGuestCtrlParseBuffer_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
162endif
163
164
165#
166# tstUSBProxyLinux
167#
168tstUSBProxyLinux_TEMPLATE = VBOXR3TSTNPEXE
169tstUSBProxyLinux_SOURCES = \
170 tstUSBProxyLinux.cpp \
171 ../src-server/linux/USBProxyServiceLinux.cpp \
172 ../src-server/linux/USBGetDevices.cpp
173tstUSBProxyLinux_INCS = \
174 . \
175 ../include \
176 $(VBOX_PATH_SDK)/bindings/xpcom/include \
177 $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
178 $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom
179tstUSBProxyLinux_DEFS = \
180 UNIT_TEST \
181 VBOX_WITH_USB \
182 VBOX_USB_WITH_SYSFS \
183 VBOX_WITH_XPCOM
184tstUSBProxyLinux_DEPS = \
185 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
186tstUSBProxyLinux_LIBS += \
187 $(PATH_OUT)/lib/USBLib.a \
188 $(PATH_OUT)/lib/VBoxCOM.a
189
190
191# generate rules.
192include $(FILE_KBUILD_SUB_FOOTER)
193
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette