1 #############################################################
5 #############################################################
8 LIBTOOL_SOURCE
:=libtool-
$(LIBTOOL_VERSION
).
tar.bz2
9 LIBTOOL_SITE
:=$(BR2_GNU_MIRROR
)/libtool
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
) && \
22 cd
$(TOOL_BUILD_DIR
) && \
23 tar -cjf
$@ libtool-
$(LIBTOOL_VERSION
) && \
24 rm -rf
$(LIBTOOL_SRC_DIR
) \
27 $(WGET
) -P
$(DL_DIR
) $(LIBTOOL_SITE
)/$(LIBTOOL_SOURCE
)
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
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
)
48 mkdir
-p
$(LIBTOOL_DIR
)
49 (cd
$(LIBTOOL_DIR
); rm -rf config.cache
; \
50 $(AUTO_CONFIGURE_TARGET
) \
53 --mandir=/usr
/share
/man \
54 --infodir=/usr
/share
/info \
59 $(LIBTOOL_DIR
)/$(LIBTOOL_BINARY
): $(LIBTOOL_DIR
)/.configured
60 $(MAKE
) -C
$(LIBTOOL_DIR
)
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
74 ifneq ($(BR2_HAVE_MANPAGES
),y
)
75 rm -rf
$(TARGET_DIR
)/usr
/share
/man
79 libtool
: uclibc
$(TARGET_DIR
)/$(LIBTOOL_TARGET_BINARY
)
81 libtool-source
: $(DL_DIR
)/$(LIBTOOL_SOURCE
)
84 -$(MAKE
) -C
$(LIBTOOL_DIR
) clean
85 -$(MAKE
) DESTDIR
=$(TARGET_DIR
) -C
$(LIBTOOL_DIR
) uninstall
87 libtool-cross
: uclibc
$(LIBTOOL_DIR
)/$(LIBTOOL_BINARY
)
90 -$(MAKE
) -C
$(LIBTOOL_DIR
) clean
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
)
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 \
116 $(LIBTOOL_HOST_DIR
)/$(LIBTOOL_BINARY
): $(LIBTOOL_HOST_DIR
)/.configured
117 $(MAKE
) -C
$(LIBTOOL_HOST_DIR
)
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
127 ifneq ($(BR2_HAVE_MANPAGES
),y
)
128 rm -rf
$(STAGING_DIR
)/usr
/share
/man
130 $(INSTALL
) -D
-m0755
$^
$@
131 $(INSTALL
) -D
-m0755
$(^
)ize
$(@
)ize
134 host-libtool
: $(TOOL_BUILD_DIR
)/bin
/$(LIBTOOL_BINARY
)
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
)