Patchwork Fix crosscompilation for mkfs.ubifs

login
register
mail settings
Submitter Matthias Fuchs
Date Oct. 23, 2009, 4:05 p.m.
Message ID <200910231805.04917.matthias.fuchs@esd.eu>
Download mbox | patch
Permalink /patch/36790/
State Accepted
Commit 600337e7c81e812d34460b413c5b044f454bc49d
Headers show

Comments

Matthias Fuchs - Oct. 23, 2009, 4:05 p.m.
This patch adds support for passing the location of the lzo
library and headers.

Also BUILDDIR must be referenced to find the libubi.a archive.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
---
 mkfs.ubifs/Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Artem Bityutskiy - Oct. 24, 2009, 5:16 p.m.
On Fri, 2009-10-23 at 18:05 +0200, Matthias Fuchs wrote:
> This patch adds support for passing the location of the lzo
> library and headers.
> 
> Also BUILDDIR must be referenced to find the libubi.a archive.
> 
> Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>

Pushed, thanks!

Patch

diff --git a/mkfs.ubifs/Makefile b/mkfs.ubifs/Makefile
index a678b0a..61d0e20 100644
--- a/mkfs.ubifs/Makefile
+++ b/mkfs.ubifs/Makefile
@@ -1,11 +1,13 @@ 
 
 CPPFLAGS += -I../include -I../ubi-utils/include
+CPPFLAGS += $(ZLIBCPPFLAGS) $(LZOCPPFLAGS)
 
 ALL_SOURCES=*.[ch] hashtable/*.[ch]
 
 TARGETS = mkfs.ubifs
 
-LDLIBS_mkfs.ubifs = -lz -llzo2 -lm -luuid -L../ubi-utils/ -lubi
+LDLIBS_mkfs.ubifs = -lz -llzo2 -lm -luuid -L$(BUILDDIR)/../ubi-utils/ -lubi
+LDLIBS_mkfs.ubifs += $(ZLIBLDFLAGS) $(LZOLDFLAGS)
 
 include ../common.mk