Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Unified Diff: Makefile

Issue 3304011: monitor_reconfig: Handle external monitors and add tests. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222//monitor_reconfig.git
Patch Set: apply review feedback Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | monitor_reconfigure_main.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Makefile
diff --git a/Makefile b/Makefile
index d62f0f6e58be9c1e2059347900a03d3e9d35cc6f..3ef81f1b063d3fbdceed9a8c399157e9e3a2983d 100644
--- a/Makefile
+++ b/Makefile
@@ -7,21 +7,28 @@ CXXFLAGS ?= -Wall -Werror -g
PKG_CONFIG ?= pkg-config
LIBS = -lbase -lpthread -lrt
+TEST_LIBS = -lgtest -lgflags
INCLUDE_DIRS = -I.. $(shell $(PKG_CONFIG) --cflags x11 xrandr)
LIB_DIRS = $(shell $(PKG_CONFIG) --libs x11 xrandr)
BIN=monitor_reconfigure
-OBJECTS=monitor_reconfigure_main.o
+OBJECTS=monitor_reconfigure_main.o resolution_selector.o
.cc.o:
$(CXX) $(CXXFLAGS) $(INCLUDE_DIRS) -c $< -o $@
$(BIN): $(OBJECTS)
$(CXX) $(CXXFLAGS) $(INCLUDE_DIRS) $(LIB_DIRS) $^ $(LIBS) $(LDFLAGS) \
- -o $@
+ -o $@
all: $(BIN)
+test: resolution_selector_test
+
+resolution_selector_test: resolution_selector_test.cc resolution_selector.o
+ $(CXX) $(CXXFLAGS) $(INCLUDE_DIRS) $(LIB_DIRS) $^ \
+ $(LIBS) $(TEST_LIBS) $(LDFLAGS) -o $@
+
clean:
- @rm -f $(BIN) $(OBJECTS)
+ @rm -f $(BIN) $(OBJECTS) resolution_selector_test
« no previous file with comments | « no previous file | monitor_reconfigure_main.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698