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.

75 lines
1.8 KiB

  1. # This is free software, licensed under the GNU General Public License v2.
  2. # See /LICENSE for more information.
  3. #
  4. include $(TOPDIR)/rules.mk
  5. PKG_NAME:=libowfat
  6. PKG_VERSION:=0.32
  7. PKG_RELEASE:=2
  8. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  9. PKG_SOURCE_URL:=https://www.fefe.de/libowfat
  10. PKG_HASH:=f4b9b3d9922dc25bc93adedf9e9ff8ddbebaf623f14c8e7a5f2301bfef7998c1
  11. PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
  12. PKG_LICENSE:=GPL-2.0
  13. PKG_LICENSE_FILES:=COPYING
  14. PKG_BUILD_DEPENDS += libowfat/host
  15. include $(INCLUDE_DIR)/package.mk
  16. include $(INCLUDE_DIR)/host-build.mk
  17. # set to 1 to enable debugging
  18. DEBUG=
  19. define Package/libowfat
  20. SECTION:=libs
  21. CATEGORY:=Libraries
  22. TITLE:=reimplemented libdjb under GPL
  23. URL:=https://www.fefe.de/libowfat/
  24. endef
  25. define Build/Configure
  26. endef
  27. TARGET_CFLAGS += $(FPIC)
  28. LOWFAT_MAKEOPTS = $(TARGET_CONFIGURE_OPTS) \
  29. CFLAGS="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR) -I$(STAGING_DIR)/usr/include" \
  30. DEBUG="$(DEBUG)" \
  31. VERSION="$(PKG_VERSION)" \
  32. OS="Linux"
  33. LOWFAT_HOST_MAKEOPTS = $(HOST_CONFIGURE_OPTS) \
  34. CFLAGS="$(HOST_CFLAGS) -I$(HOST_BUILD_DIR) -I$(STAGING_DIR_HOSTPKG)/include" \
  35. DEBUG="$(DEBUG)" \
  36. VERSION="$(PKG_VERSION)" \
  37. OS="Linux"
  38. # work around a nasty gcc bug
  39. ifneq ($(CONFIG_GCC_VERSION_4_2_4),)
  40. LOWFAT_MAKEOPTS += WOPTS=""
  41. endif
  42. define Build/Compile
  43. $(MAKE) -C $(PKG_BUILD_DIR) $(LOWFAT_MAKEOPTS)
  44. endef
  45. define Host/Compile
  46. $(MAKE) -C $(HOST_BUILD_DIR) $(LOWFAT_HOST_MAKEOPTS) ent
  47. endef
  48. define Host/Install
  49. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
  50. $(CP) $(HOST_BUILD_DIR)/ent $(STAGING_DIR_HOSTPKG)/bin/libowfat-ent
  51. endef
  52. define Build/InstallDev
  53. mkdir -p $(1)/usr/include/libowfat
  54. $(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/libowfat
  55. $(INSTALL_DIR) $(1)/usr/lib
  56. $(CP) $(PKG_BUILD_DIR)/*.a $(1)/usr/lib
  57. endef
  58. $(eval $(call HostBuild))
  59. $(eval $(call BuildPackage,libowfat))