CXXFLAGS  = -O `vigra-config --cppflags`
LDFLAGS = `vigra-config --libs`


TARGETS = \
    convert \
    distance \
    subimage \
    invert \
    invert_explicitly \
    resize \
    smooth \
    profile \
    pyramid \
    edge \
    watershed \
    boundarytensor \
    voronoi

all: $(TARGETS)

convert: convert.cxx  
	$(CXX) -o convert convert.cxx $(LDFLAGS)

distance:  distance.cxx
	$(CXX) -o distance distance.cxx $(LDFLAGS)

subimage:  subimage.cxx
	$(CXX) -o subimage subimage.cxx $(LDFLAGS)

invert:  invert.cxx
	$(CXX) -o invert invert.cxx $(LDFLAGS)

invert_explicitly:  invert_explicitly.cxx
	$(CXX) -o invert_explicitly invert_explicitly.cxx $(LDFLAGS)

resize:  resize.cxx
	$(CXX) -o resize resize.cxx $(LDFLAGS)

smooth:  smooth.cxx
	$(CXX) -o smooth smooth.cxx $(LDFLAGS)

profile:  profile.cxx
	$(CXX) -o profile profile.cxx $(LDFLAGS)

pyramid:  pyramid.cxx
	$(CXX) -o pyramid pyramid.cxx $(LDFLAGS)

boundarytensor:  boundarytensor.cxx
	$(CXX) -o boundarytensor boundarytensor.cxx $(LDFLAGS)

edge:  edge.cxx
	$(CXX) -o edge edge.cxx $(LDFLAGS)

watershed:  watershed.cxx
	$(CXX) -o watershed watershed.cxx $(LDFLAGS)

voronoi:  voronoi.cxx
	$(CXX) -o voronoi voronoi.cxx $(LDFLAGS)

clean:
	rm -f  $(TARGETS) *.exe core *.plg *ilk *.lib *.pdb *.exp \
           res.gif voronoi.gif distances.gif profile.gif
	rm -rf Release Debug ii_files

