aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2009-09-18 20:43:35 +0000
committernealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2009-09-18 20:43:35 +0000
commitce9178abaa98dfdc516b40559c6f735fb6e37926 (patch)
treeaebff026c528555611326af1c3ab13c1577f5a68 /src
parentIssue 328 - should have constant for VC++ exceptions, and stringify in Minidu... (diff)
downloadbreakpad-ce9178abaa98dfdc516b40559c6f735fb6e37926.tar.xz
A better makefile for building the Linux client.
http://breakpad.appspot.com/29003 A=nealsid R=chris masone git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@400 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src')
-rw-r--r--src/client/linux/Makefile51
-rw-r--r--src/client/linux/handler/Makefile45
2 files changed, 51 insertions, 45 deletions
diff --git a/src/client/linux/Makefile b/src/client/linux/Makefile
new file mode 100644
index 00000000..a34187f2
--- /dev/null
+++ b/src/client/linux/Makefile
@@ -0,0 +1,51 @@
+CXX=g++
+CC=gcc
+
+CXXFLAGS=-gstabs+ -I../../ -I../../testing/gtest/include -I../../testing/include -I../../testing/gtest -D_REENTRANT -m32
+CFLAGS=$(CXXFLAGS)
+LDFLAGS=-lpthread
+
+OBJ_DIR=.
+BIN_DIR=.
+
+LIB_CC_SRC=handler/exception_handler.cc \
+ minidump_writer/linux_dumper.cc \
+ minidump_writer/minidump_writer.cc \
+ ../minidump_file_writer.cc \
+ ../../common/string_conversion.cc \
+ ../../common/linux/guid_creator.cc
+
+LIB_C_SRC = ../../common/convert_UTF.c
+
+LIB_CC_OBJ=$(patsubst %.cc, $(OBJ_DIR)/%.o,$(LIB_CC_SRC))
+LIB_C_OBJ=$(patsubst %.c, $(OBJ_DIR)/%.o, $(LIB_C_SRC))
+
+TEST_CC_SRC=handler/exception_handler_unittest.cc \
+ minidump_writer/directory_reader_unittest.cc \
+ minidump_writer/line_reader_unittest.cc \
+ minidump_writer/linux_dumper_unittest.cc \
+ minidump_writer/minidump_writer_unittest.cc \
+ ../../testing/gtest/src/gtest_main.cc \
+ ../../testing/gtest/src/gtest-all.cc
+
+TEST_CC_OBJ=$(patsubst %.cc, $(OBJ_DIR)/%.o,$(TEST_CC_SRC))
+
+UNITTEST_BIN=$(BIN_DIR)/linux_client_test
+
+BREAKPAD_LIBRARY=$(BIN_DIR)/libbreakpad.a
+
+.PHONY:all clean
+
+all:$(BREAKPAD_LIBRARY) $(UNITTEST_BIN)
+
+check:$(UNITTEST_BIN)
+ $(UNITTEST_BIN)
+
+$(BIN_DIR)/libbreakpad.a:$(LIB_CC_OBJ) $(LIB_C_OBJ)
+ $(AR) rcs $@ $^
+
+$(BIN_DIR)/linux_client_test:$(TEST_CC_OBJ) $(BREAKPAD_LIBRARY)
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@
+
+clean:
+ rm -f $(UNITTEST_BIN) $(BREAKPAD_LIBRARY) $(LIB_CC_OBJ) $(LIB_C_OBJ) $(TEST_CC_OBJ) core
diff --git a/src/client/linux/handler/Makefile b/src/client/linux/handler/Makefile
deleted file mode 100644
index 7fcf1b21..00000000
--- a/src/client/linux/handler/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-CXX=g++
-CC=gcc
-
-CXXFLAGS=-gstabs+ -I../../../ -I../../../testing/gtest/include -I../../../testing/include -I../../../testing/gtest -D_REENTRANT -m32
-CFLAGS=$(CXXFLAGS)
-LDFLAGS=-lpthread
-
-OBJ_DIR=.
-BIN_DIR=.
-
-TEST_CC_SRC=exception_handler_unittest.cc \
- exception_handler.cc \
- ../../../testing/gtest/src/gtest-all.cc \
- ../../../common/linux/guid_creator.cc \
- ../minidump_writer/minidump_writer.cc \
- ../../minidump_file_writer.cc \
- ../minidump_writer/linux_dumper.cc \
- ../../../testing/gtest/src/gtest_main.cc \
- ../../../common/string_conversion.cc \
- ../minidump_writer/directory_reader_unittest.cc \
- ../minidump_writer/line_reader_unittest.cc \
- ../minidump_writer/linux_dumper_unittest.cc \
- ../minidump_writer/minidump_writer_unittest.cc
-
-TEST_C_SRC = ../../../common/convert_UTF.c
-
-TEST_CC_OBJ=$(patsubst %.cc, $(OBJ_DIR)/%.o,$(TEST_CC_SRC))
-TEST_C_OBJ=$(patsubst %.c, $(OBJ_DIR)/%.o, $(TEST_C_SRC))
-
-LINUX_CLIENT_BIN=$(BIN_DIR)/linux_client_test
-
-BIN=$(LINUX_CLIENT_BIN)
-
-.PHONY:all clean
-
-check:$(BIN)
- $(LINUX_CLIENT_BIN)
-
-all:$(BIN)
-
-$(BIN_DIR)/linux_client_test:$(TEST_CC_OBJ) $(TEST_C_OBJ)
- $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@
-
-clean:
- rm -f $(BIN) $(TEST_CC_OBJ) $(TEST_C_OBJ)