diff options
Diffstat (limited to 'test/c')
-rw-r--r-- | test/c/Makefile | 10 | ||||
-rw-r--r-- | test/c/knucleotide.c | 4 | ||||
-rw-r--r-- | test/c/mandelbrot.c | 4 |
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) |