port libtool to buildroot-ng
[openwrt/svn-archive/archive.git] / libs / libtool / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libtool
12 PKG_VERSION:=1.5.14
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=@GNU/libtool
18 PKG_MD5SUM:=049bf67de9b0eb75cd943dafe3d749ec
19 PKG_CAT:=zcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libltdl
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=A generic dynamic object loading library
29 DESCRIPTION:=A generic dynamic object loading library.
30 URL:=http://www.gnu.org/software/libtool/
31 endef
32
33 define Build/Configure
34 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
35 touch libltdl/configure.ac; \
36 touch libltdl/acinclude.m4; \
37 touch libltdl/aclocal.m4; \
38 touch libltdl/Makefile.in; \
39 touch libltdl/config-h.in; \
40 touch libltdl/configure; \
41 $(TARGET_CONFIGURE_OPTS) \
42 CFLAGS="$(TARGET_CFLAGS)" \
43 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
44 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
45 ./configure \
46 --target=$(GNU_TARGET_NAME) \
47 --host=$(GNU_TARGET_NAME) \
48 --build=$(GNU_HOST_NAME) \
49 --program-prefix="" \
50 --program-suffix="" \
51 --prefix=/usr \
52 --exec-prefix=/usr \
53 --bindir=/usr/bin \
54 --datadir=/usr/share \
55 --includedir=/usr/include \
56 --infodir=/usr/share/info \
57 --libdir=/usr/lib \
58 --libexecdir=/usr/lib \
59 --localstatedir=/var \
60 --mandir=/usr/share/man \
61 --sbindir=/usr/sbin \
62 --sysconfdir=/etc \
63 $(DISABLE_NLS) \
64 $(DISABLE_LARGEFILE) \
65 --enable-shared \
66 --enable-static \
67 );
68 endef
69
70 define Build/Compile
71 rm -rf $(PKG_INSTALL_DIR)
72 mkdir -p $(PKG_INSTALL_DIR)
73 $(MAKE) -C $(PKG_BUILD_DIR) \
74 DESTDIR="$(PKG_INSTALL_DIR)" \
75 all install
76 endef
77
78 define Package/libltdl/install
79 install -m0755 -d $(1)/usr/lib
80 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libltdl.so.* $(1)/usr/lib/
81 endef
82
83 define Build/InstallDev
84 mkdir -p $(STAGING_DIR)/usr/include
85 $(CP) $(PKG_INSTALL_DIR)/usr/include/ltdl.h $(STAGING_DIR)/usr/include/
86 mkdir -p $(I_LIBLTDL_DEV)/usr/lib
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libltdl.{a,so*} $(STAGING_DIR)/usr/lib/
88 endef
89
90 define Build/UninstallDev
91 rm -rf \
92 $(STAGING_DIR)/usr/include/ltdl.h \
93 $(STAGING_DIR)/usr/lib/libltdl.{a,so*}
94 endef
95
96 $(eval $(call BuildPackage,libltdl))