# $Id: Makefile.kmk 11467 2008-08-18 14:52:12Z vboxsync $ ## @file # Sub-Makefile for the VBox API testcases. # # # Copyright (C) 2006-2007 Sun Microsystems, Inc. # # This file is part of VirtualBox Open Source Edition (OSE), as # available from http://www.virtualbox.org. This file is free software; # you can redistribute it and/or modify it under the terms of the GNU # General Public License (GPL) as published by the Free Software # Foundation, in version 2 as it comes in the "COPYING" file of the # VirtualBox OSE distribution. VirtualBox OSE is distributed in the # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. # # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa # Clara, CA 95054 USA or visit http://www.sun.com if you need # additional information or have any questions. # ifdef VBOX_KBUILD_HACKING SUB_DEPTH = ../../../.. else DEPTH ?= ../../../.. SUB_DEPTH = .. endif include $(KBUILD_PATH)/subheader.kmk ifdef VBOX_WITH_TESTCASES PROGRAMS += tstAPI PROGRAMS.linux += tstVBoxAPILinux # That testcase is actually not linux specific, it's generic XPCOM. PROGRAMS.solaris += tstVBoxAPILinux PROGRAMS.win += tstVBoxAPIWin ifdef VBOX_WITH_RESOURCE_USAGE_API PROGRAMS += tstCollector endif else ifeq ($(USERNAME),dmik) PROGRAMS += tstAPI PROGRAMS.linux += tstVBoxAPILinux # That testcase is actually not linux specific, it's generic XPCOM. PROGRAMS.solaris += tstVBoxAPILinux PROGRAMS.win += tstVBoxAPIWin endif # VBOX_WITH_TESTCASES INSTALLS += samples # # The samples # samples_INST = $(INST_SDK_SAMPLES)/API/ samples_MODE = a+r,u+w ifeq ($(KBUILD_TARGET),win) samples_SOURCES = tstVBoxAPIWin.cpp else samples_SOURCES = tstVBoxAPILinux.cpp makefile.tstVBoxAPILinux=>Makefile ifdef VBOX_WITH_TESTCASES samples_SYMLINKS = tstVBoxAPILinux=>../../../tstVBoxAPILinux endif endif # # tstAPI # tstAPI_TEMPLATE = VBOXMAINCLIENTEXE tstAPI_SOURCES = tstAPI.cpp ifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template. tstAPI_DEPS = $(VBOX_PATH_SDK)/include/VirtualBox.h else tstAPI_DEPS = $(VBOX_PATH_SDK)/include/VirtualBox_XPCOM.h endif ifdef VBOX_WITH_RESOURCE_USAGE_API tstAPI_DEFS += VBOX_WITH_RESOURCE_USAGE_API endif # # tstVBoxAPILinux # # We only build the testcase here to make sure it builds. # It comes with a custom makefile which should be tested as well! # tstVBoxAPILinux_TEMPLATE = VBOXR3 tstVBoxAPILinux_SOURCES = tstVBoxAPILinux.cpp tstVBoxAPILinux_CXXFLAGS = -Wno-non-virtual-dtor -fshort-wchar tstVBoxAPILinux_LDFLAGS.solaris += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/../../..' tstVBoxAPILinux_INCS = \ $(VBOX_XPCOM_INCS) \ $(PATH_BIN)/sdk/include tstVBoxAPILinux_LIBPATH = $(LIBPATH_XPCOM) tstVBoxAPILinux_LIBS = $(LIB_XPCOM) tstVBoxAPILinux_DEPS = \ $(VBOX_PATH_SDK)/include/VirtualBox_XPCOM.h # # tstVBoxAPIWin # tstVBoxAPIWin_TEMPLATE = VBOXMAINCLIENTEXE tstVBoxAPIWin_SOURCES = \ tstVBoxAPIWin.cpp \ $(PATH_BIN)/sdk/lib/VirtualBox_i.c tstVBoxAPIWin_DEPS = \ $(VBOX_PATH_SDK)/include/VirtualBox.h # # tstCollector # tstCollector_TEMPLATE = VBOXMAINCLIENTEXE tstCollector_SOURCES = \ tstCollector.cpp \ ../Performance.cpp tstCollector_INCS = ../include tstCollector_LDFLAGS.solaris += -lkstat tstCollector_LDFLAGS.win += wbemuuid.lib powrprof.lib # generate rules. include $(KBUILD_PATH)/subfooter.kmk