TA159

Notas, resueltos y trabajos practicos de la materia Sistemas Gráficos
Index Commits Files Refs Submodules README LICENSE
commit 4ce51c90d6006521b2dcf0b4649a67ce1cda9613
parent c0caee6deadf483548200f186b34b15402793650
Author: Martin Kloeckner <mjkloeckner@gmail.com>
Date:   Sat, 24 Aug 2024 00:13:51 -0300

fix libs flags order

on some devices the compilation failed during the link stage

Diffstat:
Mopengl-example/Makefile | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/opengl-example/Makefile b/opengl-example/Makefile
@@ -1,6 +1,6 @@
 CC := gcc
-CLIBS := `pkg-config --libs glfw3` -lGL
-CFLAGS := # -Wall -Wshadow -pedantic -ansi -std=c99 -O3
+CLIBS := -lglfw -lGL
+CFLAGS := -Wall -Wshadow -ansi -std=c99 -O3
 SRCS := $(wildcard *.c)
 OBJS := $(SRCS:.c=.o)
 
@@ -11,11 +11,11 @@ TARGET := opengl-example
 all: $(TARGET)
 
 $(TARGET): $(OBJS)
-    $(CC) $(CLIBS) $(CFLAGS) -o $@ $^
+    $(CC) $(CFLAGS) $^ -o $@ $(CLIBS) 
     rm -f $(OBJS)
 
 %.o: %.c
-    $(CC) $(CLIBS) $(CFLAGS) -c $< -o $@
+    $(CC) $(CFLAGS) -c $< -o $@ 
 
 clean:
     rm -f $(OBJS)