VirtualBox

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

Last change on this file since 47183 was 45052, checked in by vboxsync, 12 years ago

added new makefile for building sample tstVBoxAPIWin from SDK on Windows.

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