From dc7cdb30253d64bcb5cb2a9881daa50623e96af4 Mon Sep 17 00:00:00 2001 From: ocornut Date: Fri, 27 Feb 2015 11:07:23 +0000 Subject: [PATCH] Examples: Fix Makefile --- examples/opengl3_example/Makefile | 6 ++++-- examples/opengl_example/Makefile | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/opengl3_example/Makefile b/examples/opengl3_example/Makefile index 973807dc8..bdd778e48 100644 --- a/examples/opengl3_example/Makefile +++ b/examples/opengl3_example/Makefile @@ -20,14 +20,15 @@ UNAME_S := $(shell uname -s) ifeq ($(UNAME_S), Linux) #LINUX ECHO_MESSAGE = "Linux" + LIBS = `pkg-config --static --libs glfw3` + CXXFLAGS = -I../../ -I../opengl_example/gl3w `pkg-config --cflags glfw3` CXXFLAGS += -Wall - LIBS = `pkg-config --static --libs glfw3` + CFLAGS = CXXFLAGS endif ifeq ($(UNAME_S), Darwin) #APPLE ECHO_MESSAGE = "Mac OS X" - LIBS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo LIBS += -L/usr/local/lib LIBS += -lglfw3 @@ -35,6 +36,7 @@ ifeq ($(UNAME_S), Darwin) #APPLE CXXFLAGS = -I../../ -I../opengl_example/gl3w -I/usr/local/Cellar/glew/1.10.0/include -I/usr/local/include CXXFLAGS += -Wall # CXXFLAGS += -D__APPLE__ + CFLAGS = CXXFLAGS endif .cpp.o: diff --git a/examples/opengl_example/Makefile b/examples/opengl_example/Makefile index ed5b61b70..10212d944 100644 --- a/examples/opengl_example/Makefile +++ b/examples/opengl_example/Makefile @@ -19,14 +19,15 @@ UNAME_S := $(shell uname -s) ifeq ($(UNAME_S), Linux) #LINUX ECHO_MESSAGE = "Linux" + LIBS = `pkg-config --static --libs glfw3` + CXXFLAGS = -I../../ `pkg-config --cflags glfw3` CXXFLAGS += -Wall - LIBS = `pkg-config --static --libs glfw3` + CFLAGS = CXXFLAGS endif ifeq ($(UNAME_S), Darwin) #APPLE ECHO_MESSAGE = "Mac OS X" - LIBS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo LIBS += -L/usr/local/lib LIBS += -lglfw3 @@ -34,6 +35,7 @@ ifeq ($(UNAME_S), Darwin) #APPLE CXXFLAGS = -I../../ -I/usr/local/include CXXFLAGS += -Wall # CXXFLAGS += -D__APPLE__ + CFLAGS = CXXFLAGS endif .cpp.o: