Skip to content
Snippets Groups Projects
Commit 3ccb27d0 authored by Hauke Petersen's avatar Hauke Petersen
Browse files

tools: add mosquitto.rsmb MQTT-SN broker

parent b539ab41
No related branches found
No related tags found
No related merge requests found
mosquitto_rsmb
Messages.1.*
FFDC.CWNAN.*.dmp
PKG_NAME = mosquitto_rsmb
PKG_URL = https://github.com/eclipse/mosquitto.rsmb
PKG_VERSION = 9b99a3be9a26635b93aec8fa2ed744e8c49e7262
PKG_LICENSE = EPL-1.0
PKG_BUILDDIR = $(CURDIR)/bin
# set default configuration file
RSMB_CFG ?= $(CURDIR)/config.cnf
# manually set some RIOT env vars, so this Makefile can be called stand-alone
RIOTBASE ?= $(CURDIR)/../../..
RIOTTOOLS ?= $(CURDIR)/..
GITCACHE ?= $(RIOTTOOLS)/git/git-cache
$(info $(RIOTBASE))
.PHONY: all clean
all: git-download
# Start mosquitto_rsmb build in a clean environment, so variables set by RIOT's
# build process for cross compiling a specific target platform are reset and
# mosquitto_rsmb can be built cleanly for the host platform.
env -i PATH=$(PATH) TERM=$(TERM) "$(MAKE)" -C $(PKG_BUILDDIR)/rsmb/src
cp $(PKG_BUILDDIR)/rsmb/src/broker_mqtts $(CURDIR)/mosquitto_rsmb
cp $(PKG_BUILDDIR)/rsmb/src/Messages.1.* $(CURDIR)/
run:
@$(CURDIR)/mosquitto_rsmb $(RSMB_CFG)
clean::
@rm -rf $(CURDIR)/bin
@rm -f $(CURDIR)/mosquitto_rsmb
@rm -f $(CURDIR)/Messages.1.*
@rm -f $(CURDIR)/FFDC.CWNAN.*.dmp
include $(RIOTBASE)/pkg/pkg.mk
# Uncomment this to show you packets being sent and received
trace_output protocol
# MQTT-SN listener
listener 1883 INADDR_ANY mqtts
ipv6 true
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
# (as `all`), so `all` will always be the first target defined and thereby the # (as `all`), so `all` will always be the first target defined and thereby the
# default target when `make` is called without any further argument. # default target when `make` is called without any further argument.
.PHONY: mosquitto_rsmb
# target for building the bossac binary # target for building the bossac binary
$(RIOTTOOLS)/bossa/bossac: $(RIOTTOOLS)/bossa/bossac:
@echo "[INFO] bossac binary not found - building it from source" @echo "[INFO] bossac binary not found - building it from source"
...@@ -14,3 +16,11 @@ $(RIOTTOOLS)/edbg/edbg: ...@@ -14,3 +16,11 @@ $(RIOTTOOLS)/edbg/edbg:
@echo "[INFO] edbg binary not found - building it from source now" @echo "[INFO] edbg binary not found - building it from source now"
CC= CFLAGS= make -C $(RIOTTOOLS)/edbg CC= CFLAGS= make -C $(RIOTTOOLS)/edbg
@echo "[INFO] edbg binary successfully build!" @echo "[INFO] edbg binary successfully build!"
$(RIOTTOOLS)/mosquitto_rsmb/mosquitto_rsmb:
@echo "[INFO] rsmb binary not found - building it from source now"
@make -C $(RIOTTOOLS)/mosquitto_rsmb
@echo "[INFO] rsmb binary successfully build!"
mosquitto_rsmb: $(RIOTTOOLS)/mosquitto_rsmb/mosquitto_rsmb
@make -C $(RIOTTOOLS)/mosquitto_rsmb run
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment