kamailio-3.3.x: add ldap and h350 module
[feed/telephony.git] / libs / rem / Makefile
1
2 # Copyright (C) 2010-2014 OpenWrt.org
3 # Copyright (C) 2010 Alfred E. Heggestad
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=rem
12 PKG_VERSION:=0.4.6
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.creytiv.com/pub
17 PKG_MD5SUM:=888c3000aa002790cc7129fa72d39a58
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/librem
22   SECTION:=libs
23   CATEGORY:=Libraries
24   DEPENDS:=+libre +libpthread
25   TITLE:=Audio and video processing media library
26   URL:=http://www.creytiv.com/
27 endef
28
29 TARGET_CFLAGS += $(FPIC)
30
31 define Build/Compile
32         $(MAKE) -C $(PKG_BUILD_DIR) \
33                 LIBRE_MK=$(STAGING_DIR)/usr/share/re/re.mk \
34                 LIBRE_INC=$(STAGING_DIR)/usr/include/re \
35                 LIBRE_SO=$(STAGING_DIR)/usr/lib \
36                 CC="$(TARGET_CC)" \
37                 EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
38                 EXTRA_LFLAGS="-lm" \
39                 DESTDIR="$(PKG_INSTALL_DIR)" \
40                 SYSROOT="$$$$($(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s#/include/pthread.h##p')" \
41                 SYSROOT_ALT="$(STAGING_DIR)/usr" \
42                 RELEASE=1 \
43                 CROSS_COMPILE="$(TARGET_CROSS)" \
44                 OS=linux \
45                 all install
46 endef
47
48 define Build/InstallDev
49         $(INSTALL_DIR) $(1)/usr/include
50         $(CP) $(PKG_INSTALL_DIR)/usr/include/rem $(1)/usr/include/
51         $(INSTALL_DIR) $(1)/usr/lib
52         $(CP) $(PKG_INSTALL_DIR)/usr/lib/librem.{a,so} $(1)/usr/lib/
53 endef
54
55 define Package/librem/install
56         rm -f $(BUILD_DIR)/$(PKG_NAME)
57         ln -sf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR)/$(PKG_NAME)
58         $(INSTALL_DIR) $(1)/usr/lib
59         $(CP) $(PKG_INSTALL_DIR)/usr/lib/librem.so $(1)/usr/lib/
60 endef
61
62 $(eval $(call BuildPackage,librem))