b83e65f9af6ba2ebc48b36400213c85abcf1e7ee
[openwrt/svn-archive/archive.git] / libs / gsl / Makefile
1 #
2 # Copyright (C) 2008 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:=gsl
12 PKG_VERSION:=1.9
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=ftp://ftp.gnu.org/gnu/gsl/
17 PKG_MD5SUM:=81dca4362ae8d2aa1547b7d010881e43
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libgsl
22 SECTION:=libs
23 CATEGORY:=Libraries
24 DEPENDS:=@!TARGET_avr32
25 TITLE:=GNU Scientific Library
26 URL:=http://www.gnu.org/software/gsl/
27 endef
28
29 define Package/libgsl/description
30 The library provides a wide range of mathematical routines such as
31 random number generators, special functions and least-squares fitting.
32 There are over 1000 functions in total with an extensive test suite.
33 endef
34
35 TARGET_CFLAGS += $(FPIC)
36
37 define Build/Compile
38 rm -rf $(PKG_INSTALL_DIR)
39 mkdir -p $(PKG_INSTALL_DIR)
40 $(MAKE) -C $(PKG_BUILD_DIR) \
41 $(TARGET_CONFIGURE_OPTS) \
42 DESTDIR="$(PKG_INSTALL_DIR)" \
43 all install
44 endef
45
46 define Package/libgsl/install
47 $(INSTALL_DIR) $(1)/usr/lib
48 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsl.so* $(1)/usr/lib/
49 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgslcblas.so* $(1)/usr/lib/
50 endef
51
52 define Build/InstallDev
53 mkdir -p $(1)/usr/include
54 $(CP) $(PKG_INSTALL_DIR)/usr/include/gsl/*.h $(1)/usr/include/
55 mkdir -p $(1)/usr/lib
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsl.{a,so*} $(1)/usr/lib/
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgslcblas.{a,so*} $(1)/usr/lib/
58 endef
59
60 define Build/UninstallDev
61 rm -rf $(1)/usr/include/gsl
62 endef
63
64 $(eval $(call BuildPackage,libgsl))