VirtualBox

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

Last change on this file since 28823 was 28800, checked in by vboxsync, 15 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.9 KB
Line 
1# $Id: Makefile.kmk 28800 2010-04-27 08:22:32Z 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)" == "dmik"
26 PROGRAMS += \
27 tstAPI \
28 $(if $(VBOX_WITH_XPCOM),tstVBoxAPILinux,tstVBoxAPIWin) \
29 $(if $(VBOX_WITH_RESOURCE_USAGE_API),tstCollector,)
30 PROGRAMS.linux += \
31 $(if $(VBOX_WITH_USB),tstHostHardwareLinux,)
32 endif # !VBOX_WITH_TESTCASES
33endif # !VBOX_ONLY_SDK
34if defined(VBOX_ONLY_SDK) || !defined(VBOX_WITH_XPCOM)
35 INSTALLS += samplesMSCOM
36endif
37if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_XPCOM)
38 INSTALLS += samplesXPCOM
39endif
40
41
42#
43# The samples
44#
45samplesMSCOM_MODE = a+r,u+w
46samplesMSCOM_INST = $(INST_SDK)bindings/mscom/samples/
47samplesMSCOM_SOURCES = tstVBoxAPIWin.cpp
48
49samplesXPCOM_MODE = a+r,u+w
50samplesXPCOM_INST = $(INST_SDK)bindings/xpcom/samples/
51samplesXPCOM_SOURCES = tstVBoxAPILinux.cpp makefile.tstVBoxAPILinux=>Makefile
52
53
54#
55# tstAPI
56#
57tstAPI_TEMPLATE = VBOXMAINCLIENTEXE
58#tstAPI_INST = $(INST_SDK)bindings/gluecom/samples/
59tstAPI_SOURCES = tstAPI.cpp
60ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
61tstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
62else
63tstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
64endif
65ifdef VBOX_WITH_RESOURCE_USAGE_API
66tstAPI_DEFS += VBOX_WITH_RESOURCE_USAGE_API
67endif
68
69
70#
71# tstVBoxAPILinux
72#
73# We only build the testcase here to make sure it builds.
74# It comes with a custom makefile which should be tested as well!
75#
76tstVBoxAPILinux_TEMPLATE = VBOXR3EXE
77tstVBoxAPILinux_SOURCES = tstVBoxAPILinux.cpp
78tstVBoxAPILinux_CXXFLAGS = -Wno-non-virtual-dtor -fshort-wchar
79tstVBoxAPILinux_LDFLAGS.solaris += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/../../..'
80ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
81 tstVBoxAPILinux_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
82endif
83tstVBoxAPILinux_INCS = \
84 $(VBOX_XPCOM_INCS) \
85 $(VBOX_PATH_SDK)/bindings/xpcom/include
86tstVBoxAPILinux_LIBPATH = $(LIBPATH_XPCOM)
87tstVBoxAPILinux_LIBS = $(LIB_XPCOM) $(LIB_RUNTIME)
88tstVBoxAPILinux_DEPS = \
89 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
90
91
92#
93# tstVBoxAPIWin
94#
95tstVBoxAPIWin_TEMPLATE = VBOXMAINCLIENTEXE
96tstVBoxAPIWin_SOURCES = \
97 tstVBoxAPIWin.cpp \
98 $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
99tstVBoxAPIWin_DEPS = \
100 $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
101
102
103#
104# tstCollector
105#
106tstCollector_TEMPLATE = VBOXMAINCLIENTEXE
107tstCollector_SOURCES = \
108 tstCollector.cpp \
109 ../Performance.cpp
110tstCollector_INCS = ../include
111tstCollector_DEFS += VBOX_COLLECTOR_TEST_CASE
112tstCollector_LDFLAGS.darwin += -lproc
113tstCollector_LDFLAGS.solaris += -lkstat
114tstCollector_LDFLAGS.win += psapi.lib powrprof.lib
115
116
117
118#
119# tstHostHardwareLinux
120#
121tstHostHardwareLinux_TEMPLATE = VBOXR3TSTEXE
122tstHostHardwareLinux_SOURCES = \
123 tstHostHardwareLinux.cpp \
124 ../linux/HostHardwareLinux.cpp
125tstHostHardwareLinux_INCS = . ../include
126tstHostHardwareLinux_DEFS = \
127 VBOX_TEST_USB_LINUX \
128 TESTCASE \
129 $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
130 $(if $(VBOX_WITH_DBUS),$(if $(VBOX_USB_WITH_DBUS),VBOX_USB_WITH_DBUS,),) \
131 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,) \
132 $(if $(VBOX_USB_WITH_FAM),VBOX_USB_WITH_FAM,)
133tstHostHardwareLinux_LIBS += \
134 $(PATH_OUT)/lib/USBLib.a \
135 $(if $(VBOX_USB_WITH_FAM),fam,)
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