Last active
November 17, 2020 06:39
-
-
Save ngscheurich/6dd72de36f84f8ad2d088da34214e407 to your computer and use it in GitHub Desktop.
Makefile for PICO-8 dev
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CART_NAME = $(shell basename $(PWD)) | |
CART_DIR = ~/Library/Application\ Support/pico-8/carts | |
.PHONY: compile minify run reload | |
compile: | |
@cat src/*.lua > build.lua | |
@p8tool build $(CART_DIR)/$(CART_NAME).p8 --lua build.lua | |
minify: | |
@p8tool luamin $(CART_DIR)/$(CART_NAME).p8 | |
run: compile | |
@osascript \ | |
-e 'activate application "PICO-8"' \ | |
-e "delay 1.0" \ | |
-e 'tell application "System Events" to keystroke "load $(CART_NAME).p8"'\ | |
-e 'tell application "System Events" to key code 36' \ | |
-e "delay 1.5" \ | |
-e 'tell application "System Events" to keystroke "run"' \ | |
-e 'tell application "System Events" to key code 36' | |
rerun: compile | |
@osascript \ | |
-e 'activate application "PICO-8"' \ | |
-e "delay 0.5" \ | |
-e 'tell application "System Events" to key code 53' \ | |
-e "delay 0.5" \ | |
-e 'tell application "System Events" to keystroke "load $(CART_NAME).p8"'\ | |
-e 'tell application "System Events" to key code 36' \ | |
-e "delay 0.5" \ | |
-e 'tell application "System Events" to keystroke "run"' \ | |
-e 'tell application "System Events" to key code 36' \ | |
# vim: set noexpandtab: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment