Browse Source

pkg: micro-ecc: adapt to use pkg.mk

pr/gpio
Kaspar Schleiser 7 years ago
parent
commit
d03d83a7f6
  1. 29
      pkg/micro-ecc/Makefile

29
pkg/micro-ecc/Makefile

@ -1,38 +1,15 @@
PKG_NAME=micro-ecc
PKG_URL=https://github.com/kmackay/micro-ecc.git
PKG_VERSION=b6c0cdbe7d20af48b0c2a909a66ff00b093d1542
PKG_DIR=$(CURDIR)
PKG_BUILDDIR=$(BINDIR)/pkg/$(PKG_NAME)
ifneq ($(RIOTBASE),)
INCLUDES += -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/sys/net/include \
-I$(RIOTBASE)/sys/posix/include
endif
MODULE:=$(shell basename $(CURDIR))
.PHONY: all
.PHONY: all clean patch reset
all: patch
all: download
make -C $(PKG_BUILDDIR)
make $(BINDIR)$(MODULE).a
patch: $(PKG_BUILDDIR)/Makefile
$(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
$(PKG_BUILDDIR):
mkdir -p $(BINDIR)/pkg && \
$(GITCACHE) clone "$(PKG_URL)" "$(PKG_VERSION)" "$(PKG_BUILDDIR)"
clean::
rm -Rf $(PKG_BUILDDIR)
distclean::
rm -rf $(PKG_BUILDDIR)
#$(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
include $(RIOTBASE)/pkg/pkg.mk

Loading…
Cancel
Save