You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.0 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ninja
  3. PKG_VERSION:=1.10.2
  4. PKG_RELEASE:=2
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://codeload.github.com/ninja-build/ninja/tar.gz/v$(PKG_VERSION)?
  7. PKG_HASH:=ce35865411f0490368a8fc383f29071de6690cbadc27704734978221f25e2bed
  8. PKG_MAINTAINER:=Andre Heider <a.heider@gmail.com>
  9. PKG_LICENSE:=Apache-2.0
  10. PKG_LICENSE_FILES:=COPYING
  11. PKG_BUILD_DEPENDS:=ninja/host
  12. include $(INCLUDE_DIR)/host-build.mk
  13. include $(INCLUDE_DIR)/package.mk
  14. include ./ninja.mk
  15. CONFIGURE_ARGS:=
  16. ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
  17. CONFIGURE_ARGS+=--verbose
  18. endif
  19. define Host/Configure
  20. endef
  21. define Host/Compile
  22. cd $(HOST_BUILD_DIR) && \
  23. CXX="$(HOSTCXX)" \
  24. CXXFLAGS="$(HOST_CXXFLAGS) $(HOST_CPPFLAGS)" \
  25. LDFLAGS="$(HOST_LDFLAGS)" \
  26. $(STAGING_DIR_HOST)/bin/$(PYTHON) configure.py --bootstrap $(CONFIGURE_ARGS)
  27. endef
  28. define Host/Install
  29. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
  30. $(INSTALL_BIN) $(HOST_BUILD_DIR)/ninja $(STAGING_DIR_HOSTPKG)/bin/
  31. endef
  32. define Host/Clean
  33. $(call Host/Clean/Default)
  34. rm -f $(STAGING_DIR_HOSTPKG)/bin/ninja
  35. endef
  36. define Package/ninja
  37. SECTION:=devel
  38. CATEGORY:=Development
  39. TITLE:=ninja
  40. URL:=https://ninja-build.org/
  41. DEPENDS:=+libstdcpp
  42. endef
  43. define Package/ninja/description
  44. Ninja is a small build system with a focus on speed. It differs from other build systems in two major respects: it is designed to have its input files generated by a higher-level build system, and it is designed to run builds as fast as possible.
  45. endef
  46. define Package/ninja/install
  47. $(INSTALL_DIR) $(1)/usr/bin
  48. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ninja $(1)/usr/bin/
  49. endef
  50. define Build/Configure
  51. cd $(PKG_BUILD_DIR) && \
  52. CXX="$(TARGET_CXX)" \
  53. CXXFLAGS="$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
  54. LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
  55. $(STAGING_DIR_HOST)/bin/$(PYTHON) configure.py $(CONFIGURE_ARGS)
  56. endef
  57. define Build/Compile
  58. $(call Ninja,-C $(PKG_BUILD_DIR),)
  59. endef
  60. $(eval $(call HostBuild))
  61. $(eval $(call BuildPackage,ninja))