mirror of https://github.com/sharkdp/fd.git
Change makefile to support TARGET
This commit is contained in:
parent
6e3eb26af3
commit
77a12204bb
9
Makefile
9
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
|
||||
|
|
Loading…
Reference in New Issue