Ticket #2635: Makefile

File Makefile, 1.9 KB (added by michu-at-neophob-com, 10 years ago)
Line 
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 9349 2007-10-18 18:46:37Z blogic $
8
9include $(TOPDIR)/rules.mk
10
11PKG_NAME:=argtable
12PKG_VERSION:=2.7
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)2-7.tar.gz
16PKG_SOURCE_URL:=@SF/argtable
17PKG_MD5SUM:=a84130293aab3bc09631cbee717ede93
18
19PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)2-7
20PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22include $(INCLUDE_DIR)/package.mk
23
24define Package/argtable
25  SECTION:=libs
26  CATEGORY:=Libraries
27  TITLE:=A library for parsing GNU style command line options
28  URL:=http://argtable.sourceforge.net/
29endef
30
31define Package/argtable/description
32        Argtable is an ANSI C library for parsing GNU style command line options with a minimum of fuss.
33        It enables a program's command line syntax to be defined in the source code as an array of argtable
34        structs. The command line is then parsed according to that specification and the resulting values
35        are returned in those same structs where they are accessible to the main program. Both tagged
36        (-v, --verbose, --foo=bar) and untagged arguments are supported, as are multiple instances of
37        each argument.
38endef
39
40CONFIGURE_ARGS += \
41        --enable-shared \
42        --enable-static \
43
44MAKE_FLAGS += \
45        -C $(PKG_BUILD_DIR)/src \
46        DESTDIR="$(PKG_INSTALL_DIR)" \
47        all install \
48
49define Build/InstallDev
50        mkdir -p $(1)/usr/include
51        $(CP) $(PKG_INSTALL_DIR)/usr/include/argtable2.h $(1)/usr/include/
52        mkdir -p $(1)/usr/lib
53        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libargtable2.{a,so*} $(1)/usr/lib/
54endef
55
56define Build/UninstallDev
57        rm -rf \
58        $(STAGING_DIR)/usr/include/argtable2.h \
59        $(STAGING_DIR)/usr/lib/libargtable2.{a,so*}
60endef           
61
62define Package/argtable/install
63        $(INSTALL_DIR) $(1)/usr/lib
64        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libargtable2.so.* $(1)/usr/lib/
65endef
66
67$(eval $(call BuildPackage,argtable))