From d091f3a6bc36645b0366084f0fcec59244e0f28f Mon Sep 17 00:00:00 2001 From: 2ndbeam <2ndbeam@disroot.org> Date: Thu, 23 Oct 2025 12:48:12 +0300 Subject: [PATCH] .love name with version and sha256 computing --- Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 49e76ef..4ba0657 100644 --- a/Makefile +++ b/Makefile @@ -4,29 +4,36 @@ IGNORE_FLAGS=--ignore Makefile --ignore build LOVE_PATH := $(shell command -v love) TARGET_NAME = $(shell arch) FUSED_NAME = lines +LOVE_NAME = lines ifdef VERSION FUSED_NAME := $(FUSED_NAME)-v$(VERSION) + LOVE_NAME := $(LOVE_NAME)-v$(VERSION) endif ifdef TARGET_NAME FUSED_NAME := $(FUSED_NAME)-$(TARGET_NAME) endif +LOVE_NAME := $(LOVE_NAME).love + default: @echo Available targets: love, fused, clean love: clean mkdir build - ls $(IGNORE_FLAGS) | xargs zip -9r build/lines.love - @echo created lines.love in build directory + ls $(IGNORE_FLAGS) | xargs zip -9r build/$(LOVE_NAME) + sha256sum build/$(LOVE_NAME) | sed 's: build/$(LOVE_NAME)::' > build/$(LOVE_NAME).sha256 + @echo created $(LOVE_NAME) in build directory fused: love ifdef LOVE_PATH - cat ${LOVE_PATH} build/lines.love > build/$(FUSED_NAME) + cat ${LOVE_PATH} build/$(LOVE_NAME) > build/$(FUSED_NAME) chmod +x build/$(FUSED_NAME) + sha256sum build/$(FUSED_NAME) | sed 's: build/$(FUSED_NAME)::' > build/$(FUSED_NAME).sha256 @echo created fused binary $(FUSED_NAME) in build directory else @echo love not found in PATH or LOVE_PATH + exit 1 endif clean: