SHELL=/bin/sh
PROG=matrix++.a
CC=g++
CPP=$(CC) -E

RM=rm -f 
SED=sed
MV=mv

# define __RUN_TIME_CHECKING__ or __DEBUG__ here.
# __RUN_TIME_CHECKING__: to debug things if your program doesnt work
# __DEBUG__: to debug things if __RUN_TIME_CHECKING__ doesnt show anything,
# or if you are adding new features.
EXTRA_DEFINES= -D__RUN_TIME_CHECKING__

CFLAGS= -Wall $(EXTRA_DEFINES)

AR=ar rc
RANLIB=ranlib

### you shouldn't have to change anything after this line ###

MATOBJS= add.o assignment.o backsub.o cofactor.o constractors.o \
det.o inverse.o io.o lu.o minor.o multiply.o peekpoke.o         \
solve.o subtract.o transpose.o

$(PROG): $(MATOBJS)
	$(RM) $(PROG)
	$(AR) $(PROG) $(MATOBJS)
	$(RANLIB) $(PROG)

all: $(PROG)

clean:
	$(RM) *.o *.a core *~

depend dep: 
	$(SED) '/\#\#\# Dependencies/q' < Makefile > tmp_make
	for i in *.c; do $(CPP) -MM $$i; done >> tmp_make
	$(MV) tmp_make Makefile


### Dependencies:
add.o : add.c matrix.h 
assignment.o : assignment.c matrix.h 
backsub.o : backsub.c matrix.h 
cofactor.o : cofactor.c matrix.h 
constractors.o : constractors.c matrix.h 
det.o : det.c matrix.h 
inverse.o : inverse.c matrix.h 
io.o : io.c matrix.h 
lu.o : lu.c matrix.h 
minor.o : minor.c matrix.h 
multiply.o : multiply.c matrix.h 
peekpoke.o : peekpoke.c matrix.h 
solve.o : solve.c matrix.h 
subtract.o : subtract.c matrix.h 
test.o : test.c matrix.h 
transpose.o : transpose.c matrix.h 
