From 66254e80c946ff1a159b03f500b32d54319ab42e Mon Sep 17 00:00:00 2001 From: PedroEdiaz Date: Wed, 27 Nov 2024 19:31:36 -0600 Subject: [PATCH] Fix: Compilation errors alan --- Makefile | 7 ++++++- src/context.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b2e71e1..8393bde 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ BIN = manigraph OBJ = \ + ext/glad/glad.o \ src/surface.o \ src/context.o \ src/texture.o \ @@ -14,6 +15,8 @@ OBJ = \ CFLAGS = \ -I./ext/cglm/include \ -I./ext/glfw/include \ + -I./ext/glad \ + -DGLAD \ -Wall -Wno-unused-function -std=c99 -D_GNU_SOURCE \ WAYLAND-LIB = \ @@ -42,6 +45,8 @@ help: src/main.o: src/data/axis.h src/data/shaders.h +$(OBJ): src/main.h + # WINDOWS windows: $(OBJ) glfw.dll $(CC) $(CFLAGS) $(OBJ) -o $(BIN) -L. -lglfw -lopengl32 -lglew32 @@ -84,5 +89,5 @@ clean: .SUFFIXES: .c .o -.c.o: src/main.h +.c.o: $(CC) $(CFLAGS) -c -o $@ $< diff --git a/src/context.c b/src/context.c index c9f00b8..845e492 100644 --- a/src/context.c +++ b/src/context.c @@ -4,8 +4,8 @@ #include #else #ifdef GLAD -#include #include +#include #else #include #endif