aboutsummaryrefslogtreecommitdiffstats
path: root/tools/mtd-utils/Makefile
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-04-30 10:09:48 +0200
committerFelix Fietkau <nbd@nbd.name>2018-04-30 10:12:55 +0200
commit56ae9f9b0b1583e02815f0e60bf232947c27c6cf (patch)
tree8fd80160e39a36e5b61e9af4bb0425854257ec73 /tools/mtd-utils/Makefile
parent45219c1c0ff9e896fc626ad3415cf2fe8a3c635d (diff)
downloadupstream-56ae9f9b0b1583e02815f0e60bf232947c27c6cf.tar.gz
upstream-56ae9f9b0b1583e02815f0e60bf232947c27c6cf.tar.bz2
upstream-56ae9f9b0b1583e02815f0e60bf232947c27c6cf.zip
mtd-utils: add back macOS compatibility code that was dropped during the update
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'tools/mtd-utils/Makefile')
-rw-r--r--tools/mtd-utils/Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/mtd-utils/Makefile b/tools/mtd-utils/Makefile
index 1527d10579..ff000b99e3 100644
--- a/tools/mtd-utils/Makefile
+++ b/tools/mtd-utils/Makefile
@@ -17,6 +17,15 @@ PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/host-build.mk
+ifneq ($(HOST_OS),Linux)
+ HOST_CFLAGS += \
+ -I$(CURDIR)/include \
+ -Dloff_t=off_t \
+ -D__BYTE_ORDER=BYTE_ORDER \
+ -include endian.h \
+ -DNO_NATIVE_SUPPORT \
+ -include fls.h
+endif
HOST_CONFIGURE_VARS+= \
UUID_CFLAGS="-I$(STAGING_DIR_HOST)/include/e2fsprogs/uuid"
@@ -26,6 +35,9 @@ HOST_CONFIGURE_ARGS+= \
--without-xattr \
--without-lzo
+HOST_MAKE_FLAGS += \
+ PROGRAMS="mkfs.jffs2 ubinize mkfs.ubifs"
+
define Host/Install
$(CP) \
$(HOST_BUILD_DIR)/mkfs.jffs2 \