Makefile.kmk revision e6e249a765867ec61336e3c64c3fee1845a67857
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# $Id$
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync## @file
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# Sub-Makefile for the VBox API testcases.
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync#
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync#
b72d3233df38e3122eda39b39a27b35c27209615vboxsync# Copyright (C) 2006-2007 Sun Microsystems, Inc.
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync#
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#
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.
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync#
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncifdef VBOX_KBUILD_HACKING
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncSUB_DEPTH = ../../../..
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncelse
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncDEPTH ?= ../../../..
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncSUB_DEPTH = ..
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncendif
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncinclude $(KBUILD_PATH)/subheader.kmk
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
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
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsyncendif
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
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsyncINSTALLS += samples
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync#
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync# The samples
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync#
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsyncsamples_INST = $(INST_SDK_SAMPLES)/API/
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsyncsamples_MODE = a+r,u+w
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsyncifeq ($(KBUILD_TARGET),win)
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync samples_SOURCES = tstVBoxAPIWin.cpp
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsyncelse
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync samples_SOURCES = tstVBoxAPILinux.cpp makefile.tstVBoxAPILinux=>Makefile
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync ifdef VBOX_WITH_TESTCASES
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync samples_SYMLINKS = tstVBoxAPILinux=>../../../tstVBoxAPILinux
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync endif
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsyncendif
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync#
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync# tstAPI
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync#
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
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncelse
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstAPI_DEPS = $(VBOX_PATH_SDK)/include/VirtualBox_XPCOM.h
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncendif
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncifdef VBOX_WITH_RESOURCE_USAGE_API
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstAPI_DEFS += VBOX_WITH_RESOURCE_USAGE_API
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncendif
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync#
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# tstVBoxAPILinux
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync#
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!
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync#
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) \
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync $(PATH_BIN)/sdk/include
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstVBoxAPILinux_LIBPATH = $(LIBPATH_XPCOM)
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstVBoxAPILinux_LIBS = $(LIB_XPCOM)
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstVBoxAPILinux_DEPS = \
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync $(VBOX_PATH_SDK)/include/VirtualBox_XPCOM.h
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync#
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# tstVBoxAPIWin
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync#
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstVBoxAPIWin_TEMPLATE = VBOXMAINCLIENTEXE
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstVBoxAPIWin_SOURCES = \
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync tstVBoxAPIWin.cpp \
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync $(PATH_BIN)/sdk/lib/VirtualBox_i.c
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstVBoxAPIWin_DEPS = \
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync $(VBOX_PATH_SDK)/include/VirtualBox.h
0368e9c310393e82ef37c480b6acbd0f107cf0edvboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync#
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# tstCollector
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync#
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstCollector_TEMPLATE = VBOXMAINCLIENTEXE
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsynctstCollector_SOURCES = \
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync tstCollector.cpp \
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync ../Performance.cpp
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctstCollector_INCS = ../include
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsynctstCollector_LDFLAGS.solaris += -lkstat
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsynctstCollector_LDFLAGS.win += wbemuuid.lib powrprof.lib
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync# generate rules.
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsyncinclude $(KBUILD_PATH)/subfooter.kmk
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync