melee-roguelite/makefile

62 lines
1.9 KiB
Makefile
Raw Normal View History

2018-10-17 18:32:39 -07:00
VERSION=0.1.0
NAME=min-love2d-fennel
URL=https://gitlab.com/alexjgriffith/min-love2d-fennel
AUTHOR="Alexander Griffith"
DESCRIPTION="Minimal setup for trying out Phil Hagelberg's fennel/love game design process."
LIBS := $(wildcard lib/*)
2019-04-20 18:08:03 -07:00
LUA := $(wildcard *.lua)
SRC := $(wildcard *.fnl)
OUT := $(patsubst %.fnl,%.lua,$(SRC))
2018-10-17 18:32:39 -07:00
2019-04-20 18:08:03 -07:00
run: $(OUT) ; love .
count: ; cloc *.fnl --force-lang=clojure
clean: ; rm -rf releases/* $(OUT)
cleansrc: ; rm -rf $(OUT)
%.lua: %.fnl; lua lib/fennel --compile --correlate $< > $@
LOVEFILE=releases/$(NAME)-$(VERSION).love
$(LOVEFILE): $(LUA) $(OUT) $(LIBS) #assets text
2018-10-17 18:32:39 -07:00
mkdir -p releases/
find $^ -type f | LC_ALL=C sort | env TZ=UTC zip -r -q -9 -X $@ -@
love: $(LOVEFILE)
# platform-specific distributables
2019-04-20 18:08:03 -07:00
REL=$(PWD)/love-release.sh # https://p.hagelb.org/love-release.sh
2018-10-17 18:32:39 -07:00
FLAGS=-a "$(AUTHOR)" --description $(DESCRIPTION) \
--love 11.1 --url $(URL) --version $(VERSION) --lovefile $(LOVEFILE)
releases/$(NAME)-$(VERSION)-x86_64.AppImage: $(LOVEFILE)
cd appimage && ./build.sh 11.1 $(PWD)/$(LOVEFILE)
2019-04-20 18:08:03 -07:00
#mv appimage/game-x86_64.AppImage $@
2018-10-17 18:32:39 -07:00
releases/$(NAME)-$(VERSION)-macos.zip: $(LOVEFILE)
$(REL) $(FLAGS) -M
2019-04-20 18:08:03 -07:00
#mv releases/$(NAME)-macos.zip $@
2018-10-17 18:32:39 -07:00
releases/$(NAME)-$(VERSION)-win.zip: $(LOVEFILE)
$(REL) $(FLAGS) -W32
2019-04-20 18:08:03 -07:00
#mv releases/$(NAME)-win32.zip $@
2018-10-17 18:32:39 -07:00
linux: releases/$(NAME)-$(VERSION)-x86_64.AppImage
mac: releases/$(NAME)-$(VERSION)-macos.zip
windows: releases/$(NAME)-$(VERSION)-win.zip
uploadlinux: releases/$(NAME)-$(VERSION)-x86_64.AppImage
2019-04-20 18:08:03 -07:00
butler push $^ alexjgriffith/action-slimes:linux --userversion $(VERSION)
2018-10-17 18:32:39 -07:00
uploadmac: releases/$(NAME)-$(VERSION)-macos.zip
2019-04-20 18:08:03 -07:00
~/Downloads/butler-darwin-amd64/butler push $^ alexjgriffith/action-slimes:mac --userversion $(VERSION)
2018-10-17 18:32:39 -07:00
uploadwindows: releases/$(NAME)-$(VERSION)-win.zip
2019-04-20 18:08:03 -07:00
~/Downloads/butler-darwin-amd64/butler push $^ alexjgriffith/action-slimes:windows --userversion $(VERSION)
upload: uploadmac uploadwindows
2018-10-17 18:32:39 -07:00
2019-04-20 18:08:03 -07:00
release: mac windows upload cleansrc