cannam@95: cannam@95:
cannam@95:cannam@95: Next: Cycle Counters, cannam@95: Previous: Installation on Unix, cannam@95: Up: Installation and Customization cannam@95:
It should be relatively straightforward to compile FFTW even on non-Unix
cannam@95: systems lacking the niceties of a configure
script. Basically,
cannam@95: you need to edit the config.h
header (copy it from
cannam@95: config.h.in
) to #define
the various options and compiler
cannam@95: characteristics, and then compile all the ‘.c’ files in the
cannam@95: relevant directories.
cannam@95:
cannam@95:
The config.h
header contains about 100 options to set, each one
cannam@95: initially an #undef
, each documented with a comment, and most of
cannam@95: them fairly obvious. For most of the options, you should simply
cannam@95: #define
them to 1
if they are applicable, although a few
cannam@95: options require a particular value (e.g. SIZEOF_LONG_LONG
should
cannam@95: be defined to the size of the long long
type, in bytes, or zero
cannam@95: if it is not supported). We will likely post some sample
cannam@95: config.h
files for various operating systems and compilers for
cannam@95: you to use (at least as a starting point). Please let us know if you
cannam@95: have to hand-create a configuration file (and/or a pre-compiled binary)
cannam@95: that you want to share.
cannam@95:
cannam@95:
To create the FFTW library, you will then need to compile all of the
cannam@95: ‘.c’ files in the kernel
, dft
, dft/scalar
,
cannam@95: dft/scalar/codelets
, rdft
, rdft/scalar
,
cannam@95: rdft/scalar/r2cf
, rdft/scalar/r2cb
,
cannam@95: rdft/scalar/r2r
, reodft
, and api
directories.
cannam@95: If you are compiling with SIMD support (e.g. you defined
cannam@95: HAVE_SSE2
in config.h
), then you also need to compile
cannam@95: the .c
files in the simd-support
,
cannam@95: {dft,rdft}/simd
, {dft,rdft}/simd/*
directories.
cannam@95:
cannam@95:
Once these files are all compiled, link them into a library, or a shared cannam@95: library, or directly into your program. cannam@95: cannam@95:
To compile the FFTW test program, additionally compile the code in the
cannam@95: libbench2/
directory, and link it into a library. Then compile
cannam@95: the code in the tests/
directory and link it to the
cannam@95: libbench2
and FFTW libraries. To compile the fftw-wisdom
cannam@95: (command-line) tool (see Wisdom Utilities), compile
cannam@95: tools/fftw-wisdom.c
and link it to the libbench2
and FFTW
cannam@95: libraries
cannam@95:
cannam@95:
cannam@95:
cannam@95: