72b98e1d738da0c88d88dc316e23c2b1bf2878b0
[openwrt.git] / package / libs / cyassl / Makefile
1 #
2 # Copyright (C) 2006-2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=wolfssl
11 PKG_VERSION:=3.4.6
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
15 PKG_SOURCE_URL:=http://www.yassl.com/
16 PKG_MD5SUM:=0410b3841588d635e9ecacb2d42c38f5
17
18 PKG_FIXUP:=libtool
19 PKG_INSTALL:=1
20 PKG_BUILD_PARALLEL:=1
21 PKG_LICENSE:=GPL-2.0+
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libcyassl
26   SECTION:=libs
27   SUBMENU:=SSL
28   CATEGORY:=Libraries
29   TITLE:=CyaSSL library
30   URL:=http://www.yassl.com/
31 endef
32
33 define Package/libcyassl/description
34 CyaSSL is an SSL library optimized for small footprint, both on disk and for
35 memory use.
36 endef
37
38 TARGET_CFLAGS += $(FPIC)
39
40 CONFIGURE_ARGS += \
41         --without-zlib \
42         --enable-singlethreaded \
43         --enable-opensslextra \
44         --enable-sni \
45         --enable-ecc \
46         --disable-examples
47
48 ifneq ($(CONFIG_TARGET_x86),)
49         CONFIGURE_ARGS += --enable-intelasm
50 endif
51 ifneq ($(CONFIG_TARGET_x86_64),)
52         CONFIGURE_ARGS += --enable-intelasm
53 endif
54
55 define Build/InstallDev
56         $(INSTALL_DIR) $(1)/usr/include
57         $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
58
59         $(INSTALL_DIR) $(1)/usr/lib
60         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.{so*,la} $(1)/usr/lib/
61         ln -s libwolfssl.so $(1)/usr/lib/libcyassl.so
62         ln -s libwolfssl.la $(1)/usr/lib/libcyassl.la
63 endef
64
65 define Package/libcyassl/install
66         $(INSTALL_DIR) $(1)/usr/lib
67         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.so* $(1)/usr/lib/
68         ln -s libwolfssl.so $(1)/usr/lib/libcyassl.so
69 endef
70
71 $(eval $(call BuildPackage,libcyassl))