Make programs in src/tools/linux build via the automake build system

R=jimb at http://breakpad.appspot.com/265001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@775 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
ted.mielczarek 2011-02-28 14:05:22 +00:00
parent d2b6b9ae82
commit dbf409ca20
10 changed files with 1254 additions and 478 deletions

View file

@ -677,10 +677,10 @@ void CUFixtureBase::TestLine(int i, int j,
#define TestLineCount(a,b) TRACE(TestLineCount((a),(b)))
#define TestLine(a,b,c,d,e,f) TRACE(TestLine((a),(b),(c),(d),(e),(f)))
class Simple: public CUFixtureBase, public Test {
class SimpleCU: public CUFixtureBase, public Test {
};
TEST_F(Simple, OneFunc) {
TEST_F(SimpleCU, OneFunc) {
PushLine(0x938cf8c07def4d34ULL, 0x55592d727f6cd01fLL, "line-file", 246571772);
StartCU();
@ -695,7 +695,7 @@ TEST_F(Simple, OneFunc) {
246571772);
}
TEST_F(Simple, IrrelevantRootChildren) {
TEST_F(SimpleCU, IrrelevantRootChildren) {
StartCU();
dwarf2reader::AttributeList no_attrs;
EXPECT_FALSE(root_handler_
@ -703,7 +703,7 @@ TEST_F(Simple, IrrelevantRootChildren) {
dwarf2reader::DW_TAG_lexical_block, no_attrs));
}
TEST_F(Simple, IrrelevantNamedScopeChildren) {
TEST_F(SimpleCU, IrrelevantNamedScopeChildren) {
StartCU();
dwarf2reader::AttributeList no_attrs;
DIEHandler *class_A_handler
@ -717,7 +717,7 @@ TEST_F(Simple, IrrelevantNamedScopeChildren) {
}
// Verify that FileContexts can safely be deleted unused.
TEST_F(Simple, UnusedFileContext) {
TEST_F(SimpleCU, UnusedFileContext) {
Module m("module-name", "module-os", "module-arch", "module-id");
DwarfCUToModule::FileContext fc("dwarf-filename", &m);
@ -725,7 +725,7 @@ TEST_F(Simple, UnusedFileContext) {
reporter_.SetCUName("compilation-unit-name");
}
TEST_F(Simple, InlineFunction) {
TEST_F(SimpleCU, InlineFunction) {
PushLine(0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL, "line-file", 75173118);
StartCU();
@ -740,7 +740,7 @@ TEST_F(Simple, InlineFunction) {
0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL);
}
TEST_F(Simple, InlineFunctionSignedAttribute) {
TEST_F(SimpleCU, InlineFunctionSignedAttribute) {
PushLine(0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL, "line-file", 75173118);
StartCU();
@ -759,7 +759,7 @@ TEST_F(Simple, InlineFunctionSignedAttribute) {
// Any DIE with an DW_AT_inline attribute can be cited by
// DW_AT_abstract_origin attributes --- even if the value of the
// DW_AT_inline attribute is DW_INL_not_inlined.
TEST_F(Simple, AbstractOriginNotInlined) {
TEST_F(SimpleCU, AbstractOriginNotInlined) {
PushLine(0x2805c4531be6ca0eULL, 0x686b52155a8d4d2cULL, "line-file", 6111581);
StartCU();
@ -774,7 +774,7 @@ TEST_F(Simple, AbstractOriginNotInlined) {
0x2805c4531be6ca0eULL, 0x686b52155a8d4d2cULL);
}
TEST_F(Simple, UnknownAbstractOrigin) {
TEST_F(SimpleCU, UnknownAbstractOrigin) {
EXPECT_CALL(reporter_, UnknownAbstractOrigin(_, 1ULL)).WillOnce(Return());
PushLine(0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL, "line-file", 75173118);
@ -1556,9 +1556,9 @@ TEST_F(Specifications, PreferSpecificationParents) {
0xbbd9d54dce3b95b7ULL, 0x39188b7b52b0899fULL);
}
class Errors: public CUFixtureBase, public Test { };
class CUErrors: public CUFixtureBase, public Test { };
TEST_F(Errors, BadStmtList) {
TEST_F(CUErrors, BadStmtList) {
EXPECT_CALL(reporter_, BadLineInfoOffset(dummy_line_size_ + 10)).Times(1);
ASSERT_TRUE(root_handler_
@ -1582,7 +1582,7 @@ TEST_F(Errors, BadStmtList) {
root_handler_.Finish();
}
TEST_F(Errors, NoLineSection) {
TEST_F(CUErrors, NoLineSection) {
EXPECT_CALL(reporter_, MissingSection(".debug_line")).Times(1);
PushLine(0x88507fb678052611ULL, 0x42c8e9de6bbaa0faULL, "line-file", 64472290);
// Delete the entry for .debug_line added by the fixture class's constructor.
@ -1592,7 +1592,7 @@ TEST_F(Errors, NoLineSection) {
root_handler_.Finish();
}
TEST_F(Errors, BadDwarfVersion1) {
TEST_F(CUErrors, BadDwarfVersion1) {
// Kludge: satisfy reporter_'s expectation.
reporter_.SetCUName("compilation-unit-name");
@ -1601,7 +1601,7 @@ TEST_F(Errors, BadDwarfVersion1) {
0xc9de224ccb99ac3eULL, 1));
}
TEST_F(Errors, GoodDwarfVersion2) {
TEST_F(CUErrors, GoodDwarfVersion2) {
// Kludge: satisfy reporter_'s expectation.
reporter_.SetCUName("compilation-unit-name");
@ -1610,7 +1610,7 @@ TEST_F(Errors, GoodDwarfVersion2) {
0xc9de224ccb99ac3eULL, 2));
}
TEST_F(Errors, GoodDwarfVersion3) {
TEST_F(CUErrors, GoodDwarfVersion3) {
// Kludge: satisfy reporter_'s expectation.
reporter_.SetCUName("compilation-unit-name");
@ -1619,7 +1619,7 @@ TEST_F(Errors, GoodDwarfVersion3) {
0xc9de224ccb99ac3eULL, 3));
}
TEST_F(Errors, BadCURootDIETag) {
TEST_F(CUErrors, BadCURootDIETag) {
// Kludge: satisfy reporter_'s expectation.
reporter_.SetCUName("compilation-unit-name");

View file

@ -38,7 +38,7 @@ using google_breakpad::DwarfLineToModule;
using google_breakpad::Module;
using google_breakpad::Module;
TEST(Simple, One) {
TEST(SimpleModule, One) {
Module m("name", "os", "architecture", "id");
vector<Module::Line> lines;
DwarfLineToModule h(&m, &lines);
@ -59,7 +59,7 @@ TEST(Simple, One) {
EXPECT_EQ(0x4c090cbf, lines[0].number);
}
TEST(Simple, Many) {
TEST(SimpleModule, Many) {
Module m("name", "os", "architecture", "id");
vector<Module::Line> lines;
DwarfLineToModule h(&m, &lines);
@ -196,7 +196,7 @@ TEST(Filenames, StrangeDirectoryAndFile) {
// We should silently ignore attempts to define directory number zero,
// since that is always the compilation directory.
TEST(Errors, DirectoryZero) {
TEST(ModuleErrors, DirectoryZero) {
Module m("name", "os", "architecture", "id");
vector<Module::Line> lines;
DwarfLineToModule h(&m, &lines);
@ -212,7 +212,7 @@ TEST(Errors, DirectoryZero) {
// We should refuse to add lines with bogus file numbers. We should
// produce only one warning, however.
TEST(Errors, BadFileNumber) {
TEST(ModuleErrors, BadFileNumber) {
Module m("name", "os", "architecture", "id");
vector<Module::Line> lines;
DwarfLineToModule h(&m, &lines);
@ -226,7 +226,7 @@ TEST(Errors, BadFileNumber) {
// We should treat files with bogus directory numbers as relative to
// the compilation unit.
TEST(Errors, BadDirectoryNumber) {
TEST(ModuleErrors, BadDirectoryNumber) {
Module m("name", "os", "architecture", "id");
vector<Module::Line> lines;
DwarfLineToModule h(&m, &lines);
@ -241,7 +241,7 @@ TEST(Errors, BadDirectoryNumber) {
}
// We promise not to report empty lines.
TEST(Errors, EmptyLine) {
TEST(ModuleErrors, EmptyLine) {
Module m("name", "os", "architecture", "id");
vector<Module::Line> lines;
DwarfLineToModule h(&m, &lines);
@ -254,7 +254,7 @@ TEST(Errors, EmptyLine) {
// We are supposed to clip lines that extend beyond the end of the
// address space.
TEST(Errors, BigLine) {
TEST(ModuleErrors, BigLine) {
Module m("name", "os", "architecture", "id");
vector<Module::Line> lines;
DwarfLineToModule h(&m, &lines);

View file

@ -49,6 +49,10 @@
#include <stddef.h>
#include <stdint.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef HAVE_A_OUT_H
#include <a.out.h>
#endif

View file

@ -3,9 +3,39 @@
/* actual length of specific struct sockaddr */
#undef GET_SA_LEN
/* Define to 1 if you have the <a.out.h> header file. */
#undef HAVE_A_OUT_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define if you have POSIX threads libraries and header files. */
#undef HAVE_PTHREAD
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O

View file

@ -1,410 +0,0 @@
# Build all executables.
all::
# Delete all generated files: executables, object files, test coverage
# reports, etc.
clean::
# Run all tests.
# You can run a specific test FOO with the command: 'make check-FOO'.
check:
# Generate coverage reports for the execution that has taken place
# since the coverage data files were last deleted. Only files that
# have been added to COVERAGE_SOURCES (see below) get reported on.
coverage:
# Reset all coverage counts. When coverage is enabled, each time you
# run the program, it adds its execution counts into the profiling
# data files in the build directory. 'make coverage-reset' deletes
# those files, so the counts reported by 'make coverage' start from
# zero again. Note that 'make clean' does this automatically.
coverage-reset:
.PHONY: all clean check coverage coverage-reset
### Variables that are useful to override on the command line.
CC = gcc
CXX = g++
CXXFLAGS = -g3 -O2 -Wall -m32
# To produce test coverage reports:
# 1) Build all .o files and executables without optimization and with
# 'COVERAGE=1' on the make command line.
# 2) Run the tests.
# 3) Do 'make coverage'.
# All in one command:
# $ make CFLAGS='-O0' CXXFLAGS='-O0' COVERAGE=1 clean check coverage
COVERAGE=
# A wrapper for running 'make check' targets. This is inserted before
# the test executable name in the commands for 'check' targets. So if
# 'make check' would normally execute some test program with the
# command:
#
# SOME_ENV_VAR=value ./some-test-executable test-args
#
# then setting TEST_WRAPPER to 'valgrind' (say) would have 'make
# check' run the this command line:
#
# SOME_ENV_VAR=value valgrind ./some-test-executable test-args
TEST_WRAPPER=
# Arguments to pass to the test programs.
TEST_ARGS=
### Variables used internally by this Makefile.
# The top of the breakpad source tree.
SRC = ../../..
# A list of the executables that we should use the C++ compiler to
# link. GNU make's default executable-from-object rule uses $(CC),
# which doesn't include libstdc++, and perhaps does some other things
# wrong as well. Every executable listed in this variable uses the
# pattern rule provided at the bottom, which links all the
# dependencies using $(CXX). Value accumulated throughout the file.
CPP_EXECUTABLES =
# Add the names of source files whose coverage you'd like 'make
# coverage' to report on to this variable. Value accumulated
# throughout the file.
COVERAGE_SOURCES =
### dump_syms: a program to produce Breakpad symbol files from the
### debugging information in Linux executables.
all:: dump_syms
dump_syms: \
bytereader.o \
dump_symbols.o \
dump_syms.o \
dwarf2diehandler.o \
dwarf2reader.o \
dwarf_cfi_to_module.o \
dwarf_cu_to_module.o \
dwarf_line_to_module.o \
file_id.o \
language.o \
module.o \
stabs_reader.o \
stabs_to_module.o \
$(empty)
CPP_EXECUTABLES += dump_syms
clean::
rm -f dump_syms
dump_syms.o: dump_syms.cc
VPATH += $(SRC)/common
dwarf_cfi_to_module.o: dwarf_cfi_to_module.cc
COVERAGE_SOURCES += dwarf_cfi_to_module.cc
dwarf_cu_to_module.o: dwarf_cu_to_module.cc
COVERAGE_SOURCES += dwarf_cu_to_module.cc
dwarf_line_to_module.o: dwarf_line_to_module.cc
COVERAGE_SOURCES += dwarf_line_to_module.cc
language.o: language.cc
module.o: module.cc
COVERAGE_SOURCES += module.cc
stabs_reader.o: stabs_reader.cc
COVERAGE_SOURCES += stabs_reader.cc
stabs_to_module.o: stabs_to_module.cc
COVERAGE_SOURCES += stabs_to_module.cc
VPATH += $(SRC)/common/linux
dump_symbols.o: dump_symbols.cc
file_id.o: file_id.cc
VPATH += $(SRC)/common/dwarf
bytereader.o: bytereader.cc
COVERAGE_SOURCES += bytereader.cc
cfi_assembler.o: cfi_assembler.cc
dwarf2diehandler.o: dwarf2diehandler.cc
COVERAGE_SOURCES += dwarf2diehandler.cc
dwarf2reader.o: dwarf2reader.cc
COVERAGE_SOURCES += dwarf2reader.cc
### Google C++ Testing Framework.
VPATH += $(SRC)/testing/gtest/src
GTEST_CPPFLAGS = -I$(SRC)/testing/gtest/include -I$(SRC)/testing/gtest
gtest-all.o: gtest-all.cc
gtest_main.o: gtest_main.cc
gtest-all.o gtest_main.o: override CPPFLAGS += $(GTEST_CPPFLAGS)
### Google C++ Mocking Framework.
VPATH += $(SRC)/testing/src
GMOCK_CPPFLAGS = -I$(SRC)/testing -I$(SRC)/testing/include
gmock-all.o: gmock-all.cc
gmock-all.o: override CPPFLAGS += $(GTEST_CPPFLAGS) $(GMOCK_CPPFLAGS)
### google_breakpad::TestAssembler, for constructing binary test data
VPATH += $(SRC)/common
test_assembler.o: test_assembler.cc
test_assembler.o: override CPPFLAGS += $(TEST_ASSEMBLER_CPPFLAGS)
### Unit tests for google_breakpad::StabsReader.
check: check-stabs_reader_unittest
check-stabs_reader_unittest: stabs_reader_unittest
stabs_reader_unittest: \
gmock-all.o \
gtest-all.o \
gtest_main.o \
stabs_reader.o \
test_assembler.o \
$(empty)
CPP_EXECUTABLES += stabs_reader_unittest
stabs_reader_unittest.o: stabs_reader_unittest.cc
stabs_reader_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
$(GMOCK_CPPFLAGS)
clean::
rm -f stabs_reader_unittest
### Unit tests for google_breakpad::FileID.
check: check-file_id_unittest
check-file_id_unittest: file_id_unittest
file_id_unittest: \
file_id.o \
gmock-all.o \
gtest-all.o \
gtest_main.o \
$(empty)
CPP_EXECUTABLES += file_id_unittest
file_id_unittest.o: file_id_unittest.cc
file_id_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
$(GMOCK_CPPFLAGS)
clean::
rm -f file_id_unittest
### Unit tests for google_breakpad::Module.
check: check-module_unittest
check-module_unittest: module_unittest
module_unittest: \
gmock-all.o \
gtest-all.o \
gtest_main.o \
module.o \
module_unittest.o \
$(empty)
CPP_EXECUTABLES += module_unittest
module_unittest.o: module_unittest.cc
module_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) $(GMOCK_CPPFLAGS)
clean::
rm -f module_unittest
### Unit tests for google_breakpad::DumpStabsHandler.
check: check-stabs_to_module_unittest
check-stabs_to_module_unittest: stabs_to_module_unittest
stabs_to_module_unittest: \
gtest-all.o \
gtest_main.o \
module.o \
stabs_to_module.o \
stabs_to_module_unittest.o \
$(empty)
CPP_EXECUTABLES += stabs_to_module_unittest
stabs_to_module_unittest.o: stabs_to_module_unittest.cc
stabs_to_module_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
$(GMOCK_CPPFLAGS)
clean::
rm -f stabs_to_module_unittest
### Unit tests for dwarf2reader::DwarfDIEDispatcher.
check: check-dwarf2diehandler_unittest
check-dwarf2diehandler_unittest: dwarf2diehandler_unittest
dwarf2diehandler_unittest: \
dwarf2diehandler.o \
gmock-all.o \
gtest-all.o \
gtest_main.o \
$(empty)
CPP_EXECUTABLES += dwarf2diehandler_unittest
dwarf2diehandler_unittest.o: dwarf2diehandler_unittest.cc
dwarf2diehandler_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
$(GMOCK_CPPFLAGS)
clean::
rm -f dwarf2diehandler_unittest
### Unit tests for google_breakpad::DwarfLineToModule.
check: check-dwarf_line_to_module_unittest
check-dwarf_line_to_module_unittest: dwarf_line_to_module_unittest
dwarf_line_to_module_unittest: \
dwarf_line_to_module.o \
gtest-all.o \
gtest_main.o \
module.o \
$(empty)
CPP_EXECUTABLES += dwarf_line_to_module_unittest
dwarf_line_to_module_unittest.o: dwarf_line_to_module_unittest.cc
dwarf_line_to_module_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
$(GMOCK_CPPFLAGS)
clean::
rm -f dwarf_line_to_module_unittest
### Unit tests for google_breakpad::DwarfCUToModule.
check: check-dwarf_cu_to_module_unittest
check-dwarf_cu_to_module_unittest: dwarf_cu_to_module_unittest
dwarf_cu_to_module_unittest: \
dwarf_cu_to_module.o \
gmock-all.o \
gtest-all.o \
gtest_main.o \
language.o \
module.o \
$(empty)
CPP_EXECUTABLES += dwarf_cu_to_module_unittest
dwarf_cu_to_module_unittest.o: dwarf_cu_to_module_unittest.cc
dwarf_cu_to_module_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
$(GMOCK_CPPFLAGS)
clean::
rm -f dwarf_cu_to_module_unittest
### Unit tests for dwarf2reader::CallFrameInfo.
check: check-dwarf2reader_cfi_unittest
check-dwarf2reader_cfi_unittest: dwarf2reader_cfi_unittest
dwarf2reader_cfi_unittest: \
bytereader.o \
cfi_assembler.o \
dwarf2reader.o \
gmock-all.o \
gtest-all.o \
gtest_main.o \
test_assembler.o \
$(empty)
CPP_EXECUTABLES += dwarf2reader_cfi_unittest
dwarf2reader_cfi_unittest.o: dwarf2reader_cfi_unittest.cc
dwarf2reader_cfi_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
$(GMOCK_CPPFLAGS) \
$(TEST_ASSEMBLER_CPPFLAGS)
clean::
rm -f dwarf2reader_cfi_unittest
### Unit tests for google_breakpad::DwarfCFIToModule.
check: check-dwarf_cfi_to_module_unittest
check-dwarf_cfi_to_module_unittest: dwarf_cfi_to_module_unittest
dwarf_cfi_to_module_unittest: \
dwarf_cfi_to_module.o \
gmock-all.o \
gtest-all.o \
gtest_main.o \
module.o \
$(empty)
CPP_EXECUTABLES += dwarf_cfi_to_module_unittest
dwarf_cfi_to_module_unittest.o: dwarf_cfi_to_module_unittest.cc
dwarf_cfi_to_module_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
$(GMOCK_CPPFLAGS)
clean::
rm -f dwarf_cfi_to_module_unittest
### Unit tests for google_breakpad::ByteReader
check: check-bytereader_unittest
check-bytereader_unittest: bytereader_unittest
bytereader_unittest: \
bytereader.o \
cfi_assembler.o \
gtest-all.o \
gtest_main.o \
test_assembler.o \
$(empty)
CPP_EXECUTABLES += bytereader_unittest
bytereader_unittest.o: bytereader_unittest.cc
bytereader_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
$(GMOCK_CPPFLAGS)
clean::
rm -f bytereader_unittest
### Unit tests for google_breakpad::ByteBuffer and google_breakpad::ByteCursor.
check: check-byte_cursor_unittest
check-byte_cursor_unittest: byte_cursor_unittest
byte_cursor_unittest: \
gmock-all.o \
gtest-all.o \
gtest_main.o \
$(empty)
CPP_EXECUTABLES += byte_cursor_unittest
VPATH += $(SRC)/common
byte_cursor_unittest.o: byte_cursor_unittest.cc
byte_cursor_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
$(GMOCK_CPPFLAGS)
COVERAGE_SOURCES += byte_cursor_unittest.cc
clean::
rm -f byte_cursor_unittest
### Generic compilation rules.
# Link C++ executables using the C++ compiler; see CPP_EXECUTABLES above.
$(CPP_EXECUTABLES): %: %.o
$(CXX) $(CXXFLAGS) $(COVERAGE_LDFLAGS) $(LDFLAGS) -o $@ $^
# Allow #include directives to refer to files below 'src'; generate
# dependency files automatically; and I doubt _REENTRANT is needed at all.
BREAKPAD_CPPFLAGS = -I$(SRC) -MMD -D_REENTRANT -DHAVE_A_OUT_H
# Bring in whatever dependency files we have generated by compiling with -MMD.
-include *.d
%.o: %.cc
$(CXX) -c $< -o $@ $(CPPFLAGS) $(BREAKPAD_CPPFLAGS) $(CXXFLAGS)
%.o: %.c
$(CC) -c $< -o $@ $(CPPFLAGS) $(BREAKPAD_CPPFLAGS) $(CFLAGS)
clean::
rm -f *.o *.d core
### Generic testing rules.
### To define a test, make the 'check' target depend on a particular
### target 'check-FOO' that runs your test, where FOO is the name of
### the test executable, or something else people will expect.
###
### This pattern rule provides commands for 'check-FOO' that are
### appropriate for Google C++ Testing Framework test programs. But
### you can provide your own commands.
check-%: %
$(TEST_WRAPPER) ./$< $(TEST_ARGS)
### Generic coverage reporting rules.
coverage:
gcov --branch-probabilities $(COVERAGE_SOURCES)
coverage-reset:
rm -f *.gcda
# If code coverage is enabled, pass the appropriate coverage flags to
# the compiler for the sources we care about.
ifdef COVERAGE
COVERAGE_C_SOURCES = $(filter %.c,$(COVERAGE_SOURCES))
$(COVERAGE_C_SOURCES:.c=.o): override CFLAGS += --coverage
COVERAGE_CXX_SOURCES = $(filter %.cc,$(COVERAGE_SOURCES))
$(COVERAGE_CXX_SOURCES:.cc=.o): override CXXFLAGS += --coverage
COVERAGE_LDFLAGS = --coverage
endif
clean:: coverage-reset
clean::
rm -f *.gcno *.gcov

View file

@ -1,24 +0,0 @@
CXX=g++
CXXFLAGS=-gstabs -I../../.. -Wall -D_REENTRANT
.PHONY:all clean
BIN=minidump_upload sym_upload
all:$(BIN)
DUMP_UPLOAD_OBJ=minidump_upload.o http_upload.o
SYM_UPLOAD_OBJ=sym_upload.o http_upload.o
minidump_upload:$(DUMP_UPLOAD_OBJ)
$(CXX) $(CXXFLAGS) -ldl -o $@ $^
sym_upload:$(SYM_UPLOAD_OBJ)
$(CXX) $(CXXFLAGS) -ldl -o $@ $^
http_upload.o:../../../common/linux/http_upload.cc
$(CXX) $(CXXFLAGS) `curl-config --cflags` -c $^
clean:
rm *.o $(BIN)