summaryrefslogtreecommitdiff
path: root/Makefile
blob: eb2323760d098588174229ecfca1dd4630b1de20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
GCC ?= gcc

.PHONY: default
default: runner

compile-opts:
	python2 find_compile_opts.py

INPUTS=runner.c lcs.c tick.c compile.sh md5.c md5.h compile-opts
runner: $(INPUTS)
	$(GCC) -Wall $(shell cat compile-opts) -o runner runner.c

.PHONY: bench_run
bench_run: runner_bench
	for i in `seq 200`; do ./runner_bench | grep 'processed in' | awk '{print $$4}'; done | python2 -c 'import sys; print sorted([int(a) for a in sys.stdin.read().split()])'

runner_bench: $(INPUTS)
	$(GCC) -Wall $(shell cat compile_opts) -DSINGLERUN -DTESTING -DBENCH_VAL=10000 -o runner_bench runner.c
test: test_lcs
	./test_lcs | awk '{print $$13}' | sort -g | uniq -c

test_lcs: test_lcs.c lcs.c

clean:
	rm -f runner test_lcs runner_temp runner_bench