VirtualBox

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

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

Main: fix a burn related to Linux USB changes, fourth try

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.2 KB
Line 
1# $Id: Makefile.kmk 14723 2008-11-27 17:18:37Z 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_OSE),,$(if $(VBOX_USB_WITH_SYSFS),tstUSBLinux,))
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# tstUSBLinux
123#
124tstUSBLinux_TEMPLATE = VBOXR3TSTEXE
125tstUSBLinux_SOURCES = \
126 tstUSBLinux.cpp \
127 ../linux/USBProxyServiceLinux.cpp
128tstUSBLinux_INCS = . ../include
129tstUSBLinux_DEFS = \
130 VBOX_TEST_USB_LINUX \
131 $(if $(VBOX_WITHOUT_LINUX_COMPILER_H),VBOX_WITHOUT_LINUX_COMPILER_H,) \
132 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,)
133tstUSBLinux_LIBS += $(PATH_OUT)/lib/USBLib.a
134ifeq ($(KBUILD_TARGET),linux)
135 # Why on earth does this not work? Config.kmk has an identical statement.
136 VBOX_LIBHAL_LDFLAGS ?= $(shell pkg-config hal --libs)
137endif
138tstUSBLinux_CFLAGS += $(if $(VBOX_WITH_LIBHAL),$(VBOX_LIBHAL_CFLAGS),)
139tstUSBLinux_CXXFLAGS += $(if $(VBOX_WITH_LIBHAL),$(VBOX_LIBHAL_CXXFLAGS),)
140tstUSBLinux_LDFLAGS += $(if $(VBOX_WITH_LIBHAL),$(VBOX_LIBHAL_LDFLAGS),)
141
142
143# generate rules.
144include $(KBUILD_PATH)/subfooter.kmk
145
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