Makefile.kmk revision 64babf0f32eaf36212d54af4a3ce5fe193b24825
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync# $Id$
7420e5ee5565b181c144eabb14da0da9e8cce657vboxsync## @file
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync# Sub-Makefile for the IPRT testcases.
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync#
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync
7420e5ee5565b181c144eabb14da0da9e8cce657vboxsync#
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync# Copyright (C) 2006-2009 Sun Microsystems, Inc.
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync#
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync# available from http://www.virtualbox.org. This file is free software;
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync# you can redistribute it and/or modify it under the terms of the GNU
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync# General Public License (GPL) as published by the Free Software
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
e5501b5897a4a5958157bed31ee5647cfa770333vboxsync#
e5501b5897a4a5958157bed31ee5647cfa770333vboxsync# The contents of this file may alternatively be used under the terms
e5501b5897a4a5958157bed31ee5647cfa770333vboxsync# of the Common Development and Distribution License Version 1.0
e5501b5897a4a5958157bed31ee5647cfa770333vboxsync# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
e5501b5897a4a5958157bed31ee5647cfa770333vboxsync# VirtualBox OSE distribution, in which case the provisions of the
e5501b5897a4a5958157bed31ee5647cfa770333vboxsync# CDDL are applicable instead of those of the GPL.
e5501b5897a4a5958157bed31ee5647cfa770333vboxsync#
e5501b5897a4a5958157bed31ee5647cfa770333vboxsync# You may elect to license modified versions of this file under the
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync# terms and conditions of either the GPL or the CDDL or both.
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync#
7420e5ee5565b181c144eabb14da0da9e8cce657vboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
7420e5ee5565b181c144eabb14da0da9e8cce657vboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync# additional information or have any questions.
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync#
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsyncSUB_DEPTH = ../../../..
7420e5ee5565b181c144eabb14da0da9e8cce657vboxsyncinclude $(KBUILD_PATH)/subheader.kmk
7420e5ee5565b181c144eabb14da0da9e8cce657vboxsync
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsyncifdef VBOX_WITH_TESTCASES
8a0ee4ffcd453884e357b4d5984ae3b7146abb6fvboxsync
289fdd35bf70c71ed32075f45c3af244431ffa71vboxsync#
8a0ee4ffcd453884e357b4d5984ae3b7146abb6fvboxsync# Globals
8a0ee4ffcd453884e357b4d5984ae3b7146abb6fvboxsync#
8a0ee4ffcd453884e357b4d5984ae3b7146abb6fvboxsync# WARNING: Careful with this wrt to the other sub-makefiles this joins.
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync#
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsyncTEMPLATE = VBOXR3TSTEXE
3226d4d605c81794a1e11ee873dfbe83e1033c05vboxsync
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync# Defined by the parent makefile as well (for errmsgdata.h).
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsyncIPRT_OUT_DIR ?= $(PATH_TARGET)/Runtime
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync
3226d4d605c81794a1e11ee873dfbe83e1033c05vboxsync
2feb1c8e55e737875aba0cfd07e4bd5544621c7bvboxsync#
2feb1c8e55e737875aba0cfd07e4bd5544621c7bvboxsync# Target lists
3226d4d605c81794a1e11ee873dfbe83e1033c05vboxsync#
7420e5ee5565b181c144eabb14da0da9e8cce657vboxsyncPROGRAMS += \
7420e5ee5565b181c144eabb14da0da9e8cce657vboxsync tstRTAvl \
0c9a567f96569cf5db84e72ccf1ce8d3d21363c6vboxsync tstRTBase64 \
0c9a567f96569cf5db84e72ccf1ce8d3d21363c6vboxsync tstRTBitOperations \
0c9a567f96569cf5db84e72ccf1ce8d3d21363c6vboxsync tstRTCidr \
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync tstRTCritSect \
8a0ee4ffcd453884e357b4d5984ae3b7146abb6fvboxsync tstRTDigest \
8a0ee4ffcd453884e357b4d5984ae3b7146abb6fvboxsync tstDir \
7420e5ee5565b181c144eabb14da0da9e8cce657vboxsync tstDir-2 \
ba820dc19180b3240c3c37b6001d3e6173ab22c5vboxsync tstDir-3 \
7420e5ee5565b181c144eabb14da0da9e8cce657vboxsync tstEnv \
7420e5ee5565b181c144eabb14da0da9e8cce657vboxsync tstErrUnique \
7420e5ee5565b181c144eabb14da0da9e8cce657vboxsync tstFile \
8a0ee4ffcd453884e357b4d5984ae3b7146abb6fvboxsync tstFileAio \
8a0ee4ffcd453884e357b4d5984ae3b7146abb6fvboxsync tstFileAppend-1 \
8a0ee4ffcd453884e357b4d5984ae3b7146abb6fvboxsync tstFileLock \
8a0ee4ffcd453884e357b4d5984ae3b7146abb6fvboxsync tstFork \
0c9a567f96569cf5db84e72ccf1ce8d3d21363c6vboxsync tstGetOpt \
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync tstHandleTable \
b26977a29bd8af11e3059ef8fb47a92a1241f20dvboxsync tstRTHeapOffset \
8a0ee4ffcd453884e357b4d5984ae3b7146abb6fvboxsync tstRTHeapSimple \
0c9a567f96569cf5db84e72ccf1ce8d3d21363c6vboxsync tstInlineAsm \
0c9a567f96569cf5db84e72ccf1ce8d3d21363c6vboxsync tstLdr \
8a0ee4ffcd453884e357b4d5984ae3b7146abb6fvboxsync tstLdr-2 \
7420e5ee5565b181c144eabb14da0da9e8cce657vboxsync tstLdr-3 \
b4125206636c650121449eb57dc4384de21e00d6vboxsync tstLdr-4 \
0c9a567f96569cf5db84e72ccf1ce8d3d21363c6vboxsync tstLdrLoad \
0c9a567f96569cf5db84e72ccf1ce8d3d21363c6vboxsync tstRTLockValidator \
7420e5ee5565b181c144eabb14da0da9e8cce657vboxsync tstLog \
7420e5ee5565b181c144eabb14da0da9e8cce657vboxsync tstMemAutoPtr \
tstRTMemCache \
tstRTMemPool \
tstRTR0MemUserKernelDriver \
tstMove \
tstMp-1 \
tstNoCrt-1 \
tstOnce \
tstRTPath \
tstPrfRT \
tstRand \
tstRTFsQueries \
tstR0ThreadPreemptionDriver \
tstRTS3 \
tstSemEvent \
tstSemMutex \
tstSemPingPong \
tstRTSemRW \
tstSems \
tstRTSemXRoads \
tstRTStrCache \
tstRTStrFormat \
tstStrSimplePattern \
tstStrToNum \
tstRTStrVersion \
tstSystemQueryOsInfo \
tstRTTemp \
tstTermCallbacks \
tstThread-1 \
tstTime \
tstTime-2 \
tstTime-3 \
tstTime-4 \
tstTimer \
tstTimerLR \
tstRTTimeSpec \
tstTSC \
tstUtf8 \
tstRTUuid
# tstSems
PROGRAMS.win += \
tstRTProcWait \
tstRTCritSectW32 \
tstFileAppendWin-1 \
ntGetTimerResolution
PROGRAMS.linux += \
tstRTProcWait \
tstRTProcIsRunningByName \
tstRTBitOperationsPIC3 \
tstInlineAsmPIC \
tstInlineAsmPIC3
PROGRAMS.l4 += \
tstIoCtl
PROGRAMS.darwin += \
tstDarwinSched
SYSMODS += \
tstLdrObjR0 \
tstRTR0MemUserKernel \
tstR0ThreadPreemption
ifdef VBOX_WITH_RAW_MODE
SYSMODS += tstLdrObj
endif
if1of ($(VBOX_LDR_FMT)), lx pe)
LIBRARIES += \
tstLdr-4Imp
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
tstRTDigest_SOURCES = tstRTDigest.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
tstFileAppend-1_SOURCES = tstFileAppend-1.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
tstRTHeapOffset_TEMPLATE = VBOXR3TSTEXE
tstRTHeapOffset_SOURCES = tstRTHeapOffset.cpp
tstRTHeapSimple_TEMPLATE = VBOXR3TSTEXE
tstRTHeapSimple_SOURCES = tstRTHeapSimple.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)
ifdef VBOX_WITH_RAW_MODE
tstLdrObj_TEMPLATE = VBoxRc
tstLdrObj_INST = $(INST_TESTCASE)
tstLdrObj_SYSSUFF = .gc
tstLdrObj_SOURCES = tstLdrObj.cpp
tstLdrObj_DEFS = IN_DIS IN_RT_RC DIS_CORE_ONLY
ifeq ($(VBOX_LDR_FMT32),elf)
tstLdrObj_DEFS += VBOX_SOME_IMPORT_FUNCTION
endif
tstLdrObj_LIBS = \
$(PATH_LIB)/DisasmRC$(VBOX_SUFF_LIB) \
$(PATH_LIB)/RuntimeRC$(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
endif # VBOX_WITH_RAW_MODE
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
ifn1of ($(KBUILD_TARGET), win)
tstLdrObjR0_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
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
tstRTLockValidator_TEMPLATE = VBOXR3TSTEXE
tstRTLockValidator_SOURCES = tstRTLockValidator.cpp
tstLog_SOURCES = tstLog.cpp
tstMemAutoPtr_SOURCES = tstMemAutoPtr.cpp
tstRTMemCache_TEMPLATE = VBOXR3TSTEXE
tstRTMemCache_SOURCES = tstRTMemCache.cpp
tstRTMemPool_TEMPLATE = VBOXR3TSTEXE
tstRTMemPool_SOURCES = tstRTMemPool.cpp
tstRTR0MemUserKernel_TEMPLATE = VBoxR0
tstRTR0MemUserKernel_INST = $(INST_TESTCASE)
tstRTR0MemUserKernel_DEFS = IN_RT_R0
tstRTR0MemUserKernel_SYSSUFF = .r0
tstRTR0MemUserKernel_SOURCES = tstRTR0MemUserKernel.cpp
tstRTR0MemUserKernel_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
if1of ($(VBOX_LDR_FMT), pe lx)
tstRTR0MemUserKernel_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
endif
tstRTR0MemUserKernelDriver_SOURCES = tstRTR0MemUserKernelDriver.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
tstRTPath_TEMPLATE = VBOXR3TSTEXE
tstRTPath_SOURCES = tstRTPath.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
tstSemEvent_SOURCES = tstSemEvent.cpp
tstRTSemRW_TEMPLATE = VBOXR3TSTEXE
tstRTSemRW_SOURCES = tstRTSemRW.cpp
tstSemPingPong_SOURCES = tstSemPingPong.cpp
tstSems_SOURCES = tstSems.cpp
tstRTSemXRoads_TEMPLATE = VBOXR3TSTEXE
tstRTSemXRoads_SOURCES = tstRTSemXRoads.cpp
tstRTStrCache_TEMPLATE = VBOXR3TSTEXE
tstRTStrCache_SOURCES = tstRTStrCache.cpp
tstRTStrFormat_SOURCES = tstRTStrFormat.cpp
tstStrSimplePattern_SOURCES = tstStrSimplePattern.cpp
tstStrToNum_SOURCES = tstStrToNum.cpp
tstRTStrVersion_TEMPLATE = VBOXR3TSTEXE
tstRTStrVersion_SOURCES = tstRTStrVersion.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
tstRTTimeSpec_TEMPLATE = VBOXR3TSTEXE
tstRTTimeSpec_SOURCES = tstRTTimeSpec.cpp
tstTSC_SOURCES = tstTSC.cpp
tstTSC_CXXFLAGS.linux += -O3
tstRTUuid_TEMPLATE = VBOXR3TSTEXE
tstRTUuid_SOURCES = tstRTUuid.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