-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
37 lines (27 loc) · 1.11 KB
/
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
MANIFEST ?= manifest.xml
RESOURCES ?= $(wildcard resources/**/*)
SOURCES ?= $(wildcard src/*.mc)
TESTS ?= $(wildcard test/*.mc)
KEY ?= signing-key.der
DEVICE ?= fenix847mm
.PHONY: build
build: build/authenticator_$(DEVICE).prg
start: build/authenticator_$(DEVICE).prg
ps -C simulator || simulator & \
monkeydo build/authenticator_$(DEVICE).prg $(DEVICE)
.PHONY: test
test: build/authenticator_$(DEVICE)_test.prg
ps -C simulator || simulator & \
monkeydo build/authenticator_$(DEVICE)_test.prg $(DEVICE) -t $(TEST_ARGS)
GIT_VERSION=$(shell git describe HEAD --always)
release: build/authenticator-$(GIT_VERSION).iq
%.prg: $(KEY) $(MANIFEST) $(RESOURCES) $(SOURCES)
monkeyc -o $@ -w -y $(KEY) -f $(PWD)/monkey.jungle -d $(DEVICE)
%_test.prg: $(KEY) $(MANIFEST) $(RESOURCES) $(SOURCES) $(TESTS)
monkeyc -o $@ -w -y $(KEY) -f $(PWD)/monkey.jungle --unit-test -d $(DEVICE)
%_release.prg: $(KEY) $(MANIFEST) $(RESOURCES) $(SOURCES)
monkeyc -o $@ -w -r -y $(KEY) -f $(PWD)/monkey.jungle -d $(DEVICE)
%.iq: $(KEY) $(MANIFEST) $(RESOURCES) $(SOURCES)
monkeyc -o $@ -e -w -r -y $(KEY) -f $(PWD)/monkey.jungle
clean:
rm -rf build/