You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

119 lines
2.8 KiB

  1. #
  2. # Copyright (C) 2007-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=fftw3
  9. PKG_VERSION:=3.3.6
  10. PKG_RELEASE:=1
  11. PKG_LICENSE:=GPL-2.0+
  12. PKG_SOURCE:=fftw-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=http://www.fftw.org
  14. PKG_MD5SUM:=ccd91b5b12bd0a441e100070ff09a310
  15. PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/fftw-$(PKG_VERSION)
  16. PKG_FIXUP:=autoreconf
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/fftw3
  19. SECTION:=libs
  20. CATEGORY:=Libraries
  21. DEPENDS:=@!avr32 +libpthread
  22. VARIANT:=double
  23. TITLE:=Fast Fourier transform library
  24. URL:=http://www.fftw.org/
  25. MAINTAINER:=Vladimir Ulrich <admin@evl.su>
  26. endef
  27. define Package/fftw3f
  28. $(call Package/fftw3)
  29. VARIANT:=single
  30. TITLE+= (single precision)
  31. endef
  32. define Package/fftw3l
  33. $(call Package/fftw3)
  34. DEPENDS:=@BROKEN
  35. VARIANT:=long-double
  36. TITLE+= (long-double precision)
  37. endef
  38. define Package/fftw3/description
  39. FFTW is a collection of fast C routines for computing the
  40. Discrete Fourier Transform in one or more dimensions. It
  41. includes complex, real, and parallel transforms, and can
  42. handle arbitrary array sizes efficiently.
  43. endef
  44. define Package/fftw3f/description
  45. $(call Package/fftw3/description)
  46. This package contains the single precision library.
  47. endef
  48. define Package/fftw3l/description
  49. $(call Package/fftw3/description)
  50. This package contains the long-double precision library.
  51. endef
  52. TARGET_CFLAGS += $(FPIC)
  53. CONFIGURE_ARGS += \
  54. --prefix=/usr \
  55. --without-libiconv-prefix \
  56. --without-libintl-prefix \
  57. --enable-shared \
  58. --enable-threads \
  59. --enable-type-prefix \
  60. --disable-debug \
  61. --disable-fortran
  62. ifeq ($(BUILD_VARIANT), single)
  63. CONFIGURE_ARGS += \
  64. --enable-single
  65. endif
  66. ifeq ($(BUILD_VARIANT), long-double)
  67. CONFIGURE_ARGS += \
  68. --enable-long-double
  69. endif
  70. define Build/Compile
  71. $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
  72. endef
  73. define Build/InstallDev
  74. $(INSTALL_DIR) $(1)/usr/include
  75. $(CP) $(PKG_INSTALL_DIR)/usr/include/fftw3.h $(1)/usr/include
  76. $(INSTALL_DIR) $(1)/usr/lib
  77. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3*.{a,la} $(1)/usr/lib
  78. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3*.so* $(1)/usr/lib
  79. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  80. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
  81. endef
  82. define Package/fftw3/install
  83. $(INSTALL_DIR) $(1)/usr/lib
  84. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3.so* $(1)/usr/lib/
  85. endef
  86. define Package/fftw3f/install
  87. $(INSTALL_DIR) $(1)/usr/lib
  88. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3f.so* $(1)/usr/lib/
  89. endef
  90. define Package/fftw3l/install
  91. $(INSTALL_DIR) $(1)/usr/lib
  92. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3l.so* $(1)/usr/lib/
  93. endef
  94. $(eval $(call BuildPackage,fftw3))
  95. $(eval $(call BuildPackage,fftw3f))
  96. $(eval $(call BuildPackage,fftw3l))