aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 18 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 5992396..f9133e2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,12 @@
profile := dev
target = $(shell rustc -vV | grep host | awk '{print $$2}')
-architectures := aarch64-unknown-linux-gnu
+# Cargo outputs dev profile to 'debug' directory, not 'dev'
+ifeq ($(profile),dev)
+output_dir := debug
+else
+output_dir := $(profile)
+endif
+architectures := x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu
app_name := map
deploy_host := deploy@build.r.bdr.sh
deploy_path := /srv/http/build.r.bdr.sh/$(app_name)-linux
@@ -26,7 +32,7 @@ endif
# Build ########################################################################
build: compile_translations prepare
- @$(eval target_dir := ./target/$(target)/$(profile)/map)
+ @$(eval target_dir := ./target/$(target)/$(output_dir)/map)
cargo build --profile $(profile) --target $(target)
# Code Quality #################################################################
@@ -81,7 +87,7 @@ endif
package-tar: build
@$(eval staging := $(shell mktemp -d))
- @install -Dm0755 target/$(target)/$(profile)/$(app_name) $(staging)/usr/bin/$(app_name)
+ @install -Dm0755 target/$(target)/$(output_dir)/$(app_name) $(staging)/usr/bin/$(app_name)
@install -Dm0644 resources/logo.svg $(staging)/usr/share/icons/hicolor/scalable/apps/systems.tranquil.Map.svg
@install -Dm0644 resources/systems.tranquil.Map.desktop $(staging)/usr/share/applications/systems.tranquil.Map.desktop
@install -Dm0644 resources/systems.tranquil.Map.metainfo.xml $(staging)/usr/share/metainfo/systems.tranquil.Map.metainfo.xml
@@ -121,7 +127,7 @@ release: package distribute
# Installation #################################################################
install: build
- install -Dm0755 target/$(target)/$(profile)/$(app_name) $(prefix)/bin/$(app_name)
+ install -Dm0755 target/$(target)/$(output_dir)/$(app_name) $(prefix)/bin/$(app_name)
install -Dm0644 resources/logo.svg $(prefix)/share/icons/hicolor/scalable/apps/systems.tranquil.Map.svg
install -Dm0644 resources/systems.tranquil.Map.desktop $(prefix)/share/applications/systems.tranquil.Map.desktop
install -Dm0644 resources/systems.tranquil.Map.metainfo.xml $(prefix)/share/metainfo/systems.tranquil.Map.metainfo.xml
@@ -146,7 +152,7 @@ uninstall:
# CI ###########################################################################
-ci: lint coverage
+ci: lint
ifeq ($(GIT_REF),refs/heads/main)
$(MAKE) -e profile=release -e channel=unstable $(architectures)
else ifneq (,$(findstring refs/tags/,$(GIT_REF)))
@@ -160,5 +166,11 @@ else
$(MAKE) -e target=$@ build
endif
+release_all:
+ifndef channel
+ $(error channel is required for release_all)
+endif
+ $(MAKE) -e profile=release $(architectures)
+
-.PHONY: default build $(architectures) package package-rpm package-deb package-tar package-flatpak distribute distribute-rpm distribute-deb distribute-tar distribute-flatpak prepare set_rust ci release test coverage format update_flatpak_dependencies extract_strings find_translatable_files compile_translations install uninstall
+.PHONY: default build $(architectures) package package-rpm package-deb package-tar package-flatpak distribute distribute-rpm distribute-deb distribute-tar distribute-flatpak prepare set_rust ci release release_all test coverage format update_flatpak_dependencies extract_strings find_translatable_files compile_translations install uninstall