diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2006-09-17 12:04:56 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2006-09-17 12:04:56 +0000 |
commit | 2ec5b3fb2ccb0120be641e077089f3da5e53d8a3 (patch) | |
tree | d1e6f6a9a3d99f0095dc96fe320214de68918158 /test/c/Makefile | |
parent | e37d620f5b9b05e16563545cba9c538f8d31c746 (diff) | |
download | compcert-2ec5b3fb2ccb0120be641e077089f3da5e53d8a3.tar.gz compcert-2ec5b3fb2ccb0120be641e077089f3da5e53d8a3.zip |
Davantage de tests
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@104 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test/c/Makefile')
-rw-r--r-- | test/c/Makefile | 51 |
1 files changed, 44 insertions, 7 deletions
diff --git a/test/c/Makefile b/test/c/Makefile index b125688c..9f3c5531 100644 --- a/test/c/Makefile +++ b/test/c/Makefile @@ -1,20 +1,57 @@ -CC=gcc -CFLAGS=-O2 -Wall CCOMP=../../ccomp CCOMPFLAGS=-dump-c -PROGS=fib integr qsort fft sha1 aes almabench lists +CC=gcc -arch ppc # MacOS X +#CC=gcc # other systems + +CFLAGS=-O1 -Wall + +LIBS= # MacOS X +#LIBS=-lm # other systems + +TIME=xtime -o /dev/null -mintime 1.0 # Xavier's hack +#TIME=time >/dev/null # Otherwise + +PROGS=fib integr qsort fft sha1 aes almabench lists \ + binarytrees fannkuch knucleotide mandelbrot nbody \ + nsieve nsievebits spectral all_s: $(PROGS:%=%.s) -all: $(PROGS) +all: $(PROGS:%=%.compcert) + +all_gcc: $(PROGS:%=%.gcc) -%: %.s - $(CC) $(CFLAGS) -o $* $*.s +%.compcert: %.s + $(CC) $(CFLAGS) -o $*.compcert $*.s $(LIBS) %.s: %.c ../../ccomp $(CCOMP) $(CCOMPFLAGS) $*.c +%.gcc: %.c + $(CC) $(CFLAGS) -o $*.gcc $*.c $(LIBS) + +test_compcert: + @for i in $(PROGS); do \ + if ./$$i.compcert | cmp -s - Results/$$i; \ + then echo "$$i: passed"; \ + else echo "$$i: FAILED"; \ + fi; \ + done + +test_gcc: + @for i in $(PROGS); do \ + if ./$$i.gcc | cmp -s - Results/$$i; \ + then echo "$$i: passed"; \ + else echo "$$i: FAILED"; \ + fi; \ + done + +time_gcc: + @for i in $(PROGS); do \ + echo -n "$$i: "; $(TIME) ./$$i.gcc; \ + done + clean: - rm -f $(PROGS) + rm -f *.compcert *.gcc rm -f *.light.c *.s *.o *~ |