0c5fbadf8aa27cca83d8a3355ca274c907d1fb03
[openwrt/svn-archive/archive.git] / libs / argtable / Makefile
1 #
2 # Copyright (C) 2007-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=argtable
11 PKG_VERSION:=2.11
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)2-11.tar.gz
15 PKG_SOURCE_URL:=@SF/argtable
16 PKG_MD5SUM:=6be6bdb5395b2de8063698f83db61791
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)2-11
19 PKG_FIXUP:=libtool
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/argtable
24 SECTION:=libs
25 CATEGORY:=Libraries
26 TITLE:=A library for parsing GNU style command line options
27 URL:=http://argtable.sourceforge.net/
28 endef
29
30 define Package/argtable/description
31 Argtable is an ANSI C library for parsing GNU style command line options
32 with a minimum of fuss. It enables a program's command line syntax to be
33 defined in the source code as an array of argtable structs. The command
34 line is then parsed according to that specification and the resulting
35 values are returned in those same structs where they are accessible to
36 the main program. Both tagged (-v, --verbose, --foo=bar) and untagged
37 arguments are supported, as are multiple instances of each argument.
38 endef
39
40 TARGET_CFLAGS += $(FPIC)
41 CONFIGURE_ARGS += \
42 --enable-shared \
43 --enable-static \
44
45 MAKE_FLAGS += \
46 -C $(PKG_BUILD_DIR)/src \
47 DESTDIR="$(PKG_INSTALL_DIR)" \
48 all install \
49
50 define Build/InstallDev
51 $(INSTALL_DIR) $(1)/usr/include
52 $(CP) $(PKG_INSTALL_DIR)/usr/include/argtable2.h $(1)/usr/include/
53 $(INSTALL_DIR) $(1)/usr/lib
54 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libargtable2.{a,so*} $(1)/usr/lib/
55 endef
56
57 define Package/argtable/install
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libargtable2.so.* $(1)/usr/lib/
60 endef
61
62 $(eval $(call BuildPackage,argtable))