summaryrefslogtreecommitdiff
path: root/test/c/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'test/c/Makefile')
-rw-r--r--test/c/Makefile48
1 files changed, 11 insertions, 37 deletions
diff --git a/test/c/Makefile b/test/c/Makefile
index 436e222..bcc7cad 100644
--- a/test/c/Makefile
+++ b/test/c/Makefile
@@ -1,46 +1,20 @@
CC=gcc
CFLAGS=-O2 -Wall
-
-VPATH=../harness ../lib
+CCOMP=../../ccomp
+CCOMPFLAGS=-dump-c
PROGS=fib integr qsort fft sha1 aes almabench
-all: $(PROGS)
-
-fib: fib.o mainfib.o
- $(CC) $(CFLAGS) -o fib fib.o mainfib.o
-clean::
- rm -f fib
-
-integr: integr.o mainintegr.o
- $(CC) $(CFLAGS) -o integr integr.o mainintegr.o
-clean::
- rm -f integr
+all_s: $(PROGS:%=%.s)
-qsort: qsort.o mainqsort.o
- $(CC) $(CFLAGS) -o qsort qsort.o mainqsort.o
-clean::
- rm -f qsort
-
-fft: fft.o mainfft.o staticlib.o
- $(CC) $(CFLAGS) -o fft fft.o mainfft.o staticlib.o -lm
-clean::
- rm -f fft
-
-sha1: sha1.o mainsha1.o staticlib.o
- $(CC) $(CFLAGS) -o sha1 sha1.o mainsha1.o staticlib.o
-clean::
- rm -f sha1 sha1.cm
+all: $(PROGS)
-aes: aes.o mainaes.o
- $(CC) $(CFLAGS) -o aes aes.o mainaes.o
-clean::
- rm -f aes aes.cm
+%: %.s
+ $(CC) $(CFLAGS) -o $* $*.s
-almabench: almabench.o mainalmabench.o staticlib.o
- $(CC) $(CFLAGS) -o almabench almabench.o mainalmabench.o staticlib.o -lm
-clean::
- rm -f almabench almabench.cm
+%.s: %.c ../../ccomp
+ $(CCOMP) $(CCOMPFLAGS) $*.c
-clean::
- rm -f *.s *.o *~
+clean:
+ rm -f $(PROGS)
+ rm -f *.clight *.s *.o *~