2018-10-17 18:32:39 -07:00
|
|
|
VERSION=0.1.0
|
2022-03-16 17:22:07 -07:00
|
|
|
LOVE_VERSION=11.4
|
2018-11-30 17:39:09 -08:00
|
|
|
NAME=change-me
|
2019-10-07 20:02:32 -07:00
|
|
|
ITCH_ACCOUNT=change-me-too
|
2018-10-17 18:32:39 -07:00
|
|
|
URL=https://gitlab.com/alexjgriffith/min-love2d-fennel
|
2020-04-08 18:56:53 -07:00
|
|
|
AUTHOR="Your Name"
|
2018-10-17 18:32:39 -07:00
|
|
|
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)
|
2018-10-17 18:32:39 -07:00
|
|
|
|
2021-09-12 22:25:46 -07:00
|
|
|
run: ; love .
|
2018-11-30 17:39:09 -08:00
|
|
|
|
2021-09-12 22:25:46 -07:00
|
|
|
count: ; cloc *.fnl
|
2019-04-20 18:08:03 -07:00
|
|
|
|
2021-09-12 22:25:46 -07:00
|
|
|
clean: ; rm -rf releases/*
|
2019-04-20 18:08:03 -07:00
|
|
|
|
|
|
|
LOVEFILE=releases/$(NAME)-$(VERSION).love
|
|
|
|
|
2021-09-12 22:25:46 -07:00
|
|
|
$(LOVEFILE): $(LUA) $(SRC) $(LIBS)
|
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
|
|
|
|
|
2021-09-12 22:15:26 -07:00
|
|
|
REL=$(PWD)/buildtools/love-release.sh # https://p.hagelb.org/love-release.sh
|
2018-10-17 18:32:39 -07:00
|
|
|
FLAGS=-a "$(AUTHOR)" --description $(DESCRIPTION) \
|
2020-04-08 18:56:53 -07:00
|
|
|
--love $(LOVE_VERSION) --url $(URL) --version $(VERSION) --lovefile $(LOVEFILE)
|
2018-10-17 18:32:39 -07:00
|
|
|
|
|
|
|
releases/$(NAME)-$(VERSION)-x86_64.AppImage: $(LOVEFILE)
|
2021-02-01 17:09:15 -08:00
|
|
|
cd buildtools/appimage && ./build.sh $(LOVE_VERSION) $(PWD)/$(LOVEFILE)
|
|
|
|
mv buildtools/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:24:43 -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:24:43 -07:00
|
|
|
mv releases/$(NAME)-win32.zip $@
|
2018-10-17 18:32:39 -07:00
|
|
|
|
2021-02-01 17:09:15 -08:00
|
|
|
releases/$(NAME)-$(VERSION)-web.zip: $(LOVEFILE)
|
2022-03-10 12:29:30 -08:00
|
|
|
buildtools/love-js/love-js.sh releases/$(NAME)-$(VERSION).love $(NAME) -v=$(VERSION) -a=$(AUTHOR) -o=releases
|
2021-02-01 17:09:15 -08:00
|
|
|
|
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
|
2021-02-01 17:09:15 -08:00
|
|
|
web: releases/$(NAME)-$(VERSION)-web.zip
|
2018-10-17 18:32:39 -07:00
|
|
|
|
2022-03-10 12:29:30 -08:00
|
|
|
|
|
|
|
runweb: $(LOVEFILE)
|
2022-03-16 17:22:07 -07:00
|
|
|
buildtools/love-js/love-js.sh $(LOVEFILE) $(NAME) -v=$(VERSION) -a=$(AUTHOR) -o=releases -r -n
|
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
|
2019-10-07 20:02:32 -07:00
|
|
|
butler push $^ $(ITCH_ACCOUNT)/$(NAME):linux --userversion $(VERSION)
|
2018-10-17 18:32:39 -07:00
|
|
|
uploadmac: releases/$(NAME)-$(VERSION)-macos.zip
|
2019-10-07 20:02:32 -07:00
|
|
|
butler push $^ $(ITCH_ACCOUNT)/$(NAME):mac --userversion $(VERSION)
|
2018-10-17 18:32:39 -07:00
|
|
|
uploadwindows: releases/$(NAME)-$(VERSION)-win.zip
|
2019-10-07 20:02:32 -07:00
|
|
|
butler push $^ $(ITCH_ACCOUNT)/$(NAME):windows --userversion $(VERSION)
|
2021-02-01 17:09:15 -08:00
|
|
|
uploadweb: releases/$(NAME)-$(VERSION)-web.zip
|
|
|
|
butler push $^ $(ITCH_ACCOUNT)/$(NAME):web --userversion $(VERSION)
|
2019-04-20 18:08:03 -07:00
|
|
|
|
2019-10-07 20:02:32 -07:00
|
|
|
upload: uploadlinux uploadmac uploadwindows
|
2018-10-17 18:32:39 -07:00
|
|
|
|
2019-10-07 20:02:32 -07:00
|
|
|
release: linux mac windows upload cleansrc
|