Makefile.kmk revision e6e249a765867ec61336e3c64c3fee1845a67857
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# Sub-Makefile for the VBox API testcases.
b72d3233df38e3122eda39b39a27b35c27209615vboxsync# Copyright (C) 2006-2007 Sun Microsystems, Inc.
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# available from http://www.virtualbox.org. This file is free software;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# you can redistribute it and/or modify it under the terms of the GNU
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# General Public License (GPL) as published by the Free Software
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# additional information or have any questions.
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncifdef VBOX_KBUILD_HACKING
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncSUB_DEPTH = ../../../..
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncDEPTH ?= ../../../..
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncSUB_DEPTH = ..
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncinclude $(KBUILD_PATH)/subheader.kmk
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncifdef VBOX_WITH_TESTCASES
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync PROGRAMS += tstAPI
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync PROGRAMS.linux += tstVBoxAPILinux
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync # That testcase is actually not linux specific, it's generic XPCOM.
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync PROGRAMS.solaris += tstVBoxAPILinux
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync PROGRAMS.win += tstVBoxAPIWin
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncifdef VBOX_WITH_RESOURCE_USAGE_API
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync PROGRAMS += tstCollector
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsyncelse ifeq ($(USERNAME),dmik)
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync PROGRAMS += tstAPI
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync PROGRAMS.linux += tstVBoxAPILinux
b72d3233df38e3122eda39b39a27b35c27209615vboxsync # That testcase is actually not linux specific, it's generic XPCOM.
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync PROGRAMS.solaris += tstVBoxAPILinux
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync PROGRAMS.win += tstVBoxAPIWin
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsyncendif # VBOX_WITH_TESTCASES
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsyncINSTALLS += samples
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync# The samples
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsyncsamples_INST = $(INST_SDK_SAMPLES)/API/
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsyncsamples_MODE = a+r,u+w
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsyncifeq ($(KBUILD_TARGET),win)
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync samples_SOURCES = tstVBoxAPIWin.cpp
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync samples_SOURCES = tstVBoxAPILinux.cpp makefile.tstVBoxAPILinux=>Makefile
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync ifdef VBOX_WITH_TESTCASES
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync samples_SYMLINKS = tstVBoxAPILinux=>../../../tstVBoxAPILinux
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsynctstAPI_TEMPLATE = VBOXMAINCLIENTEXE
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsynctstAPI_SOURCES = tstAPI.cpp
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstAPI_DEPS = $(VBOX_PATH_SDK)/include/VirtualBox.h
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstAPI_DEPS = $(VBOX_PATH_SDK)/include/VirtualBox_XPCOM.h
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncifdef VBOX_WITH_RESOURCE_USAGE_API
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstAPI_DEFS += VBOX_WITH_RESOURCE_USAGE_API
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# tstVBoxAPILinux
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync# We only build the testcase here to make sure it builds.
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync# It comes with a custom makefile which should be tested as well!
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsynctstVBoxAPILinux_TEMPLATE = VBOXR3
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsynctstVBoxAPILinux_SOURCES = tstVBoxAPILinux.cpp
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsynctstVBoxAPILinux_CXXFLAGS = -Wno-non-virtual-dtor -fshort-wchar
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsynctstVBoxAPILinux_LDFLAGS.solaris += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/../../..'
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstVBoxAPILinux_INCS = \
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync $(VBOX_XPCOM_INCS) \
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstVBoxAPILinux_LIBPATH = $(LIBPATH_XPCOM)
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstVBoxAPILinux_LIBS = $(LIB_XPCOM)
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstVBoxAPILinux_DEPS = \
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# tstVBoxAPIWin
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstVBoxAPIWin_TEMPLATE = VBOXMAINCLIENTEXE
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstVBoxAPIWin_SOURCES = \
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstVBoxAPIWin_DEPS = \
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# tstCollector
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstCollector_TEMPLATE = VBOXMAINCLIENTEXE
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsynctstCollector_SOURCES = \
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstCollector_INCS = ../include
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsynctstCollector_LDFLAGS.win += wbemuuid.lib powrprof.lib
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# generate rules.
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncinclude $(KBUILD_PATH)/subfooter.kmk