2014-11-25 17:49:25 +01:00
|
|
|
PKG_NAME=openwsn
|
2014-11-25 11:47:44 +01:00
|
|
|
PKG_URL=https://github.com/openwsn-berkeley/openwsn-fw.git
|
|
|
|
PKG_VERSION=ff25e5d0ae5d344ed793a724d60532fb917bf1f8
|
|
|
|
PKG_DIR=$(CURDIR)/$(PKG_NAME)
|
2014-01-15 14:02:28 +01:00
|
|
|
|
2014-11-25 11:47:44 +01:00
|
|
|
.PHONY: all clean patch reset
|
2014-01-15 14:02:28 +01:00
|
|
|
|
2014-11-25 11:47:44 +01:00
|
|
|
all: patch
|
|
|
|
"$(MAKE)" -C $(PKG_DIR)
|
2014-01-15 14:02:28 +01:00
|
|
|
|
2014-11-25 11:47:44 +01:00
|
|
|
patch: $(PKG_DIR)/Makefile
|
2014-01-15 14:02:28 +01:00
|
|
|
|
2014-11-25 11:47:44 +01:00
|
|
|
$(PKG_DIR)/Makefile: $(PKG_DIR)/.git/config
|
2014-11-25 17:49:25 +01:00
|
|
|
cd "$(PKG_DIR)" && git am --ignore-whitespace $(CURDIR)/*.patch
|
2014-01-20 12:34:07 +01:00
|
|
|
|
2014-11-25 11:47:44 +01:00
|
|
|
$(PKG_DIR)/.git/config:
|
2016-03-20 13:01:51 +01:00
|
|
|
test -d "$(PKG_DIR)" || $(GITCACHE) clone "$(PKG_URL)" "$(PKG_VERSION)" "$(PKG_DIR)"
|
2014-11-25 11:47:44 +01:00
|
|
|
|
2014-11-25 17:49:25 +01:00
|
|
|
clean::
|
|
|
|
@echo "Cleaning up OpenWSN package..."
|
|
|
|
@cd "$(PKG_DIR)" 2> /dev/null > /dev/null && \
|
|
|
|
git clean -x -f && \
|
2014-12-18 13:08:47 +01:00
|
|
|
git am --abort ; \
|
2014-11-25 17:49:25 +01:00
|
|
|
git reset --hard "$(PKG_VERSION)" && \
|
|
|
|
$(MAKE) patch || true
|
2014-11-25 11:47:44 +01:00
|
|
|
|
2014-11-25 17:49:25 +01:00
|
|
|
distclean::
|
|
|
|
rm -rf "$(PKG_DIR)"
|
2014-11-25 11:47:44 +01:00
|
|
|
|
|
|
|
Makefile.include:
|
2016-03-20 13:01:51 +01:00
|
|
|
@true
|