Makefile.kmk revision 93809b1d982cee7c0c691c0dee1ebe8ad37dbdfe
# $Id$
## @file
# Sub-Makefile for the IPRT 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.
#
# The contents of this file may alternatively be used under the terms
# of the Common Development and Distribution License Version 1.0
# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
# VirtualBox OSE distribution, in which case the provisions of the
# CDDL are applicable instead of those of the GPL.
#
# You may elect to license modified versions of this file under the
# terms and conditions of either the GPL or the CDDL or both.
#
# 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_SINGLE_MAKEFILE
SUB_DEPTH = ../../../..
else
SUB_DEPTH = ..
DEPTH ?= ../../../..
endif
include $(KBUILD_PATH)/subheader.kmk
ifdef VBOX_WITH_TESTCASES
#
# Globals
#
# WARNING: Careful with this wrt to the other sub-makefiles this joins.
#
TEMPLATE = VBOXR3TSTEXE
#
# Target lists
#
PROGRAMS += \
tstAvl \
tstBitOperations \
tstCidr \
tstCritSect \
tstDeadlock \
tstDir \
tstDir-2 \
tstEnv \
tstErrUnique \
tstFile \
tstFileLock \
tstGetOpt \
tstHandleTable \
tstHeapSimple \
tstInlineAsm \
tstLdr \
tstLdr-2 \
tstLdr-3 \
tstLdr-4 \
tstLdrLoad \
tstLog \
tstMemAutoPtr \
tstMove \
tstMp-1 \
tstNoCrt-1 \
tstOnce \
tstPath \
tstPrfRT \
tstRand \
tstRTFsQueries \
tstStrFormat \
tstStrToNum \
tstSystemQueryOsInfo \
tstThread-1 \
tstTime \
tstTime-2 \
tstTime-3 \
tstTime-4 \
tstTimer \
tstTimerLR \
tstTimeSpec \
tstTSC \
tstUtf8 \
tstUuid
# tstSems
PROGRAMS.win += \
tstRTProcWait \
tstCritSectW32 \
tstFileAppendWin-1 \
ntGetTimerResolution
PROGRAMS.linux += \
tstRTProcWait \
tstBitOperationsPIC3 \
tstInlineAsmPIC \
tstInlineAsmPIC3 \
tstSemMutex
PROGRAMS.l4 += \
tstIoCtl
SYSMODS += \
tstLdrObj \
tstLdrObjR0
if1of ($(VBOX_LDR_FMT)), lx pe)
LIBRARIES += \
tstLdr-4Imp
endif
#
# Target configs in almost alphabetical order.
#
tstAvl_SOURCES = tstAvl.cpp
tstBitOperations_TEMPLATE = VBOXR3TSTEXE
tstBitOperations_SOURCES = tstBitOperations.cpp
tstBitOperationsPIC3_SOURCES = tstBitOperations.cpp
tstBitOperationsPIC3_CXXFLAGS = -fPIC -fomit-frame-pointer -O3
tstBitOperationsPIC3_DEFS = PIC
tstCidr_SOURCES = tstCidr.cpp
tstCritSect_SOURCES = tstCritSect.cpp
tstCritSectW32_SOURCES = tstCritSect.cpp
tstCritSectW32_DEFS = TRY_WIN32_CRIT
tstDeadlock_SOURCES = tstDeadlock.cpp
tstDir_SOURCES = tstDir.cpp
tstDir-2_SOURCES = tstDir-2.cpp
tstEnv_SOURCES = tstEnv.cpp
# Note: tstErrUnique.cpp depends on a header generated by the makefile above us.
tstErrUnique_SOURCES = tstErrUnique.cpp
tstErrUnique_INCS = $(PATH_TARGET)/
tstErrUnique.cpp_DEPS = $(PATH_TARGET)/errmsgdata.h
tstFile_SOURCES = tstFile.cpp
tstFileAppendWin-1_SOURCES = tstFileAppendWin-1.cpp
tstFileLock_SOURCES = tstFileLock.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_R3
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_GC IN_RT_GC 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_R3
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_R0 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_R3
tstLdr-4_LIBS = \
$(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB)
tstLdrLoad_SOURCES = tstLdrLoad.cpp
tstLog_SOURCES = tstLog.cpp
tstMemAutoPtr_SOURCES = tstMemAutoPtr.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/strlen.asm
tstOnce_SOURCES = tstOnce.cpp
tstPath_SOURCES = tstPath.cpp
tstPrfRT_SOURCES = tstPrfRT.cpp
tstRand_SOURCES = tstRand.cpp
tstRTFsQueries_SOURCES = tstRTFsQueries.cpp
tstRTProcWait_SOURCES = tstRTProcWait.cpp
tstSemMutex_SOURCES = tstSemMutex.cpp
tstSems_SOURCES = tstSems.cpp
tstStrFormat_SOURCES = tstStrFormat.cpp
tstStrToNum_SOURCES = tstStrToNum.cpp
tstSystemQueryOsInfo_SOURCES = tstSystemQueryOsInfo.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
ntGetTimerResolution_SOURCES = ntGetTimerResolution.cpp
ntGetTimerResolution_SDKS.win = WINPSDK W2K3DDK VBOX_NTDLL
endif # VBOX_WITH_TESTCASES
include $(KBUILD_PATH)/subfooter.kmk