22 lines
415 B
Makefile
22 lines
415 B
Makefile
GLEW_LIBS=$(shell pkgconf glew --libs)
|
|
GLFW_LIBS=$(shell pkgconf glfw3 --libs)
|
|
|
|
OBJ = main.o matrixMath.o transformation.o
|
|
SHADERS = fragmentShader.c vertexShader.c
|
|
|
|
cg1.out: $(OBJ) $(SHADERS)
|
|
gcc -o $@ $(OBJ) -lm $(GLEW_LIBS) $(GLFW_LIBS)
|
|
|
|
%Shader.c: %Shader.glsl
|
|
xxd -i $? > $@
|
|
|
|
main.o: $(SHADERS) matrixMath.h transformation.h
|
|
|
|
%.o: %.c
|
|
gcc -c $<
|
|
|
|
run: cg1.out
|
|
./cg1.out
|
|
|
|
clean:
|
|
rm $(SHADERS) $(OBJ) cg1.out
|