aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/xor_and_mat/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'test/monniaux/xor_and_mat/Makefile')
-rw-r--r--test/monniaux/xor_and_mat/Makefile35
1 files changed, 25 insertions, 10 deletions
diff --git a/test/monniaux/xor_and_mat/Makefile b/test/monniaux/xor_and_mat/Makefile
index 005382de..be4d8158 100644
--- a/test/monniaux/xor_and_mat/Makefile
+++ b/test/monniaux/xor_and_mat/Makefile
@@ -1,21 +1,36 @@
+
include ../rules.mk
-PRODUCTS=int_mat.host int_mat.gcc.k1c.out int_mat.ccomp.k1c.out int_mat.ccomp.k1c.s int_mat.gcc.k1c.s int_mat.gcc.k1c int_mat.ccomp.k1c
-all: $(PRODUCTS)
+src=int_mat_run.c int_mat.c
-int_mat.host: int_mat.c int_mat_run.c xor_and.h
- $(CC) $(CFLAGS) int_mat.c int_mat_run.c -o $@
+PRODUCTS?=xor_and_mat.gcc.host xor_and_mat.ccomp.host xor_and_mat.gcc.k1c xor_and_mat.gcc.o1.k1c xor_and_mat.ccomp.k1c
+PRODUCTS_OUT=$(addsuffix .out,$(PRODUCTS))
-int_mat.gcc.k1c.s int_mat.ccomp.k1c.s int_mat_run.gcc.k1c.s: xor_and.h
+all: $(PRODUCTS)
+
+.PHONY:
+run: measures.csv
-int_mat.gcc.k1c: int_mat.gcc.k1c.o int_mat_run.gcc.k1c.o
- $(K1C_CC) $(K1C_CFLAGS) $+ -o $@
-int_mat.ccomp.k1c: int_mat.ccomp.k1c.o int_mat_run.gcc.k1c.o
+xor_and_mat.gcc.host: $(src:.c=.gcc.host.o) ../clock.gcc.host.o
+ $(CC) $(CFLAGS) $+ -o $@
+xor_and_mat.ccomp.host: $(src:.c=.ccomp.host.o) ../clock.gcc.host.o
+ $(CCOMP) $(CCOMPFLAGS) $+ -o $@
+xor_and_mat.gcc.k1c: $(src:.c=.gcc.k1c.o) ../clock.gcc.k1c.o
+ $(K1C_CC) $(K1C_CFLAGS) $+ -o $@
+xor_and_mat.gcc.o1.k1c: $(src:.c=.gcc.o1.k1c.o) ../clock.gcc.k1c.o
+ $(K1C_CC) $(K1C_CFLAGS_O1) $+ -o $@
+xor_and_mat.ccomp.k1c: $(src:.c=.ccomp.k1c.o) ../clock.gcc.k1c.o
$(K1C_CCOMP) $(K1C_CCOMPFLAGS) $+ -o $@
+measures.csv: $(PRODUCTS_OUT)
+ echo "benches, gcc host,ccomp host,gcc k1c,gcc o1 k1c,ccomp k1c" > $@
+ echo "xor_and_mat c2", $$(grep 'c2_time' xor_and_mat.gcc.host.out | cut -d':' -f2), $$(grep 'c2_time' xor_and_mat.ccomp.host.out | cut -d':' -f2), $$(grep 'c2_time' xor_and_mat.gcc.k1c.out | cut -d':' -f2), $$(grep 'c2_time' xor_and_mat.gcc.o1.k1c.out | cut -d':' -f2), $$(grep 'c2_time' xor_and_mat.ccomp.k1c.out | cut -d':' -f2)>> $@
+ echo "xor_and_mat c7", $$(grep 'c7_time' xor_and_mat.gcc.host.out | cut -d':' -f2), $$(grep 'c7_time' xor_and_mat.ccomp.host.out | cut -d':' -f2), $$(grep 'c7_time' xor_and_mat.gcc.k1c.out | cut -d':' -f2), $$(grep 'c7_time' xor_and_mat.gcc.o1.k1c.out | cut -d':' -f2), $$(grep 'c7_time' xor_and_mat.ccomp.k1c.out | cut -d':' -f2)>> $@
+
+.SECONDARY:
+.PHONY:
clean:
- $(RM) -f $(PRODUCTS) int_mat.gcc.k1c.o int_mat.ccomp.k1c.o int_mat_run.gcc.k1c.o
+ rm -f *.o *.s *.k1c *.csv
-.PHONY: clean