optimize for size
[openwrt.git] / obsolete-buildroot / make / libtool.mk
1 #############################################################
2 #
3 # libtool
4 #
5 #############################################################
6 LIBTOOL_SOURCE:=libtool_1.4.3.orig.tar.gz
7 LIBTOOL_SITE:=http://ftp.debian.org/debian/pool/main/libt/libtool
8 LIBTOOL_CAT:=zcat
9 LIBTOOL_DIR:=$(BUILD_DIR)/libtool-1.4.3
10 LIBTOOL_BINARY:=libtool
11 LIBTOOL_TARGET_BINARY:=usr/bin/libtool
12
13 $(DL_DIR)/$(LIBTOOL_SOURCE):
14 $(WGET) -P $(DL_DIR) $(LIBTOOL_SITE)/$(LIBTOOL_SOURCE)
15
16 libtool-source: $(DL_DIR)/$(LIBTOOL_SOURCE)
17
18 $(LIBTOOL_DIR)/.unpacked: $(DL_DIR)/$(LIBTOOL_SOURCE)
19 $(LIBTOOL_CAT) $(DL_DIR)/$(LIBTOOL_SOURCE) | tar -C $(BUILD_DIR) -xvf -
20 touch $(LIBTOOL_DIR)/.unpacked
21
22 $(LIBTOOL_DIR)/.configured: $(LIBTOOL_DIR)/.unpacked
23 (cd $(LIBTOOL_DIR); rm -rf config.cache; \
24 $(TARGET_CONFIGURE_OPTS) \
25 CFLAGS="$(TARGET_CFLAGS)" \
26 ./configure \
27 --target=$(GNU_TARGET_NAME) \
28 --host=$(GNU_TARGET_NAME) \
29 --build=$(GNU_HOST_NAME) \
30 --prefix=/usr \
31 --exec-prefix=/usr \
32 --bindir=/usr/bin \
33 --sbindir=/usr/sbin \
34 --libexecdir=/usr/lib \
35 --sysconfdir=/etc \
36 --datadir=/usr/share \
37 --localstatedir=/var \
38 --mandir=/usr/man \
39 --infodir=/usr/info \
40 $(DISABLE_NLS) \
41 );
42 touch $(LIBTOOL_DIR)/.configured
43
44 $(LIBTOOL_DIR)/$(LIBTOOL_BINARY): $(LIBTOOL_DIR)/.configured
45 $(MAKE) CC=$(TARGET_CC) -C $(LIBTOOL_DIR)
46 touch -c $(LIBTOOL_DIR)/$(LIBTOOL_BINARY)
47
48 $(TARGET_DIR)/$(LIBTOOL_TARGET_BINARY): $(LIBTOOL_DIR)/$(LIBTOOL_BINARY)
49 $(MAKE) \
50 prefix=$(TARGET_DIR)/usr \
51 exec_prefix=$(TARGET_DIR)/usr \
52 bindir=$(TARGET_DIR)/usr/bin \
53 sbindir=$(TARGET_DIR)/usr/sbin \
54 libexecdir=$(TARGET_DIR)/usr/lib \
55 datadir=$(TARGET_DIR)/usr/share \
56 sysconfdir=$(TARGET_DIR)/etc \
57 localstatedir=$(TARGET_DIR)/var \
58 libdir=$(TARGET_DIR)/usr/lib \
59 infodir=$(TARGET_DIR)/usr/info \
60 mandir=$(TARGET_DIR)/usr/man \
61 includedir=$(TARGET_DIR)/usr/include \
62 -C $(LIBTOOL_DIR) install;
63 $(STRIP) $(TARGET_DIR)//usr/lib/libltdl.so.*.*.* > /dev/null 2>&1
64 $(SED) "s,^CC.*,CC=\"/usr/bin/gcc\"," $(TARGET_DIR)/usr/bin/libtool
65 $(SED) "s,^LD.*,LD=\"/usr/bin/ld\"," $(TARGET_DIR)/usr/bin/libtool
66 rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
67 $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
68
69 libtool: uclibc $(TARGET_DIR)/$(LIBTOOL_TARGET_BINARY)
70
71 libtool-clean:
72 $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(LIBTOOL_DIR) uninstall
73 -$(MAKE) -C $(LIBTOOL_DIR) clean
74
75 libtool-dirclean:
76 rm -rf $(LIBTOOL_DIR)
77
This page took 0.060485 seconds and 5 git commands to generate.