Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #
  2. # Copyright (C) 2010-2014 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. LOWFAT_VERSION=0.30
  9. PKG_NAME:=libowfat
  10. PKG_VERSION:=$(LOWFAT_VERSION)
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  13. PKG_SOURCE_URL:=http://www.fefe.de/libowfat
  14. PKG_MD5SUM:=f0119532ea834ce9e80afe49d7d85512
  15. PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
  16. PKG_LICENSE:=GPL-2.0
  17. PKG_LICENSE_FILES:=COPYING
  18. include $(INCLUDE_DIR)/package.mk
  19. # set to 1 to enable debugging
  20. DEBUG=
  21. define Package/libowfat
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=reimplemented libdjb under GPL
  25. URL:=http://www.fefe.de/libowfat/
  26. endef
  27. define Build/Configure
  28. endef
  29. TARGET_CFLAGS += $(FPIC)
  30. LOWFAT_MAKEOPTS = $(TARGET_CONFIGURE_OPTS) \
  31. CFLAGS="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR) -I$(STAGING_DIR)/usr/include" \
  32. DEBUG="$(DEBUG)" \
  33. VERSION="$(LOWFAT_VERSION)" \
  34. OS="Linux"
  35. # work around a nasty gcc bug
  36. ifneq ($(CONFIG_GCC_VERSION_4_2_4),)
  37. LOWFAT_MAKEOPTS += WOPTS=""
  38. endif
  39. define Build/Compile
  40. $(MAKE) -C $(PKG_BUILD_DIR) $(LOWFAT_MAKEOPTS)
  41. endef
  42. define Build/InstallDev
  43. mkdir -p $(1)/usr/include/libowfat
  44. $(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/libowfat
  45. $(INSTALL_DIR) $(1)/usr/lib
  46. $(CP) $(PKG_BUILD_DIR)/*.a $(1)/usr/lib
  47. endef
  48. $(eval $(call BuildPackage,libowfat))