diff --git a/Makefile b/Makefile index 41bc641..26a2748 100644 --- a/Makefile +++ b/Makefile @@ -1,33 +1,33 @@ -# Detect OS -OS := $(shell uname) - -GLEW_LIBS := $(shell pkgconf --libs glew) -GLFW_LIBS := $(shell pkgconf --libs glfw3) - -# Set libraries for Linux -ifeq ($(OS), Linux) - OPENGL_LIB := -lGL -# Set libraries for Windows (MSYS2) -else - OPENGL_LIB := -lopengl32 -endif - -# Source files -SRC := src/main.c src/log.c src/shader.c - -# Output binary -OUT := cg1 - -# Compiler -CC := gcc - -# Build target -$(OUT): $(SRC) - $(CC) -o $(OUT) $(SRC) $(GLEW_LIBS) $(GLFW_LIBS) $(OPENGL_LIB) - -# Clean target -clean: - rm -f $(OUT) - -# mark phony targets +# Detect OS +OS := $(shell uname) + +GLEW_LIBS := $(shell pkgconf --libs glew) +GLFW_LIBS := $(shell pkgconf --libs glfw3) + +# Set libraries for Linux +ifeq ($(OS), Linux) + OPENGL_LIB := -lGL +# Set libraries for Windows (MSYS2) +else + OPENGL_LIB := -lopengl32 +endif + +# Source files +SRC := src/main.c src/log.c src/shader.c src/matrix-math.c + +# Output binary +OUT := cg1 + +# Compiler +CC := gcc + +# Build target +$(OUT): $(SRC) + $(CC) -o $(OUT) $(SRC) $(GLEW_LIBS) $(GLFW_LIBS) $(OPENGL_LIB) + +# Clean target +clean: + rm -f $(OUT) + +# mark phony targets .PHONY: clean \ No newline at end of file