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

Unified Diff: src/platform/crash/Makefile

Issue 2128004: Adding in-process crash dumping library and crash uploader (Closed) Base URL: ssh://git@chromiumos-git//chromeos
Patch Set: respond to review and add another test 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 | « DEPS ('k') | src/platform/crash/crash_dumper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/crash/Makefile
diff --git a/src/platform/crash/Makefile b/src/platform/crash/Makefile
index 714e1d0d993ad0c1a386671adb595afdc3c7b671..06679f91297a53e81cb81e6ee59c4566582697c1 100644
--- a/src/platform/crash/Makefile
+++ b/src/platform/crash/Makefile
@@ -3,20 +3,28 @@
# found in the LICENSE file.
CRASH_BIN = crash_reporter
+CRASH_LIB = libcrash_dumper.so
CRASH_OBJS = system_logging.o user_collector.o
TEST_OBJS = $(CRASH_OBJS) system_logging_mock.o
TEST_BINS = user_collector_test
LIBS = -lbase -lpthread -lgflags -lrt -lmetrics
+
TEST_LIBS = $(LIBS) -lgtest -lgmock
-INCLUDE_DIRS = -I..
+INCLUDE_DIRS = -I.. -I$(SYSROOT)/usr/include/google-breakpad
LIB_DIRS =
-all: $(CRASH_BIN)
+# We need -fPIC for linking objects into shared objects.
+CXXFLAGS += -fPIC -Wall -Werror
+
+all: $(CRASH_BIN) $(CRASH_LIB)
$(CRASH_BIN): crash_reporter.o $(CRASH_OBJS)
$(CXX) $(CXXFLAGS) $(LIB_DIRS) $^ $(LIBS) -o $@
+$(CRASH_LIB): crash_dumper.o
+ $(CXX) -shared -lbreakpad_client $^ -o $@
+
tests: $(TEST_BINS)
user_collector_test: user_collector_test.o $(TEST_OBJS)
@@ -26,4 +34,4 @@ user_collector_test: user_collector_test.o $(TEST_OBJS)
$(CXX) $(CXXFLAGS) $(INCLUDE_DIRS) -c $< -o $@
clean:
- rm -rf *.o $(CRASH_BIN) $(TEST_BINS)
+ rm -rf *.o $(CRASH_BIN) $(TEST_BINS) $(CRASH_LIB)
« no previous file with comments | « DEPS ('k') | src/platform/crash/crash_dumper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698