1b841e1bc6f00cf2cf9e56cc39bfeed0072791b5
[openwrt/svn-archive/archive.git] / libs / polarssl / 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:=polarssl
11 PKG_VERSION:=0.10.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz
15 PKG_SOURCE_URL:=http://polarssl.org/code/releases/
16 PKG_MD5SUM:=49bd1c6b46a8699d8bf215d3a318899e
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/polarssl/Default
21 TITLE:=Embedded SSL
22 URL:=http://polarssl.org/
23 endef
24
25 define Package/libpolarssl/Default/description
26 The aim of the PolarSSL project is to provide a quality, open-source
27 cryptographic library written in C and targeted at embedded systems.
28 endef
29
30 define Package/libpolarssl
31 $(call Package/polarssl/Default)
32 SECTION:=libs
33 CATEGORY:=Libraries
34 TITLE+= (library)
35 endef
36
37 define Package/polarssl-progs
38 $(call Package/polarssl/Default)
39 SECTION:=utils
40 CATEGORY:=Utilities
41 DEPENDS:=+libpolarssl
42 TITLE+= (programs)
43 endef
44
45 define Build/Configure
46 endef
47
48 TARGET_CFLAGS += $(FPIC)
49
50 define Build/Compile
51 $(MAKE) -C $(PKG_BUILD_DIR) \
52 $(TARGET_CONFIGURE_OPTS) \
53 OFLAGS="$(TARGET_CFLAGS)" \
54 all
55 $(MAKE) -C $(PKG_BUILD_DIR) \
56 DESTDIR="$(PKG_INSTALL_DIR)/usr" \
57 install
58 endef
59
60 define Build/InstallDev
61 mkdir -p $(1)/usr/include
62 $(CP) $(PKG_INSTALL_DIR)/usr/include/polarssl $(1)/usr/include/
63 mkdir -p $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpolarssl.{a,so} $(1)/usr/lib/
65 endef
66
67 define Package/libpolarssl/install
68 $(INSTALL_DIR) $(1)/usr/lib
69 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libpolarssl.so $(1)/usr/lib/
70 endef
71
72 define Package/polarssl-progs/install
73 $(INSTALL_DIR) $(1)/usr/bin
74 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/polarssl_* $(1)/usr/bin/
75 endef
76
77 $(eval $(call BuildPackage,libpolarssl))
78 $(eval $(call BuildPackage,polarssl-progs))