23d74374c89df2532771bc0946bd0f9add7b1dc0
[openwrt/openwrt.git] / package / libs / lzo / Makefile
1 #
2 # Copyright (C) 2006-2016 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:=lzo
11 PKG_VERSION:=2.10
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.oberhumer.com/opensource/lzo/download/
16 PKG_HASH:=c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072
17
18 PKG_FIXUP:=autoreconf
19 PKG_INSTALL:=1
20 PKG_LICENSE:=GPL-2.0+
21
22 PKG_BUILD_PARALLEL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/liblzo
27 SECTION:=libs
28 CATEGORY:=Libraries
29 TITLE:=A real-time data compression library
30 URL:=http://www.oberhumer.com/opensource/lzo/
31 endef
32
33 define Package/liblzo/description
34 LZO is a data compression library which is suitable for data de-/compression
35 in real-time. This means it favours speed over compression ratio.
36 endef
37
38 define Build/Configure
39 $(call Build/Configure/Default, \
40 --enable-shared \
41 --enable-static \
42 )
43 endef
44
45 TARGET_CFLAGS += $(FPIC)
46 MAKE_FLAGS += CFLAGS_O="$(TARGET_CFLAGS)"
47
48 ifeq ($(CONFIG_i386)$(CONFIG_x86_64),)
49 TARGET_CFLAGS += -DLZO_CFG_NO_UNALIGNED=1
50 endif
51
52 define Build/InstallDev
53 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
54 $(CP) $(PKG_INSTALL_DIR)/usr/include/lzo $(1)/usr/include/
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo2.{a,so*} $(1)/usr/lib/
56 endef
57
58 define Package/liblzo/install
59 $(INSTALL_DIR) $(1)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo2.so* $(1)/usr/lib/
61 endef
62
63 $(eval $(call BuildPackage,liblzo))