mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 19:08:09 +01:00
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++.
This commit is contained in:
parent
be9e3ee313
commit
067c547b23
1 changed files with 9 additions and 3 deletions
12
Makefile
12
Makefile
|
@ -1,7 +1,13 @@
|
||||||
PROGS=notmuch
|
PROGS=notmuch
|
||||||
|
|
||||||
MYCFLAGS=-Wall -O0 -g `pkg-config --cflags glib-2.0 talloc`
|
CXXWARNINGS_FLAGS=-Wall
|
||||||
MYCXXFLAGS=$(MYCFLAGS) `xapian-config --cxxflags`
|
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`
|
MYLDFLAGS=`pkg-config --libs glib-2.0 talloc` `xapian-config --libs`
|
||||||
|
|
||||||
|
@ -28,7 +34,7 @@ notmuch: $(MODULES)
|
||||||
$(CC) $(MYLDFLAGS) $^ -o $@
|
$(CC) $(MYLDFLAGS) $^ -o $@
|
||||||
|
|
||||||
Makefile.dep: *.c *.cc
|
Makefile.dep: *.c *.cc
|
||||||
$(CC) -M $(CPPFLAGS) $(MYCFLAGS) $^ > $@
|
$(CC) -M $(CPPFLAGS) $(CDEPENDS_FLAGS) $^ > $@
|
||||||
-include Makefile.dep
|
-include Makefile.dep
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
Loading…
Reference in a new issue