OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 SOURCES = main.cc bench.cc xlib_window.cc | 5 SOURCES = main.cc bench.cc xlib_window.cc |
6 | 6 |
7 CXXFLAGS = -g -Wall -Werror | 7 CXXFLAGS = -g -Wall -Werror |
8 LDFLAGS = -lGL -lX11 | 8 LDFLAGS = -lGL -lX11 |
9 TARGET = ../gl_Bench | 9 TARGET = ../gl_Bench |
10 | 10 |
11 ifdef USE_EGL | 11 ifdef USE_EGL |
12 CXXFLAGS += -I$(GCLIENT_ROOT)/src/third_party/khronos/files/include | 12 CXXFLAGS += -I$(GCLIENT_ROOT)/src/third_party/khronos/files/include |
13 SOURCES += egl_stuff.cc | 13 SOURCES += egl_stuff.cc |
14 LDFLAGS += -L$(GCLIENT_ROOT)/src/third_party/khronos/files -lEGL | 14 LDFLAGS += -L$(GCLIENT_ROOT)/src/third_party/khronos/files -lEGL |
15 else | 15 else |
16 SOURCES += glx_stuff.cc | 16 SOURCES += glx_stuff.cc |
17 endif | 17 endif |
18 | 18 |
19 OBJS = $(SOURCES:.cc=.o) | 19 OBJS = $(SOURCES:.cc=.o) |
| 20 DEPS = $(SOURCES:.cc=.d) |
20 | 21 |
21 .PHONY: all clean | 22 .PHONY: all clean |
22 | 23 |
23 all: $(TARGET) | 24 all: $(TARGET) |
24 | 25 |
25 $(TARGET): $(OBJS) | 26 $(TARGET): $(OBJS) |
26 | 27 |
27 main.o: main.h | |
28 bench.o: main.h | |
29 | |
30 clean: | 28 clean: |
31 » $(RM) $(TARGET) $(OBJS) | 29 » $(RM) $(TARGET) $(OBJS) $(DEPS) |
32 | 30 |
33 $(TARGET): | 31 $(TARGET): |
34 $(CXX) $^ -o $@ $(CXXFLAGS) $(LDFLAGS) | 32 $(CXX) $^ -o $@ $(CXXFLAGS) $(LDFLAGS) |
35 | 33 |
36 $(OBJS): %.o: %.cc | 34 $(OBJS): %.o: %.cc |
37 » $(CXX) $(CXXFLAGS) -c $< -o $@ | 35 » $(CXX) $(CXXFLAGS) -c $< -o $@ -MMD |
| 36 |
| 37 -include $(DEPS) |
OLD | NEW |