| --- a/squashfs-tools/Makefile |
| +++ b/squashfs-tools/Makefile |
| @@ -247,7 +247,6 @@ ifeq ($(LZMA_XZ_SUPPORT),1) |
| CFLAGS += -DLZMA_SUPPORT |
| MKSQUASHFS_OBJS += lzma_xz_wrapper.o |
| UNSQUASHFS_OBJS += lzma_xz_wrapper.o |
| -LIBS += -llzma |
| COMPRESSORS += lzma |
| endif |
| |
| @@ -260,10 +259,18 @@ else |
| MKSQUASHFS_OBJS += xz_wrapper.o |
| UNSQUASHFS_OBJS += xz_wrapper.o |
| endif |
| -LIBS += -llzma |
| COMPRESSORS += xz |
| endif |
| |
| +ifneq ($(LZMA_XZ_SUPPORT)$(XZ_SUPPORT),) |
| +ifneq ($(LZMA_LIB),) |
| +MKSQUASHFS_OBJS += $(LZMA_LIB) |
| +UNSQUASHFS_OBJS += $(LZMA_LIB) |
| +else |
| +LIBS += -llzma |
| +endif |
| +endif |
| + |
| ifeq ($(LZO_SUPPORT),1) |
| CFLAGS += -DLZO_SUPPORT |
| MKSQUASHFS_OBJS += lzo_wrapper.o |