Makefile 1.2 KB

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