1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/relic/Makefile
Oleg Hahm 16a3f131a3 Merge pull request #5112 from kaspar030/use_git_cache
make: pkg: introduce git-cache
2016-03-21 22:32:33 +01:00

40 lines
1.3 KiB
Makefile

RELIC_URL=http://github.com/relic-toolkit/relic.git
RELIC_BRANCH=cdcfaeef101d18c3231c3b46359c519dd72682e8
PKG_NAME=relic
PKG_URL=$(RELIC_URL)
PKG_VERSION=$(RELIC_BRANCH)
PKG_DIR=$(CURDIR)/$(PKG_NAME)
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 reset
all: $(PKG_DIR)/Makefile
"$(MAKE)" -C $(PKG_DIR) && \
cp $(PKG_DIR)/lib/librelic_s.a $(BINDIR)$(PKG_NAME).a
$(PKG_DIR)/comp-options.cmake: $(PKG_DIR)/.git/config
cd "$(PKG_DIR)" && perl ../generate-cmake-xcompile.perl > comp-options.cmake
$(PKG_DIR)/Makefile: $(PKG_DIR)/comp-options.cmake
cd "$(PKG_DIR)" && COMP="$(filter-out -Werror=old-style-definition -Werror=strict-prototypes, $(CFLAGS) ) " cmake -DCMAKE_TOOLCHAIN_FILE=comp-options.cmake -DCHECK=off -DTESTS=0 -DBENCH=0 -DSHLIB=off -Wno-dev $(RELIC_CONFIG_FLAGS) .
$(PKG_DIR)/.git/config:
test -d "$(PKG_DIR)" || $(GITCACHE) clone "$(PKG_URL)" "$(PKG_VERSION)" "$(PKG_DIR)"
cd "$(PKG_DIR)" && git am --ignore-whitespace $(CURDIR)/*.patch
./fix-util_print_wo_args.sh .
./fix-old-style-definitions.sh .
clean::
@echo "Cleaning up relic package..."
rm -rf "$(PKG_DIR)"
distclean::
rm -rf "$(PKG_DIR)"
Makefile.include:
@true