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.

120 lines
2.9 KiB

  1. #
  2. # Copyright (C) 2007-2018 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.8
  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_HASH:=6113262f6e92c5bd474f2875fa1b01054c4ad5040f6b0da7c03c98821d9ae303
  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. VARIANT:=long-double
  35. TITLE+= (long-double precision)
  36. endef
  37. define Package/fftw3/description
  38. FFTW is a collection of fast C routines for computing the
  39. Discrete Fourier Transform in one or more dimensions. It
  40. includes complex, real, and parallel transforms, and can
  41. handle arbitrary array sizes efficiently.
  42. endef
  43. define Package/fftw3f/description
  44. $(call Package/fftw3/description)
  45. This package contains the single precision library.
  46. endef
  47. define Package/fftw3l/description
  48. $(call Package/fftw3/description)
  49. This package contains the long-double precision library.
  50. endef
  51. TARGET_CFLAGS += $(FPIC)
  52. CONFIGURE_ARGS += \
  53. --prefix=/usr \
  54. --without-libiconv-prefix \
  55. --without-libintl-prefix \
  56. --enable-shared \
  57. --enable-threads \
  58. --enable-type-prefix \
  59. --disable-debug \
  60. --disable-fortran \
  61. --disable-doc
  62. ifeq ($(BUILD_VARIANT), single)
  63. CONFIGURE_ARGS += \
  64. $(if $(findstring neon,$(CONFIG_TARGET_OPTIMIZATION)),--enable-neon) \
  65. --enable-single
  66. endif
  67. ifeq ($(BUILD_VARIANT), long-double)
  68. CONFIGURE_ARGS += \
  69. --enable-long-double
  70. endif
  71. define Build/Compile
  72. $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
  73. endef
  74. define Build/InstallDev
  75. $(INSTALL_DIR) $(1)/usr/include
  76. $(CP) $(PKG_INSTALL_DIR)/usr/include/fftw3.h $(1)/usr/include
  77. $(INSTALL_DIR) $(1)/usr/lib
  78. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3*.{a,la} $(1)/usr/lib
  79. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3*.so* $(1)/usr/lib
  80. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  81. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
  82. endef
  83. define Package/fftw3/install
  84. $(INSTALL_DIR) $(1)/usr/lib
  85. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3.so* $(1)/usr/lib/
  86. endef
  87. define Package/fftw3f/install
  88. $(INSTALL_DIR) $(1)/usr/lib
  89. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3f.so* $(1)/usr/lib/
  90. endef
  91. define Package/fftw3l/install
  92. $(INSTALL_DIR) $(1)/usr/lib
  93. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3l.so* $(1)/usr/lib/
  94. endef
  95. $(eval $(call BuildPackage,fftw3))
  96. $(eval $(call BuildPackage,fftw3f))
  97. $(eval $(call BuildPackage,fftw3l))