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.

51 lines
1.4 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ninja
  3. PKG_VERSION:=1.10.2
  4. PKG_RELEASE:=3
  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. include $(INCLUDE_DIR)/package.mk
  12. CONFIGURE_ARGS:=
  13. ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
  14. CONFIGURE_ARGS+=--verbose
  15. endif
  16. define Package/ninja
  17. SECTION:=devel
  18. CATEGORY:=Development
  19. TITLE:=ninja
  20. URL:=https://ninja-build.org/
  21. DEPENDS:=+libstdcpp
  22. endef
  23. define Package/ninja/description
  24. 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.
  25. endef
  26. define Package/ninja/install
  27. $(INSTALL_DIR) $(1)/usr/bin
  28. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ninja $(1)/usr/bin/
  29. endef
  30. define Build/Configure
  31. cd $(PKG_BUILD_DIR) && \
  32. CXX="$(TARGET_CXX)" \
  33. CXXFLAGS="$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
  34. LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
  35. $(STAGING_DIR_HOST)/bin/$(PYTHON) configure.py $(CONFIGURE_ARGS)
  36. endef
  37. define Build/Compile
  38. +$(NINJA) -C $(PKG_BUILD_DIR) $(1)
  39. endef
  40. $(eval $(call BuildPackage,ninja))