2 target = $(shell rustc -vV | grep host | awk '{print $$2}')
3 architectures := x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu
12 rustup target add $(target)
15 cargo build --profile $(profile) --target $(target)
18 @$(eval filename := $(app_name)-$(target)-$(channel))
19 rsync -avz $(filename).tar.gz deploy@conchos.unlimited.pizza:/srv/http/build.r.bdr.sh/$(app_name)
23 $(MAKE) -e channel=$(channel) -e target=$@ release
25 $(MAKE) -e target=$@ build
31 @$(eval filename := $(app_name)-$(target)-$(channel))
32 tar -czvf $(filename).tar.gz -C target/$(target)/$(profile)/ $(app_name)
34 package: $(architectures)
37 ifeq ($(GIT_REF),refs/heads/main)
38 $(MAKE) -e profile=release -e channel=unstable package
39 else ifneq (,$(findstring refs/tags/,$(GIT_REF)))
40 $(MAKE) -e profile=release -e channel=$(subst refs/tags/,,$(GIT_REF)) package
43 .PHONY: default build $(architectures) rpm package prepare set_rust ci release