-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (26 loc) · 853 Bytes
/
Copy pathMakefile
File metadata and controls
36 lines (26 loc) · 853 Bytes
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
CRATES := meowbot-ai meowbot-core meowbot-db meowbot-platform meowbot-weather
MODE ?= debug
OUT_DIR := bin
.PHONY: all $(CRATES) clean
all: $(CRATES)
$(CRATES):
cargo test -p $@ $(if $(filter $(MODE),release),--release,)
cargo clippy --no-deps -p $@ $(if $(filter $(MODE),release),--release,)
cargo fmt --check -p $@ $(if $(filter $(MODE),release),--release,)
cargo build -p $@ $(if $(filter $(MODE),release),--release,)
mkdir -p $(OUT_DIR)/$@
cp target/$(MODE)/$@ $(OUT_DIR)/$@/
@if [ -f $@/.env ]; then cp $@/.env $(OUT_DIR)/$@/.env; fi
clean:
rm -rf $(OUT_DIR)
cargo clean
run-ai:
./$(OUT_DIR)/meowbot-ai/meowbot-ai
run-core:
./$(OUT_DIR)/meowbot-core/meowbot-core
run-db:
./$(OUT_DIR)/meowbot-db/meowbot-db
run-platform:
./$(OUT_DIR)/meowbot-platform/meowbot-platform
run-weather:
./$(OUT_DIR)/meowbot-weather/meowbot-weather