d520aceded3c197f39db5beec1815fe88cfe258a
[openwrt/svn-archive/archive.git] / libs / axtls / Makefile
1 #
2 # Copyright (C) 2006 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:=axtls
11 PKG_VERSION:=1.1.6
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=axTLS-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/axtls http://www.leroc.com.au/axTLS/
16 PKG_MD5SUM:=50e63d5fe002399e2ae63591908f7f5a
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/axTLS
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/libaxtls
23 SECTION:=libs
24 CATEGORY:=Libraries
25 TITLE:=Embedded client/server TLSv1 SSL library
26 URL:=http://sourceforge.net/projects/axtls
27 endef
28
29 define Package/axhttpd
30 SECTION:=net
31 CATEGORY:=Network
32 SUBMENU:=Web
33 DEPENDS:=+libaxtls
34 TITLE:=A small embedded web server using the axTLS library
35 URL:=http://www.axtls.co.nr/
36 endef
37
38 define Build/Configure
39 $(CP) ./files/config $(PKG_BUILD_DIR)/config/.config
40 $(MAKE) -C $(PKG_BUILD_DIR) oldconfig
41 endef
42
43 TARGET_CFLAGS += $(FPIC)
44
45 define Build/Compile
46 $(MAKE) -C $(PKG_BUILD_DIR) \
47 CC="$(TARGET_CC)" \
48 STRIP="/bin/true" \
49 OPT_CFLAGS="$(TARGET_CFLAGS)" OPT_LDFLAGS="" \
50 all
51 $(MAKE) -C $(PKG_BUILD_DIR) \
52 PREFIX="$(PKG_INSTALL_DIR)/usr" \
53 install
54 endef
55
56 define Build/InstallDev
57 mkdir -p $(1)/usr/include
58 $(CP) $(PKG_INSTALL_DIR)/usr/include/axTLS $(1)/usr/include/
59 mkdir -p $(1)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaxtls.{a,so*} $(1)/usr/lib/
61 endef
62
63 define Package/libaxtls/install
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaxtls.so.* $(1)/usr/lib/
66 endef
67
68 define Package/axhttpd/install
69 $(INSTALL_DIR) $(1)/usr/sbin
70 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/axhttpd $(1)/usr/sbin/
71 endef
72
73 $(eval $(call BuildPackage,libaxtls))
74 $(eval $(call BuildPackage,axhttpd))