1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-29 16:31:18 +01:00
RIOT/pkg/ccn-lite/Makefile
Gaëtan Harter ca5d13cc2a pkg/*: adapt to new state file targets
Prepare for handling pkg state with files. So it requires having the
path defined before declaring targets. In addition, it cleans up the
old git-download target.
2020-01-08 20:55:19 +01:00

45 lines
1.3 KiB
Makefile

PKG_NAME=ccn-lite
PKG_URL=https://github.com/cn-uofbasel/ccn-lite/
PKG_VERSION=e37b02c5cb20e9acccea2394be40f7e570a66a4b
PKG_LICENSE=ISC
include $(RIOTBASE)/pkg/pkg.mk
.PHONY: ..cmake_version_supported
CMAKE_MINIMAL_VERSION = 3.6.0
RIOT_CFLAGS = $(INCLUDES)
ifeq (llvm,$(TOOLCHAIN))
RIOT_CFLAGS += -Wno-char-subscripts
endif
TOOLCHAIN_FILE = $(PKG_BUILDDIR)/xcompile-toolchain.cmake
all: $(BINDIR)/ccn-lite.a
$(BINDIR)/ccn-lite.a: $(PKG_BUILDDIR)/bin/lib/libccnl-riot.a
cp $< $@
$(PKG_BUILDDIR)/bin/lib/libccnl-riot.a: $(PKG_BUILDDIR)/bin/Makefile
$(MAKE) -C $(PKG_BUILDDIR)/bin
$(PKG_BUILDDIR)/bin/Makefile: $(PKG_PREPARED) $(TOOLCHAIN_FILE) | ..cmake_version_supported
cmake -B$(PKG_BUILDDIR)/bin -H$(PKG_BUILDDIR)/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