- Compilation on Unix-like systems
Once libit, SDL and SDL_Image installed (using ./configure; make; make install), you will have to make the object files from the libit library, just type the following command lines in the "wavjnd" directory:
gcc -c libitsrc/cplx.c -o obj/cplx.o
gcc -c libitsrc/math.c -o obj/math.o
gcc -c libitsrc/fourier.c -o obj/fourier.o
gcc -c libitsrc/filter.c -o obj/filter.o
gcc -c libitsrc/mat.c -o obj/mat.o
gcc -c libitsrc/vec.c -o obj/vec.o
gcc -c libitsrc/separable2D.c -o obj/separable2D.o
gcc -c libitsrc/wavelet.c -o obj/wavelet.o
gcc -c libitsrc/wavelet2D.c -o obj/wavelet2D.o
gcc -c libitsrc/io.c -o obj/io.o
gcc -c libitsrc/random.c -o obj/random.o
You'll also have to make sure that your LIBRARY flags are correctly set for libit & SDL:
Assuming that libit and SDL installs in "/usr/local", you'll have to write down the following lines in you ~/.bashrc file :
export LD_LIBRARY_PATH="/usr/local/lib"
export CFLAGS="-I/usr/local/include"
export CPPFLAGS="-I/usr/local/include"
export LDFLAGS="-L/usr/local/lib"
Then (hopefully), a "make" (in the wavjnd folder) should work.
On Linux Ubuntu:
Thanks to Thomas Stuetz (from the Univ of Salzburg) who pointed out some problems with the compilation on Ubuntu (8.0.4 LTS), here are his suggestions:
On Linux systems, first install SDL:
apt-get install libsdl-console-dev
and the libit library:
./configure; make; make install
and here is a Makefile which should work:
CFLAGS=-g -O2 -Wall $(shell sdl-config --cflags)
LDFLAGS=-g -O2 -Wall $(shell sdl-config --libs) -lSDL_image -lit
PROGRAMS=$(basename $(wildcard *.c))
all: $(PROGRAMS)
clean:
rm -f $(PROGRAMS) *.o
new: clean all