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

47 lines
1.3 KiB
Makefile
Raw Normal View History

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
include $(RIOTBASE)/pkg/pkg.mk
.PHONY: ..cmake_version_supported
CMAKE_MINIMAL_VERSION = 3.6.0
RIOT_CFLAGS = $(INCLUDES)
2019-08-05 08:23:37 +02:00
ifeq (llvm,$(TOOLCHAIN))
RIOT_CFLAGS += -Wno-char-subscripts
endif
TOOLCHAIN_FILE = $(PKG_SOURCE_DIR)/xcompile-toolchain.cmake
2021-01-13 09:30:39 +01:00
CFLAGS += -Wno-cast-align
all: $(BINDIR)/ccn-lite.a
$(BINDIR)/ccn-lite.a: $(PKG_BUILD_DIR)/lib/libccnl-riot.a
cp $< $@
$(PKG_BUILD_DIR)/lib/libccnl-riot.a: $(PKG_BUILD_DIR)/Makefile
$(MAKE) -C $(PKG_BUILD_DIR)
$(PKG_BUILD_DIR)/Makefile: $(PKG_PREPARED) $(TOOLCHAIN_FILE) | ..cmake_version_supported
cmake -B$(PKG_BUILD_DIR) -H$(PKG_SOURCE_DIR)/src \
-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)
..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
ifneq (,$(filter -Wformat-nonliteral -Wformat=2, $(CFLAGS)))
CFLAGS += -Wno-format-nonliteral
endif