added Makefile for matrix