Skip to content

Instantly share code, notes, and snippets.

@floriancargoet
Last active May 5, 2017 03:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save floriancargoet/3f07210ce6bd180d24fa to your computer and use it in GitHub Desktop.
Save floriancargoet/3f07210ce6bd180d24fa to your computer and use it in GitHub Desktop.
Love2D Android Makefile
# Put this Makefile in love-android-sdl2/
# Put your Lua files in love-android-sdl2/assets/game/
src_path := assets/game
src_files := $(wildcard $(src_path)/*)
# do not change
love_file := assets/game.love
apk_file := bin/love-android-debug.apk
# if you change these, update AndroidManifest.xml and source
app_package := org.love2d.android
app_activity := GameActivity
clean:
-rm -f $(love_file) $(apk_file)
-adb uninstall $(app_package)
apk: $(apk_file)
love: $(love_file)
install: apk
adb install -r $(apk_file)
run: install
adb shell am start -n $(app_package)/.$(app_activity)
$(apk_file): $(love_file)
ant debug
$(love_file): $(src_files)
-rm -f $@
cd $(src_path) ; zip -r tmp.love . ; cd -
mv $(src_path)/tmp.love $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment