2016-07-09 11:25:34 +02:00
|
|
|
PKG_NAME = nordic_softdevice_ble
|
|
|
|
PKG_VERSION = 3288530
|
|
|
|
PKG_FILE = nrf5_iot_sdk_$(PKG_VERSION).zip
|
|
|
|
PKG_URL = https://developer.nordicsemi.com/nRF5_IoT_SDK/nRF5_IoT_SDK_v0.9.x/$(PKG_FILE)
|
2017-02-23 17:50:37 +01:00
|
|
|
PKG_MD5 = 291c875df69c51e22491e6112128bd9c
|
2017-01-08 21:55:46 +01:00
|
|
|
PKG_LICENSE = nordic-bsd
|
2016-07-09 11:25:34 +02:00
|
|
|
PKG_DIR=$(CURDIR)
|
2017-02-25 15:41:39 +01:00
|
|
|
PKG_BUILDDIR=$(PKGDIRBASE)/$(PKG_NAME)
|
2016-07-09 11:25:34 +02:00
|
|
|
PKG_SRCDIR=$(PKG_BUILDDIR)/src
|
|
|
|
|
|
|
|
SOFTDEVICE := components/softdevice/s1xx_iot/s1xx-iot-prototype3_nrf52_softdevice.hex
|
|
|
|
BLE_6LOWPAN_LIB := components/iot/ble_6lowpan/lib/ble_6lowpan.a
|
|
|
|
MODULE_MAKEFILE := $(PKG_DIR)/Makefile.module
|
|
|
|
|
2017-06-28 14:34:53 +02:00
|
|
|
.PHONY: all prepare clean distclean
|
2016-07-09 11:25:34 +02:00
|
|
|
|
|
|
|
all: $(BINDIR)/ble_6lowpan.a $(BINDIR)/softdevice.hex
|
|
|
|
|
2017-06-28 14:34:53 +02:00
|
|
|
prepare: $(PKG_SRCDIR)/.extracted
|
|
|
|
|
2016-07-09 11:25:34 +02:00
|
|
|
$(BINDIR)/ble_6lowpan.a: $(PKG_SRCDIR)/.extracted
|
|
|
|
cp $(PKG_SRCDIR)/$(BLE_6LOWPAN_LIB) $@
|
|
|
|
|
|
|
|
$(BINDIR)/softdevice.hex: $(PKG_SRCDIR)/.extracted
|
|
|
|
cp $(PKG_SRCDIR)/$(SOFTDEVICE) $@
|
|
|
|
|
|
|
|
$(PKG_SRCDIR)/.extracted: $(PKG_BUILDDIR)/$(PKG_FILE)
|
|
|
|
rm -rf $(@D)
|
|
|
|
mkdir -p $(@D)
|
2016-12-17 01:16:59 +01:00
|
|
|
$(Q)cd $(@D) && $(UNZIP_HERE) $(PKG_BUILDDIR)/$(PKG_FILE)
|
2016-07-09 11:25:34 +02:00
|
|
|
|
|
|
|
# this file doesn't compile with RIOT, but is not needed either
|
|
|
|
rm $(PKG_BUILDDIR)/src/components/ble/common/ble_conn_params.c
|
|
|
|
|
|
|
|
# setup RIOT module makefiles for nordic SDK components
|
|
|
|
cat $(MODULE_MAKEFILE) > $(PKG_SRCDIR)/components/softdevice/common/softdevice_handler/Makefile
|
|
|
|
|
|
|
|
echo "MODULE=ble_common" > $(PKG_SRCDIR)/components/ble/common/Makefile
|
|
|
|
cat $(MODULE_MAKEFILE) >> $(PKG_SRCDIR)/components/ble/common/Makefile
|
|
|
|
|
|
|
|
cat $(MODULE_MAKEFILE) > $(PKG_SRCDIR)/components/iot/ble_ipsp/Makefile
|
|
|
|
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(PKG_BUILDDIR)/$(PKG_FILE):
|
|
|
|
@mkdir -p $(@D)
|
2017-02-23 17:50:37 +01:00
|
|
|
$(Q)$(DLCACHE) $(PKG_URL) $(PKG_MD5) $@
|
2016-07-09 11:25:34 +02:00
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -rf $(PKG_SRCDIR)/
|
|
|
|
|
|
|
|
distclean::
|
|
|
|
rm -rf $(PKG_BUILDDIR)/
|