melee-roguelite/makefile

58 lines
1.8 KiB
Makefile
Raw Normal View History

2018-10-17 18:32:39 -07:00
VERSION=0.1.0
2018-11-30 17:39:09 -08:00
NAME=change-me
2018-10-17 18:32:39 -07:00
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/*)
2018-11-30 17:39:09 -08:00
LUA := $(wildcard *.lua)
SRC := $(wildcard *.fnl)
OUT := $(patsubst %.fnl,%.lua,$(SRC))
2018-10-17 18:32:39 -07:00
2018-11-30 17:39:09 -08:00
LOVEFILE=releases/$(NAME)-$(VERSION).love
run: ; love $(PWD)
%.lua: %.fnl ; lua lib/fennel --compile --correlate $< > $@
clean: ; rm -rf $(OUT)
$(LOVEFILE): $(LUA) $(OUT) $(LIBS) assets
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
REL="$(PWD)/love-release.sh" # https://p.hagelb.org/love-release.sh
FLAGS=-a "$(AUTHOR)" --description $(DESCRIPTION) \
2018-11-30 17:39:09 -08:00
--love 11.2 --url $(URL) --version $(VERSION) --lovefile $(LOVEFILE)
2018-10-17 18:32:39 -07:00
releases/$(NAME)-$(VERSION)-x86_64.AppImage: $(LOVEFILE)
2018-11-30 17:39:09 -08:00
cd appimage && ./build.sh 11.2 $(PWD)/$(LOVEFILE)
2018-10-17 18:32:39 -07:00
mv appimage/game-x86_64.AppImage $@
releases/$(NAME)-$(VERSION)-macos.zip: $(LOVEFILE)
$(REL) $(FLAGS) -M
2018-11-30 17:39:09 -08:00
mv releases/$(NAME)-macos.zip $@
2018-10-17 18:32:39 -07:00
releases/$(NAME)-$(VERSION)-win.zip: $(LOVEFILE)
$(REL) $(FLAGS) -W32
2018-11-30 17:39:09 -08: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
2018-11-30 17:39:09 -08:00
# If you release on itch.io, you should install butler:
# https://itch.io/docs/butler/installing.html
2018-10-17 18:32:39 -07:00
uploadlinux: releases/$(NAME)-$(VERSION)-x86_64.AppImage
butler push $^ technomancy/exo-encounter-667:linux
uploadmac: releases/$(NAME)-$(VERSION)-macos.zip
butler push $^ technomancy/exo-encounter-667:mac
uploadwindows: releases/$(NAME)-$(VERSION)-win.zip
butler push $^ technomancy/exo-encounter-667:windows
upload: uploadlinux uploadmac uploadwindows