2 # Copyright (C) 2010-2017 OpenWrt.org
3 # Copyright (C) 2010 Alfred E. Heggestad
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=http
://www.creytiv.com
/pub
17 PKG_HASH
:=cd5bfc79640411803b200c7531e4ba8a230da3806746d3bd2de970da2060fe43
19 PKG_LICENSE
:=BSD-3-Clause
20 PKG_LICENSE_FILES
:=docs
/COPYING
21 PKG_MAINTAINER
:=Jiri Slachta
<jiri@slachta.eu
>
26 include $(INCLUDE_DIR
)/package.mk
32 DEPENDS
:=+libopenssl
+zlib
33 TITLE
:=Generic library for real-time communications with async IO support
34 URL
:=http
://www.creytiv.com
37 # re.mk is used for this and all related packages (rem, restund and baresip).
38 # It relies on SYSROOT and SYSROOT_ALT being set. SYSROOT is used for finding
39 # toolchain headers (like pthread.h). SYSROOT_ALT is used for finding headers
40 # from other packages, like openssl etc.
42 # CFLAGS are picked up from the environment, as well as CPPFLAGS (and LD etc.).
43 # But LDFLAGS aren't picked up, so they need to be handed over via
46 # LD is changed to TARGET_CC to fix build failures on x86 32bit. Without this
47 # there's no linking to ssp, which results in undefined references.
49 # used by 001-extend-ninit-nclose-check.patch
50 TARGET_CFLAGS
+=-DOPENWRT
52 ifneq ($(CONFIG_USE_GLIBC
)$(CONFIG_USE_MUSL
),)
53 TARGET_CFLAGS
+=-D_GNU_SOURCE
57 CROSS_COMPILE
="$(TARGET_CROSS)" \
58 EXTRA_LFLAGS
="$(TARGET_LDFLAGS)" \
62 SYSROOT
="$(shell $(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s|/include/pthread.h||p')" \
63 SYSROOT_ALT
="$(STAGING_DIR)/usr"
65 define Build
/InstallDev
66 $(INSTALL_DIR
) $(1)/usr
/share
/re
67 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/re
/re.mk
$(1)/usr
/share
/re
68 $(INSTALL_DIR
) $(1)/usr
/include
69 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/re
$(1)/usr
/include
70 $(INSTALL_DIR
) $(1)/usr
/lib
71 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libre.
{a
,so
} $(1)/usr
/lib
74 define Package
/libre
/install
75 $(INSTALL_DIR
) $(1)/usr
/lib
76 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libre.so
$(1)/usr
/lib
79 $(eval
$(call BuildPackage
,libre
))