forked from seemoo-lab/openhaystack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (25 loc) · 963 Bytes
/
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
PLATFORM := nRF51822
NRF51_SDK_PATH := $(shell pwd)/nrf51_sdk_v4_4_2_33551
NRF51_SDK_DOWNLOAD_URL := https://developer.nordicsemi.com/nRF5_SDK/nRF51_SDK_v4.x.x/nrf51_sdk_v4_4_2_33551.zip
OPENHAYSTACK_FIRMWARE_PATH := $(shell pwd)/../../OpenHaystack/OpenHaystack/HaystackApp/Firmwares/Microbit/firmware.bin
export PLATFORM
export NRF51_SDK_PATH
ifeq ($(DEPLOY_PATH),)
DEPLOY_PATH := /Volumes/MICROBIT
endif
offline-finding/build/offline-finding.bin: $(NRF51_SDK_PATH) blessed/.git offline-finding/main.c
$(MAKE) -C blessed
$(MAKE) -C offline-finding
$(NRF51_SDK_PATH):
wget $(NRF51_SDK_DOWNLOAD_URL)
unzip $(NRF51_SDK_PATH).zip -d $(NRF51_SDK_PATH)
blessed/.git:
git submodule update --init
clean:
$(MAKE) -C blessed $@
$(MAKE) -C offline-finding $@
install: offline-finding/build/offline-finding.bin
cp $< $(DEPLOY_PATH)
update-app: offline-finding/build/offline-finding.bin
cp $< $(OPENHAYSTACK_FIRMWARE_PATH)
.PHONY: clean install update-app