35d0bb56b75c1a7c3385ab3c5c1cab2f39f3fa55
[openwrt/svn-archive/archive.git] / libs / re / Makefile
1 #
2 # Makefile
3 #
4 # Copyright (C) 2010 Alfred E. Heggestad
5 #
6
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=re
10 PKG_VERSION:=0.1.0
11 PKG_RELEASE:=1
12
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_SOURCE_URL:=http://www.creytiv.com/pub
15 #PKG_MD5SUM:=734892c8ca5e7e835828048a1289a0cc
16
17 include $(INCLUDE_DIR)/package.mk
18
19 define Package/libre
20 SECTION:=libs
21 CATEGORY:=Libraries
22 DEPENDS:=+libopenssl +libpthread
23 TITLE:=Generic library for real-time communications with async IO support
24 URL:=http://www.creytiv.com/
25 endef
26
27 define Package/libre/description
28 Generic library for real-time communications with async IO support.
29 endef
30
31 TARGET_CFLAGS += $(FPIC)
32
33 define Build/Compile
34 $(MAKE) -C $(PKG_BUILD_DIR) \
35 HAVE_LIBRESOLV= \
36 CC="$(TARGET_CC)" \
37 EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
38 EXTRA_LFLAGS="-lm" \
39 DESTDIR="$(PKG_INSTALL_DIR)" \
40 SYSROOT="$(TOOLCHAIN_DIR)" \
41 SYSROOT_ALT="$(STAGING_DIR)/usr" \
42 RELEASE=1 \
43 all install
44 endef
45
46 define Build/InstallDev
47 mkdir -p $(1)/usr/include
48 $(CP) $(PKG_INSTALL_DIR)/usr/include/re $(1)/usr/include/
49 mkdir -p $(1)/usr/lib
50 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.{a,so*} $(1)/usr/lib/
51 endef
52
53 define Build/UninstallDev
54 rm -rf \
55 $(STAGING_DIR)/usr/include/re \
56 $(STAGING_DIR)/usr/lib/libre.{a,so*}
57 endef
58
59 define Package/libre/install
60 $(INSTALL_DIR) $(1)/usr/lib
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.so* $(1)/usr/lib/
62 endef
63
64 $(eval $(call BuildPackage,libre))