diff options
Diffstat (limited to 'test/monniaux')
-rw-r--r-- | test/monniaux/benches.sh | 5 | ||||
-rw-r--r-- | test/monniaux/bitsliced-aes/Makefile | 23 | ||||
-rw-r--r-- | test/monniaux/bitsliced-aes/make.proto | 1 | ||||
-rwxr-xr-x | test/monniaux/genmake.py | 20 |
4 files changed, 17 insertions, 32 deletions
diff --git a/test/monniaux/benches.sh b/test/monniaux/benches.sh index f6552370..9bca6b42 100644 --- a/test/monniaux/benches.sh +++ b/test/monniaux/benches.sh @@ -1,4 +1 @@ -#benches="binary_search bitsliced-aes bitsliced-tea complex float_mat glibc_qsort heapsort idea number_theoretic_transform quicksort sha-2 tacle-bench-lift tacle-bench-powerwindow ternary too_slow" -benches="binary_search bitsliced-tea complex float_mat glibc_qsort heapsort idea number_theoretic_transform quicksort sha-2 tacle-bench-lift tacle-bench-powerwindow ternary too_slow" - -# TODO - put back bitslices-aes once i get it working again +benches="binary_search bitsliced-aes bitsliced-tea complex float_mat glibc_qsort heapsort idea number_theoretic_transform quicksort sha-2 tacle-bench-lift tacle-bench-powerwindow ternary too_slow" diff --git a/test/monniaux/bitsliced-aes/Makefile b/test/monniaux/bitsliced-aes/Makefile deleted file mode 100644 index 6a0367e0..00000000 --- a/test/monniaux/bitsliced-aes/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -src = $(wildcard *.c) tests/tests.c - -include ../rules.mk - -all: test.gcc.k1c.out test.gcc.o1.k1c.out test.ccomp.k1c.out test.gcc.host.out test.ccomp.host.out - -test.gcc.o1.k1c: $(src:.c=.gcc.o1.k1c.o) ../clock.gcc.k1c.o - $(K1C_CC) $(K1C_CFLAGS_O1) -o $@ $+ - -test.gcc.k1c: $(src:.c=.gcc.k1c.o) ../clock.gcc.k1c.o - $(K1C_CC) $(K1C_CFLAGS) -o $@ $+ - -test.ccomp.k1c: $(src:.c=.ccomp.k1c.o) ../clock.gcc.k1c.o - $(K1C_CCOMP) $(K1C_CCOMPFLAGS) -o $@ $+ - -test.gcc.host: $(src:.c=.gcc.host.o) ../clock.gcc.host.o - $(CC) $(CFLAGS) -o $@ $+ - -test.ccomp.host: $(src:.c=.ccomp.host.o) ../clock.gcc.host.o - $(CCOMP) $(CCOMPFLAGS) -o $@ $+ - -clean: - rm -f *.o *.k1c *.host */*.o *.s */*.s *.out diff --git a/test/monniaux/bitsliced-aes/make.proto b/test/monniaux/bitsliced-aes/make.proto index 6f3139c7..530d7e36 100644 --- a/test/monniaux/bitsliced-aes/make.proto +++ b/test/monniaux/bitsliced-aes/make.proto @@ -1 +1,2 @@ +sources: "$(wildcard *.c) tests/tests.c" target: test diff --git a/test/monniaux/genmake.py b/test/monniaux/genmake.py index 7e25c181..c0fe0d05 100755 --- a/test/monniaux/genmake.py +++ b/test/monniaux/genmake.py @@ -41,6 +41,10 @@ with open(yaml_file, "r") as f: basename = settings["target"] objdeps = settings["objdeps"] if "objdeps" in settings else [] intro = settings["intro"] if "intro" in settings else "" +sources = settings["sources"] if "sources" in settings else None + +if sources: + intro += "\nsrc=" + sources for objdep in objdeps: if objdep["compiler"] not in ("gcc", "ccomp", "both"): @@ -59,9 +63,16 @@ def make_obj(name, env, compiler_short): def make_clock(env, optim): return "clock.gcc." + env.target +def make_sources(env, optim): + if sources: + return "$(src:.c=." + env.compiler.short + (("." + optim.short) if optim.short != "" else "") + "." + env.target + ".o)" + else: + return "{product}.o".format(product = make_product(env, optim)) + def print_rule(env, optim): - print("{product}: {product}.o ../{clock}.o " - .format(product = make_product(env, optim), clock = make_clock(env, optim)) + print("{product}: {sources} ../{clock}.o " + .format(product = make_product(env, optim), + sources = make_sources(env, optim), clock = make_clock(env, optim)) + " ".join([make_obj(objdep["name"], env, (objdep["compiler"] if objdep["compiler"] != "both" else env.compiler.short)) for objdep in objdeps])) print(" {compiler} {flags} $+ -o $@" .format(compiler = env.compiler.full, flags = optim.full)) @@ -91,8 +102,7 @@ for env in environments: print_rule(env, optim) print(""" +.PHONY: clean: - -rm -f *.o *.s *.k1c - -.PHONY: clean + rm -f *.o *.s *.k1c """) |