clean up, replace old libtool fixup calls with PKG_FIXUP
[openwrt/svn-archive/archive.git] / libs / liboil / Makefile
1 #
2 # Copyright (C) 2007 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:=liboil
12 PKG_VERSION:=0.3.12
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://liboil.freedesktop.org/download/
17 PKG_MD5SUM:=96ee4c627ffb0db3999cef3c7454b1d9
18
19 PKG_FIXUP = libtool
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/liboil
24 SECTION:=libs
25 CATEGORY:=Libraries
26 DEPENDS:=+libnotimpl
27 TITLE:=simple functions optimized for various CPUs
28 URL:=http://liboil.freedesktop.org/wiki/
29 endef
30
31 define Package/liboil/description
32 Liboil is a library of simple functions that are optimized for various CPUs.
33 These functions are generally loops implementing simple algorithms, such as
34 converting an array of N integers to floating-point numbers or multiplying
35 and summing an array of N numbers. Such functions are candidates for significant
36 optimization using various techniques, especially by using extended instructions
37 provided by modern CPUs (Altivec, MMX, SSE, etc.).
38 endef
39
40 CONFIGURE_ARGS += \
41 --enable-shared \
42 --enable-static \
43
44 CONFIGURE_VARS += \
45 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/lib/libiconv/include" \
46 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/lib/libintl/include" \
47 LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/libiconv/lib" \
48 LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/libintl/lib" \
49 LIBS="-lnotimpl" \
50 ac_cv_lib_m_rintf=no \
51
52 define Build/Compile
53 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
54 endef
55
56 define Build/InstallDev
57 mkdir -p $(1)/usr/include
58 $(CP) $(PKG_INSTALL_DIR)/usr/include/liboil-0.3/ $(1)/usr/include/
59 mkdir -p $(1)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liboil-0.3.{a,so*} $(1)/usr/lib/
61 mkdir -p $(1)/usr/lib/pkgconfig
62 $(CP) $(PKG_BUILD_DIR)/liboil.pc $(1)/usr/lib/pkgconfig/
63 $(SED) 's,$(TARGET_LDFLAGS),,g' $(1)/usr/lib/pkgconfig/liboil.pc
64 endef
65
66 define Package/liboil/install
67 $(INSTALL_DIR) $(1)/usr/lib
68 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liboil-0.3.so* $(1)/usr/lib/
69 endef
70
71 $(eval $(call BuildPackage,liboil))