summaryrefslogtreecommitdiff
path: root/tools/mtd-utils/Makefile
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-09-14 14:51:07 +0000
committerJo-Philipp Wich <jow@openwrt.org>2015-09-14 14:51:07 +0000
commitcf77766e64dfba8c72906edc3fdedaf71684ebc1 (patch)
tree35f5d7830942af7d275b7f333ba4d180d93b90de /tools/mtd-utils/Makefile
parentb4e49ad8f0c75f2c3f22e6bc8a8c1af7fddff258 (diff)
downloadmtk-20170518-cf77766e64dfba8c72906edc3fdedaf71684ebc1.zip
mtk-20170518-cf77766e64dfba8c72906edc3fdedaf71684ebc1.tar.gz
mtk-20170518-cf77766e64dfba8c72906edc3fdedaf71684ebc1.tar.bz2
tools/mtd-utils: prefer static linking
- Add patch for optional static linking preference - Prefer static linking on Linux systems - Enable verbose compiler messages when building with V=c Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 46908
Diffstat (limited to 'tools/mtd-utils/Makefile')
-rw-r--r--tools/mtd-utils/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/mtd-utils/Makefile b/tools/mtd-utils/Makefile
index f831e3c..e06d137 100644
--- a/tools/mtd-utils/Makefile
+++ b/tools/mtd-utils/Makefile
@@ -25,6 +25,9 @@ HOST_CFLAGS += -I$(STAGING_DIR_HOST)/include/e2fsprogs
CFLAGS := $(HOST_CFLAGS) -I$(HOST_BUILD_DIR)/include -L$(HOST_BUILD_DIR) -L$(STAGING_DIR_HOST)/lib -DNO_NATIVE_SUPPORT
ifneq ($(HOST_OS),Linux)
CFLAGS += -Dloff_t=off_t -D__BYTE_ORDER=BYTE_ORDER -include getline.h -include endian.h -I$(CURDIR)/include -include fls.h
+MTD_STATIC := 0
+else
+MTD_STATIC := 1
endif
MTD_MAKEOPTS = \
@@ -32,7 +35,9 @@ MTD_MAKEOPTS = \
LDFLAGS="$(HOST_LDFLAGS)" \
WITHOUT_LZO=1 WITHOUT_XATTR=1 \
SUBDIRS="" \
- BUILDDIR="$(HOST_BUILD_DIR)"
+ BUILDDIR="$(HOST_BUILD_DIR)" \
+ STATIC=$(MTD_STATIC) \
+ V=$(if $(findstring c,$(OPENWRT_VERBOSE)),1)
define Host/Compile
$(MAKE) -C $(HOST_BUILD_DIR) \