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