Newer
Older
Outback Dingo
committed
# Copyright (C) 2010 Alfred E. Heggestad
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
Outback Dingo
committed
include $(TOPDIR)/rules.mk
PKG_NAME:=re
Outback Dingo
committed
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.creytiv.com/pub
PKG_HASH:=a3119826ad162f898ada734d093f565824a018df395b4517549915b00e2bdf69
Outback Dingo
committed
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=docs/COPYING
PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
Outback Dingo
committed
include $(INCLUDE_DIR)/package.mk
define Package/libre
Outback Dingo
committed
SECTION:=libs
CATEGORY:=Libraries
Outback Dingo
committed
TITLE:=Generic library for real-time communications with async IO support
Outback Dingo
committed
endef
# re.mk is used for this and all related packages (rem, restund and baresip).
# It relies on SYSROOT and SYSROOT_ALT being set. SYSROOT is used for finding
# toolchain headers (like pthread.h). SYSROOT_ALT is used for finding headers
# from other packages, like openssl etc.
#
# CFLAGS are picked up from the environment, as well as CPPFLAGS (and LD etc.).
# But LDFLAGS aren't picked up, so they need to be handed over via
# EXTRA_LFLAGS.
#
# LD is changed to TARGET_CC to fix build failures on x86 32bit. Without this
# there's no linking to ssp, which results in undefined references.
Outback Dingo
committed
# used by 001-extend-ninit-nclose-check.patch
TARGET_CFLAGS+=-DOPENWRT
ifneq ($(CONFIG_USE_GLIBC)$(CONFIG_USE_MUSL),)
endif
MAKE_FLAGS+= \
EXTRA_LFLAGS="$(TARGET_LDFLAGS)" \
SYSROOT="$(shell $(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s|/include/pthread.h||p')" \
SYSROOT_ALT="$(STAGING_DIR)/usr" \
Outback Dingo
committed
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/share/re
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/re/re.mk $(1)/usr/share/re
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/re $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.{a,so} $(1)/usr/lib
Outback Dingo
committed
endef
define Package/libre/install
Outback Dingo
committed
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.so $(1)/usr/lib
Outback Dingo
committed
endef
$(eval $(call BuildPackage,libre))