diff --git a/Makefile b/Makefile index 6ca17ba..62f44d8 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,19 @@ PROFILE=release EXE=target/$(PROFILE)/fd +CARGO_CMD=cargo prefix=/usr/local bindir=$(prefix)/bin datadir=$(prefix)/share exe_name=fd +build_opts=--locked --profile $(PROFILE) + +ifdef TARGET + EXE=target/$(TARGET)/$(PROFILE)/fd + build_opts+=--target $(TARGET) +endif $(EXE): Cargo.toml src/**/*.rs - cargo build --profile $(PROFILE) + $(CARGO_CMD) build $(build_opts) .PHONY: completions completions: autocomplete/fd.bash autocomplete/fd.fish autocomplete/fd.ps1 autocomplete/_fd