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