2 target = $(shell rustc -vV | grep host | awk '{print $$2}')
3 architectures := x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu
11 rustup target add $(target)
14 cargo build --profile $(profile) --target $(target)
17 @echo "Releasing $(target) to $(channel)"
20 $(MAKE) -e target=$@ rpm
22 $(MAKE) -e channel=$(channel) -e target=$@ release
27 package: $(architectures)
30 ifeq ($(GIT_REF),refs/heads/main)
31 @$(eval channel=unstable)
32 else ifneq (,$(findstring refs/tags/,$(GIT_REF)))
33 @$(eval channel=$(subst refs/tags/,,$(GIT_REF)))
36 $(MAKE) -e channel=$(channel) package
39 .PHONY: default build $(architectures) rpm package prepare set_rust ci release