.PHONY: build build: \ target/release/zmp24 ARCH := $(shell uname -m) FILES_RS := $(shell find src -type f -regex '^.*\.rs$$') FILES_CLIENT := client/dst/index.html client/dst/script.js client/dst/style.css MAIN_RS_SRCS := $(FILES_RS) $(FILES_CLIENT) Cargo.toml SEARCH_REPLACE := lib/search_and_replace/target/release/search_and_replace .PHONY: run run: $(MAIN_RS_SRCS) dst/dev_config.toml cargo run --features dev -- dst/dev_config.toml .PHONY: test test: target/debug/zmp24 cargo test .PHONY: test_tabs test_tabs: @for file in $(FILES_RS); do \ echo -n "$$file ... "; \ if grep -Eq '^\s* ' "$$file"; then \ echo "fail"; \ exit 1; \ fi; \ echo "ok"; \ done .PHONY: clean clean: client_clean cargo clean cd lib/search_and_replace && cargo clean rm -rf dst dst: mkdir dst include lib/config.mk include client/client.mk include image/image.mk target/release/zmp24: $(MAIN_RS_SRCS) cargo build --release target/debug/zmp24: $(MAIN_RS_SRCS) cargo build target/$(ARCH)-unknown-linux-musl/release/zmp24: $(MAIN_RS_SRCS) cargo build --target $(ARCH)-unknown-linux-musl --release $(SEARCH_REPLACE): lib/search_and_replace/src/main.rs lib/search_and_replace/Cargo.toml cd lib/search_and_replace && cargo build --release