Compare commits

...

2 commits

Author SHA1 Message Date
7e13e1ca4f add version and arch info to fused binary name 2025-10-22 17:26:48 +03:00
e5241d6c45 added Makefile 2025-10-22 17:16:06 +03:00
2 changed files with 35 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
build

34
Makefile Normal file
View file

@ -0,0 +1,34 @@
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
love: clean
mkdir build
ls $(IGNORE_FLAGS) | xargs zip -9r build/lines.love
@echo created lines.love in build directory
fused: love
ifdef LOVE_PATH
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
clean:
-rm -rf build