enable $(FPIC) for a few more packages
[packages.git] / libs / xyssl / 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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=xyssl
12 PKG_VERSION:=0.9
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
16 PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/x/xyssl
17 PKG_MD5SUM:=3f0695831aa874cb77e3790755d6b570
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/xyssl/Default
22   TITLE:=Embedded SSL
23   URL:=http://xyssl.org/
24 endef
25
26 define Package/libxyssl/Default/description
27  The aim of the XySSL 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/libxyssl
32 $(call Package/xyssl/Default)
33   SECTION:=libs
34   CATEGORY:=Libraries
35   TITLE+= (library)
36 endef
37
38 define Package/xyssl-progs
39 $(call Package/xyssl/Default)
40   SECTION:=utils
41   CATEGORY:=Utilities
42   DEPENDS:=+libxyssl
43   TITLE+= (programs)
44 endef
45
46 define Build/Configure
47 endef
48
49 TARGET_CFLAGS += $(FPIC)
50
51 define Build/Compile
52         $(MAKE) -C $(PKG_BUILD_DIR) \
53                 $(TARGET_CONFIGURE_OPTS) \
54                 OFLAGS="$(TARGET_CFLAGS)" \
55                 all
56         $(MAKE) -C $(PKG_BUILD_DIR) \
57                 DESTDIR="$(PKG_INSTALL_DIR)/usr" \
58                 install
59 endef
60
61 define Build/InstallDev
62         mkdir -p $(1)/usr/include
63         $(CP) $(PKG_INSTALL_DIR)/usr/include/xyssl $(1)/usr/include/
64         mkdir -p $(1)/usr/lib
65         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxyssl.{a,so} $(1)/usr/lib/
66 endef
67
68 define Package/libxyssl/install
69         $(INSTALL_DIR) $(1)/usr/lib
70         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libxyssl.so $(1)/usr/lib/
71 endef
72
73 define Package/xyssl-progs/install
74         $(INSTALL_DIR) $(1)/usr/bin
75         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xyssl_* $(1)/usr/bin/
76 endef
77
78 $(eval $(call BuildPackage,libxyssl))
79 $(eval $(call BuildPackage,xyssl-progs))