-
Notifications
You must be signed in to change notification settings - Fork 541
/
Makefile
62 lines (43 loc) · 1.4 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
# ============
# Main targets
# ============
# -------------
# Configuration
# -------------
$(eval venvpath := .venv2)
$(eval pip := $(venvpath)/bin/pip)
$(eval python := $(venvpath)/bin/python)
$(eval platformio := $(venvpath)/bin/platformio)
# Setup Python virtualenv
setup-virtualenv:
@test -e $(python) || `command -v virtualenv` --python=python3 $(venvpath)
# ----------
# PlatformIO
# ----------
install-platformio: setup-virtualenv
@$(pip) install platformio --quiet
build-all: install-platformio
@$(platformio) run
build-env: install-platformio
@$(platformio) run --environment $(environment)
# Note: This are legacy build targets, the new ones are defined through `platformio.ini`.
ci-all: install-platformio
# atmelavr
$(platformio) ci --board=megaatmega2560 --lib="." examples/HX711_basic_example
$(platformio) ci --board=megaatmega2560 --lib="." examples/HX711_timeout_example
$(platformio) ci --board=megaatmega2560 --lib="." examples/HX711_full_example
# atmelavr
$(MAKE) ci-basic board=feather328p
# espressif8266
$(MAKE) ci-basic board=huzzah
# espressif32
$(MAKE) ci-basic board=lopy4
# atmelsam
$(MAKE) ci-basic board=adafruit_feather_m0
$(MAKE) ci-basic board=adafruit_feather_m4
# bluepill
$(MAKE) ci-basic board=bluepill_f103c8
ci-basic:
$(platformio) ci --board=$(board) --lib="." examples/HX711_basic_example --verbose
clean:
$(platformio) run -t clean