GLEW_LIBS=$(shell pkgconf glew --libs)
GLFW_LIBS=$(shell pkgconf glfw3 --libs)

OBJ = main.o matrixMath.o

cg1.out: $(OBJ) vertexShader.c fragmentShader.c matrixMath.h
	gcc -o $@ $(OBJ) -lm $(GLEW_LIBS) $(GLFW_LIBS)

%Shader.c: %Shader.glsl
	xxd -i $? > $@

main.o: vertexShader.c fragmentShader.c

%.o: %.c
	gcc -c $<

run: cg1.out
	./cg1.out

clean:
	rm vertexShader.c fragmentShader.c cg1.out *.o