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

Unified Diff: src/platform/metrics/Makefile

Issue 2079007: Add metrics library tests. Some metrics daemon API cleanup. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: A bit more cleanup. Created 10 years, 7 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 | src/platform/metrics/metrics_daemon.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/metrics/Makefile
diff --git a/src/platform/metrics/Makefile b/src/platform/metrics/Makefile
index 5ce0caff8cce7a411bc39b5c99683960066ca9d5..e0c37414a050a6378cf05e7877e33305b1defbc1 100644
--- a/src/platform/metrics/Makefile
+++ b/src/platform/metrics/Makefile
@@ -15,11 +15,15 @@ DAEMON = metrics_daemon
DAEMON_TEST = metrics_daemon_test
LIB = libmetrics.a
SHAREDLIB = libmetrics.so
+LIB_TEST = metrics_library_test
CLIENT_OBJS = \
metrics_client.o
LIB_OBJS = \
metrics_library.o
+TESTLIB_OBJS = \
+ metrics_library.o \
+ metrics_library_test.o
DAEMON_OBJS = \
metrics_daemon.o \
metrics_daemon_main.o
@@ -27,12 +31,13 @@ TESTDAEMON_OBJS = \
metrics_daemon.o \
metrics_daemon_test.o
-DAEMON_LDFLAGS = $(LDCONFIG) -lrt -lbase -lpthread -lgflags
+DAEMON_LDFLAGS = $(LDFLAGS) $(LDCONFIG) -lrt -lbase -lpthread -lgflags
TESTDAEMON_LIBS = -lgmock -lgtest
+TESTLIB_LIBS = -lgtest -lbase -lrt -lpthread
all: $(LIB) $(SHAREDLIB) $(CLIENT) $(DAEMON)
-tests: $(DAEMON_TEST)
+tests: $(DAEMON_TEST) $(LIB_TEST)
$(CLIENT): $(CLIENT_OBJS) $(SHAREDLIB)
$(CXX) $(LDFLAGS) $^ -o $@
@@ -40,7 +45,7 @@ $(CLIENT): $(CLIENT_OBJS) $(SHAREDLIB)
$(DAEMON): $(DAEMON_OBJS) $(SHAREDLIB)
$(CXX) -o $@ $^ $(DAEMON_LDFLAGS)
-$(DAEMON_TEST): $(TESTDAEMON_OBJS) $(SHAREDLIB)
+$(DAEMON_TEST): $(TESTDAEMON_OBJS)
$(CXX) -o $@ $^ $(DAEMON_LDFLAGS) $(TESTDAEMON_LIBS)
$(LIB): $(LIB_OBJS)
@@ -49,6 +54,9 @@ $(LIB): $(LIB_OBJS)
$(SHAREDLIB): $(LIB_OBJS)
$(CXX) $(LDFLAGS) -shared $^ -o $@
+$(LIB_TEST): $(TESTLIB_OBJS) $(SHAREDLIB)
+ $(CXX) -o $@ $^ $(LDFLAGS) $(TESTLIB_LIBS)
+
%.o: %.cc
$(CXX) $(CXXFLAGS) -c $< -o $@
@@ -64,4 +72,5 @@ metrics_daemon_test.o: \
power_states.h
clean:
- rm -f $(CLIENT) $(DAEMON) $(LIB) $(SHAREDLIB) $(TESTDAEMON) *.o
+ rm -f $(CLIENT) $(DAEMON) $(LIB) $(SHAREDLIB) *.o
+ rm -f $(DAEMON_TEST) $(LIB_TEST)
« no previous file with comments | « no previous file | src/platform/metrics/metrics_daemon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698