aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-06-07 02:19:03 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-06-08 14:36:23 +0300
commit811e2e742e64cdc4bfb9519c0d0db53ac75aa4ce (patch)
tree5f5b7245dd94fe63cfc630b39aad6b00d8b88e37 /Makefile
parentbc1040362c26828989e1a8ec2b22ebc9be20df20 (diff)
jffs2: make lzo optional at build time
The external lzo dep can be a pain to deal with when cross-compiling, so make it optional for jffs2. This is useful if people aren't even using the functionality, or for quicker development. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6a65258..8bdba8e 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,11 @@ CPPFLAGS += -I./include $(ZLIBCPPFLAGS) $(LZOCPPFLAGS)
ifeq ($(WITHOUT_XATTR), 1)
CPPFLAGS += -DWITHOUT_XATTR
endif
+ifeq ($(WITHOUT_LZO), 1)
+ CPPFLAGS += -DWITHOUT_LZO
+else
+ LZOLDLIBS = -llzo2
+endif
SUBDIRS = lib ubi-utils mkfs.ubifs
TESTS = tests
@@ -48,11 +53,11 @@ $(BUILDDIR)/mkfs.jffs2: $(addprefix $(BUILDDIR)/,\
compr_rtime.o mkfs.jffs2.o compr_zlib.o compr_lzo.o \
compr.o rbtree.o)
LDFLAGS_mkfs.jffs2 = $(ZLIBLDFLAGS) $(LZOLDFLAGS)
-LDLIBS_mkfs.jffs2 = -lz -llzo2
+LDLIBS_mkfs.jffs2 = -lz $(LZOLDLIBS)
$(BUILDDIR)/jffs2reader: $(BUILDDIR)/jffs2reader.o
LDFLAGS_jffs2reader = $(ZLIBLDFLAGS) $(LZOLDFLAGS)
-LDLIBS_jffs2reader = -lz -llzo2
+LDLIBS_jffs2reader = -lz $(LZOLDLIBS)
$(BUILDDIR)/lib/libmtd.a: subdirs_lib_all ;