-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
32 lines (23 loc) · 726 Bytes
/
Makefile
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
27
28
29
30
31
32
PROBLEMS_DIR=problems/
RESULTS_DIR=results/
RESULTS_DB=db/benchmark.db
BENCHMARK_APP=../omplapp/build/bin/benchmark
DB_SCRIPT=../omplapp/ompl/scripts/benchmark_statistics.py
CFG_FILES=$(shell find $(PROBLEMS_DIR) -name *.cfg)
LOG_FILES=$(addprefix $(RESULTS_DIR),$(notdir $(CFG_FILES:.cfg=.log)))
TARGETS=$(basename $(notdir $(CFG_FILES)))
all: benchmark db
benchmark: $(TARGETS)
define RUN_BENCHMARK_template
$(basename $(notdir $(1))): $(1)
$(BENCHMARK_APP) $(1)
endef
$(foreach cfg,$(CFG_FILES),$(eval $(call RUN_BENCHMARK_template,$(cfg))))
db:
if test -e $(RESULTS_DB); then \
mv $(RESULTS_DB) $(RESULTS_DB).backup; \
fi
$(DB_SCRIPT) $(LOG_FILES) --database=$(RESULTS_DB)
clean:
rm -f *.console
.PHONY: db