summary refs log blame commit diff
path: root/pkgs/games/hawkthorne/makefile.patch
blob: 16a79683149d092358f6802c9e2a613f8e07a0eb (plain) (tree)
































                                                                                  
diff --git a/Makefile b/Makefile
index 55eb817..f3406aa 100644
--- a/Makefile
+++ b/Makefile
@@ -18,10 +18,14 @@ endif

 tilemaps := $(patsubst %.tmx,%.lua,$(wildcard src/maps/*.tmx))

-maps: $(tilemaps)
-
 love: build/hawkthorne.love

+shebang: build/hawkthorne.love
+	cat <(echo '#!/usr/bin/env love') build/hawkthorne.love > build/hawkthorne
+	chmod +x build/hawkthorne
+
+maps: $(tilemaps)
+
 build/hawkthorne.love: $(tilemaps) src/*
 	mkdir -p build
 	cd src && zip --symlinks -q -r ../build/hawkthorne.love . -x ".*" \
@@ -30,6 +34,12 @@ build/hawkthorne.love: $(tilemaps) src/*
 run: $(tilemaps) $(LOVE)
 	$(LOVE) src

+check: test
+
+install: shebang
+	mkdir -p $(out)/bin
+	cp build/hawkthorne $(out)/bin
+
 src/maps/%.lua: src/maps/%.tmx bin/tmx2lua
 	bin/tmx2lua $<