aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa/prng/Makefile
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2018-11-09 17:07:13 +0100
committerCyril SIX <cyril.six@kalray.eu>2018-11-09 17:07:13 +0100
commitf24d303df6cb125ca19b953bb364955cc6e8c246 (patch)
treee885cbb64c217ddec1b02a350679b3f2a29d6373 /test/mppa/prng/Makefile
parent622a211d4ebd47feb4d2c7dfe590d10c6d6ae834 (diff)
downloadcompcert-kvx-f24d303df6cb125ca19b953bb364955cc6e8c246.tar.gz
compcert-kvx-f24d303df6cb125ca19b953bb364955cc6e8c246.zip
Fixed consistency between the different tests mmult, prng and sort
Diffstat (limited to 'test/mppa/prng/Makefile')
-rw-r--r--test/mppa/prng/Makefile49
1 files changed, 49 insertions, 0 deletions
diff --git a/test/mppa/prng/Makefile b/test/mppa/prng/Makefile
new file mode 100644
index 00000000..481a3fca
--- /dev/null
+++ b/test/mppa/prng/Makefile
@@ -0,0 +1,49 @@
+K1CC ?= k1-mbr-gcc
+CC ?= gcc
+CCOMP ?= ccomp
+CFLAGS ?= -O2
+
+all: prng-test-gcc-x86 prng-test-gcc-k1c prng-test-ccomp-k1c
+
+prng-test-gcc-x86: prng.c
+ $(CC) -D__UNIT_TEST_PRNG__ $(CFLAGS) $< -o $@
+
+prng-test-gcc-k1c: prng.c
+ $(K1CC) -D__UNIT_TEST_PRNG__ $(CFLAGS) $< -o $@
+
+prng-test-ccomp-k1c: prng.c
+ $(CCOMP) -D__UNIT_TEST_PRNG__ $(CFLAGS) $< -o $@
+
+.PHONY:
+test: test-x86 test-k1c
+
+.PHONY:
+test-x86: prng-test-gcc-x86
+ @if ! ./$<; then\
+ >&2 echo "ERROR: $< failed";\
+ exit;\
+ else\
+ echo "$< Succeeded";\
+ fi
+
+.PHONY:
+test-k1c: prng-test-gcc-k1c
+ @if ! k1-cluster -- ./$<; then\
+ >&2 echo "ERROR: $< failed";\
+ exit;\
+ else\
+ echo "$< Succeeded";\
+ fi
+
+.PHONY:
+check: prng-test-ccomp-k1c
+ @if ! k1-cluster -- ./$<; then\
+ >&2 echo "ERROR: $< failed";\
+ exit;\
+ else\
+ echo "$< Succeeded";\
+ fi
+
+.PHONY:
+clean:
+ rm -f prng-test-gcc-x86 prng-test-gcc-k1c prng-test-ccomp-k1c