1
0

Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #
  2. # Copyright (C) 2015 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. # Although liblz4 exports a major.minor.patch version, it isn't always
  9. # incremented for new releases, so use the release tag instead.
  10. PKG_NAME:=liblz4
  11. PKG_VERSION:=r131
  12. PKG_RELEASE:=1
  13. PKG_LICENSE:=BSD-2-Clause
  14. PKG_MAINTAINER:=Darik Horn <dajhorn@vanadac.com>
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  16. PKG_SOURCE_PROTO:=git
  17. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  18. PKG_SOURCE_URL:=https://github.com/Cyan4973/lz4.git
  19. PKG_SOURCE_VERSION:=$(PKG_VERSION)
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/liblz4
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=Extremely fast compression
  25. URL:=http://www.lz4.org/
  26. endef
  27. define Package/liblz4/description
  28. LZ4 is a compression codec that features a very fast encoder and an
  29. even faster decoder. This package provides the liblz4 shared library.
  30. endef
  31. TARGET_CFLAGS += $(FPIC)
  32. define Build/Compile
  33. $(MAKE) -C "$(PKG_BUILD_DIR)/lib" $(MAKE_INSTALL_FLAGS) \
  34. CC="$(TARGET_CC)" \
  35. CFLAGS="$(TARGET_CFLAGS)" \
  36. PREFIX="$(CONFIGURE_PREFIX)" \
  37. install
  38. endef
  39. define Build/InstallDev
  40. $(CP) $(PKG_INSTALL_DIR)/* $(1)/
  41. endef
  42. define Package/liblz4/install
  43. $(INSTALL_DIR) $(1)/usr/lib
  44. $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblz4.so* $(1)/usr/lib/
  45. endef
  46. $(eval $(call BuildPackage,liblz4))