#
# Imakefile for the cellular automata simulator
#


VERSION=2.03a
TARGET=auto

################################################################
# set the things you do or dont want
################################################################
#define LINUX 
/* #define BRUNEL */
#define INSTALL
/* #define PROFILE  */


################################################################
# how much debugging?
################################################################
/* DEBUG = -g -DDEBUG */
DEBUG = -g 

################################################################
# Have you got shared libraries?
################################################################
#STATIC = -static
STATIC =


################################################################
#where did you install SUIT?
################################################################
SUIT = /usr/local/suit/sparc

################################################################
# should be ok after here
################################################################
CC = gcc 
CDEBUGFLAGS = -O6  $(DEBUG)

VERSION_FLAGS = -DVERSION=\"$(VERSION)\" -DTARGET=\"$(TARGET)\"

#ifdef LINUX
#  otherwise linux/types.h is moaned about
OS_FLAGS = -D_PTRDIFF_T
#endif

#ifdef INSTALL
INSTALL_FLAGS = -DINSTALL
#endif

DEFINES = $(OS_FLAGS) $(VERSION_FLAGS) $(INSTALL_FLAGS)

#ifdef PROFILE
CDEBUGFLAGS = -pg
#endif

CCOPTIONS = $(STATIC) -fpcc-struct-return -traditional -Wall 
STD_INCLUDES = -I$(SUIT)/include
MATHLIB = -lm

################################################################
# somethings are never perfect
################################################################
#ifdef BRUNEL
SUIT = /vol/PACK/studentsoft/src/usr/local/suit/sparc
STD_INCLUDES = -I$(SUIT)/include -I$(HOME)/public/sources/shared/includes
#ifdef PROFILE
CDEBUGFLAGS = -pg -static
#endif
#endif

#ifdef LINUX
CCOPTIONS = $(STATIC) -traditional -Wall 
SUIT = /usr/local/lib/suit
#endif


################################################################
# shouldnt need to modify anything here
################################################################
LDOPTIONS = $(CDEBUGFLAGS) -L$(SUIT)/lib
LDLIBS = -lsuit -lsrgp -lX11 -lm

SRCS = abort.c assorted.c auto.c automata.c callback.c colors.c\
	colorbar.c files.c main.c matrix.c methods.c neighbours.c\
	perfmeter.c rules.c stack.c suitx.c

OBJS = abort.o assorted.o auto.o automata.o callback.o colors.o\
	colorbar.o files.o main.o matrix.o methods.o neighbours.o\
	perfmeter.o rules.o stack.o suitx.o

ComplexProgramTarget($(TARGET))

