curdir=.

test: test.o
	$(CXX) -o test test.o ||  { rm ./test$(EXEEXT).cxx ; exit 1; }
	./test || { rm ./test$(EXEEXT) ; exit 1; }

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

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

include ../Makefile.include

EXTRA_CLEAN_TARGET = test.cxx

CPPFLAGS := $(LIBCPPFLAGS) $(FFTW_INCLUDES)

test.cxx: $(vigra_srcdir)/include/vigra
	@echo creating test.cxx
	@\rm -f test.cxx && touch test.cxx
		@for headerpath in $(vigra_srcdir)/include/vigra/*.hxx; do \
            header=`expr $$headerpath : ".*/\(.*\)"` ; \
            if [ "$$header" != "fftw.hxx" -a "$$header" != "rfftw.hxx" ] ; then \
                echo "#include <vigra/$$header>" >> test.cxx; \
            fi; \
        done
	@echo "int main() {}" >> test.cxx



