Makefile.kmk revision 3263c7cb6a2131bde1185b85dd04d08a6888bca3
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe# $Id$
19d8729755d7f4d9503029a628dacbbdabcd2264wrowe## @file
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# Sub-Makefile for the IPRT testcases.
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding#
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding#
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe# Copyright (C) 2006-2007 Sun Microsystems, Inc.
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding#
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# This file is part of VirtualBox Open Source Edition (OSE), as
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# available from http://www.virtualbox.org. This file is free software;
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe# you can redistribute it and/or modify it under the terms of the GNU
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# General Public License (GPL) as published by the Free Software
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# Foundation, in version 2 as it comes in the "COPYING" file of the
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe#
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# The contents of this file may alternatively be used under the terms
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# of the Common Development and Distribution License Version 1.0
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe# VirtualBox OSE distribution, in which case the provisions of the
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe# CDDL are applicable instead of those of the GPL.
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding#
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# You may elect to license modified versions of this file under the
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# terms and conditions of either the GPL or the CDDL or both.
19d8729755d7f4d9503029a628dacbbdabcd2264wrowe#
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# Clara, CA 95054 USA or visit http://www.sun.com if you need
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# additional information or have any questions.
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding#
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fieldingSUB_DEPTH = ../../../..
4e8732935d428b2a70151b178a95cbba5d3839f5wroweinclude $(KBUILD_PATH)/subheader.kmk
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fieldingifdef VBOX_WITH_TESTCASES
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe#
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe# Globals
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding#
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# WARNING: Careful with this wrt to the other sub-makefiles this joins.
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding#
9ec65cbae2f760e485a1c54df5b19853688d5c91wroweTEMPLATE = VBOXR3TSTEXE
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# Defined by the parent makefile as well (for errmsgdata.h).
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fieldingIPRT_OUT_DIR ?= $(PATH_TARGET)/Runtime
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe
56e85d89d42a6980f31b800266649efbed338da3wrowe
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding#
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# Target lists
4439ba95daf7b82794fe338726790e2dab89d119wrowe#
37ad54b8fd2611b7a4f2b269eec3d27ed784a25dwrowePROGRAMS += \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstRTAvl \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstRTBase64 \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstRTBitOperations \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstRTCidr \
94b262d3639149df0b02642a9daa6db8bff58577wrowe tstRTCritSect \
94b262d3639149df0b02642a9daa6db8bff58577wrowe tstDeadlock \
94b262d3639149df0b02642a9daa6db8bff58577wrowe tstDir \
94b262d3639149df0b02642a9daa6db8bff58577wrowe tstDir-2 \
94b262d3639149df0b02642a9daa6db8bff58577wrowe tstDir-3 \
94b262d3639149df0b02642a9daa6db8bff58577wrowe tstEnv \
94b262d3639149df0b02642a9daa6db8bff58577wrowe tstErrUnique \
94b262d3639149df0b02642a9daa6db8bff58577wrowe tstFile \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstFileLock \
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe tstFork \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstGetOpt \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstHandleTable \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstHeapSimple \
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe tstInlineAsm \
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe tstLdr \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstLdr-2 \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstLdr-3 \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstLdr-4 \
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe tstLdrLoad \
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe tstLog \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstMemAutoPtr \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstRTMemPool \
5ac28f3fe2417368757f29cf381338357605fd52wrowe tstMove \
e1ad80c048e29e968221817698529d73098f07a4wrowe tstMp-1 \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstNoCrt-1 \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstOnce \
4439ba95daf7b82794fe338726790e2dab89d119wrowe tstPath \
37ad54b8fd2611b7a4f2b269eec3d27ed784a25dwrowe tstPrfRT \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstRand \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstRTFsQueries \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstR0ThreadPreemptionDriver \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstSems \
94b262d3639149df0b02642a9daa6db8bff58577wrowe tstSemPingPong \
94b262d3639149df0b02642a9daa6db8bff58577wrowe tstStrFormat \
94b262d3639149df0b02642a9daa6db8bff58577wrowe tstStrSimplePattern \
94b262d3639149df0b02642a9daa6db8bff58577wrowe tstStrToNum \
94b262d3639149df0b02642a9daa6db8bff58577wrowe tstSystemQueryOsInfo \
94b262d3639149df0b02642a9daa6db8bff58577wrowe tstRTTemp \
94b262d3639149df0b02642a9daa6db8bff58577wrowe tstTermCallbacks \
94b262d3639149df0b02642a9daa6db8bff58577wrowe tstThread-1 \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstTime \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstTime-2 \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstTime-3 \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstTime-4 \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstTimer \
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe tstTimerLR \
4e8732935d428b2a70151b178a95cbba5d3839f5wrowe tstTimeSpec \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstTSC \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstUtf8 \
990e1969a428b8844e07aad088df41340cd009d4wrowe tstUuid
4439ba95daf7b82794fe338726790e2dab89d119wrowe# tstSems
4439ba95daf7b82794fe338726790e2dab89d119wrowePROGRAMS.win += \
4439ba95daf7b82794fe338726790e2dab89d119wrowe tstRTProcWait \
8c8173f49dd7122e10636b3d20ae841551bd0b43wrowe tstRTCritSectW32 \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding tstFileAppendWin-1 \
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding ntGetTimerResolution
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fieldingPROGRAMS.linux += \
tstRTProcWait \
tstRTProcIsRunningByName \
tstRTBitOperationsPIC3 \
tstInlineAsmPIC \
tstInlineAsmPIC3 \
tstSemMutex \
tstSemRW
PROGRAMS.l4 += \
tstIoCtl
PROGRAMS.darwin += \
tstDarwinSched
SYSMODS += \
tstLdrObj \
tstLdrObjR0 \
tstR0ThreadPreemption
if1of ($(VBOX_LDR_FMT)), lx pe)
LIBRARIES += \
tstLdr-4Imp
endif
ifdef RT_ASYNC_IO_CODE
PROGRAMS += \
tstFileAio
endif
if defined(VBOX_WITH_LIBXML2_IN_VBOXRT)
PROGRAMS += \
tstRTS3
endif
#
# Target configs in almost alphabetical order.
#
tstRTAvl_TEMPLATE = VBOXR3TSTEXE
tstRTAvl_SOURCES = tstRTAvl.cpp
tstRTBase64_TEMPLATE = VBOXR3TSTEXE
tstRTBase64_SOURCES = tstRTBase64.cpp
tstRTBitOperations_TEMPLATE = VBOXR3TSTEXE
tstRTBitOperations_SOURCES = tstRTBitOperations.cpp
tstRTBitOperationsPIC3_TEMPLATE = VBOXR3TSTEXE
tstRTBitOperationsPIC3_SOURCES = tstRTBitOperations.cpp
tstRTBitOperationsPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer -O3
tstRTBitOperationsPIC3_DEFS = PIC
tstRTCidr_TEMPLATE = VBOXR3TSTEXE
tstRTCidr_SOURCES = tstRTCidr.cpp
tstRTCritSect_TEMPLATE = VBOXR3TSTEXE
tstRTCritSect_SOURCES = tstRTCritSect.cpp
tstRTCritSectW32_TEMPLATE = VBOXR3TSTEXE
tstRTCritSectW32_SOURCES = tstRTCritSect.cpp
tstRTCritSectW32_DEFS = TRY_WIN32_CRIT
tstDeadlock_SOURCES = tstDeadlock.cpp
tstDir_SOURCES = tstDir.cpp
tstDir-2_SOURCES = tstDir-2.cpp
tstDir-3_SOURCES = tstDir-3.cpp
tstEnv_SOURCES = tstEnv.cpp
# Note: tstErrUnique.cpp depends on a header generated by the makefile above us.
tstErrUnique_SOURCES = tstErrUnique.cpp
tstErrUnique_INCS = $(IPRT_OUT_DIR)/
tstErrUnique.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgdata.h
tstFile_SOURCES = tstFile.cpp
tstFileAppendWin-1_SOURCES = tstFileAppendWin-1.cpp
tstFileAio_SOURCES = tstFileAio.cpp
tstFileLock_SOURCES = tstFileLock.cpp
tstFork_SOURCES = tstFork.cpp
tstGetOpt_SOURCES = tstGetOpt.cpp
tstHandleTable_SOURCES = tstHandleTable.cpp
tstHeapSimple_SOURCES = tstHeapSimple.cpp
tstIoCtl_SOURCES = tstIoCtl.cpp
tstInlineAsm_SOURCES = tstInlineAsm.cpp
tstInlineAsmPIC_SOURCES = tstInlineAsm.cpp
tstInlineAsmPIC_CXXFLAGS = -fPIC
tstInlineAsmPIC_DEFS = PIC
tstInlineAsmPIC3_SOURCES = tstInlineAsm.cpp
tstInlineAsmPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer -O3
tstInlineAsmPIC3_DEFS = PIC
tstLdr_SOURCES = tstLdr.cpp
tstLdr-2_SOURCES = tstLdr-2.cpp
tstLdr-2_DEFS = IN_DIS
tstLdr-2_LIBS = \
$(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
tstLdrObj_TEMPLATE = VBOXGC
tstLdrObj_INST = $(INST_TESTCASE)
tstLdrObj_SYSSUFF = .gc
tstLdrObj_SOURCES = tstLdrObj.cpp
tstLdrObj_DEFS = IN_DIS IN_RT_GC IN_RT_RC DIS_CORE_ONLY
ifeq ($(VBOX_LDR_FMT32),elf)
tstLdrObj_DEFS += VBOX_SOME_IMPORT_FUNCTION
endif
tstLdrObj_LIBS = \
$(PATH_LIB)/DisasmGC$(VBOX_SUFF_LIB) \
$(PATH_LIB)/RuntimeGC$(VBOX_SUFF_LIB)
ifeq ($(VBOX_LDR_FMT32),pe)
tstLdrObj_LDFLAGS = -Entry:Entrypoint
tstLdrObj_LIBS += \
$(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
endif # PE
ifeq ($(VBOX_LDR_FMT32),elf)
tstLdrObj_LDFLAGS = -e Entrypoint
endif
ifeq ($(VBOX_LDR_FMT32),lx)
tstLdrObj_LIBS += \
$(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
endif
tstLdr-3_SOURCES = tstLdr-3.cpp
tstLdr-3_DEFS = IN_DIS
tstLdr-3_LIBS = \
$(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
tstLdr-4Imp_TEMPLATE = VBOXR0
ifeq ($(VBOX_LDR_FMT),lx)
tstLdr-4Imp_SOURCES = tstLdr-4Imp-os2.def
else ifeq ($(VBOX_LDR_FMT),pe)
tstLdr-4Imp_SOURCES.win = tstLdr-4Imp-win.def
endif
tstLdrObjR0_TEMPLATE = VBOXR0
tstLdrObjR0_INST = $(INST_TESTCASE)
tstLdrObjR0_SYSSUFF = .r0
tstLdrObjR0_SOURCES = tstLdrObjR0.cpp tstLdrDisasmTest.cpp
tstLdrObjR0_DEFS = IN_DIS IN_RT_R0 DIS_CORE_ONLY
ifeq ($(VBOX_LDR_FMT32),elf)
tstLdrObjR0_DEFS += VBOX_SOME_IMPORT_FUNCTION
endif
tstLdrObjR0_LIBS = \
$(PATH_LIB)/DisasmR0$(VBOX_SUFF_LIB) \
$(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
ifeq ($(VBOX_LDR_FMT),pe)
tstLdrObjR0_LDFLAGS = -Entry:Entrypoint
tstLdrObjR0_LIBS += \
$(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) \
$(TARGET_tstLdr-4Imp)
endif
ifeq ($(VBOX_LDR_FMT),elf)
tstLdrObjR0_LDFLAGS = -e Entrypoint
endif
ifeq ($(VBOX_LDR_FMT),lx)
tstLdrObjR0_LIBS += \
$(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) \
$(TARGET_tstLdr-4Imp)
endif
tstLdr-4_SOURCES = tstLdr-4.cpp tstLdrDisasmTest.cpp
tstLdr-4_DEFS = IN_DIS
tstLdr-4_LIBS = \
$(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
tstLdrLoad_SOURCES = tstLdrLoad.cpp
tstLog_SOURCES = tstLog.cpp
tstMemAutoPtr_SOURCES = tstMemAutoPtr.cpp
tstRTMemPool_TEMPLATE = VBOXR3TSTEXE
tstRTMemPool_SOURCES = tstRTMemPool.cpp
tstMove_SOURCES = tstMove.cpp
tstMp-1_SOURCES = tstMp-1.cpp
tstNoCrt-1_DEFS = RT_WITHOUT_NOCRT_WRAPPER_ALIASES
tstNoCrt-1_SOURCES = \
tstNoCrt-1.cpp \
../common/string/memcpy.asm \
../common/string/mempcpy.asm \
../common/string/memmove.asm \
../common/string/memset.asm \
../common/string/memchr.asm \
../common/string/memcmp.asm \
../common/string/strchr.asm \
../common/string/strcmp.asm \
../common/string/strcpy.asm \
../common/string/strlen.asm
tstOnce_SOURCES = tstOnce.cpp
tstPath_SOURCES = tstPath.cpp
tstPrfRT_SOURCES = tstPrfRT.cpp
tstRand_SOURCES = tstRand.cpp
tstR0ThreadPreemption_TEMPLATE = VBOXR0
tstR0ThreadPreemption_INST = $(INST_TESTCASE)
tstR0ThreadPreemption_DEFS = IN_RT_R0
tstR0ThreadPreemption_SYSSUFF = .r0
tstR0ThreadPreemption_SOURCES = tstR0ThreadPreemption.cpp
tstR0ThreadPreemption_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
if1of ($(VBOX_LDR_FMT), pe lx)
tstR0ThreadPreemption_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
endif
tstR0ThreadPreemptionDriver_SOURCES = tstR0ThreadPreemptionDriver.cpp
tstRTFsQueries_SOURCES = tstRTFsQueries.cpp
tstRTProcWait_SOURCES = tstRTProcWait.cpp
tstRTProcIsRunningByName_SOURCES = tstRTProcIsRunningByName.cpp
tstRTS3_SOURCES = tstRTS3.cpp
tstSemMutex_SOURCES = tstSemMutex.cpp
tstSemRW_SOURCES = tstSemRW.cpp
tstSemPingPong_SOURCES = tstSemPingPong.cpp
tstSems_SOURCES = tstSems.cpp
tstStrFormat_SOURCES = tstStrFormat.cpp
tstStrSimplePattern_SOURCES = tstStrSimplePattern.cpp
tstStrToNum_SOURCES = tstStrToNum.cpp
tstSystemQueryOsInfo_SOURCES = tstSystemQueryOsInfo.cpp
tstRTTemp_TEMPLATE = VBOXR3TSTEXE
tstRTTemp_SOURCES = tstRTTemp.cpp
tstTermCallbacks_SOURCES = tstTermCallbacks.cpp
tstThread-1_SOURCES = tstThread-1.cpp
tstTime_SOURCES = tstTime.cpp
tstTime-2_SOURCES = tstTime-2.cpp
tstTime-3_SOURCES = tstTime-3.cpp
tstTime-4_SOURCES = tstTime-4.cpp
tstTimer_SOURCES = tstTimer.cpp
tstTimerLR_SOURCES = tstTimerLR.cpp
tstTimeSpec_SOURCES = tstTimeSpec.cpp
tstTSC_SOURCES = tstTSC.cpp
tstTSC_CXXFLAGS.linux += -O3
tstUuid_SOURCES = tstUuid.cpp
tstUtf8_SOURCES = tstUtf8.cpp
#
# odds and ends
#
tstDarwinSched_SOURCES = tstDarwinSched.cpp
ntGetTimerResolution_SOURCES = ntGetTimerResolution.cpp
ntGetTimerResolution_SDKS.win = WINPSDK W2K3DDK VBOX_NTDLL
endif # VBOX_WITH_TESTCASES
include $(KBUILD_PATH)/subfooter.kmk