Browse Source

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.
Sam Hocevar 9 năm trước cách đây
mục cha
commit
b6f251103b
2 tập tin đã thay đổi với 7 bổ sung5 xóa
  1. 3 2
      examples/opengl2_example/Makefile
  2. 4 3
      examples/opengl3_example/Makefile

+ 3 - 2
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)
 

+ 4 - 3
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)