add target/download
[openwrt.git] / 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=lzma432.tar.bz2
11 LZMA_SITE=@SF/sevenzip
12 LZMA_MD5=155c1ebce5bc6710ae7ecc926226d9d7
13
14 LZMA_LIB_DIR=$(LZMA_DIR)/C/7zip/Compress/LZMA_Lib
15 LZMA_ALONE_DIR=$(LZMA_DIR)/C/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 tar xjf $^ -C $(LZMA_DIR)
25 patch -d $(LZMA_DIR) -p1 < lzma-zlib.patch
26 touch $(LZMA_DIR)/.unpacked
27
28 $(LZMA_ALONE_DIR)/lzma $(LZMA_LIB_DIR)/liblzma.a: $(LZMA_DIR)/.built
29 $(LZMA_DIR)/.built: $(LZMA_DIR)/.unpacked
30 $(MAKE) -C $(LZMA_LIB_DIR)
31 $(MAKE) -f makefile.gcc -C $(LZMA_ALONE_DIR)
32 touch $@
33
34 lzma: $(TARGETS)
35 $(CP) $^ $(LZMA_DIR)
36
37
38 lzma-clean: FORCE
39 -$(MAKE) -C $(LZMA_LIB_DIR) clean
40 -$(MAKE) -C $(LZMA_ALONE_DIR) clean
41 rm -f $(LZMA_DIR)/liblzma.a $(LZMA_DIR)/lzma
42
43 lzma-dirclean: FORCE
44 rm -rf $(LZMA_DIR)
45
46 #############################################################
47
48 source: $(DL_DIR)/$(LZMA_SOURCE)
49 prepare: $(LZMA_DIR)/.unpacked
50 compile: lzma
51 install: lzma FORCE
52 $(CP) $(LZMA_DIR)/lzma $(STAGING_DIR)/bin/
53 clean: lzma-dirclean
This page took 0.045624 seconds and 5 git commands to generate.