SOFTDIR = /u/picardo/Soft

# where all the header files are
INCLUDEDIR   = -I$(SOFTDIR)/Ev/Include -I$(SOFTDIR)/Std/Include  \
               -I$(SOFTDIR)/Sys/Include -I$(SOFTDIR)/Xpp/Include \
               -I$(SOFTDIR)/Vw/Include

#where the libraries are
LIBDIR       = -L$(SOFTDIR)/Ev -L$(SOFTDIR)/Std  -L$(SOFTDIR)/Sys \
               -L$(SOFTDIR)/Xpp -L$(SOFTDIR)/Vw

## The compiler options =====================================================
CC = g++   

## Compiler flags
#CFLAGS += -g         # include debugging information
#CFLAGS += -p         # include profiling information
 CFLAGS += -Wall      # spit out all warnings
#CFLAGS += -DASSERT   # compile with assertions turned on
 CFLAGS += -O3        # force all compilations to use optimizer
 CFLAGS += -fno-implicit-templates   # Templates are instantiated externally

## Rules and dependancies ===================================================

.c.o:                               # Generate a .o file from any .c file 
	$(CC) $(CFLAGS) $(INCLUDEDIR) -c $*.c

simulate: simulate.o
	$(CC) $(CFLAGS) simulate.o $(INCLUDEDIR) $(LIBDIR) -lEv -lSys -lStd -lXpp -lVw -lX11 -lm -o simulate

clean:                               # Remove all the .o files
	rm -f *.o
	ls -l

backup:                              # Revision control system backup
	ci -l -m"backup"  *.c *.h *.html


.KEEP_STATE:                         # This rule will create a .make.state 
                                     # file containing dependancy and 
                                     # compilation history information.








