34 lines
748 B
Makefile
34 lines
748 B
Makefile
all: build
|
|
|
|
OPTS ?= --progress --no-debug
|
|
Q ?= @
|
|
SHOULD_UPDATE = ./bin/should-update
|
|
DBDIR=/tmp/tests-on-dodb
|
|
|
|
RESULTS_DIR=results
|
|
benchmark-cars:
|
|
$(Q)crystal build spec/benchmark-cars.cr $(OPTS) --release
|
|
|
|
benchmark-cars-run: benchmark-cars
|
|
./benchmark-cars search # by default, test search durations
|
|
./bin/stats.sh $(RESULTS_DIR)
|
|
./bin/extract-data-benchmark-cars.sh $(RESULTS_DIR)
|
|
|
|
build: benchmark-cars
|
|
|
|
wipe-db:
|
|
rm -r $(DBDIR)
|
|
|
|
release:
|
|
make build OPTS="--release --progress"
|
|
|
|
doc:
|
|
crystal docs src/dodb.cr
|
|
|
|
HTTPD_ACCESS_LOGS ?= /tmp/access-dodb-docs.log
|
|
HTTPD_ADDR ?= 127.0.0.1
|
|
HTTPD_PORT ?= 9000
|
|
DIR ?= docs
|
|
serve-doc:
|
|
darkhttpd $(DIR) --addr $(HTTPD_ADDR) --port $(HTTPD_PORT) --log $(HTTPD_ACCESS_LOGS)
|