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.

121 lines
2.9 KiB

  1. #
  2. # Copyright (C) 2007-2017 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.7
  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:=3b609b7feba5230e8f6dd8d245ddbefac324c5a6ae4186947670d9ac2cd25573
  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. --disable-doc
  63. ifeq ($(BUILD_VARIANT), single)
  64. CONFIGURE_ARGS += \
  65. $(if $(findstring neon,$(CONFIG_TARGET_OPTIMIZATION)),--enable-neon) \
  66. --enable-single
  67. endif
  68. ifeq ($(BUILD_VARIANT), long-double)
  69. CONFIGURE_ARGS += \
  70. --enable-long-double
  71. endif
  72. define Build/Compile
  73. $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
  74. endef
  75. define Build/InstallDev
  76. $(INSTALL_DIR) $(1)/usr/include
  77. $(CP) $(PKG_INSTALL_DIR)/usr/include/fftw3.h $(1)/usr/include
  78. $(INSTALL_DIR) $(1)/usr/lib
  79. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3*.{a,la} $(1)/usr/lib
  80. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3*.so* $(1)/usr/lib
  81. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  82. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
  83. endef
  84. define Package/fftw3/install
  85. $(INSTALL_DIR) $(1)/usr/lib
  86. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3.so* $(1)/usr/lib/
  87. endef
  88. define Package/fftw3f/install
  89. $(INSTALL_DIR) $(1)/usr/lib
  90. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3f.so* $(1)/usr/lib/
  91. endef
  92. define Package/fftw3l/install
  93. $(INSTALL_DIR) $(1)/usr/lib
  94. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3l.so* $(1)/usr/lib/
  95. endef
  96. $(eval $(call BuildPackage,fftw3))
  97. $(eval $(call BuildPackage,fftw3f))
  98. $(eval $(call BuildPackage,fftw3l))