# Makefile for matrix routines
# Jerod Weinman
# August 2008

CC=cc

DEFINES=
FLAGS=-g -Wall

# Compile matrixop.c into an object file that can be linked with other programs
matrixop: matrix.h matrixop.h matrixop.c
	$(CC) $(FLAGS) $(DEFINES) -c matrixop.c

# Compile matrixutil.c into an object file also
matrixutil: matrix.h matrixutil.h matrixutil.c
	$(CC) $(FLAGS) $(DEFINES) -c matrixutil.c	

# Set this target to depend on the previous two and pass object files to link
add: matrixop matrixutil testadd.c
	$(CC) $(FLAGS) $(DEFINES) -o testadd matrixop.o matrixutil.o testadd.c

clean:
	rm *.o *~ testadd