curdir=$(vigra_testdir)/simpleanalysis

TESTIMAGES = noiseNormalizationTest.xv slantedEdgeMTF.xv lenna128.xv

all: test

include ../Makefile.include

CPPFLAGS += $(FFTW_INCLUDES)

test: test.o $(TESTIMAGES) $(PREINSTALL_IMPEX_LIB)
	$(CXX) -o test test.o $(PREINSTALL_IMPEX_LIB) $(IMPEX_DEPLIBS) $(FFTW_LIB)
	./test || { rm ./test$(EXEEXT) ; exit 1; }

simpleanalysis.exe: test.d
	devenv "..\test.sln" /build Release /project simpleanalysis
	./simpleanalysis.exe || { rm ./simpleanalysis.exe ; exit 1; }

$(TESTIMAGES):
	ln -s $(curdir)/$@ .

ifneq "$(MAKECMDGOALS)" "clean"
include test.d
endif
