ZeroEpsilon/Makefile

34 lines
858 B
Makefile

NAME=zero_epsilon
include .env
all: deps_opt build
run: build
LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) ./$(NAME)
build:
crystal build src/$(NAME).cr --stats --error-trace
debug:
crystal build src/$(NAME).cr --stats --error-trace # todo add debug flag
sandbox:
crystal build src/tests/physics_sandbox.cr --stats --error-trace
run-sandbox:
LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) crystal run src/tests/physics_sandbox.cr --stats --error-trace
release:
crystal build src/$(NAME).cr --stats --release
test:
crystal spec --error-trace
deps:
shards install
deps_update:
shards update
deps_opt:
@[ -d lib/ ] || make deps
doc:
crystal docs ./src/zero_epsilon.cr ./src/tests/physics_sandbox.cr ./lib/crsfml/src/crsfml.cr ./lib/imgui/src/imgui.cr ./lib/imgui-sfml/src/imgui-sfml.cr
clean:
rm $(NAME)
.PHONY: all run build release test deps deps_update clean doc