SOURCE_FILES := src/utils.lua src/announcer.lua src/graphics.lua src/scoreboard.lua src/main.lua

all:
	pdc src BatterUp.pdx

check:
	stylua -c --indent-type Spaces src/
	cat __stub.ext.lua <(sed 's/^function/-- selene: allow(unused_variable)\nfunction/' ${PLAYDATE_SDK_PATH}/CoreLibs/__types.lua) ${SOURCE_FILES} | grep -v '^import' | sed 's/<const>//g' | selene -

test: check
	(cd src; find ./test -name '*lua' | xargs -L1 lua)

lint:
	stylua --indent-type Spaces src/
