fca8b60f86
fftw's library name depends on the precision option. Consequently, it's possible to install multiple flavor on the same target. This patch breaks fftw single precision into a new package and: - makes BR2_PACKAGE_FFTW_PRECISION_SINGLE select BR2_PACKAGE_FFTW_SINGLE to keep compatibility with packages that use BR2_PACKAGE_FFTW_PRECISION_SINGLE. This option will be removed in a follow-up commit; - removes the BR2_PACKAGE_FFTW_USE_SSE and BR2_PACKAGE_FFTW_USE_NEON otpions since they are only used for single precision. The corresponding CPU-capability options are directly handled in the fftw-single package; - makes fftw depend on fftw-single when this package is enabled. Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com> [Yann/Thomas: - Force --disable-single in FFTW_CONF_OPTS, just for the sake of clarity (fftw is no longer going to build the single variant) - Use FFTW_SINGLE_DL_SUBDIR to avoid downloading fftw multiple times - Minor reformatting tweaks in fftw-single.mk - Do not deprecate BR2_PACKAGE_FFTW_PRECISION_SINGLE and instead make it select BR2_PACKAGE_FFTW_SINGLE, so that packages using BR2_PACKAGE_FFTW_PRECISION_SINGLE continue to work.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
54 lines
1.5 KiB
Makefile
54 lines
1.5 KiB
Makefile
################################################################################
|
|
#
|
|
# fftw
|
|
#
|
|
################################################################################
|
|
|
|
FFTW_VERSION = 3.3.8
|
|
FFTW_SITE = http://www.fftw.org
|
|
FFTW_INSTALL_STAGING = YES
|
|
FFTW_LICENSE = GPL-2.0+
|
|
FFTW_LICENSE_FILES = COPYING
|
|
|
|
ifeq ($(BR2_PACKAGE_FFTW_SINGLE),y)
|
|
FFTW_DEPENDENCIES += fftw-single
|
|
endif
|
|
|
|
# fortran support only enables generation and installation of fortran sources
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
|
|
FFTW_COMMON_CONF_OPTS += --enable-fortran
|
|
FFTW_COMMON_CONF_ENV += FLIBS="-lgfortran -lm"
|
|
else
|
|
FFTW_COMMON_CONF_OPTS += --disable-fortran
|
|
endif
|
|
|
|
FFTW_COMMON_CFLAGS = $(TARGET_CFLAGS)
|
|
|
|
ifeq ($(BR2_PACKAGE_FFTW_FAST),y)
|
|
FFTW_COMMON_CFLAGS += -O3 -ffast-math
|
|
endif
|
|
|
|
# x86 optimisations
|
|
FFTW_COMMON_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_SSE2),--enable,--disable)-sse2
|
|
|
|
# Generic optimisations
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
|
FFTW_COMMON_CONF_OPTS += --enable-threads
|
|
FFTW_COMMON_CONF_OPTS += $(if $(BR2_GCC_ENABLE_OPENMP),--without,--with)-combined-threads
|
|
else
|
|
FFTW_COMMON_CONF_OPTS += --disable-threads
|
|
endif
|
|
FFTW_COMMON_CONF_OPTS += $(if $(BR2_GCC_ENABLE_OPENMP),--enable,--disable)-openmp
|
|
|
|
FFTW_CONF_ENV = $(FFTW_COMMON_CONF_ENV)
|
|
FFTW_CONF_OPTS += \
|
|
$(FFTW_COMMON_CONF_OPTS) \
|
|
--disable-single \
|
|
$(if $(BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE),--enable,--disable)-long-double \
|
|
$(if $(BR2_PACKAGE_FFTW_PRECISION_QUAD),--enable,--disable)-quad-precision \
|
|
CFLAGS="$(FFTW_COMMON_CFLAGS)"
|
|
|
|
$(eval $(autotools-package))
|
|
|
|
include $(sort $(wildcard package/fftw/*/*.mk))
|