Makefile.kmk revision ef6d793f446560d7c7f073687b6256955a8a43f6
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# $Id$
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync## @file
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# Sub-Makefile for the VBox API testcases.
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# Copyright (C) 2006-2007 Sun Microsystems, Inc.
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# available from http://www.virtualbox.org. This file is free software;
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# you can redistribute it and/or modify it under the terms of the GNU
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# General Public License (GPL) as published by the Free Software
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsync# additional information or have any questions.
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsync#
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsync
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsyncSUB_DEPTH = ../../../..
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsyncinclude $(KBUILD_PATH)/subheader.kmk
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsync
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsync#
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# Target and globals (small mess)
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncifndef VBOX_ONLY_SDK
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync if defined(VBOX_WITH_TESTCASES) || "$(USERNAME)" == "dmik"
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync PROGRAMS += \
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync tstAPI \
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync $(if $(VBOX_WITH_XPCOM),tstVBoxAPILinux,tstVBoxAPIWin) \
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync $(if $(VBOX_WITH_RESOURCE_USAGE_API),tstCollector,)
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync PROGRAMS.linux += \
032a52c5b2984e26e84c2961f8f7f98a3954c8f2vboxsync $(if $(VBOX_WITH_USB),tstHostHardwareLinux,)
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync endif # !VBOX_WITH_TESTCASES
590bfe12ce22cd3716448fbb9f4dc51664bfe5e2vboxsyncendif # !VBOX_ONLY_SDK
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncif defined(VBOX_ONLY_SDK) || !defined(VBOX_WITH_XPCOM)
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync INSTALLS += samplesMSCOM
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncendif
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncif defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_XPCOM)
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync INSTALLS += samplesXPCOM
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncendif
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# The samples
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncsamplesMSCOM_MODE = a+r,u+w
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncsamplesMSCOM_INST = $(INST_SDK)bindings/mscom/samples/
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncsamplesMSCOM_SOURCES = tstVBoxAPIWin.cpp
c2046db2cc346cc299f0cd9b2d1e160179159cfcvboxsync
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsyncsamplesXPCOM_MODE = a+r,u+w
c2046db2cc346cc299f0cd9b2d1e160179159cfcvboxsyncsamplesXPCOM_INST = $(INST_SDK)bindings/xpcom/samples/
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncsamplesXPCOM_SOURCES = tstVBoxAPILinux.cpp makefile.tstVBoxAPILinux=>Makefile
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync
c2046db2cc346cc299f0cd9b2d1e160179159cfcvboxsync
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
c2046db2cc346cc299f0cd9b2d1e160179159cfcvboxsync# tstAPI
c2046db2cc346cc299f0cd9b2d1e160179159cfcvboxsync#
c2046db2cc346cc299f0cd9b2d1e160179159cfcvboxsynctstAPI_TEMPLATE = VBOXMAINCLIENTEXE
c2046db2cc346cc299f0cd9b2d1e160179159cfcvboxsync#tstAPI_INST = $(INST_SDK)bindings/gluecom/samples/
c2046db2cc346cc299f0cd9b2d1e160179159cfcvboxsynctstAPI_SOURCES = tstAPI.cpp
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncifeq ($(KBUILD_TARGET),win) ## @todo just add this to the template.
044af0d1e6474076366759db86f101778c5f20ccvboxsynctstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
044af0d1e6474076366759db86f101778c5f20ccvboxsyncelse
044af0d1e6474076366759db86f101778c5f20ccvboxsynctstAPI_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
044af0d1e6474076366759db86f101778c5f20ccvboxsyncendif
044af0d1e6474076366759db86f101778c5f20ccvboxsyncifdef VBOX_WITH_RESOURCE_USAGE_API
044af0d1e6474076366759db86f101778c5f20ccvboxsynctstAPI_DEFS += VBOX_WITH_RESOURCE_USAGE_API
044af0d1e6474076366759db86f101778c5f20ccvboxsyncendif
044af0d1e6474076366759db86f101778c5f20ccvboxsync
044af0d1e6474076366759db86f101778c5f20ccvboxsync
044af0d1e6474076366759db86f101778c5f20ccvboxsync#
044af0d1e6474076366759db86f101778c5f20ccvboxsync# tstVBoxAPILinux
044af0d1e6474076366759db86f101778c5f20ccvboxsync#
044af0d1e6474076366759db86f101778c5f20ccvboxsync# We only build the testcase here to make sure it builds.
044af0d1e6474076366759db86f101778c5f20ccvboxsync# It comes with a custom makefile which should be tested as well!
044af0d1e6474076366759db86f101778c5f20ccvboxsync#
044af0d1e6474076366759db86f101778c5f20ccvboxsynctstVBoxAPILinux_TEMPLATE = VBOXR3EXE
044af0d1e6474076366759db86f101778c5f20ccvboxsynctstVBoxAPILinux_SOURCES = tstVBoxAPILinux.cpp
044af0d1e6474076366759db86f101778c5f20ccvboxsynctstVBoxAPILinux_CXXFLAGS = -Wno-non-virtual-dtor -fshort-wchar
044af0d1e6474076366759db86f101778c5f20ccvboxsynctstVBoxAPILinux_LDFLAGS.solaris += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/../../..'
044af0d1e6474076366759db86f101778c5f20ccvboxsyncifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
044af0d1e6474076366759db86f101778c5f20ccvboxsync tstVBoxAPILinux_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
044af0d1e6474076366759db86f101778c5f20ccvboxsyncendif
044af0d1e6474076366759db86f101778c5f20ccvboxsynctstVBoxAPILinux_INCS = \
044af0d1e6474076366759db86f101778c5f20ccvboxsync $(VBOX_XPCOM_INCS) \
044af0d1e6474076366759db86f101778c5f20ccvboxsync $(VBOX_PATH_SDK)/bindings/xpcom/include
044af0d1e6474076366759db86f101778c5f20ccvboxsynctstVBoxAPILinux_LIBPATH = $(LIBPATH_XPCOM)
044af0d1e6474076366759db86f101778c5f20ccvboxsynctstVBoxAPILinux_LIBS = $(LIB_XPCOM) $(LIB_RUNTIME)
044af0d1e6474076366759db86f101778c5f20ccvboxsynctstVBoxAPILinux_DEPS = \
044af0d1e6474076366759db86f101778c5f20ccvboxsync $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
044af0d1e6474076366759db86f101778c5f20ccvboxsync
044af0d1e6474076366759db86f101778c5f20ccvboxsync
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
044af0d1e6474076366759db86f101778c5f20ccvboxsync# tstVBoxAPIWin
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsynctstVBoxAPIWin_TEMPLATE = VBOXMAINCLIENTEXE
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsynctstVBoxAPIWin_SOURCES = \
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync tstVBoxAPIWin.cpp \
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsynctstVBoxAPIWin_DEPS = \
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
044af0d1e6474076366759db86f101778c5f20ccvboxsync# tstCollector
044af0d1e6474076366759db86f101778c5f20ccvboxsync#
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsynctstCollector_TEMPLATE = VBOXMAINCLIENTEXE
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsynctstCollector_SOURCES = \
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync tstCollector.cpp \
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync ../Performance.cpp
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsynctstCollector_INCS = ../include
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsynctstCollector_LDFLAGS.darwin += -lproc
044af0d1e6474076366759db86f101778c5f20ccvboxsynctstCollector_LDFLAGS.solaris += -lkstat
044af0d1e6474076366759db86f101778c5f20ccvboxsynctstCollector_LDFLAGS.win += psapi.lib powrprof.lib
044af0d1e6474076366759db86f101778c5f20ccvboxsync
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# tstHostHardwareLinux
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsynctstHostHardwareLinux_TEMPLATE = VBOXR3TSTEXE
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsynctstHostHardwareLinux_SOURCES = \
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync tstHostHardwareLinux.cpp \
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync ../linux/HostHardwareLinux.cpp \
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync ../linux/vbox-dbus.cpp
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsynctstHostHardwareLinux_INCS = . ../include
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsynctstHostHardwareLinux_DEFS = \
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync VBOX_TEST_USB_LINUX \
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync TESTCASE \
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync $(if $(VBOX_WITH_DBUS),VBOX_WITH_DBUS,) \
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,)
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsynctstHostHardwareLinux_LIBS += $(PATH_OUT)/lib/USBLib.a
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync
a1df400bbe9d64aad400442e56eb637019300a5evboxsync# generate rules.
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsyncinclude $(KBUILD_PATH)/subfooter.kmk
a1df400bbe9d64aad400442e56eb637019300a5evboxsync
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync