Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #
  2. # Copyright (C) 2006-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:=mtd-utils
  9. PKG_VERSION:=2.1.1
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  11. PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/mtd-utils/
  12. PKG_HASH:=8d15e8b70f036d6af1a66011f8ca0e048e9675fa7983d33bea92c24313a232d2
  13. PKG_FIXUP:=autoreconf
  14. include $(INCLUDE_DIR)/host-build.mk
  15. ifneq ($(HOST_OS),Linux)
  16. HOST_CFLAGS += \
  17. -I$(CURDIR)/include \
  18. -Dloff_t=off_t \
  19. -D__BYTE_ORDER=BYTE_ORDER \
  20. -include endian.h \
  21. -DNO_NATIVE_SUPPORT \
  22. -include fls.h
  23. endif
  24. HOST_CONFIGURE_VARS+= \
  25. UUID_CFLAGS="-I$(STAGING_DIR_HOST)/include/e2fsprogs/uuid"
  26. HOST_CONFIGURE_ARGS+= \
  27. --disable-tests \
  28. --without-crypto \
  29. --without-xattr \
  30. --without-zstd \
  31. --without-lzo
  32. HOST_MAKE_FLAGS += \
  33. PROGRAMS="mkfs.jffs2 ubinize mkfs.ubifs"
  34. define Host/Install
  35. $(CP) \
  36. $(HOST_BUILD_DIR)/mkfs.jffs2 \
  37. $(HOST_BUILD_DIR)/mkfs.ubifs \
  38. $(HOST_BUILD_DIR)/ubinize \
  39. $(STAGING_DIR_HOST)/bin/
  40. endef
  41. define Host/Clean
  42. rm -f $(STAGING_DIR_HOST)/bin/{mkfs.jffs2,mkfs.ubifs,ubinize}
  43. endef
  44. $(eval $(call HostBuild))