fix compiling on avr32
[openwrt/svn-archive/archive.git] / libs / libreadline / 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: Makefile 5624 2006-11-23 00:29:07Z nbd $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=readline
12 PKG_VERSION:=5.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@GNU/readline
17 PKG_MD5SUM:=7ee5a692db88b30ca48927a13fd60e46
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libreadline
25 SECTION:=libs
26 CATEGORY:=Libraries
27 TITLE:=Command lines edition library
28 URL:=http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
29 endef
30
31 define Package/libreadline/description
32 The Readline library provides a set of functions for use by applications
33 that allow users to edit command lines as they are typed in. Both Emacs
34 and vi editing modes are available. The Readline library includes
35 additional functions to maintain a list of previously-entered command
36 lines, to recall and perhaps reedit those lines, and perform csh-like
37 history expansion on previous commands.
38 endef
39
40 define Build/Configure
41 $(call Build/Configure/Default, \
42 --enable-shared \
43 --enable-static \
44 --without-curses \
45 )
46 endef
47
48 TARGET_CPPFLAGS:=-I. -I.. $(TARGET_CPPFLAGS)
49
50 define Build/Compile
51 $(MAKE) -C $(PKG_BUILD_DIR) \
52 DESTDIR="$(PKG_INSTALL_DIR)" \
53 all install
54 endef
55
56 define Build/InstallDev
57 mkdir -p $(1)/usr/include
58 $(CP) $(PKG_INSTALL_DIR)/usr/include/readline $(1)/usr/include/
59 mkdir -p $(1)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.{a,so*} $(1)/usr/lib/
61 endef
62
63 define Package/libreadline/install
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.so.* $(1)/usr/lib/
66 endef
67
68 $(eval $(call BuildPackage,libreadline))