mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-24 07:59:01 +00:00
cl20: Khronos Bug 16122: Convert half to test harness
Conflicts: test_conformance/half/CMakeLists.txt test_conformance/half/Test_vStoreHalf.c test_conformance/half/cl_utils.c test_conformance/half/cl_utils.h Signed-off-by: Radek Szymanski <radek.szymanski@arm.com> Signed-off-by: Kevin Petit <kevin.petit@arm.com>
This commit is contained in:
@@ -3,43 +3,38 @@ ATF = -framework ATF
|
||||
USE_ATF = -DUSE_ATF
|
||||
endif
|
||||
|
||||
SRCFILES = cl_utils.c Test_vLoadHalf.c Test_roundTrip.c \
|
||||
Test_vStoreHalf.c main.c
|
||||
SRCS = main.c \
|
||||
cl_utils.c \
|
||||
Test_vLoadHalf.c \
|
||||
Test_roundTrip.c \
|
||||
Test_vStoreHalf.c \
|
||||
../../test_common/harness/errorHelpers.c \
|
||||
../../test_common/harness/kernelHelpers.c \
|
||||
../../test_common/harness/mingw_compat.c \
|
||||
../../test_common/harness/testHarness.c
|
||||
|
||||
CC = c++
|
||||
CFLAGS = -g -Wall -Wshorten-64-to-32 $(COMPILERFLAGS) ${RC_CFLAGS} \
|
||||
${USE_ATF}
|
||||
SOURCES = $(abspath $(SRCS))
|
||||
LIBPATH += -L/System/Library/Frameworks/OpenCL.framework/Libraries
|
||||
LIBPATH += -L.
|
||||
FRAMEWORK = $(SOURCES)
|
||||
HEADERS =
|
||||
TARGET = Test_half
|
||||
INCLUDE =
|
||||
COMPILERFLAGS = -c -Wall -g
|
||||
CC = ${CROSS_COMPILE}g++
|
||||
CFLAGS = $(COMPILERFLAGS) ${RC_CFLAGS} ${USE_ATF} $(INCLUDE)
|
||||
LIBRARIES = -framework OpenCL ${ATF}
|
||||
|
||||
LIBRARIES = -framework OpenCL ${RC_CFLAGS} ${ATF}
|
||||
OBJECTS := ${SOURCES:.c=.o}
|
||||
|
||||
TARGETOBJECT =
|
||||
all: $(TARGET)
|
||||
|
||||
all: release
|
||||
|
||||
OBJECTS := ${SRCFILES:.c=.o}
|
||||
|
||||
release:
|
||||
echo "Build Release"
|
||||
$(CC) $(SRCFILES) -Os $(CFLAGS) -o Test_half $(LIBRARIES)
|
||||
|
||||
debug: $(OBJECTS)
|
||||
echo "Build Debug"
|
||||
$(CC) $(OBJECTS) -O0 $(CFLAGS) -o Test_half_debug -D_DEBUG=1 $(LIBRARIES)
|
||||
|
||||
test: release
|
||||
arch -i386 ./Test_half -c > cpu.log &
|
||||
arch -i386 ./Test_half -g > gpu.log &
|
||||
echo "Testing 32-bit mode in progress. See cpu.log and gpu.log for results."
|
||||
|
||||
test64: release
|
||||
arch -x86_64 ./Test_half -c > cpu64.log &
|
||||
arch -x86_64 ./Test_half -g > gpu64.log &
|
||||
echo "Testing 64-bit mode in progress. See cpu64.log and gpu64.log for results."
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(CC) $(INCLUDE) $(RC_CFLAGS) $(OBJECTS) -o $@ $(LIBPATH) $(LIBRARIES)
|
||||
|
||||
clean:
|
||||
rm -f ./Test_half_debug
|
||||
rm -f ./Test_half
|
||||
|
||||
rm -f $(TARGET) $(OBJECTS)
|
||||
|
||||
.DEFAULT:
|
||||
@echo The target \"$@\" does not exist in Makefile.
|
||||
|
||||
Reference in New Issue
Block a user