summaryrefslogtreecommitdiff
path: root/tools/squashfs4/patches/110-allow_static_liblzma.patch
blob: 9a3a7441847c743f98f5996aea856aad5c313aa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- a/squashfs-tools/Makefile
+++ b/squashfs-tools/Makefile
@@ -129,7 +129,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
 
@@ -137,10 +136,18 @@ ifeq ($(XZ_SUPPORT),1)
 CFLAGS += -DXZ_SUPPORT
 MKSQUASHFS_OBJS += xz_wrapper.o
 UNSQUASHFS_OBJS += xz_wrapper.o
-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
 ifdef LZO_DIR