mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 12:28:09 +01:00
2affed0851
We want to start using this from both message.cc and thread.cc so we need it in a place we can share the code. This also requires a new notmuch-private-cxx.h header file for interfaces that include C++-specific datatypes (such as Xapian::Document).
42 lines
889 B
Makefile
42 lines
889 B
Makefile
PROGS=notmuch
|
|
|
|
WARN_FLAGS=-Wall -Wextra -Wmissing-declarations -Wwrite-strings -Wswitch-enum
|
|
|
|
CDEPENDS_FLAGS=`pkg-config --cflags glib-2.0 talloc`
|
|
CXXDEPENDS_FLAGS=`pkg-config --cflags glib-2.0 talloc` `xapian-config --cxxflags`
|
|
|
|
MYCFLAGS=$(WARN_FLAGS) -O0 -g $(CDEPENDS_FLAGS)
|
|
MYCXXFLAGS=$(WARN_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 \
|
|
tags.o \
|
|
thread.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
|
|
$(CXX) -M $(CPPFLAGS) $(CDEPENDS_FLAGS) $(CXXDEPENDS_FLAGS) $^ > $@
|
|
-include Makefile.dep
|
|
|
|
clean:
|
|
rm -f $(PROGS) *.o Makefile.dep
|