5045ab6fed15607ddfe3396b229e6d18cddcb517
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / fftw / fftw.mk
1 ################################################################################
2 #
3 # fftw
4 #
5 ################################################################################
6
7 FFTW_VERSION = 3.3.4
8 FFTW_SITE = http://www.fftw.org
9 FFTW_INSTALL_STAGING = YES
10 FFTW_LICENSE = GPLv2+
11 FFTW_LICENSE_FILES = COPYING
12
13 FFTW_CONF_OPTS = --disable-fortran
14
15 FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_PRECISION_SINGLE),--enable,--disable)-single
16 FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE),--enable,--disable)-long-double
17 FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_PRECISION_QUAD),--enable,--disable)-quad-precision
18
19 FFTW_CFLAGS = $(TARGET_CFLAGS)
20 ifeq ($(BR2_PACKAGE_FFTW_FAST),y)
21 FFTW_CFLAGS += -O3 -ffast-math
22 endif
23
24 # x86 optimisations
25 FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_SSE),--enable,--disable)-sse
26 FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_SSE2),--enable,--disable)-sse2
27
28 # ARM optimisations
29 FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_NEON),--enable,--disable)-neon
30 FFTW_CFLAGS += $(if $(BR2_PACKAGE_FFTW_USE_NEON),-mfpu=neon)
31
32 # Generic optimisations
33 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
34 FFTW_CONF_OPTS += --enable-threads --with-combined-threads
35 else
36 FFTW_CONF_OPTS += --disable-threads
37 endif
38 FFTW_CONF_OPTS += $(if $(BR2_GCC_ENABLE_OPENMP),--enable,--disable)-openmp
39
40 FFTW_CONF_OPTS += CFLAGS="$(FFTW_CFLAGS)"
41
42 $(eval $(autotools-package))