CC=cc

DEFINES=
FLAGS=-g -Wall

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

# Compile matrixutil.c into an object file also
matrixutil: 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