From 77a12204bbaac82cb1c30551516dd4874cd2d550 Mon Sep 17 00:00:00 2001 From: Thayne McCombs Date: Thu, 1 Dec 2022 22:37:16 -0700 Subject: [PATCH] Change makefile to support TARGET --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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