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/
|
2024-01-11 14:02:37 +01:00
|
|
|
PKG_VERSION=0aa974b0efdaabc61df95f35af5f74f5ed148aa8
|
2017-01-08 21:54:34 +01:00
|
|
|
PKG_LICENSE=ISC
|
2015-10-26 17:41:01 +01:00
|
|
|
|
2019-10-02 12:47:02 +02:00
|
|
|
include $(RIOTBASE)/pkg/pkg.mk
|
2018-08-06 14:56:51 +02:00
|
|
|
|
2019-10-02 12:47:02 +02:00
|
|
|
.PHONY: ..cmake_version_supported
|
2018-08-06 14:56:51 +02:00
|
|
|
|
2019-10-02 12:47:02 +02:00
|
|
|
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
|
|
|
|
|
2020-06-13 20:59:41 +02:00
|
|
|
TOOLCHAIN_FILE = $(PKG_SOURCE_DIR)/xcompile-toolchain.cmake
|
2018-03-27 19:03:27 +02:00
|
|
|
|
2021-01-13 09:30:39 +01:00
|
|
|
CFLAGS += -Wno-cast-align
|
|
|
|
|
2019-10-02 12:47:02 +02:00
|
|
|
all: $(BINDIR)/ccn-lite.a
|
2018-03-27 19:03:27 +02:00
|
|
|
|
2020-06-13 20:59:41 +02:00
|
|
|
$(BINDIR)/ccn-lite.a: $(PKG_BUILD_DIR)/lib/libccnl-riot.a
|
2019-10-02 12:47:02 +02:00
|
|
|
cp $< $@
|
|
|
|
|
2020-06-13 20:59:41 +02:00
|
|
|
$(PKG_BUILD_DIR)/lib/libccnl-riot.a: $(PKG_BUILD_DIR)/Makefile
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR)
|
2015-10-26 17:41:01 +01:00
|
|
|
|
2020-06-13 20:59:41 +02:00
|
|
|
$(PKG_BUILD_DIR)/Makefile: $(PKG_PREPARED) $(TOOLCHAIN_FILE) | ..cmake_version_supported
|
|
|
|
cmake -B$(PKG_BUILD_DIR) -H$(PKG_SOURCE_DIR)/src \
|
2019-10-02 12:47:02 +02:00
|
|
|
-DCMAKE_TOOLCHAIN_FILE=$(TOOLCHAIN_FILE) \
|
|
|
|
-DCCNL_RIOT=1 -DRIOT_CFLAGS="$(RIOT_CFLAGS)" -DBUILD_TESTING=OFF
|
|
|
|
|
|
|
|
$(TOOLCHAIN_FILE): FORCE
|
|
|
|
$(RIOTTOOLS)/cmake/generate-xcompile-toolchain.sh > $(TOOLCHAIN_FILE)
|
2018-08-06 14:56:51 +02:00
|
|
|
|
|
|
|
..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
|
|
|
|
|
2018-06-15 01:20:42 +02:00
|
|
|
ifneq (,$(filter -Wformat-nonliteral -Wformat=2, $(CFLAGS)))
|
|
|
|
CFLAGS += -Wno-format-nonliteral
|
|
|
|
endif
|