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.

76 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. 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. DEBUG="$(DEBUG)" \
  32. VERSION="$(PKG_VERSION)" \
  33. OS="Linux"
  34. LOWFAT_HOST_MAKEOPTS = $(HOST_CONFIGURE_OPTS) \
  35. CFLAGS="$(HOST_CFLAGS) -I$(HOST_BUILD_DIR) -I$(STAGING_DIR_HOSTPKG)/include" \
  36. DEBUG="$(DEBUG)" \
  37. VERSION="$(PKG_VERSION)" \
  38. OS="Linux"
  39. # work around a nasty gcc bug
  40. ifneq ($(CONFIG_GCC_VERSION_4_2_4),)
  41. LOWFAT_MAKEOPTS += WOPTS=""
  42. endif
  43. define Build/Compile
  44. $(MAKE) -C $(PKG_BUILD_DIR) $(LOWFAT_MAKEOPTS)
  45. endef
  46. define Host/Compile
  47. $(MAKE) -C $(HOST_BUILD_DIR) $(LOWFAT_HOST_MAKEOPTS) ent
  48. endef
  49. define Host/Install
  50. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
  51. $(CP) $(HOST_BUILD_DIR)/ent $(STAGING_DIR_HOSTPKG)/bin/libowfat-ent
  52. endef
  53. define Build/InstallDev
  54. mkdir -p $(1)/usr/include/libowfat
  55. $(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/libowfat
  56. $(INSTALL_DIR) $(1)/usr/lib
  57. $(CP) $(PKG_BUILD_DIR)/*.a $(1)/usr/lib
  58. endef
  59. $(eval $(call HostBuild))
  60. $(eval $(call BuildPackage,libowfat))