From 6da26e5bf521efd5a6905dff39c7a8f4c7876922 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Tue, 28 Aug 2007 16:02:22 +0000 Subject: [PATCH] Added the first Rain program to the testcases directory and added Makefile rules for compiling *.rain into *x using the C++CSP backend --- Makefile | 9 +++++++++ testcases/simple.rain | 7 +++++++ 2 files changed, 16 insertions(+) create mode 100644 testcases/simple.rain diff --git a/Makefile b/Makefile index f9ce9bf..9f8a7e8 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,15 @@ CFLAGS = \ -std=gnu99 -fgnu89-inline \ `kroc --cflags` `kroc --ccincpath` +CXXFLAGS = -I. -O2 -ggdb3 -Wall + +%x.tock.cpp: %.rain tock + ./tock -v --backend=cppcsp --frontend=rain -o $@ $< + indent -nut -bli0 -pcs $@ + +%x: %x.tock.o tock + g++ $@.tock.o -pthread -lcppcsp2 -o $@ + %.tock.c: %.occ tock ./tock -v -o $@ $< indent -kr -pcs $@ diff --git a/testcases/simple.rain b/testcases/simple.rain new file mode 100644 index 0000000..9156304 --- /dev/null +++ b/testcases/simple.rain @@ -0,0 +1,7 @@ +process main (?uint8: in, !uint8: out, !uint8: err) +{ + seqeach (c : "hello") + { + out ! c; + } +}