summaryrefslogtreecommitdiff
path: root/test/c
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2006-10-22 08:14:51 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2006-10-22 08:14:51 +0000
commitb6bdb4b4924b0934aed24335597a89e49f7cbd61 (patch)
treef69d59843e463d3345a987660ac7c1f43f33c268 /test/c
parent0b3920e6fd26f05e2ddad19cfd8b224c150ebfd1 (diff)
Ajout et utilisation de compcert_stdio.h
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@123 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test/c')
-rw-r--r--test/c/Makefile10
-rw-r--r--test/c/knucleotide.c4
-rw-r--r--test/c/mandelbrot.c4
3 files changed, 12 insertions, 6 deletions
diff --git a/test/c/Makefile b/test/c/Makefile
index 9f3c553..16fead4 100644
--- a/test/c/Makefile
+++ b/test/c/Makefile
@@ -1,13 +1,11 @@
CCOMP=../../ccomp
-CCOMPFLAGS=-dump-c
+CCOMPFLAGS=-dump-c -I../lib
-CC=gcc -arch ppc # MacOS X
-#CC=gcc # other systems
+CC=gcc -arch ppc
CFLAGS=-O1 -Wall
-LIBS= # MacOS X
-#LIBS=-lm # other systems
+LIBS=
TIME=xtime -o /dev/null -mintime 1.0 # Xavier's hack
#TIME=time >/dev/null # Otherwise
@@ -23,7 +21,7 @@ all: $(PROGS:%=%.compcert)
all_gcc: $(PROGS:%=%.gcc)
%.compcert: %.s
- $(CC) $(CFLAGS) -o $*.compcert $*.s $(LIBS)
+ $(CC) $(CFLAGS) -o $*.compcert $*.s ../lib/libcompcert.a $(LIBS)
%.s: %.c ../../ccomp
$(CCOMP) $(CCOMPFLAGS) $*.c
diff --git a/test/c/knucleotide.c b/test/c/knucleotide.c
index f743892..955af7f 100644
--- a/test/c/knucleotide.c
+++ b/test/c/knucleotide.c
@@ -8,7 +8,11 @@
http://cvs.alioth.debian.org/cgi-bin/cvsweb.cgi/shootout/bench/Include/?cvsroot=shootout
*/
+#ifdef __COMPCERT__
+#include <compcert_stdio.h>
+#else
#include <stdio.h>
+#endif
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
diff --git a/test/c/mandelbrot.c b/test/c/mandelbrot.c
index 93aa8ac..f4c0db1 100644
--- a/test/c/mandelbrot.c
+++ b/test/c/mandelbrot.c
@@ -10,7 +10,11 @@
compile flags: -O3 -ffast-math -march=pentium4 -funroll-loops
*/
+#ifdef __COMPCERT__
+#include <compcert_stdio.h>
+#else
#include <stdio.h>
+#endif
#include <stdlib.h>
int main (int argc, char **argv)