-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
60 lines (49 loc) · 906 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
DEPENDS:= \
array.lua \
button.lua \
chirp.lua \
chirpy.lua \
fibonacci.lua \
libfftw/*.lua \
libnu.lua \
load.lua \
xcor.lua \
mobile.lua \
play.lua \
pointer.lua \
read.lua \
str.lua \
window.lua
FONTS:= fonts/DejaVuSans.ttf
.PHONY: all
all: apk
.PHONY: love
love: chirpy.love
.PHONY: clean-love
clean-love:
rm -f chirpy.love
.PHONY: mobile.lua
mobile.lua:
ifdef MOBILE
echo 'return true' > mobile.lua
else
echo 'return false' > mobile.lua
endif
chirpy.love: main.lua mobile.lua $(DEPENDS) $(FONTS)
zip chirpy.zip main.lua $(DEPENDS) $(FONTS)
cp chirpy.zip chirpy.love
.PHONY: apk
apk:
cd chirpy-android && $(MAKE) apk
.PHONY: clean-apk
clean-apk:
cd chirpy-android && $(MAKE) clean
.PHONY: cleanup
cleanup:
rm -f chirpy.zip
rm -f mobile.lua
.PHONY: clean
clean: cleanup clean-apk clean-love
.PHONY: check
check: $(DEPENDS)
luacheck main.lua $(DEPENDS)