-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
82 lines (64 loc) · 2.55 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# md5sum binary
MD5SUM = md5sum
# tinygo binary for tests
TINYGO ?= tinygo
.PHONY: all clean fmt fmt-check
all: fmt fmt-check smoke-test
clean:
@mkdir -p build
@rm -f $(TARGET)
FMT_PATHS = ./*.go cmd freemono freesans freeserif gophers proggy examples
fmt:
@gofmt -l -w $(FMT_PATHS)
fmt-check:
@unformatted=$$(gofmt -l $(FMT_PATHS)); [ -z "$$unformatted" ] && exit 0; echo "Unformatted:"; for fn in $$unformatted; do echo " $$fn"; done; exit 1
TARGET = build/examples_epd.hex \
build/examples_hub75.hex \
build/examples_displays_gopher-badge.hex \
build/examples_displays_pybadge.hex \
build/examples_displays_pyportal.hex \
build/examples_displays_wioterminal.hex \
build/examples_const1bit_pyportal.hex \
build/examples_unicode_font_pyportal.hex \
build/examples_unicode_font_wioterminal.hex \
build/examples_unicode_font2_pyportal.hex \
build/examples_unicode_font2_wioterminal.hex \
build/examples_unicode_font3_const2bit_pyportal.hex
.PHONY: smoke-test $(TARGET)
smoke-test: clean $(TARGET)
build/examples_epd.hex:
$(TINYGO) build -size short -o $@ -target=microbit ./examples/epd
@$(MD5SUM) $@
build/examples_hub75.hex:
$(TINYGO) build -size short -o $@ -target=pybadge ./examples/hub75
@$(MD5SUM) $@
build/examples_displays_gopher-badge.hex:
$(TINYGO) build -size short -o $@ -target=gopher-badge ./examples/displays
@$(MD5SUM) $@
build/examples_displays_pybadge.hex:
$(TINYGO) build -size short -o $@ -target=pybadge ./examples/displays
@$(MD5SUM) $@
build/examples_displays_pyportal.hex:
$(TINYGO) build -size short -o $@ -target=pyportal ./examples/displays
@$(MD5SUM) $@
build/examples_displays_wioterminal.hex:
$(TINYGO) build -size short -o $@ -target=wioterminal ./examples/displays
@$(MD5SUM) $@
build/examples_const1bit_pyportal.hex:
$(TINYGO) build -size short -o $@ -target=pyportal ./examples/const1bit
@$(MD5SUM) $@
build/examples_unicode_font_pyportal.hex:
$(TINYGO) build -size short -o $@ -target=pyportal ./examples/unicode_font
@$(MD5SUM) $@
build/examples_unicode_font_wioterminal.hex:
$(TINYGO) build -size short -o $@ -target=wioterminal ./examples/unicode_font
@$(MD5SUM) $@
build/examples_unicode_font2_pyportal.hex:
$(TINYGO) build -size short -o $@ -target=pyportal ./examples/unicode_font2
@$(MD5SUM) $@
build/examples_unicode_font2_wioterminal.hex:
$(TINYGO) build -size short -o $@ -target=wioterminal ./examples/unicode_font2
@$(MD5SUM) $@
build/examples_unicode_font3_const2bit_pyportal.hex:
$(TINYGO) build -size short -o $@ -target=pyportal ./examples/unicode_font3_const2bit
@$(MD5SUM) $@