1 #############################################################
5 #############################################################
7 include $(TOPDIR
)/rules.mk
9 LZMA_DIR
=$(BUILD_DIR
)/lzma
10 LZMA_SOURCE
=lzma406.zip
11 LZMA_SITE
=http
://www
.7-zip.org
/dl
13 LZMA_LIB_DIR
=$(LZMA_DIR
)/SRC
/7zip
/Compress
/LZMA_Lib
14 LZMA_ALONE_DIR
=$(LZMA_DIR
)/SRC
/7zip
/Compress
/LZMA_Alone
16 TARGETS
=$(LZMA_LIB_DIR
)/liblzma.a
$(LZMA_ALONE_DIR
)/lzma
18 $(DL_DIR
)/$(LZMA_SOURCE
):
19 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(LZMA_SOURCE
) x
$(LZMA_SITE
)
21 $(LZMA_DIR
)/.unpacked
: $(DL_DIR
)/$(LZMA_SOURCE
)
22 @
rm -rf
$(LZMA_DIR
) && mkdir
-p
$(LZMA_DIR
)
23 unzip
-q
$^
-d
$(LZMA_DIR
)
24 patch
-d
$(LZMA_DIR
) -p1
< lzma-406-zlib-stream.patch
25 touch
$(LZMA_DIR
)/.unpacked
27 $(LZMA_LIB_DIR
)/liblzma.a
: $(LZMA_DIR
)/.unpacked
28 $(MAKE
) -C
$(LZMA_LIB_DIR
)
30 $(LZMA_ALONE_DIR
)/lzma
: $(LZMA_DIR
)/.unpacked
31 $(MAKE
) -C
$(LZMA_ALONE_DIR
)
36 lzma-source
: $(DL_DIR
)/$(LZMA_SOURCE
)
39 -$(MAKE
) -C
$(LZMA_LIB_DIR
) clean
40 -$(MAKE
) -C
$(LZMA_ALONE_DIR
) clean
41 rm -f
$(LZMA_DIR
)/liblzma.a
$(LZMA_DIR
)/lzma
46 #############################################################
48 prepare
: $(LZMA_DIR
)/.unpacked