optimize for size
[openwrt.git] / obsolete-buildroot / make / gzip.mk
1 #############################################################
2 #
3 # gzip
4 #
5 #############################################################
6 GZIP_SOURCE:=gzip-1.3.5.tar.gz
7 GZIP_SITE:=ftp://alpha.gnu.org/gnu/gzip
8 GZIP_DIR:=$(BUILD_DIR)/gzip-1.3.5
9 GZIP_CAT:=zcat
10 GZIP_BINARY:=$(GZIP_DIR)/gzip
11 GZIP_TARGET_BINARY:=$(TARGET_DIR)/bin/zmore
12
13 ifeq ($(strip $(BUILD_WITH_LARGEFILE)),false)
14 GZIP_LARGEFILE="--disable-largefile"
15 endif
16
17 $(DL_DIR)/$(GZIP_SOURCE):
18 $(WGET) -P $(DL_DIR) $(GZIP_SITE)/$(GZIP_SOURCE)
19
20 gzip-source: $(DL_DIR)/$(GZIP_SOURCE)
21
22 $(GZIP_DIR)/.unpacked: $(DL_DIR)/$(GZIP_SOURCE)
23 $(GZIP_CAT) $(DL_DIR)/$(GZIP_SOURCE) | tar -C $(BUILD_DIR) -xvf -
24 touch $(GZIP_DIR)/.unpacked
25
26 $(GZIP_DIR)/.configured: $(GZIP_DIR)/.unpacked
27 (cd $(GZIP_DIR); rm -rf config.cache; \
28 $(TARGET_CONFIGURE_OPTS) \
29 ./configure \
30 --target=$(GNU_TARGET_NAME) \
31 --host=$(GNU_TARGET_NAME) \
32 --build=$(GNU_HOST_NAME) \
33 --prefix=/usr \
34 --exec-prefix=/ \
35 --bindir=/bin \
36 --sbindir=/bin \
37 --libexecdir=/usr/lib \
38 --sysconfdir=/etc \
39 --datadir=/usr/share/misc \
40 --localstatedir=/var \
41 --mandir=/usr/man \
42 --infodir=/usr/info \
43 $(DISABLE_NLS) \
44 $(GZIP_LARGEFILE) \
45 );
46 touch $(GZIP_DIR)/.configured
47
48 $(GZIP_BINARY): $(GZIP_DIR)/.configured
49 $(MAKE) CC=$(TARGET_CC) -C $(GZIP_DIR)
50
51 $(GZIP_TARGET_BINARY): $(GZIP_BINARY)
52 $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GZIP_DIR) install
53 rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
54 $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
55 (cd $(TARGET_DIR)/bin; \
56 ln -sf gzip gunzip; \
57 ln -sf gzip zcat; \
58 ln -sf zdiff zcmp; \
59 ln -sf zgrep zegrep; \
60 ln -sf zgrep zfgrep;)
61
62 gzip: uclibc $(GZIP_TARGET_BINARY)
63
64 gzip-clean:
65 $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GZIP_DIR) uninstall
66 -$(MAKE) -C $(GZIP_DIR) clean
67
68 gzip-dirclean:
69 rm -rf $(GZIP_DIR)
70
This page took 0.040341 seconds and 5 git commands to generate.