ifeq ($(SWARMHOME),)
SWARMHOME=../swarm-1998-02-03
endif
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 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 CRNNdemo

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

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

#Different objectives...
tar: clean
	-cd ..; tar cvf NeuroLib-1.0.tar NeuroLib-1.0; gzip NeuroLib-1.0.tar; mv NeuroLib-1.0.tar.gz /net/huangho/disk2/Users/jmerelo/ftp
clean:
	-rm *~ core *.o *demo
#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
