-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
38 lines (27 loc) · 760 Bytes
/
Copy pathmakefile
File metadata and controls
38 lines (27 loc) · 760 Bytes
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
.PHONY: clean
.PHONY: build
.PHONY: run
.PHONY: copy
SDK = $(shell egrep '^\s*SDKRoot' ~/.Playdate/config | head -n 1 | cut -c9-)
SDKBIN=$(SDK)/bin
GAME=$(notdir $(CURDIR))
SIM=Playdate Simulator
build: clean compile run
run: open
clean:
rm -rf '$(GAME).pdx'
compile: Source/main.lua
"$(SDKBIN)/pdc" 'Source' 'build/$(GAME).pdx'
open:
open -a '$(SDKBIN)/$(SIM).app/Contents/MacOS/$(SIM)' 'build/$(GAME).pdx'
pre-build:
mkdir -p build
@echo ===INCREMENT BUILD NUMBER
scripts/buildnum.sh
.PHONY: build-production
build-production: clean pre-build compile-production
.PHONY: compile-production
compile-production:
"$(SDKBIN)/pdc" '-s' 'Source' 'build/$(GAME).pdx'
@echo ===ZIP BUILD
cd build && zip -r --quiet '$(GAME).pdx.zip' '$(GAME).pdx'