mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 12:28:09 +01:00
3bd4a2eaaa
Having to enumerate all the enum values at every switch is annoying, but this warning actually found a bug, (missing support for NOTMUCH_STATUS_OUT_OF_MEMORY in notmuch_status_to_string).
42 lines
903 B
Makefile
42 lines
903 B
Makefile
PROGS=notmuch
|
|
|
|
CXXWARNINGS_FLAGS=-Wall -Wextra -Wmissing-declarations -Wwrite-strings \
|
|
-Wswitch-enum
|
|
CWARNINGS_FLAGS=$(CXXWARNINGS_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`
|
|
|
|
MODULES= \
|
|
notmuch.o \
|
|
database.o \
|
|
date.o \
|
|
message.o \
|
|
message-file.o \
|
|
query.o \
|
|
sha1.o \
|
|
libsha1.o \
|
|
xutil.o
|
|
|
|
all: $(PROGS)
|
|
|
|
%.o: %.cc
|
|
$(CXX) -c $(CFLAGS) $(CXXFLAGS) $(MYCXXFLAGS) $< -o $@
|
|
|
|
%.o: %.c
|
|
$(CC) -c $(CFLAGS) $(MYCFLAGS) $< -o $@
|
|
|
|
notmuch: $(MODULES)
|
|
$(CC) $(MYLDFLAGS) $^ -o $@
|
|
|
|
Makefile.dep: *.c *.cc
|
|
$(CC) -M $(CPPFLAGS) $(CDEPENDS_FLAGS) $^ > $@
|
|
-include Makefile.dep
|
|
|
|
clean:
|
|
rm -f $(PROGS) *.o Makefile.dep
|