forked from picolove/picolove
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
43 lines (33 loc) · 919 Bytes
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
.PHONY: run all 9 10 11 lint build clean format test
project_name := "picolove"
# ignore subfolders for now
lua_files = $(wildcard *.lua)
run:
@love .
all: format lint test build
# run specific love version
# setup environment variable with path to love executable first
9:
@echo "Love 9 support is WIP"
@"${LOVE9}" .
10:
@"${LOVE10}" .
11:
@echo "Love 11 support is WIP"
@"${LOVE11}" .
lint:
luacheck .
format:
@$(foreach file,$(lua_files),luafmt -l 80 -w replace -i 2 --use-tabs $(file);)
clean:
@echo "deleting \"build/${project_name}.love\" ..."
@rm -f build/${project_name}.love
test:
# todo implement test running
build: clean
@echo "building \"build/${project_name}.love\" ..."
@zip -9 -r build/"${project_name}".love ./nocart.p8
@zip -9 -r [email protected] build/${project_name}.love .
run_build:
@echo "executing \"build/${project_name}.love\" ..."
@love build/${project_name}.love