computer-grafik-1/u08-1/Makefile

34 lines
696 B
Makefile

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