SWARMHOME=../swarm
LIBNAME=neuro
EMAIL=jmerelo@kal-el.ugr.es
OBJECTS=CompLearning.o SOM.o SOMplus.o Hebb.o Hebb2Layer.o BaseCompLrn.o CRNN.o BaseSingleLayer.o neuron.o
SRCS=neuro.h CompLearning.[mh] SOM.[mh] SOMplus.[mh] Hebb.[mh] Hebb2Layer.[mh] BaseCompLrn.[mh] BaseSingleLayer.[mh] CRNN.[mh] neuron.[mh] SOMdemo.m neurodemo.m CRNNdemo.m
HEADERS=neuro.h  CompLearning.h SOM.h SOMplus.h Hebb.h Hebb2Layer.h BaseCompLrn.h BaseSingleLayer.h CRNN.h neuron.h 
DOCS=neurolib.ps

include $(SWARMHOME)/Makefile.lib

demo: SOMdemo neurodemo CRNNdemo

SOMdemo: SOMdemo.o $(OBJECTS)
	$(CC) $(LDFLAGS) -o $@ $@.o $(OBJECTS) $(LIBS)

neurodemo : neurodemo.o libneuro.a
	$(LINKER) $(LDFLAGS) -o $@ $@.o $(OBJECTS) $(LIBS)

CRNNdemo : CRNNdemo.o libneuro.a
	$(LINKER) $(LDFLAGS) -o $@ $@.o $(OBJECTS) $(LIBS)

#Different objectives...
tar:
	-tar cvf neurolib.tar $(SRCS) $(DOCS) Makefile
	gzip neurolib.tar

#Higher level classes
CompLearning.o : CompLearning.[mh] BaseCompLrn.o
SOM.o: SOM.[mh] BaseCompLrn.o
SOMplus.o: SOMplus.[mh] BaseCompLrn.o
Hebb.o: Hebb.[mh] BaseSingleLayer.o
Hebb2Layer.o: Hebb2Layer.[mh] neuron.h Makefile
CRNN.o: CRNN.[mh] neuron.o

#Lower level -- abstract classes
BaseCompLrn.o : BaseCompLrn.[mh] BaseSingleLayer.o
BaseSingleLayer.o: BaseSingleLayer.[mh] neuron.o Makefile

#other functions
neuron.o: neuron.[mh] Makefile
