+prepare:
+ rustup target add $(target)
+
+build: prepare
+ @export $$(cat .env | xargs) > /dev/null 2>&1 && cargo build --profile $(profile) --target $(target)
+
+release: rpm tar deb
+ @$(eval filename := $(app_name)-$(target)-$(channel))
+
+$(architectures):
+ifneq ($(channel),)
+ $(MAKE) -e channel=$(channel) -e target=$@ release
+else
+ $(MAKE) -e target=$@ build
+endif
+
+deb: build
+ifeq ($(findstring linux,$(target)),linux)
+ @$(eval filename := $(app_name)-$(target)-$(channel))
+ @export $$(cat .env | xargs) > /dev/null 2>&1 && cargo deb --profile $(profile) --target $(target)
+ mv target/$(target)/debian/*.deb $(filename).deb
+ sha256sum $(filename).deb > $(filename).deb.sha256
+ rsync -avz $(filename).deb deploy@conchos.unlimited.pizza:/srv/http/build.r.bdr.sh/$(long_app_name)
+ rsync -avz $(filename).deb.sha256 deploy@conchos.unlimited.pizza:/srv/http/build.r.bdr.sh/$(long_app_name)
+endif