VirtualBox

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

Last change on this file since 11896 was 11896, checked in by vboxsync, 17 years ago

samples update, ship mscom examples

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.9 KB
Line 
1# $Id: Makefile.kmk 11896 2008-09-01 08:10:34Z 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
22ifdef VBOX_KBUILD_HACKING
23SUB_DEPTH = ../../../..
24else
25DEPTH ?= ../../../..
26SUB_DEPTH = ..
27endif
28include $(KBUILD_PATH)/subheader.kmk
29
30ifeq ($(KBUILD_TARGET),win)
31 NEED_MSCOM_SAMPLE = 1
32else
33 NEED_XPCOM_SAMPLE = 1
34endif
35
36ifdef VBOX_ONLY_SDK
37 NEED_MSCOM_SAMPLE = 1
38 NEED_XPCOM_SAMPLE = 1
39else
40 ifdef VBOX_WITH_TESTCASES
41 PROGRAMS += tstAPI
42 PROGRAMS.linux += tstVBoxAPILinux
43 # That testcase is actually not linux specific, it's generic XPCOM.
44 PROGRAMS.solaris += tstVBoxAPILinux
45 PROGRAMS.win += tstVBoxAPIWin
46 ifdef VBOX_WITH_RESOURCE_USAGE_API
47 PROGRAMS += tstCollector
48 endif
49 else ifeq ($(USERNAME),dmik)
50 PROGRAMS += tstAPI
51 PROGRAMS.linux += tstVBoxAPILinux
52 # That testcase is actually not linux specific, it's generic XPCOM.
53 PROGRAMS.solaris += tstVBoxAPILinux
54 PROGRAMS.win += tstVBoxAPIWin
55 endif # VBOX_WITH_TESTCASES
56endif # VBOX_ONLY_SDK
57
58ifdef NEED_MSCOM_SAMPLE
59 INSTALLS += samplesMSCOM
60endif
61
62ifdef NEED_XPCOM_SAMPLE
63 INSTALLS += samplesXPCOM
64endif
65
66# maybe, if will ship glue COM headers with SDK
67#INSTALLS += tstAPI
68
69#
70# The samples
71#
72samplesMSCOM_MODE = a+r,u+w
73samplesMSCOM_INST = $(INST_SDK)bindings/mscom/samples/
74samplesMSCOM_SOURCES = tstVBoxAPIWin.cpp
75
76samplesXPCOM_MODE = a+r,u+w
77samplesXPCOM_INST = $(INST_SDK)bindings/xpcom/samples/
78samplesXPCOM_SOURCES = tstVBoxAPILinux.cpp makefile.tstVBoxAPILinux=>Makefile
79
80#
81# tstAPI
82#
83tstAPI_TEMPLATE = VBOXMAINCLIENTEXE
84#tstAPI_INST = $(INST_SDK)bindings/gluecom/samples/
85tstAPI_SOURCES = tstAPI.cpp
86ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
87tstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
88else
89tstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
90endif
91ifdef VBOX_WITH_RESOURCE_USAGE_API
92tstAPI_DEFS += VBOX_WITH_RESOURCE_USAGE_API
93endif
94
95
96#
97# tstVBoxAPILinux
98#
99# We only build the testcase here to make sure it builds.
100# It comes with a custom makefile which should be tested as well!
101#
102tstVBoxAPILinux_TEMPLATE = VBOXR3
103tstVBoxAPILinux_SOURCES = tstVBoxAPILinux.cpp
104tstVBoxAPILinux_CXXFLAGS = -Wno-non-virtual-dtor -fshort-wchar
105tstVBoxAPILinux_LDFLAGS.solaris += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/../../..'
106ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
107 tstVBoxAPILinux_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
108endif
109tstVBoxAPILinux_INCS = \
110 $(VBOX_XPCOM_INCS) \
111 $(VBOX_PATH_SDK)/bindings/xpcom/include
112tstVBoxAPILinux_LIBPATH = $(LIBPATH_XPCOM)
113tstVBoxAPILinux_LIBS = $(LIB_XPCOM)
114tstVBoxAPILinux_DEPS = \
115 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
116
117#
118# tstVBoxAPIWin
119#
120tstVBoxAPIWin_TEMPLATE = VBOXMAINCLIENTEXE
121tstVBoxAPIWin_SOURCES = \
122 tstVBoxAPIWin.cpp \
123 $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
124tstVBoxAPIWin_DEPS = \
125 $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
126
127#
128# tstCollector
129#
130tstCollector_TEMPLATE = VBOXMAINCLIENTEXE
131tstCollector_SOURCES = \
132 tstCollector.cpp \
133 ../Performance.cpp
134tstCollector_INCS = ../include
135tstCollector_LDFLAGS.darwin += -lproc
136tstCollector_LDFLAGS.solaris += -lkstat
137tstCollector_LDFLAGS.win += wbemuuid.lib powrprof.lib
138
139
140# generate rules.
141include $(KBUILD_PATH)/subfooter.kmk
142
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