aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-04-01 22:57:06 +0000
committerjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-04-01 22:57:06 +0000
commit2a18f064ce05f9d3784902cb1714250011cf2d7d (patch)
tree4d9ac552caaae6116bbb93aaaaec6c7c8464d9a8 /src
parentBreakpad Linux dumper: Include filename in error messages. (diff)
downloadbreakpad-2a18f064ce05f9d3784902cb1714250011cf2d7d.tar.xz
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
Diffstat (limited to 'src')
-rw-r--r--src/tools/linux/dump_syms/Makefile14
1 files changed, 9 insertions, 5 deletions
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.