1 | # $Id: Makefile.kmk 11612 2008-08-25 13:52: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 |
|
---|
22 | ifdef VBOX_KBUILD_HACKING
|
---|
23 | SUB_DEPTH = ../../../..
|
---|
24 | else
|
---|
25 | DEPTH ?= ../../../..
|
---|
26 | SUB_DEPTH = ..
|
---|
27 | endif
|
---|
28 | include $(KBUILD_PATH)/subheader.kmk
|
---|
29 |
|
---|
30 | ifdef VBOX_WITH_TESTCASES
|
---|
31 | PROGRAMS += tstAPI
|
---|
32 | PROGRAMS.linux += tstVBoxAPILinux
|
---|
33 | # That testcase is actually not linux specific, it's generic XPCOM.
|
---|
34 | PROGRAMS.solaris += tstVBoxAPILinux
|
---|
35 | PROGRAMS.win += tstVBoxAPIWin
|
---|
36 | ifdef VBOX_WITH_RESOURCE_USAGE_API
|
---|
37 | PROGRAMS += tstCollector
|
---|
38 | endif
|
---|
39 | else ifeq ($(USERNAME),dmik)
|
---|
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 | endif # VBOX_WITH_TESTCASES
|
---|
46 |
|
---|
47 | INSTALLS += samples
|
---|
48 |
|
---|
49 | #
|
---|
50 | # The samples
|
---|
51 | #
|
---|
52 | samples_INST = $(INST_SDK_SAMPLES)/API/
|
---|
53 | samples_MODE = a+r,u+w
|
---|
54 | ifeq ($(KBUILD_TARGET),win)
|
---|
55 | samples_SOURCES = tstVBoxAPIWin.cpp
|
---|
56 | else
|
---|
57 | samples_SOURCES = tstVBoxAPILinux.cpp makefile.tstVBoxAPILinux=>Makefile
|
---|
58 | ifdef VBOX_WITH_TESTCASES
|
---|
59 | samples_SYMLINKS = tstVBoxAPILinux=>../../../tstVBoxAPILinux
|
---|
60 | endif
|
---|
61 | endif
|
---|
62 |
|
---|
63 | #
|
---|
64 | # tstAPI
|
---|
65 | #
|
---|
66 | tstAPI_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
67 | tstAPI_SOURCES = tstAPI.cpp
|
---|
68 | ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
|
---|
69 | tstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
70 | else
|
---|
71 | tstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
72 | endif
|
---|
73 | ifdef VBOX_WITH_RESOURCE_USAGE_API
|
---|
74 | tstAPI_DEFS += VBOX_WITH_RESOURCE_USAGE_API
|
---|
75 | endif
|
---|
76 |
|
---|
77 |
|
---|
78 | #
|
---|
79 | # tstVBoxAPILinux
|
---|
80 | #
|
---|
81 | # We only build the testcase here to make sure it builds.
|
---|
82 | # It comes with a custom makefile which should be tested as well!
|
---|
83 | #
|
---|
84 | tstVBoxAPILinux_TEMPLATE = VBOXR3
|
---|
85 | tstVBoxAPILinux_SOURCES = tstVBoxAPILinux.cpp
|
---|
86 | tstVBoxAPILinux_CXXFLAGS = -Wno-non-virtual-dtor -fshort-wchar
|
---|
87 | tstVBoxAPILinux_LDFLAGS.solaris += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/../../..'
|
---|
88 | ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
|
---|
89 | tstVBoxAPILinux_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
|
---|
90 | endif
|
---|
91 | tstVBoxAPILinux_INCS = \
|
---|
92 | $(VBOX_XPCOM_INCS) \
|
---|
93 | $(PATH_BIN)/sdk/include
|
---|
94 | tstVBoxAPILinux_LIBPATH = $(LIBPATH_XPCOM)
|
---|
95 | tstVBoxAPILinux_LIBS = $(LIB_XPCOM)
|
---|
96 | tstVBoxAPILinux_DEPS = \
|
---|
97 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
98 |
|
---|
99 | #
|
---|
100 | # tstVBoxAPIWin
|
---|
101 | #
|
---|
102 | tstVBoxAPIWin_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
103 | tstVBoxAPIWin_SOURCES = \
|
---|
104 | tstVBoxAPIWin.cpp \
|
---|
105 | $(PATH_BIN)/sdk/lib/VirtualBox_i.c
|
---|
106 | tstVBoxAPIWin_DEPS = \
|
---|
107 | $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
108 |
|
---|
109 | #
|
---|
110 | # tstCollector
|
---|
111 | #
|
---|
112 | tstCollector_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
113 | tstCollector_SOURCES = \
|
---|
114 | tstCollector.cpp \
|
---|
115 | ../Performance.cpp
|
---|
116 | tstCollector_INCS = ../include
|
---|
117 | tstCollector_LDFLAGS.solaris += -lkstat
|
---|
118 | tstCollector_LDFLAGS.win += wbemuuid.lib powrprof.lib
|
---|
119 |
|
---|
120 |
|
---|
121 | # generate rules.
|
---|
122 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
123 |
|
---|