1 | # $Id: Makefile.kmk 8155 2008-04-18 15:16:47Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # 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 | DEPTH ?= ../../../..
|
---|
23 | SUB_DEPTH = ..
|
---|
24 | include $(PATH_KBUILD)/subheader.kmk
|
---|
25 |
|
---|
26 | ifdef VBOX_WITH_TESTCASES
|
---|
27 | PROGRAMS += tstAPI
|
---|
28 | PROGRAMS.linux += tstVBoxAPILinux
|
---|
29 | PROGRAMS.win += tstVBoxAPIWin
|
---|
30 | else ifeq ($(USERNAME),dmik)
|
---|
31 | PROGRAMS += tstAPI
|
---|
32 | PROGRAMS.linux += tstVBoxAPILinux
|
---|
33 | PROGRAMS.win += tstVBoxAPIWin
|
---|
34 | endif # VBOX_WITH_TESTCASES
|
---|
35 |
|
---|
36 | INSTALLS += samples
|
---|
37 |
|
---|
38 | #
|
---|
39 | # The samples
|
---|
40 | #
|
---|
41 | samples_INST = $(INST_SDK_SAMPLES)/API/
|
---|
42 | samples_MODE = a+r,u+w
|
---|
43 | ifeq ($(BUILD_TARGET),win)
|
---|
44 | samples_SOURCES = tstVBoxAPIWin.cpp
|
---|
45 | else
|
---|
46 | samples_SOURCES = tstVBoxAPILinux.cpp makefile.tstVBoxAPILinux=>Makefile
|
---|
47 | ifdef VBOX_WITH_TESTCASES
|
---|
48 | samples_SYMLINKS = tstVBoxAPILinux=>../../../tstVBoxAPILinux
|
---|
49 | endif
|
---|
50 | endif
|
---|
51 |
|
---|
52 | #
|
---|
53 | # tstAPI
|
---|
54 | #
|
---|
55 | tstAPI_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
56 | tstAPI_SOURCES = tstAPI.cpp
|
---|
57 | ifeq ($(BUILD_TARGET),win) ## @todo just add this to the template.
|
---|
58 | tstAPI_DEPS = $(VBOX_PATH_SDK)/include/VirtualBox.h
|
---|
59 | else
|
---|
60 | tstAPI_DEPS = $(VBOX_PATH_SDK)/include/VirtualBox_XPCOM.h
|
---|
61 | endif
|
---|
62 |
|
---|
63 |
|
---|
64 | #
|
---|
65 | # tstVBoxAPILinux
|
---|
66 | #
|
---|
67 | # We only build the testcase here to make sure it builds.
|
---|
68 | # It comes with a custom makefile which should be tested as well!
|
---|
69 | #
|
---|
70 | tstVBoxAPILinux_TEMPLATE = VBOXR3
|
---|
71 | tstVBoxAPILinux_SOURCES = tstVBoxAPILinux.cpp
|
---|
72 | tstVBoxAPILinux_CXXFLAGS = -Wno-non-virtual-dtor -fshort-wchar
|
---|
73 | tstVBoxAPILinux_INCS = \
|
---|
74 | $(VBOX_XPCOM_INCS) \
|
---|
75 | $(PATH_BIN)/sdk/include
|
---|
76 | tstVBoxAPILinux_LIBPATH = $(LIBPATH_XPCOM)
|
---|
77 | tstVBoxAPILinux_LIBS = $(LIB_XPCOM)
|
---|
78 | tstVBoxAPILinux_DEPS = \
|
---|
79 | $(VBOX_PATH_SDK)/include/VirtualBox_XPCOM.h
|
---|
80 |
|
---|
81 | #
|
---|
82 | # tstVBoxAPIWin
|
---|
83 | #
|
---|
84 | tstVBoxAPIWin_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
85 | tstVBoxAPIWin_SOURCES = \
|
---|
86 | tstVBoxAPIWin.cpp \
|
---|
87 | $(PATH_BIN)/sdk/lib/VirtualBox_i.c
|
---|
88 | tstVBoxAPIWin_DEPS = \
|
---|
89 | $(VBOX_PATH_SDK)/include/VirtualBox.h
|
---|
90 |
|
---|
91 | # generate rules.
|
---|
92 | include $(PATH_KBUILD)/subfooter.kmk
|
---|
93 |
|
---|