Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions pkg/openwsn/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
PKG_NAME=RB
PKG_URL=https://codeload.github.com/openwsn-berkeley/openwsn-fw
PKG_VERSION=1.4
PKG_EXT=zip

FETCH=$(shell which wget &> /dev/null && echo "wget" || echo "curl")
#UNPACK=tar -xvf
UNPACK=unzip

ifeq ($(FETCH),curl )
FETCH_FLAGS += -z $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT) -o
else
FETCH_FLAGS += -nc -O
endif

ifneq ($(RIOTBOARD),)
#include $(RIOTBOARD)/Makefile.base
include $(RIOTBOARD)/$(BOARD)/Makefile.include
endif

.PHONY: all clean

all: $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)/
make -C $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)

$(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)/: $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT)
$(AD)rm -rf $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)
$(AD)$(UNPACK) $< -d $(PKG_NAME)-$(PKG_VERSION)
$(AD)cd $@ && sh ../structure_changes.sh
$(AD)cd $@ && patch -p0 -N -i ../patch.txt

$(CURDIR)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT):
# Get PKG_VERSION of package from PKG_URL
$(AD)$(FETCH) $(FETCH_FLAGS) $@ $(PKG_URL)/$(PKG_EXT)/$(PKG_NAME)-$(PKG_VERSION) || true

clean::
rm -rf $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)

distclean::
rm -f $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT)
9 changes: 9 additions & 0 deletions pkg/openwsn/Makefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
DIRS =
DIRS += openwsn

all::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;

# remove compilation products
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
8 changes: 8 additions & 0 deletions pkg/openwsn/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Compatibility

This port of the openwsn stack is compatible with the TelosB board only for now.
The hardware dependency will be reduced in the future and thous running on more
hardware platforms.

A test can be found in the [projects repository](https://github.com/RIOT-OS/projects/)
named ```test_openwsn_pkg``` with an example ```Makefile```.
Loading