From b6f251103bc709c062a3d0f2926df390c34c38fc Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sat, 22 Oct 2016 13:26:39 +0200 Subject: [PATCH] Define SOURCES instead of OBJS in Makefiles. OBJS is still deduced from SOURCES, but this change gives better control over where the object files get actually written. --- examples/opengl2_example/Makefile | 5 +++-- examples/opengl3_example/Makefile | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/examples/opengl2_example/Makefile b/examples/opengl2_example/Makefile index 5ea488ff..621227b1 100644 --- a/examples/opengl2_example/Makefile +++ b/examples/opengl2_example/Makefile @@ -15,8 +15,9 @@ #CXX = clang++ EXE = opengl2_example -OBJS = main.o imgui_impl_glfw_gl2.o -OBJS += ../../imgui.o ../../imgui_demo.o ../../imgui_draw.o +SOURCES = main.cpp imgui_impl_glfw_gl2.cpp +SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp +OBJS = $(addsuffix .o, $(basename $(SOURCES))) UNAME_S := $(shell uname -s) diff --git a/examples/opengl3_example/Makefile b/examples/opengl3_example/Makefile index 56f1f8e2..e2dd9761 100644 --- a/examples/opengl3_example/Makefile +++ b/examples/opengl3_example/Makefile @@ -15,9 +15,10 @@ #CXX = clang++ EXE = opengl3_example -OBJS = main.o imgui_impl_glfw_gl3.o -OBJS += ../../imgui.o ../../imgui_demo.o ../../imgui_draw.o -OBJS += ../libs/gl3w/GL/gl3w.o +SOURCES = main.cpp imgui_impl_glfw_gl3.cpp +SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp +SOURCES += ../libs/gl3w/GL/gl3w.c +OBJS = $(addsuffix .o, $(basename $(SOURCES))) UNAME_S := $(shell uname -s)