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

40 lines
1.0 KiB
Makefile
Raw Normal View History

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)
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
endif
MODULE:=$(shell basename $(CURDIR))
.PHONY: all clean patch reset
all: patch
2016-03-10 15:21:52 +01:00
make -C $(PKG_BUILDDIR)
make $(BINDIR)$(MODULE).a
2016-03-10 15:21:52 +01:00
patch: $(PKG_BUILDDIR)/Makefile
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
2016-03-10 15:21:52 +01:00
$(PKG_BUILDDIR):
mkdir -p $(BINDIR)/pkg && \
git clone $(PKG_URL) $@ && \
cd $@ && git reset --hard $(PKG_VERSION)
clean::
2016-03-10 15:21:52 +01:00
rm -Rf $(PKG_BUILDDIR)
distclean::
2016-03-10 15:21:52 +01:00
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