| Index: Makefile
|
| diff --git a/Makefile b/Makefile
|
| index b649bea24981c003082d2d301ecf47262a7b49b3..9658e7713b13db5d067833f5bbfb43b5eb4b7a2c 100644
|
| --- a/Makefile
|
| +++ b/Makefile
|
| @@ -3,12 +3,15 @@
|
| # found in the LICENSE file.
|
|
|
| CRASH_REPORTER = crash_reporter
|
| -REPORTER_BINS = $(CRASH_REPORTER)
|
| +LIST_PROXIES_BIN = list_proxies
|
| +REPORTER_BINS = $(CRASH_REPORTER) $(LIST_PROXIES_BIN)
|
| CRASH_OBJS = \
|
| crash_collector.o \
|
| kernel_collector.o \
|
| unclean_shutdown_collector.o \
|
| user_collector.o
|
| +LIST_PROXIES_OBJS = list_proxies.o
|
| +LIST_PROXIES_PKGS = dbus-1 dbus-glib-1
|
| TEST_OBJS = $(CRASH_OBJS)
|
| TEST_BINS = \
|
| crash_collector_test \
|
| @@ -19,11 +22,14 @@ TEST_BINS = \
|
| LDCONFIG = $(shell $(PKG_CONFIG) --libs libpcrecpp)
|
|
|
| # -lglib-2.0 is needed by libbase.a now.
|
| -COMMON_LIBS = -lchromeos -lbase -lpthread -lglib-2.0 -lgflags -lrt $(LDCONFIG)
|
| +COMMON_LIBS = -lchromeos -lbase -lgflags $(LDCONFIG) \
|
| + $(shell $(PKG_CONFIG) --libs glib-2.0 $(LIST_PROXIES_PKGS))
|
| REPORTER_LIBS = $(COMMON_LIBS) -lmetrics
|
| +LIST_PROXIES_LIBS = $(COMMON_LIBS)
|
|
|
| TEST_LIBS = $(COMMON_LIBS) -lgtest -lgmock
|
| -INCLUDE_DIRS = -I.. -I$(SYSROOT)/usr/include/google-breakpad
|
| +INCLUDE_DIRS = -I.. -I$(SYSROOT)/usr/include/google-breakpad \
|
| + $(shell $(PKG_CONFIG) --cflags glib-2.0 $(LIST_PROXIES_PKGS))
|
|
|
| CXXFLAGS += -Wall -Werror
|
|
|
| @@ -32,6 +38,9 @@ all: $(REPORTER_BINS)
|
| $(CRASH_REPORTER): crash_reporter.o $(CRASH_OBJS)
|
| $(CXX) $(CXXFLAGS) $^ $(REPORTER_LIBS) -o $@
|
|
|
| +$(LIST_PROXIES_BIN): $(LIST_PROXIES_OBJS)
|
| + $(CXX) $(CXXFLAGS) $^ $(LIST_PROXIES_LIBS) -o $@
|
| +
|
| tests: $(TEST_BINS)
|
|
|
| %_test: %_test.o $(TEST_OBJS)
|
| @@ -41,4 +50,4 @@ tests: $(TEST_BINS)
|
| $(CXX) $(CXXFLAGS) $(INCLUDE_DIRS) -c $< -o $@
|
|
|
| clean:
|
| - rm -rf *.o $(CRASH_BIN) $(TEST_BINS)
|
| + rm -rf *.o $(CRASH_BIN) $(LIST_PROXIES_BIN) $(TEST_BINS)
|
|
|