# Note that the  current version requires the MPE graphics libraries
# in the MPICH distribution
CC = cc

# Set CFLAGS and LIB for your system.  Everything else should be OK.
# If CLICK_STEP flag is set, DISPLAY won't be updated until there's
# a mouse click.  If CLICK_STEP is not set, set SLEEP_INTERVAL in
# const.h

# SGI
#CFLAGS = -g -fullwarn -DDEBUG  -DCLICK_STEP
CFLAGS = -fullwarn -O3

# Linux
CFLAGS = -Wall -O3

LDFLAGS = 

INCLUDE = -I. -I/usr/local/mpich/include
	  
# SGI
LIB = -L/usr/local/mpich/lib

# Linux
LIB = -L /usr/local/mpich/lib -L/usr/X11R6/lib

MPI_LIB = -lmpich

MPE_LIB = -lmpe -lX11

OBJS = \
	neurondiz.o \
	fileio.o \
	ui.o \
	setup.o \
	draw.o 

neurondiz: $(OBJS)  
	$(CC) -o neurondiz $(CFLAGS) $(OBJS) $(INCLUDE) $(LIB) \
		$(MPE_LIB) $(MPI_LIB) -lm

clean:
	rm -f *.o neurondiz core

neurondiz.o: consts.h draw.h  

fileio.o: fileio.h 

ui.o: fileio.h ui.h 

setup.o: consts.h setup.h 

drawND.o: constsND.h drawND.h 

.c.o:
	$(CC) -c $(CFLAGS) $*.c $(INCLUDE)
