My goal is to compile the kiss\_fft libraries to use in JNI for android development.
However to begin with, I am attempting to just use the kiss\_fft libraries on my linux machine in C.

when using Kiss\_fft.c or Kiss\_fftr.c from Kiss\_fft ([Kissfft](http://kissfft.sourceforge.net/)
)to calculate the DFT. How exactly do you compile their libraries into your own file. In the top of my source C file, I #include kiss\_fft.h and #include kiss\_fftr.h, and also either place the kiss\_fft souce code in my project root directory or in /usr/include/ in linux, then I compile with a makefile similar to this one:

```
#Makefile

#ARGS = -g -ansi -pedantic -Wall -Werror -O1
ARGS = -g -lsndfile -O1 -lm

FILES = spec_subv4.o kiss_fftr.o kiss_fft.o

spec_sub: $(FILES)
gcc $(ARGS) $(FILES) -o spec_sub  

spec_subv4.o:   spec_subv4.c 
gcc -lsndfile $(ARGS) -c spec_subv4.c -o spec_subv4

kiss_fftr.o:    kiss_fftr.c kiss_fftr.h kiss_fftr.h _kiss_fft_guts.h
gcc $(ARGS) -c kiss_fftr.c -o kiss_fftr

kiss_fft.o: kiss_fft.c _kiss_fft_guts.h
gcc $(ARGS) -c kiss_fftr.c -o kiss_fft

```

Looking through all the kiss\_fft source files, I wrote this make file to build all the dependencies. However I still get 

`undefined reference to kiss_fft`

`undefined reference to kiss_fft_alloc`

Which are internal functions of the kiss\_fft libs.

Any help would be appreciated. Thanks