enable $(FPIC) for a few more packages
[openwrt/svn-archive/archive.git] / libs / lzo / 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:=lzo
12 PKG_VERSION:=2.03
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.oberhumer.com/opensource/lzo/download/
17 PKG_MD5SUM:=0c3d078c2e8ea5a88971089a2f02a726
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/liblzo
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:=A real-time data compression library
25 URL:=http://www.oberhumer.com/opensource/lzo/
26 endef
27
28 define Package/liblzo/description
29 LZO is a data compression library which is suitable for data
30 de-/compression in real-time.
31 This means it favours speed over compression ratio.
32 endef
33
34 define Build/Configure
35 $(call Build/Configure/Default, \
36 --enable-shared \
37 --enable-static \
38 )
39 endef
40
41 TARGET_CFLAGS += $(FPIC)
42
43 define Build/Compile
44 $(MAKE) -C $(PKG_BUILD_DIR) \
45 CFLAGS_O="$(TARGET_CFLAGS)" \
46 DESTDIR="$(PKG_INSTALL_DIR)" \
47 all install
48 endef
49
50 define Build/InstallDev
51 mkdir -p $(1)/usr/include
52 $(CP) $(PKG_INSTALL_DIR)/usr/include/lzo $(1)/usr/include/
53 mkdir -p $(1)/usr/lib
54 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo2.{a,so*} $(1)/usr/lib/
55 endef
56
57 define Package/liblzo/install
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo2.so.* $(1)/usr/lib/
60 endef
61
62 $(eval $(call BuildPackage,liblzo))