Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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.0.2
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  11. PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/mtd-utils/
  12. PKG_HASH:=fb3de61be8e932abb424e8ea3c30298f553d5f970ad158a737bb303bbf9660b8
  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-xattr \
  29. --without-lzo
  30. HOST_MAKE_FLAGS += \
  31. PROGRAMS="mkfs.jffs2 ubinize mkfs.ubifs"
  32. define Host/Install
  33. $(CP) \
  34. $(HOST_BUILD_DIR)/mkfs.jffs2 \
  35. $(HOST_BUILD_DIR)/mkfs.ubifs \
  36. $(HOST_BUILD_DIR)/ubinize \
  37. $(STAGING_DIR_HOST)/bin/
  38. endef
  39. define Host/Clean
  40. rm -f $(STAGING_DIR_HOST)/bin/{mkfs.jffs2,mkfs.ubifs,ubinize}
  41. endef
  42. $(eval $(call HostBuild))