-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (30 loc) · 968 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
33
34
35
36
37
38
export ASAN_OPTIONS := detect_leaks=1
export CC := /usr/local/opt/llvm/bin/clang
export CXX := /usr/local/opt/llvm/bin/clang++
export BUILD_DIRECTORY := Build
export INPUT_DIRECTORY := Input
export PROGRAM := yambi
.PHONY: clean compile
all: lint
lint: run
@printf '\n✨ Lint\n'
@oclint -p Build -no-analytics -enable-global-analysis \
-enable-clang-static-analyzer Source/*.cpp
run: test
@printf '🚗 Run\n\n'
@$(BUILD_DIRECTORY)/$(PROGRAM) \
$(INPUT_DIRECTORY)/"Plain Scalar>Word Chars.yaml"
test: compile
@printf '🐛 Test\n\n'
@Test/test.fish && printf '\n'
compile: $(BUILD_DIRECTORY)
@printf '🏗 Build\n\n'
@set -o pipefail; ninja -C Build | sed -e 's~\.\./~~' && printf '\n';
$(BUILD_DIRECTORY):
@printf '🤖 Configure\n\n'
@mkdir -p $(BUILD_DIRECTORY)
@cd $(BUILD_DIRECTORY); set -o pipefail; \
cmake -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. && printf '\n'
clean:
@printf '🗑 Clean\n'
@rm -rf $(BUILD_DIRECTORY)