1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/libcoap/Makefile

43 lines
1006 B
Makefile
Raw Normal View History

2013-11-18 11:21:50 +01:00
PKG_NAME=libcoap
PKG_URL=http://git.code.sf.net/p/libcoap/code
2014-02-19 03:18:46 +01:00
PKG_VERSION=ef41ce5d02d64cec0751882ae8fd95f6c32bc018
2014-02-25 20:58:36 +01:00
PKG_DIR=$(CURDIR)/$(PKG_NAME)
2013-11-18 11:21:50 +01:00
ifneq ($(RIOTBOARD),)
include $(RIOTBOARD)/$(BOARD)/Makefile.include
endif
ifneq ($(RIOTBASE),)
INCLUDES += -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/sys/net/include \
-I$(RIOTBASE)/sys/posix/include -I$(RIOTBASE)/sys/posix/pnet/include
endif
.PHONY: all clean patch reset
all: patch
2014-02-25 20:58:36 +01:00
make -C $(PKG_DIR)
2013-11-18 11:21:50 +01:00
2014-02-25 20:58:36 +01:00
patch: $(PKG_DIR)/Makefile
2014-02-25 20:58:36 +01:00
$(PKG_DIR)/Makefile: $(PKG_DIR)/.git/config
cd "$(PKG_DIR)" && git am --ignore-whitespace "$(CURDIR)"/*.patch
2013-11-18 11:21:50 +01:00
2014-02-25 20:58:36 +01:00
$(PKG_DIR)/.git/config:
test -d "$(PKG_DIR)" || git clone "$(PKG_URL)" "$(PKG_DIR)"; \
cd "$(PKG_DIR)" && git checkout -f "$(PKG_VERSION)"
2013-11-18 11:21:50 +01:00
clean::
2014-02-25 20:58:36 +01:00
@echo "Cleaning up libcoap package..."
@cd "$(PKG_DIR)" 2> /dev/null > /dev/null && \
2013-11-18 11:21:50 +01:00
git clean -x -f && \
2014-02-25 20:58:36 +01:00
git am --abort && \
git reset --hard "$(PKG_VERSION)" && \
$(MAKE) patch || true
2013-11-18 11:21:50 +01:00
2014-02-25 20:58:36 +01:00
2014-05-14 10:46:15 +02:00
distclean::
2014-02-25 20:58:36 +01:00
rm -rf "$(PKG_DIR)"
Makefile.include:
@true