modernc.org/ccgo/v3@v3.16.14/lib/testdata/CompCert-3.6/test/c/Makefile (about) 1 include ../../Makefile.config 2 3 CCOMP=../../ccomp 4 CCOMPFLAGS=$(CCOMPOPTS) -stdlib ../../runtime -dc -dclight -dasm 5 6 CFLAGS=-O1 -Wall 7 8 LIBS=$(LIBMATH) 9 10 TIME=ocaml unix.cma ../../tools/xtime.ml -o /dev/null -mintime 2.0 -minruns 4 11 12 PROGS=fib integr qsort fft fftsp fftw sha1 sha3 aes almabench \ 13 lists binarytrees fannkuch knucleotide mandelbrot nbody \ 14 nsieve nsievebits spectral vmach \ 15 bisect chomp perlin siphash24 16 17 all: $(PROGS:%=%.compcert) 18 19 all_s: $(PROGS:%=%.s) 20 21 all_gcc: $(PROGS:%=%.gcc) 22 23 %.compcert: %.c 24 $(CCOMP) $(CCOMPFLAGS) -o $*.compcert $*.c $(LIBS) 25 26 %.s: %.c 27 $(CCOMP) $(CCOMPFLAGS) -S $*.c 28 29 %.gcc: %.c 30 $(CC) $(CFLAGS) -o $*.gcc $*.c $(LIBS) 31 32 test: 33 @for i in $(PROGS); do \ 34 if $(SIMU) ./$$i.compcert | cmp -s - Results/$$i; \ 35 then echo "$$i: passed"; \ 36 else echo "$$i: FAILED"; exit 2; \ 37 fi; \ 38 done 39 40 test_gcc: 41 @for i in $(PROGS); do \ 42 if ./$$i.gcc | cmp -s - Results/$$i; \ 43 then echo "$$i: passed"; \ 44 else echo "$$i: FAILED"; \ 45 fi; \ 46 done 47 48 bench_gcc: 49 @for i in $(PROGS); do \ 50 $(TIME) -name $$i -- ./$$i.gcc; \ 51 done 52 53 bench: 54 @for i in $(PROGS); do \ 55 $(TIME) -name $$i -- ./$$i.compcert; \ 56 done 57 58 clean: 59 rm -f *.compcert *.gcc 60 rm -f *.compcert.c *.light.c *.parsed.c *.s *.o *.sdump *~