VirtualBox

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

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

Makefiles: VBOX_KBUILD_HACKING -> VBOX_SINGLE_MAKEFILE

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