# GNUmakefile          Section: 8.3  Fast Fourier Transform
#      Copyright 1994, Center for Computer Vision and Visualization,
#      University of Florida.  All rights reserved.
#
# See comments in  gnumake.iah for description of symbols.

# NOTE: There are two verison of the FFT algorithm, an interative and
#     a non-interative.   Only the iterative version should be placed
#     in the IAH library.
#######################################################################
# Modify the following symbols to control compilation
#######################################################################

BLASTABLE_PTFILES =
CLOSUREOBJS =

# Only will put the iter version of the fft in the library, its faster...
HEADERS	= fft.h
LOBJS	= fft-nd-iter.o

SOURCES	= fft.h  fft-nd.c  fft-nd-iter.c test-fft.c test-fft-all.c
TESTS	= test-fft  test-fft-all  test-fft-iter  test-fft-all-iter

ARL =

EXTRAINCLUDES =
CPPFLAGS =
OTHERLIBS =

TARGET_ARCH =
XTRAFLAGS =
XTRACCFLAGS =

# Make this nothing if you do not want programs striped.
STRIPPROGRAMS = anystring-means-strip--no-string-means-do-not-strip

#######################################################################
include	../../gnumake.iah
#######################################################################

#######################################################################
#####	User program dependencies and rules follow
#######################################################################

ifeq (${LIBTEST},)

#### The iterative versions of the fft code & tests

fft-nd-iter.o:	fft.h	fft-nd-iter.c

test-fft.o:	test-fft.c	fft.h

test-fft-all.o:	test-fft-all.c	fft.h

test-fft-iter:		 test-fft.o     fft-nd-iter.o
	$(LINK.cc) -o $@ test-fft.o     fft-nd-iter.o $(LDLIBS)
	strip $@

test-fft-all-iter:	 test-fft-all.o fft-nd-iter.o
	$(LINK.cc) -o $@ test-fft-all.o fft-nd-iter.o $(LDLIBS)
	strip $@

#### The template versions of the fft code & tests

fft-nd.o:	fft.h	fft-nd.c

test-fft:	test-fft.o	fft-nd.o
	$(LINK.cc) -o $@ $@.o	fft-nd.o $(LDLIBS)
	strip $@

test-fft-all:  test-fft-all.o	fft-nd.o
	$(LINK.cc) -o $@ $@.o	fft-nd.o $(LDLIBS)
	strip $@

else
#### The iterative versions of the fft code & tests

#fft-nd-iter.o:	should be in the library

test-fft.o:	test-fft.c

test-fft-all.o:	test-fft-all.c

test-fft-iter:		 test-fft.o
	$(LINK.cc) -o $@ test-fft.o $(LDLIBS)
	strip $@

test-fft-all-iter:	 test-fft-all.o
	$(LINK.cc) -o $@ test-fft-all.o $(LDLIBS)
	strip $@

#### No template versions of FFT in library

endif
