add optimization flags, remove install dir before building
[openwrt/svn-archive/archive.git] / libs / libcli / 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:=libcli
12 PKG_VERSION:=1.8.5
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/libcli
17 PKG_MD5SUM:=0fdd30df5a8c1388a4549751ba61247a
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libcli
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=A Cisco-like CLI library
29 DESCRIPTION:=\
30 Libcli provides a shared library for including a Cisco-like \\\
31 command-line interface into other software. It's a telnet \\\
32 interface which supports command-line editing, history, \\\
33 authentication and callbacks for a user-definable function tree.
34 URL:=http://libcli.sourceforge.net/
35 endef
36
37 define Build/Compile
38 rm -rf $(PKG_INSTALL_DIR)
39 $(call Build/Compile/Default, \
40 OPTIM="$(TARGET_CFLAGS)" \
41 DESTDIR="$(PKG_INSTALL_DIR)" \
42 all install \
43 )
44 endef
45
46 define Build/InstallDev
47 mkdir -p $(STAGING_DIR)/usr/include
48 $(CP) $(PKG_INSTALL_DIR)/usr/include/libcli.h $(STAGING_DIR)/usr/include/
49 mkdir -p $(STAGING_DIR)/usr/lib
50 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcli.so* $(STAGING_DIR)/usr/lib/
51 endef
52
53 define Build/UninstallDev
54 rm -rf $(STAGING_DIR)/usr/include/libcli.h \
55 $(STAGING_DIR)/usr/lib/libcli.so*
56 endef
57
58 define Package/libcli/install
59 install -d -m0755 $(1)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcli.so.* $(1)/usr/lib/
61 endef
62
63 $(eval $(call BuildPackage,libcli))