-
Notifications
You must be signed in to change notification settings - Fork 104
/
Copy pathMakefile
87 lines (59 loc) · 2.01 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
83
84
85
86
87
include /home/x/OneDrive/Projects/makefile-common/src/Makefile.twine
include /home/x/OneDrive/Projects/makefile-common/src/Makefile.python
include /home/x/OneDrive/Projects/makefile-common/src/Makefile.nethunter
include ./plugins/Makefile
$(info PROJECT_NAME: $(PROJECT_NAME))
$(info MACHINE: $(MACHINE))
$(info DEPENDENCY_PY_PKGS: $(DEPENDENCY_PY_PKGS))
$(info )
.DEFAULT_GOAL := build
PKG_NAME := $(PY_PKG_NAME)
MICROBIT_BIN = ./build/bbc-microbit-classic-gcc/src/firmware/bluing-advsniff-combined.hex
MICROBIT_PATH = /media/${USER}/MICROBIT
.PHONY: build
build:
$(call python-build)
.PHONY: update-oui
wget https://standards-oui.ieee.org/oui/oui.txt -O src/bluing/res/oui.txt
.PHONY: install
install:
$(call python-install)
.PHONY: flash
flash:
@yotta build bluing-advsniff
@if [ -d $(MICROBIT_PATH) ]; then \
cp $(MICROBIT_BIN) $(MICROBIT_PATH); \
fi
@if [ -d $(MICROBIT_PATH)1 ]; then \
cp $(MICROBIT_BIN) $(MICROBIT_PATH)1; \
fi
@if [ -d $(MICROBIT_PATH)2 ]; then \
cp $(MICROBIT_BIN) $(MICROBIT_PATH)2; \
fi
BLE400_BIN = ./build/bbc-microbit-classic-gcc/src/firmware/bluing-advsniff-core51822-ble400-combined.hex
.PHONY: core51822-ble400-firmware
core51822-ble400-firmware:
@yotta build bluing-advsniff-core51822-ble400 --config=./config/core51822-ble400.json
BLE400_BIN = ./build/bbc-microbit-classic-gcc/src/firmware/bluing-advsniff-bluefruit-le-friend-combined.hex
.PHONY: bluefruit-le-friend-firmware
@yotta build bluing-advsniff-bluefruit-le-friend --config=./config/bluefruit-le-friend.json
.PHONY: clean
clean:
$(call python-clean)
-@yotta clean
.PHONY: microbit-purge
microbit-purge:
-@yotta clean
-@rm -r yotta_modules
-@rm -r yotta_targets
.PHONY: release
release:
echo "Remember to update the html used by the GitHub Page"
$(call twine-release)
.PHONY: push
push:
$(call push-to-nethunter)
@scp dist/*.whl Raspberry-Pi-4-via-Local-Ethernet:~/Desktop/temp
.PHONY: push-to-ubuntu-server-vm
push-to-ubuntu-server-vm:
scp dist/$(PKG_NAME)-*-py3-none-any.whl Ubuntu-Server-VM:~/Downloads/