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.

78 lines
1.9 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:=3
  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. BUILDONLY:=1
  25. endef
  26. define Build/Configure
  27. endef
  28. TARGET_CFLAGS += $(FPIC)
  29. LOWFAT_MAKEOPTS = $(TARGET_CONFIGURE_OPTS) \
  30. CFLAGS="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR) -I$(STAGING_DIR)/usr/include" \
  31. CCC="$(TARGET_CC)" \
  32. CROSS="$(TARGET_CROSS)" \
  33. DEBUG="$(DEBUG)" \
  34. VERSION="$(PKG_VERSION)" \
  35. OS="Linux"
  36. LOWFAT_HOST_MAKEOPTS = $(HOST_CONFIGURE_OPTS) \
  37. CFLAGS="$(HOST_CFLAGS) -I$(HOST_BUILD_DIR) -I$(STAGING_DIR_HOSTPKG)/include" \
  38. DEBUG="$(DEBUG)" \
  39. VERSION="$(PKG_VERSION)" \
  40. OS="Linux"
  41. # work around a nasty gcc bug
  42. ifneq ($(CONFIG_GCC_VERSION_4_2_4),)
  43. LOWFAT_MAKEOPTS += WOPTS=""
  44. endif
  45. define Build/Compile
  46. $(MAKE) -C $(PKG_BUILD_DIR) $(LOWFAT_MAKEOPTS)
  47. endef
  48. define Host/Compile
  49. $(MAKE) -C $(HOST_BUILD_DIR) $(LOWFAT_HOST_MAKEOPTS) ent
  50. endef
  51. define Host/Install
  52. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
  53. $(CP) $(HOST_BUILD_DIR)/ent $(STAGING_DIR_HOSTPKG)/bin/libowfat-ent
  54. endef
  55. define Build/InstallDev
  56. mkdir -p $(1)/usr/include/libowfat
  57. $(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/libowfat
  58. $(INSTALL_DIR) $(1)/usr/lib
  59. $(CP) $(PKG_BUILD_DIR)/*.a $(1)/usr/lib
  60. endef
  61. $(eval $(call HostBuild))
  62. $(eval $(call BuildPackage,libowfat))