diff options
author | Carl Worth <cworth@cworth.org> | 2009-10-25 15:19:36 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-10-25 15:19:36 -0700 |
commit | 067c547b236133cacbe7192b99bcd5487a08f7c8 (patch) | |
tree | 39d6e1cb37a26ca6def5d909e6fc21634123e70e /Makefile | |
parent | be9e3ee3132457ea5936bd1225294bdfe3949a4c (diff) |
Rework Makefile just a bit to enable adding flags for more compiler warnings
We have to carefully separate the C and C++ flags here since a
bunch of the warnings options for gcc are valid for compiling C,
but not for C++.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1,7 +1,13 @@ PROGS=notmuch -MYCFLAGS=-Wall -O0 -g `pkg-config --cflags glib-2.0 talloc` -MYCXXFLAGS=$(MYCFLAGS) `xapian-config --cxxflags` +CXXWARNINGS_FLAGS=-Wall +CWARNINGS_FLAGS=$(CXX_WARNINGS_FLAGS) + +CDEPENDS_FLAGS=`pkg-config --cflags glib-2.0 talloc` +CXXDEPENDS_FLAGS=`pkg-config --cflags glib-2.0 talloc` `xapian-config --cxxflags` + +MYCFLAGS=$(CWARNINGS_FLAGS) -O0 -g $(CDEPENDS_FLAGS) +MYCXXFLAGS=$(CXXWARNINGS_FLAGS) -O0 -g $(CXXDEPENDS_FLAGS) MYLDFLAGS=`pkg-config --libs glib-2.0 talloc` `xapian-config --libs` @@ -28,7 +34,7 @@ notmuch: $(MODULES) $(CC) $(MYLDFLAGS) $^ -o $@ Makefile.dep: *.c *.cc - $(CC) -M $(CPPFLAGS) $(MYCFLAGS) $^ > $@ + $(CC) -M $(CPPFLAGS) $(CDEPENDS_FLAGS) $^ > $@ -include Makefile.dep clean: |