2014-12-28 18:27:03 +01:00
|
|
|
PKG_NAME=micro-ecc
|
|
|
|
PKG_URL=https://github.com/kmackay/micro-ecc.git
|
2016-03-08 13:49:25 +01:00
|
|
|
PKG_VERSION=b6c0cdbe7d20af48b0c2a909a66ff00b093d1542
|
2016-03-10 15:21:52 +01:00
|
|
|
PKG_DIR=$(CURDIR)
|
|
|
|
PKG_BUILDDIR=$(BINDIR)/pkg/$(PKG_NAME)
|
2014-12-28 18:27:03 +01:00
|
|
|
|
|
|
|
ifneq ($(RIOTBASE),)
|
|
|
|
INCLUDES += -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/sys/net/include \
|
2015-08-11 20:02:10 +02:00
|
|
|
-I$(RIOTBASE)/sys/posix/include
|
2014-12-28 18:27:03 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
MODULE:=$(shell basename $(CURDIR))
|
|
|
|
|
|
|
|
.PHONY: all clean patch reset
|
|
|
|
|
|
|
|
all: patch
|
2016-03-10 15:21:52 +01:00
|
|
|
make -C $(PKG_BUILDDIR)
|
2014-12-28 18:27:03 +01:00
|
|
|
make $(BINDIR)$(MODULE).a
|
|
|
|
|
2016-03-10 15:21:52 +01:00
|
|
|
patch: $(PKG_BUILDDIR)/Makefile
|
2014-12-28 18:27:03 +01:00
|
|
|
|
2016-03-10 15:21:52 +01:00
|
|
|
$(PKG_BUILDDIR)/Makefile: $(PKG_BUILDDIR)
|
|
|
|
cd $(PKG_BUILDDIR) && \
|
|
|
|
for patch in $(PKG_DIR)/[0-9][0-9][0-9][0-9]*.patch; do git am "$${patch}" || { git am --abort; exit 1; }; done
|
|
|
|
touch $(PKG_BUILDDIR)/Makefile
|
2014-12-28 18:27:03 +01:00
|
|
|
|
2016-03-10 15:21:52 +01:00
|
|
|
$(PKG_BUILDDIR):
|
|
|
|
mkdir -p $(BINDIR)/pkg && \
|
2016-03-20 13:01:51 +01:00
|
|
|
$(GITCACHE) clone "$(PKG_URL)" "$(PKG_VERSION)" "$(PKG_BUILDDIR)"
|
2014-12-28 18:27:03 +01:00
|
|
|
|
|
|
|
clean::
|
2016-03-10 15:21:52 +01:00
|
|
|
rm -Rf $(PKG_BUILDDIR)
|
2014-12-28 18:27:03 +01:00
|
|
|
|
|
|
|
distclean::
|
2016-03-10 15:21:52 +01:00
|
|
|
rm -rf $(PKG_BUILDDIR)
|
2014-12-28 18:27:03 +01:00
|
|
|
|
|
|
|
#$(BINDIR)$(MODULE).a: $(BINDIR)micro-ecc_*.a
|
|
|
|
# mkdir -p $(BINDIR)$(MODULE); cd $(BINDIR)$(MODULE); for var in $?; do ar -x $$var; done; ar -r -c -s $(BINDIR)$(MODULE).a *.o
|