1
0

Makefile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #
  2. # Copyright (C) 2006-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=cmake
  9. PKG_VERSION:=3.15.1
  10. PKG_CPE_ID:=cpe:/a:kitware:cmake
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/Kitware/CMake/releases/download/v$(PKG_VERSION)/ \
  13. https://cmake.org/files/v3.15/
  14. PKG_HASH:=18dec548d8f8b04d53c60f9cedcebaa6762f8425339d1e2c889c383d3ccdd7f7
  15. HOST_BUILD_PARALLEL:=1
  16. HOST_CONFIGURE_PARALLEL:=1
  17. include $(INCLUDE_DIR)/host-build.mk
  18. # Workaround for GCC versions below 6.X and ccache
  19. # Reference: https://github.com/openwrt/openwrt/pull/1929
  20. GCC_DMPVER_GREPCMD := grep -E '^(4\.[8-9]|[5]\.?)'
  21. GCC_DMPVER_STRING := $(shell $(HOSTCC_NOCACHE) -dumpversion | $(GCC_DMPVER_GREPCMD))
  22. ifneq ($(GCC_DMPVER_STRING),)
  23. ifeq ($(CONFIG_CCACHE),y)
  24. $(info GCC version less than 6.0 detected, disabling CCACHE)
  25. HOST_CONFIGURE_VARS:=$(filter-out CC=% gcc%",$(HOST_CONFIGURE_VARS)) CC="$(HOSTCC_NOCACHE)"
  26. HOST_CONFIGURE_VARS:=$(filter-out CXX=% g++%",$(HOST_CONFIGURE_VARS)) CXX="$(HOSTCXX_NOCACHE)"
  27. else
  28. $(info GCC version greater or equal to 6.0 detected, no workaround set for CCACHE)
  29. endif
  30. endif
  31. HOST_CONFIGURE_VARS += \
  32. MAKEFLAGS="$(HOST_JOBS)" \
  33. CXXFLAGS="$(HOST_CFLAGS)"
  34. HOST_CONFIGURE_ARGS := \
  35. $(if $(MAKE_JOBSERVER),--parallel="$(MAKE_JOBSERVER)") \
  36. --prefix=$(STAGING_DIR_HOST)
  37. ifneq ($(findstring c,$(LIBRECMC_VERBOSE)),)
  38. HOST_MAKE_FLAGS += VERBOSE=1
  39. endif
  40. $(eval $(call HostBuild))