toolchain: bump Codescape IMG MIPS version to 2016.05-06
[buildroot-gz.git] / package / libwebsockets / libwebsockets.mk
blobbf46291ad42641e2153e6c42f11ef835dba3c4f8
1 ################################################################################
3 # libwebsockets
5 ################################################################################
7 LIBWEBSOCKETS_VERSION = v2.1.0
8 LIBWEBSOCKETS_SITE = $(call github,warmcat,libwebsockets,$(LIBWEBSOCKETS_VERSION))
9 LIBWEBSOCKETS_LICENSE = LGPLv2.1 with exceptions
10 LIBWEBSOCKETS_LICENSE_FILES = LICENSE
11 LIBWEBSOCKETS_DEPENDENCIES = zlib
12 LIBWEBSOCKETS_INSTALL_STAGING = YES
13 LIBWEBSOCKETS_CONF_OPTS = -DLWS_WITHOUT_TESTAPPS=ON -DLWS_IPV6=ON
15 # If LWS_MAX_SMP=1, then there is no code related to pthreads compiled
16 # in the library. If unset, LWS_MAX_SMP defaults to 32 and a small
17 # amount of pthread mutex code is built into the library.
18 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
19 LIBWEBSOCKETS_CONF_OPTS += -DLWS_MAX_SMP=1
20 else
21 LIBWEBSOCKETS_CONF_OPTS += -DLWS_MAX_SMP=
22 endif
24 ifeq ($(BR2_PACKAGE_OPENSSL),y)
25 LIBWEBSOCKETS_DEPENDENCIES += openssl host-openssl
26 LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_SSL=ON
27 else
28 LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_SSL=OFF
29 endif
31 ifeq ($(BR2_PACKAGE_LIBEV),y)
32 LIBWEBSOCKETS_DEPENDENCIES += libev
33 LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBEV=ON
34 else
35 LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBEV=OFF
36 endif
38 ifeq ($(BR2_PACKAGE_LIBUV),y)
39 LIBWEBSOCKETS_DEPENDENCIES += libuv
40 LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBUV=ON
41 else
42 LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBUV=OFF
43 endif
45 ifeq ($(BR2_STATIC_LIBS),y)
46 LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_SHARED=OFF
47 endif
49 ifeq ($(BR2_SHARED_LIBS),y)
50 LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_STATIC=OFF
51 endif
53 $(eval $(cmake-package))