37dc599d4d9b170e23415f50ffc2b667aa888cca
[openwrt/svn-archive/archive.git] / libs / libjson-c / 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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=json-c
11 PKG_VERSION:=0.7
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://oss.metaparadigm.com/json-c/
16 PKG_MD5SUM:=
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/libjson
21 SECTION:=libs
22 CATEGORY:=Libraries
23 TITLE:=javascript object notation
24 URL:=http://oss.metaparadigm.com/json-c/
25 endef
26
27 define Package/libjson/description
28 This package contains a library for javascript object notation backends.
29 endef
30
31 TARGET_CFLAGS += $(FPIC)
32
33 define Build/Compile
34 $(MAKE) -C $(PKG_BUILD_DIR) \
35 DESTDIR="$(PKG_INSTALL_DIR)" \
36 all install
37 endef
38
39 define Build/InstallDev
40 mkdir -p $(1)/usr/include
41 $(CP) $(PKG_INSTALL_DIR)/usr/include/json $(1)/usr/include/
42 mkdir -p $(1)/usr/lib
43 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson.{a,so*} $(1)/usr/lib/
44 mkdir -p $(1)/usr/lib/pkgconfig
45 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/json.pc $(1)/usr/lib/pkgconfig/
46 endef
47
48 define Package/libjson/install
49 $(INSTALL_DIR) $(1)/usr/lib
50 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson.so.* $(1)/usr/lib/
51 endef
52
53 $(eval $(call BuildPackage,libjson))