add version and arch info to fused binary name

This commit is contained in:
Alexey 2025-10-22 17:26:48 +03:00
commit 7e13e1ca4f

View file

@ -1,5 +1,17 @@
VERSION=0.1
IGNORE_FLAGS=--ignore Makefile --ignore build
LOVE_PATH := $(shell command -v love)
TARGET_NAME = $(shell arch)
FUSED_NAME = lines
ifdef VERSION
FUSED_NAME := $(FUSED_NAME)-v$(VERSION)
endif
ifdef TARGET_NAME
FUSED_NAME := $(FUSED_NAME)-$(TARGET_NAME)
endif
default:
@echo Available targets: love, fused, clean
@ -10,9 +22,9 @@ love: clean
fused: love
ifdef LOVE_PATH
cat ${LOVE_PATH} build/lines.love > build/lines
chmod +x build/lines
@echo created fused binary lines in build directory
cat ${LOVE_PATH} build/lines.love > build/$(FUSED_NAME)
chmod +x build/$(FUSED_NAME)
@echo created fused binary $(FUSED_NAME) in build directory
else
@echo love not found in PATH or LOVE_PATH
endif