updated makefile & simplifying triangle.c