Blame view

buildroot/buildroot-2016.08.1/package/fftw/fftw.mk 1.59 KB
6b13f685e   김민수   BSP 최초 추가
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
  ################################################################################
  #
  # fftw
  #
  ################################################################################
  
  FFTW_VERSION = 3.3.4
  FFTW_SITE = http://www.fftw.org
  FFTW_INSTALL_STAGING = YES
  FFTW_LICENSE = GPLv2+
  FFTW_LICENSE_FILES = COPYING
  
  # fortran support only enables generation and installation of fortran sources
  ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
  FFTW_CONF_OPTS += --enable-fortran
  FFTW_CONF_ENV += FLIBS="-lgfortran -lm"
  else
  FFTW_CONF_OPTS += --disable-fortran
  endif
  
  FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_PRECISION_SINGLE),--enable,--disable)-single
  FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE),--enable,--disable)-long-double
  FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_PRECISION_QUAD),--enable,--disable)-quad-precision
  
  FFTW_CFLAGS = $(TARGET_CFLAGS)
  ifeq ($(BR2_PACKAGE_FFTW_FAST),y)
  FFTW_CFLAGS += -O3 -ffast-math
  endif
  
  # x86 optimisations
  FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_SSE),--enable,--disable)-sse
  FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_SSE2),--enable,--disable)-sse2
  
  # ARM optimisations
  FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_NEON),--enable,--disable)-neon
  FFTW_CFLAGS += $(if $(BR2_PACKAGE_FFTW_USE_NEON),-mfpu=neon)
  
  # Generic optimisations
  ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
  FFTW_CONF_OPTS += --enable-threads
  FFTW_CONF_OPTS += $(if $(BR2_GCC_ENABLE_OPENMP),--without,--with)-combined-threads
  else
  FFTW_CONF_OPTS += --disable-threads
  endif
  FFTW_CONF_OPTS += $(if $(BR2_GCC_ENABLE_OPENMP),--enable,--disable)-openmp
  
  FFTW_CONF_OPTS += CFLAGS="$(FFTW_CFLAGS)"
  
  $(eval $(autotools-package))