2015-10-26 17:41:01 +01:00
|
|
|
PKG_NAME=ccn-lite
|
2016-03-23 12:14:45 +01:00
|
|
|
PKG_URL=https://github.com/cn-uofbasel/ccn-lite/
|
2019-08-29 21:54:20 +02:00
|
|
|
PKG_VERSION=e37b02c5cb20e9acccea2394be40f7e570a66a4b
|
2017-01-08 21:54:34 +01:00
|
|
|
PKG_LICENSE=ISC
|
2015-10-26 17:41:01 +01:00
|
|
|
|
2018-08-06 14:56:51 +02:00
|
|
|
.PHONY: all ..cmake_version_supported
|
|
|
|
|
|
|
|
CMAKE_MINIMAL_VERSION = 3.6.0
|
|
|
|
|
2015-10-26 17:41:01 +01:00
|
|
|
|
2018-06-04 09:43:41 +02:00
|
|
|
RIOT_CFLAGS = $(INCLUDES)
|
2015-10-26 17:41:01 +01:00
|
|
|
|
2019-08-05 08:23:37 +02:00
|
|
|
ifeq (llvm,$(TOOLCHAIN))
|
|
|
|
RIOT_CFLAGS += -Wno-char-subscripts
|
|
|
|
endif
|
|
|
|
|
2018-03-27 19:03:27 +02:00
|
|
|
TOOLCHAIN_FILE=$(PKG_BUILDDIR)/xcompile-toolchain.cmake
|
|
|
|
|
|
|
|
all: $(PKG_BUILDDIR)/src/Makefile
|
|
|
|
$(MAKE) -C $(PKG_BUILDDIR)/src && \
|
2018-03-29 15:41:49 +02:00
|
|
|
cp $(PKG_BUILDDIR)/src/lib/libccnl-riot.a $(BINDIR)/ccn-lite.a
|
2018-03-27 19:03:27 +02:00
|
|
|
|
|
|
|
$(PKG_BUILDDIR)/src/Makefile: $(TOOLCHAIN_FILE)
|
|
|
|
cd $(PKG_BUILDDIR)/src && \
|
|
|
|
cmake -DCMAKE_TOOLCHAIN_FILE=$(TOOLCHAIN_FILE) \
|
2018-03-29 15:41:49 +02:00
|
|
|
-DCCNL_RIOT=1 -DRIOT_CFLAGS="$(RIOT_CFLAGS)" -DBUILD_TESTING=OFF .
|
2018-03-27 19:03:27 +02:00
|
|
|
$(TOOLCHAIN_FILE): git-download
|
2018-03-29 15:41:11 +02:00
|
|
|
$(RIOTTOOLS)/cmake/generate-xcompile-toolchain.sh > $(TOOLCHAIN_FILE)
|
2015-10-26 17:41:01 +01:00
|
|
|
|
2018-08-06 14:56:51 +02:00
|
|
|
git-download: | ..cmake_version_supported
|
|
|
|
|
|
|
|
..cmake_version_supported:
|
|
|
|
@ # Remove '-rcX' from version as they are not well handled
|
|
|
|
$(Q)\
|
|
|
|
CMAKE_VERSION=$$(cmake --version | sed -n '1 {s/cmake version //;s/-rc.*//;p;}'); \
|
|
|
|
$(RIOTTOOLS)/has_minimal_version/has_minimal_version.sh "$${CMAKE_VERSION}" "$(CMAKE_MINIMAL_VERSION)" cmake
|
|
|
|
|
|
|
|
|
2016-03-22 18:29:45 +01:00
|
|
|
include $(RIOTBASE)/pkg/pkg.mk
|
2018-06-15 01:20:42 +02:00
|
|
|
ifneq (,$(filter -Wformat-nonliteral -Wformat=2, $(CFLAGS)))
|
|
|
|
CFLAGS += -Wno-format-nonliteral
|
|
|
|
endif
|