From 2a18f064ce05f9d3784902cb1714250011cf2d7d Mon Sep 17 00:00:00 2001 From: jimblandy Date: Thu, 1 Apr 2010 22:57:06 +0000 Subject: Breakpad Linux dumper: Generate make dependencies on header files automatically. The Linux dumper's Makefile doesn't record the object files' dependence on header files at all, just because I was too lazy to write them out and knew I would forget to keep them up to date anyway. But I've wasted too much time tracking down mysterious segmentation faults and other problems after changing header files, and I know it's wasted others' time, too. a=jimblandy, r=nealsid,dmuir git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@563 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/tools/linux/dump_syms/Makefile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/tools/linux/dump_syms/Makefile b/src/tools/linux/dump_syms/Makefile index 3629cb46..76cbf2c1 100644 --- a/src/tools/linux/dump_syms/Makefile +++ b/src/tools/linux/dump_syms/Makefile @@ -338,16 +338,20 @@ clean:: $(CPP_EXECUTABLES): %: %.o $(CXX) $(CXXFLAGS) $(COVERAGE_LDFLAGS) $(LDFLAGS) -o $@ $^ -# These flags are required for breakpad sources to compile correctly. -BREAKPAD_CPPFLAGS = -I$(SRC) -D_REENTRANT +# 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 + +# Bring in whatever dependency files we have generated by compiling with -MMD. +-include *.d %.o: %.cc - $(CXX) -c $^ -o $@ $(CPPFLAGS) $(BREAKPAD_CPPFLAGS) $(CXXFLAGS) + $(CXX) -c $< -o $@ $(CPPFLAGS) $(BREAKPAD_CPPFLAGS) $(CXXFLAGS) %.o: %.c - $(CC) -c $^ -o $@ $(CPPFLAGS) $(BREAKPAD_CPPFLAGS) $(CFLAGS) + $(CC) -c $< -o $@ $(CPPFLAGS) $(BREAKPAD_CPPFLAGS) $(CFLAGS) clean:: - rm -f *.o core + rm -f *.o *.d core ### Generic testing rules. -- cgit v1.2.1