Makefile 954 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #
  2. # Copyright (C) 2012-2015 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:=dosfstools
  9. PKG_VERSION:=3.0.27
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  11. PKG_SOURCE_URL:=https://github.com/dosfstools/dosfstools/releases/download/v$(PKG_VERSION)/ \
  12. http://fossies.org/linux/misc
  13. PKG_MD5SUM:=2e31e7bdf92998e41ed17de505a4a552
  14. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
  15. include $(INCLUDE_DIR)/host-build.mk
  16. ifeq ($(HOST_OS),Darwin)
  17. LDLIBS += -liconv
  18. endif
  19. define Host/Compile
  20. $(MAKE) -C $(HOST_BUILD_DIR) SHELL="$(BASH)" LDFLAGS="$(HOST_LDFLAGS)" LDLIBS="$(LDLIBS)"
  21. endef
  22. define Host/Install
  23. $(INSTALL_BIN) $(HOST_BUILD_DIR)/mkfs.fat $(STAGING_DIR_HOST)/bin/
  24. $(LN) mkfs.fat $(STAGING_DIR_HOST)/bin/mkdosfs
  25. endef
  26. define Host/Clean
  27. rm -f $(STAGING_DIR_HOST)/bin/mk{dosfs,fs.fat}
  28. endef
  29. $(eval $(call HostBuild))