# make sources for connectionist simulator, one by one.
# 

MAKE=make

DEFNS=	"SIMDIR=$(SIMDIR)" "CC=$(CC)" "LD=$(LD)" "MAKE=$(MAKE)" \
	"DTYPE=$(DTYPE)" "SIMLD=$(SIMLD)" "SIMCC=$(SIMCC)" "BINDIR=$(BINDIR)" \
	"SRCDIR=$(SRCDIR)" "XUSRLIBDIR=$(XUSRLIBDIR)" "XINCROOT=$(XINCROOT)" \
	"INSTALL=$(INSTALL)" "NM=$(NM)"

library:
	cd lib; $(MAKE) $(MFLAGS) VERSIONS='int float null' all $(DEFNS)

bp:
	cd backprop; $(MAKE) $(MFLAGS) all $(DEFNS)

simtools:
	cd tools; $(MAKE) $(MFLAGS) all; $(MAKE) $(MFLAGS) install $(DEFNS)

sgraphics:
	cd gi; $(MAKE) $(MFLAGS) all $(DEFNS)

xgraphics:
	cd xgi; $(MAKE) $(MFLAGS) all $(DEFNS)

simulator:
	cd uniproc; $(MAKE) $(MFLAGS) all $(DEFNS)

sdebug:
	cd gi; $(MAKE) $(MFLAGS) debug $(DEFNS)

xdebug:
	cd xgi; $(MAKE) $(MFLAGS) debug $(DEFNS)

simdebug:
	cd uniproc; $(MAKE) $(MFLAGS) debug $(DEFNS)

clean: 
	cd lib; $(MAKE) clean
	cd backprop; $(MAKE) clean
	cd tools; $(MAKE) clean
	cd gi; $(MAKE) clean
	cd xgi; $(MAKE) clean
	cd uniproc; $(MAKE) clean
	cd ld; $(MAKE) clean
	rm -f *~ \#*

tidy:
	cd lib; $(MAKE) tidy
	cd backprop; $(MAKE) tidy
	cd tools; $(MAKE) tidy
	cd gi; $(MAKE) tidy
	cd xgi; $(MAKE) tidy
	cd uniproc; $(MAKE) tidy
	cd ld; $(MAKE) tidy
	rm -f *~ \#*
