Index: client/deps/glbench/src/Makefile |
diff --git a/client/deps/glbench/src/Makefile b/client/deps/glbench/src/Makefile |
index 3f5a48dda8a38f2b7657d96fcb319135536e8153..17205675d91a9a6f0237ccfddfcfccd35fd9dea9 100644 |
--- a/client/deps/glbench/src/Makefile |
+++ b/client/deps/glbench/src/Makefile |
@@ -2,38 +2,46 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
-SOURCES = main.cc bench.cc xlib_window.cc shaders.cc utils.cc |
+SOURCES_COMMON = xlib_window.cc utils.cc |
+SOURCES_GL_BENCH = main.cc bench.cc shaders.cc |
+SOURCES_TEARTEST = teartest.cc |
+SOURCES_ALL = $(SOURCES_COMMON) $(SOURCES_GL_BENCH) $(SOURCES_TEARTEST) |
CXXFLAGS = -g -Wall -Werror -I$(GCLIENT_ROOT)/src/third_party/chrome/files |
LDFLAGS = -lGL -lX11 -L$(GCLIENT_ROOT)/src/third_party/chrome -lbase -lrt |
-TARGET = ../glbench |
+GL_BENCH = ../glbench |
+TEARTEST = ../teartest |
GCLIENT_ROOT ?= ../../../../../../../.. |
ifdef USE_EGL |
CXXFLAGS += -I$(GCLIENT_ROOT)/src/third_party/khronos/files/include |
-SOURCES += egl_stuff.cc |
+SOURCES_COMMON += egl_stuff.cc |
LDFLAGS += -L$(GCLIENT_ROOT)/src/third_party/khronos/files -lEGL |
else |
-SOURCES += glx_stuff.cc |
+SOURCES_COMMON += glx_stuff.cc |
endif |
-OBJS = $(SOURCES:.cc=.o) |
-DEPS = $(SOURCES:.cc=.d) |
+OBJS_COMMON = $(SOURCES_COMMON:.cc=.o) |
+OBJS_GL_BENCH = $(SOURCES_GL_BENCH:.cc=.o) |
+OBJS_TEARTEST = $(SOURCES_TEARTEST:.cc=.o) |
+OBJS_ALL = $(SOURCES_ALL:.cc=.o) |
+DEPS_ALL = $(SOURCES_ALL:.cc=.d) |
.PHONY: all clean |
-all: $(TARGET) |
+all: $(GL_BENCH) $(TEARTEST) |
-$(TARGET): $(OBJS) |
+$(TEARTEST): $(OBJS_COMMON) $(OBJS_TEARTEST) |
+$(GL_BENCH): $(OBJS_COMMON) $(OBJS_GL_BENCH) |
clean: |
- $(RM) $(TARGET) $(OBJS) $(DEPS) |
+ $(RM) $(GL_BENCH) $(TEARTEST) $(OBJS_ALL) $(DEPS_ALL) |
-$(TARGET): |
+$(GL_BENCH) $(TEARTEST): |
$(CXX) $^ -o $@ $(CXXFLAGS) $(LDFLAGS) |
-$(OBJS): %.o: %.cc |
+$(OBJS_ALL): %.o: %.cc |
$(CXX) $(CXXFLAGS) -c $< -o $@ -MMD |
--include $(DEPS) |
+-include $(DEPS_ALL) |