Subject: Add way to change linker settings From: Erwin Rol When cross compiling the linker can not find libz, this patch adds a LIBS variable that makes it possible to pass the right linker flags. Signed-off-by: Erwin Rol --- squashfs3.4/squashfs-tools/Makefile.orig 2010-02-27 00:01:56.000000000 +0100 +++ squashfs3.4/squashfs-tools/Makefile 2010-02-27 00:02:46.000000000 +0100 @@ -4,10 +4,12 @@ CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2 +LIBS := -lz -lpthread -lm + all: mksquashfs unsquashfs mksquashfs: mksquashfs.o read_fs.o sort.o - $(CC) mksquashfs.o read_fs.o sort.o -lz -lpthread -lm -o $@ + $(CC) mksquashfs.o read_fs.o sort.o $(LIBS) $(LDFLAGS) -o $@ mksquashfs.o: mksquashfs.c squashfs_fs.h mksquashfs.h global.h sort.h @@ -16,7 +18,7 @@ sort.o: sort.c squashfs_fs.h global.h sort.h unsquashfs: unsquashfs.o - $(CC) unsquashfs.o -lz -lpthread -lm -o $@ + $(CC) unsquashfs.o $(LIBS) $(LDFLAGS) -o $@ unsquashfs.o: unsquashfs.c squashfs_fs.h read_fs.h global.h