VirtualBox

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

Last change on this file since 22875 was 18866, checked in by vboxsync, 16 years ago

*: VBOX_WITHOUT_LINUX_COMPILER_H -> VBOX_WITH_LINUX_COMPILER_H. TODO: regenerate RDP/client/configure.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.9 KB
Line 
1# $Id: Makefile.kmk 18866 2009-04-10 14:13:10Z vboxsync $
2## @file
3# Sub-Makefile for the VBox API testcases.
4#
5
6#
7# Copyright (C) 2006-2007 Sun Microsystems, Inc.
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# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22SUB_DEPTH = ../../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25#
26# Target and globals (small mess)
27#
28ifndef VBOX_ONLY_SDK
29 if defined(VBOX_WITH_TESTCASES) || "$(USERNAME)" == "dmik"
30 PROGRAMS += \
31 tstAPI \
32 $(if $(VBOX_WITH_XPCOM),tstVBoxAPILinux,tstVBoxAPIWin) \
33 $(if $(VBOX_WITH_RESOURCE_USAGE_API),tstCollector,)
34 PROGRAMS.linux += \
35 $(if $(VBOX_WITH_USB),tstHostHardwareLinux,)
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
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# tstVBoxAPILinux
76#
77# We only build the testcase here to make sure it builds.
78# It comes with a custom makefile which should be tested as well!
79#
80tstVBoxAPILinux_TEMPLATE = VBOXR3EXE
81tstVBoxAPILinux_SOURCES = tstVBoxAPILinux.cpp
82tstVBoxAPILinux_CXXFLAGS = -Wno-non-virtual-dtor -fshort-wchar
83tstVBoxAPILinux_LDFLAGS.solaris += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/../../..'
84ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
85 tstVBoxAPILinux_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
86endif
87tstVBoxAPILinux_INCS = \
88 $(VBOX_XPCOM_INCS) \
89 $(VBOX_PATH_SDK)/bindings/xpcom/include
90tstVBoxAPILinux_LIBPATH = $(LIBPATH_XPCOM)
91tstVBoxAPILinux_LIBS = $(LIB_XPCOM) $(LIB_RUNTIME)
92tstVBoxAPILinux_DEPS = \
93 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
94
95
96#
97# tstVBoxAPIWin
98#
99tstVBoxAPIWin_TEMPLATE = VBOXMAINCLIENTEXE
100tstVBoxAPIWin_SOURCES = \
101 tstVBoxAPIWin.cpp \
102 $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
103tstVBoxAPIWin_DEPS = \
104 $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
105
106
107#
108# tstCollector
109#
110tstCollector_TEMPLATE = VBOXMAINCLIENTEXE
111tstCollector_SOURCES = \
112 tstCollector.cpp \
113 ../Performance.cpp
114tstCollector_INCS = ../include
115tstCollector_LDFLAGS.darwin += -lproc
116tstCollector_LDFLAGS.solaris += -lkstat
117tstCollector_LDFLAGS.win += psapi.lib powrprof.lib
118
119
120
121#
122# tstHostHardwareLinux
123#
124tstHostHardwareLinux_TEMPLATE = VBOXR3TSTEXE
125tstHostHardwareLinux_SOURCES = \
126 tstHostHardwareLinux.cpp \
127 ../linux/HostHardwareLinux.cpp \
128 ../linux/vbox-dbus.cpp
129tstHostHardwareLinux_INCS = . ../include
130tstHostHardwareLinux_DEFS = \
131 VBOX_TEST_USB_LINUX \
132 $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
133 $(if $(VBOX_WITH_DBUS),VBOX_WITH_DBUS,) \
134 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,)
135tstHostHardwareLinux_LIBS += $(PATH_OUT)/lib/USBLib.a
136
137
138# generate rules.
139include $(KBUILD_PATH)/subfooter.kmk
140
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