usability and stability patch from package maintainer Johannes 5 Joemann
[openwrt.git] / openwrt / target / lzma / Makefile
1 #############################################################
2 #
3 # lzma target
4 #
5 #############################################################
6
7 include $(TOPDIR)/rules.mk
8
9 LZMA_DIR=$(BUILD_DIR)/lzma
10 LZMA_SOURCE=lzma406.zip
11 LZMA_SITE=http://www.7-zip.org/dl
12 LZMA_MD5=a09378411cba5f786b5c49c9c58496df
13
14 LZMA_LIB_DIR=$(LZMA_DIR)/SRC/7zip/Compress/LZMA_Lib
15 LZMA_ALONE_DIR=$(LZMA_DIR)/SRC/7zip/Compress/LZMA_Alone
16
17 TARGETS=$(LZMA_LIB_DIR)/liblzma.a $(LZMA_ALONE_DIR)/lzma
18
19 $(DL_DIR)/$(LZMA_SOURCE):
20 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LZMA_SOURCE) $(LZMA_MD5) $(LZMA_SITE)
21
22 $(LZMA_DIR)/.unpacked: $(DL_DIR)/$(LZMA_SOURCE)
23 @rm -rf $(LZMA_DIR) && mkdir -p $(LZMA_DIR)
24 unzip -q $^ -d $(LZMA_DIR)
25 patch -d $(LZMA_DIR) -p1 < lzma-406-zlib-stream.patch
26 touch $(LZMA_DIR)/.unpacked
27
28 $(LZMA_LIB_DIR)/liblzma.a: $(LZMA_DIR)/.unpacked
29 $(MAKE) -C $(LZMA_LIB_DIR)
30
31 $(LZMA_ALONE_DIR)/lzma: $(LZMA_DIR)/.unpacked
32 $(MAKE) -C $(LZMA_ALONE_DIR)
33
34 lzma: $(TARGETS)
35 cp -f $^ $(LZMA_DIR)
36
37 lzma-source: $(DL_DIR)/$(LZMA_SOURCE)
38
39 lzma-clean:
40 -$(MAKE) -C $(LZMA_LIB_DIR) clean
41 -$(MAKE) -C $(LZMA_ALONE_DIR) clean
42 rm -f $(LZMA_DIR)/liblzma.a $(LZMA_DIR)/lzma
43
44 lzma-dirclean:
45 rm -rf $(LZMA_DIR)
46
47 #############################################################
48
49 prepare: $(LZMA_DIR)/.unpacked
50 compile: lzma
51 install: lzma
52 cp $(LZMA_DIR)/lzma $(STAGING_DIR)/bin/
53 clean: lzma-dirclean
This page took 0.041082 seconds and 5 git commands to generate.