Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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:=lzo
  9. PKG_VERSION:=2.10
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://www.oberhumer.com/opensource/lzo/download/
  13. PKG_MD5SUM:=39d3f3f9c55c87b1e5d6888e1420f4b5
  14. PKG_FIXUP:=autoreconf
  15. PKG_INSTALL:=1
  16. PKG_LICENSE:=GPL-2.0+
  17. PKG_BUILD_PARALLEL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/liblzo
  20. SECTION:=libs
  21. CATEGORY:=Libraries
  22. TITLE:=A real-time data compression library
  23. URL:=http://www.oberhumer.com/opensource/lzo/
  24. endef
  25. define Package/liblzo/description
  26. LZO is a data compression library which is suitable for data de-/compression
  27. in real-time. This means it favours speed over compression ratio.
  28. endef
  29. define Build/Configure
  30. $(call Build/Configure/Default, \
  31. --enable-shared \
  32. --enable-static \
  33. )
  34. endef
  35. TARGET_CFLAGS += $(FPIC)
  36. MAKE_FLAGS += CFLAGS_O="$(TARGET_CFLAGS)"
  37. ifeq ($(CONFIG_i386)$(CONFIG_x86_64),)
  38. TARGET_CFLAGS += -DLZO_CFG_NO_UNALIGNED=1
  39. endif
  40. define Build/InstallDev
  41. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
  42. $(CP) $(PKG_INSTALL_DIR)/usr/include/lzo $(1)/usr/include/
  43. $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo2.{a,so*} $(1)/usr/lib/
  44. endef
  45. define Package/liblzo/install
  46. $(INSTALL_DIR) $(1)/usr/lib
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo2.so* $(1)/usr/lib/
  48. endef
  49. $(eval $(call BuildPackage,liblzo))