bump version
[buildroot.git] / package / libtool / libtool.mk
blob83190723e043c11913caeb0254ba842b99ca38e8
1 #############################################################
3 # libtool
5 #############################################################
6 LIBTOOL_VERSION:=2.2.4
7 LIBTOOL_VERSION:=git
8 LIBTOOL_SOURCE:=libtool-$(LIBTOOL_VERSION).tar.bz2
9 LIBTOOL_SITE:=$(BR2_GNU_MIRROR)/libtool
10 LIBTOOL_CAT:=$(BZCAT)
11 LIBTOOL_SRC_DIR:=$(TOOL_BUILD_DIR)/libtool-$(LIBTOOL_VERSION)
12 LIBTOOL_DIR:=$(BUILD_DIR)/libtool-$(LIBTOOL_VERSION)
13 LIBTOOL_HOST_DIR:=$(TOOL_BUILD_DIR)/libtool-$(LIBTOOL_VERSION)-host
14 LIBTOOL_BINARY:=libtool
15 LIBTOOL_TARGET_BINARY:=usr/bin/libtool
17 $(DL_DIR)/$(LIBTOOL_SOURCE):
18 ifeq ($(LIBTOOL_VERSION),git)
19 $(GIT) clone git://git.savannah.gnu.org/libtool.git $(LIBTOOL_SRC_DIR)
20 (cd $(TOOL_BUILD_DIR)/libtool-$(LIBTOOL_VERSION) && \
21 ./bootstrap && \
22 cd $(TOOL_BUILD_DIR) && \
23 tar -cjf $@ libtool-$(LIBTOOL_VERSION) && \
24 rm -rf $(LIBTOOL_SRC_DIR) \
26 else
27 $(WGET) -P $(DL_DIR) $(LIBTOOL_SITE)/$(LIBTOOL_SOURCE)
28 endif
30 $(LIBTOOL_SRC_DIR)/.unpacked: $(DL_DIR)/$(LIBTOOL_SOURCE)
31 $(LIBTOOL_CAT) $(DL_DIR)/$(LIBTOOL_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) -
32 $(CONFIG_UPDATE) $(@D)
33 $(CONFIG_UPDATE) $(@D)/libltdl
34 touch $@
36 #############################################################
38 # libtool for the target
40 #############################################################
42 $(LIBTOOL_DIR)/.configured: THIS_SRCDIR = $(LIBTOOL_SRC_DIR)
43 $(LIBTOOL_DIR)/.configured: $(LIBTOOL_SRC_DIR)/.unpacked
44 ifeq ($(BR2_USE_UPDATES),y)
45 (test -d $(LIBTOOL_SRC_DIR)/.git && cd $(LIBTOOL_SRC_DIR) && $(GIT) pull && autoreconf)
46 endif
47 rm -rf $(LIBTOOL_DIR)
48 mkdir -p $(LIBTOOL_DIR)
49 (cd $(LIBTOOL_DIR); rm -rf config.cache; \
50 $(AUTO_CONFIGURE_TARGET) \
51 --prefix=/usr \
52 --sysconfdir=/etc \
53 --mandir=/usr/share/man \
54 --infodir=/usr/share/info \
55 $(DISABLE_NLS) \
57 touch $@
59 $(LIBTOOL_DIR)/$(LIBTOOL_BINARY): $(LIBTOOL_DIR)/.configured
60 $(MAKE) -C $(LIBTOOL_DIR)
61 touch -c $@
63 $(TARGET_DIR)/$(LIBTOOL_TARGET_BINARY): $(LIBTOOL_DIR)/$(LIBTOOL_BINARY)
64 $(MAKE) DESTDIR=$(TARGET_DIR) -C $(LIBTOOL_DIR) install-exec
65 $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) \
66 $(TARGET_DIR)/usr/lib/libltdl.so.*.*.* > /dev/null 2>&1
67 $(SED) "s,^CC.*,CC=\"/usr/bin/gcc\"," $(TARGET_DIR)/usr/bin/libtool
68 $(SED) "s,^LD.*,LD=\"/usr/bin/ld\"," $(TARGET_DIR)/usr/bin/libtool
69 rm -rf $(TARGET_DIR)/share/locale
70 rm -rf $(TARGET_DIR)/usr/share/doc
71 ifneq ($(BR2_HAVE_INFOPAGES),y)
72 rm -rf $(TARGET_DIR)/usr/share/info
73 endif
74 ifneq ($(BR2_HAVE_MANPAGES),y)
75 rm -rf $(TARGET_DIR)/usr/share/man
76 endif
77 touch -c $@
79 libtool: $(TARGET_DIR)/$(LIBTOOL_TARGET_BINARY)
81 libtool-source: $(DL_DIR)/$(LIBTOOL_SOURCE)
83 libtool-clean:
84 -$(MAKE) -C $(LIBTOOL_DIR) clean
85 -$(MAKE) DESTDIR=$(TARGET_DIR) -C $(LIBTOOL_DIR) uninstall
87 libtool-cross: $(LIBTOOL_DIR)/$(LIBTOOL_BINARY)
89 libtool-cross-clean:
90 -$(MAKE) -C $(LIBTOOL_DIR) clean
92 libtool-dirclean:
93 rm -rf $(LIBTOOL_DIR)
95 #############################################################
97 # libtool for the host
99 #############################################################
101 $(LIBTOOL_HOST_DIR)/.configured: $(LIBTOOL_SRC_DIR)/.unpacked
102 ifeq ($(BR2_USE_UPDATES),y)
103 (test -d $(LIBTOOL_SRC_DIR)/.git && cd $(LIBTOOL_SRC_DIR) && $(GIT) pull)
104 endif
105 mkdir -p $(LIBTOOL_HOST_DIR)
106 (cd $(LIBTOOL_HOST_DIR); rm -rf config.cache; \
107 $(HOST_CONFIGURE_OPTS) \
108 CFLAGS="$(HOST_CFLAGS)" \
109 LDFLAGS="$(HOST_LDFLAGS)" \
110 $(LIBTOOL_SRC_DIR)/configure \
111 --prefix=$(STAGING_DIR)/usr \
112 $(DISABLE_NLS) \
114 touch $@
116 $(LIBTOOL_HOST_DIR)/$(LIBTOOL_BINARY): $(LIBTOOL_HOST_DIR)/.configured
117 $(MAKE) -C $(LIBTOOL_HOST_DIR)
118 touch -c $@
120 $(TOOL_BUILD_DIR)/bin/$(LIBTOOL_BINARY): $(LIBTOOL_HOST_DIR)/$(LIBTOOL_BINARY)
121 $(MAKE) -C $(LIBTOOL_HOST_DIR) install-exec
122 rm -rf $(STAGING_DIR)/share/locale
123 rm -rf $(STAGING_DIR)/usr/share/doc
124 ifneq ($(BR2_HAVE_INFOPAGES),y)
125 rm -rf $(STAGING_DIR)/usr/share/info
126 endif
127 ifneq ($(BR2_HAVE_MANPAGES),y)
128 rm -rf $(STAGING_DIR)/usr/share/man
129 endif
130 $(INSTALL) -D -m0755 $^ $@
131 $(INSTALL) -D -m0755 $(^)ize $(@)ize
132 touch -c $@
134 host-libtool: $(TOOL_BUILD_DIR)/bin/$(LIBTOOL_BINARY)
136 host-libtool-clean:
137 -$(MAKE) -C $(LIBTOOL_HOST_DIR) clean
138 -$(MAKE) -C $(LIBTOOL_HOST_DIR) uninstall
139 rm -f $(TOOL_BUILD_DIR)/bin/$(LIBTOOL_BINARY) \
140 $(TOOL_BUILD_DIR)/bin/$(LIBTOOL_BINARY)ize
142 host-libtool-dirclean:
143 rm -rf $(LIBTOOL_HOST_DIR) $(LIBTOOL_SRC_DIR)
145 #############################################################
147 # Toplevel Makefile options
149 #############################################################
150 ifeq ($(BR2_PACKAGE_LIBTOOL),y)
151 TARGETS+=libtool
152 endif