CXX=$(top_srcdir)/bin/s++
SRCFILES = $(wildcard *.cc)
EXTRA_DIST = $(SRCFILES) $(wildcard *.xml) 
CXXCOMPILE = $(CXX)
CXXLINK = $(CXX)
# Force an empty libs because the s++ script already knows everything
LIBS=-lsynaps
SUFFIXES= .ex .cc .o .d .tmml .html .xml .tm .tex
DEPDIR = .
DEP = $(patsubst %.cc, %.d, $(SRCFILES))
DEP_FILES = ./.depend
CLEANFILES = $(wildcard *.ex *.o *.d *~ $(DEP) $(DEP_FILES) core)
DISTCLEANFILES = $(CLEANFILES)

.cc.d: $*.cc .depend
	$(CXX) -M $*.cc -o $*.d

.depend: $(DEP)	
	if [ -f .depend ]; then rm .depend; fi;
	touch .depend
	for i in $(DEP); do cat $$i >> .depend; done;

include $(DEP_FILES)

.cc.o: .depend
	if test -f $*.ex; then rm $*.ex; fi;
	$(CXX) -g $(CPPFLAGS) -c $*.cc
.o.ex: .depend
	$(CXX) -g $*.o 
TESTS = $(patsubst %.cc, %.ex, $(SRCFILES))

