2014-12-16 17:36:38 +01:00
|
|
|
PKG_NAME=relic
|
2017-01-08 21:55:46 +01:00
|
|
|
PKG_URL=https://github.com/relic-toolkit/relic.git
|
2016-03-22 18:29:46 +01:00
|
|
|
PKG_VERSION=cdcfaeef101d18c3231c3b46359c519dd72682e8
|
2017-01-08 21:55:46 +01:00
|
|
|
PKG_LICENSE=LGPL-2.1
|
2014-12-16 17:36:38 +01:00
|
|
|
|
2016-03-22 18:29:46 +01:00
|
|
|
.PHONY: all
|
2014-12-16 17:36:38 +01:00
|
|
|
|
2018-03-27 19:03:51 +02:00
|
|
|
CFLAGS += -Wno-gnu-zero-variadic-macro-arguments -Wno-unused-function -Wno-newline-eof
|
|
|
|
|
|
|
|
TOOLCHAIN_FILE=$(PKG_BUILDDIR)/xcompile-toolchain.cmake
|
|
|
|
|
2016-03-22 18:29:46 +01:00
|
|
|
all: $(PKG_BUILDDIR)/Makefile
|
2018-03-27 19:03:51 +02:00
|
|
|
$(MAKE) -C $(PKG_BUILDDIR) && \
|
2016-10-18 23:27:59 +02:00
|
|
|
cp $(PKG_BUILDDIR)/lib/librelic_s.a $(BINDIR)/$(PKG_NAME).a
|
2014-12-16 17:36:38 +01:00
|
|
|
|
2018-03-27 19:03:51 +02:00
|
|
|
$(PKG_BUILDDIR)/Makefile: $(TOOLCHAIN_FILE)
|
|
|
|
cd $(PKG_BUILDDIR) && \
|
|
|
|
COMP="$(filter-out -Werror=old-style-definition -Werror=strict-prototypes, $(CFLAGS) ) " \
|
|
|
|
cmake -DCMAKE_TOOLCHAIN_FILE=$(TOOLCHAIN_FILE) \
|
|
|
|
-DCHECK=off -DTESTS=0 -DBENCH=0 -DSHLIB=off -Wno-dev $(RELIC_CONFIG_FLAGS) .
|
2014-12-16 17:36:38 +01:00
|
|
|
|
2018-03-27 19:03:51 +02:00
|
|
|
$(TOOLCHAIN_FILE): fix_source
|
|
|
|
$(RIOTBASE)/dist/tools/cmake/generate-xcompile-toolchain.sh > $(TOOLCHAIN_FILE)
|
2016-11-10 16:21:01 +01:00
|
|
|
|
2016-03-23 16:38:19 +01:00
|
|
|
fix_source: git-download
|
2016-03-22 18:29:46 +01:00
|
|
|
./fix-util_print_wo_args.sh $(PKG_BUILDDIR)
|
|
|
|
./fix-old-style-definitions.sh $(PKG_BUILDDIR)
|
2014-12-16 17:36:38 +01:00
|
|
|
|
2016-03-22 18:29:46 +01:00
|
|
|
clean::
|
2016-10-18 23:27:59 +02:00
|
|
|
@rm -rf $(BINDIR)/$(PKG_NAME).a
|
2018-03-27 19:03:51 +02:00
|
|
|
|
2016-03-22 18:29:46 +01:00
|
|
|
include $(RIOTBASE)/pkg/pkg.mk
|