2009-11-18 00:23:42 +01:00
|
|
|
# Default FLAGS, (can be overridden by user such as "make CFLAGS=-O2")
|
2009-10-26 00:07:46 +01:00
|
|
|
WARN_FLAGS=-Wall -Wextra -Wmissing-declarations -Wwrite-strings -Wswitch-enum
|
2009-11-10 17:36:41 +01:00
|
|
|
CFLAGS=-O2
|
2009-10-25 23:19:36 +01:00
|
|
|
|
2009-11-10 17:27:48 +01:00
|
|
|
# Additional flags that we will append to whatever the user set.
|
|
|
|
# These aren't intended for the user to manipulate.
|
2009-11-18 12:34:54 +01:00
|
|
|
extra_cflags := $(shell pkg-config --cflags glib-2.0 gmime-2.4 talloc)
|
|
|
|
extra_cxxflags := $(shell xapian-config --cxxflags)
|
2009-10-25 23:19:36 +01:00
|
|
|
|
2009-11-19 22:20:01 +01:00
|
|
|
emacs_lispdir := $(shell pkg-config emacs --variable sitepkglispdir)
|
2009-11-20 13:07:42 +01:00
|
|
|
# Hard-code if this system doesn't have an emacs.pc file
|
|
|
|
ifeq ($(emacs_lispdir),)
|
|
|
|
emacs_lispdir = $(prefix)/share/site-lisp
|
|
|
|
endif
|
2009-11-19 22:20:01 +01:00
|
|
|
|
2009-11-10 17:27:48 +01:00
|
|
|
# Now smash together user's values with our extra values
|
2009-11-10 17:34:54 +01:00
|
|
|
override CFLAGS += $(WARN_FLAGS) $(extra_cflags)
|
|
|
|
override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags)
|
notmuch: Start actually adding messages to the index.
This is the beginning of the notmuch library as well, with its
interface in notmuch.h. So far we've got create, open, close, and
add_message (all with a notmuch_database prefix).
The current add_message function has already been whittled down from
what we have in notmuch-index-message to add only references,
message-id, and thread-id to the index, (that is---just enough to do
thread-linkage but nothing for full-text searching).
The concept here is to do something quickly so that the user can get
some data into notmuch and start using it. (The most interesting stuff
is then thread-linkage and labels like inbox and unread.) We can
defer the full-text indexing of the body of the messages for later,
(such as in the background while the user is reading mail).
The initial thread-stitching step is still slower than I would like.
We may have to stop using libgmime for this step as its overhead is
not worth it for the simple case of just parsing the message-id,
references, and in-reply-to headers.
2009-10-19 05:56:30 +02:00
|
|
|
|
2009-11-18 12:34:54 +01:00
|
|
|
override LDFLAGS += \
|
|
|
|
$(shell pkg-config --libs glib-2.0 gmime-2.4 talloc) \
|
|
|
|
$(shell xapian-config --libs)
|
2009-10-13 00:50:02 +02:00
|
|
|
|
2009-11-18 00:23:42 +01:00
|
|
|
# Include our local Makefile.local first so that its first target is default
|
2009-11-10 16:14:49 +01:00
|
|
|
include Makefile.local
|
|
|
|
include lib/Makefile.local
|
2009-10-13 00:50:02 +02:00
|
|
|
|
2009-11-17 22:05:16 +01:00
|
|
|
# And get user settings from the output of configure
|
|
|
|
include Makefile.config
|
|
|
|
|
notmuch: Start actually adding messages to the index.
This is the beginning of the notmuch library as well, with its
interface in notmuch.h. So far we've got create, open, close, and
add_message (all with a notmuch_database prefix).
The current add_message function has already been whittled down from
what we have in notmuch-index-message to add only references,
message-id, and thread-id to the index, (that is---just enough to do
thread-linkage but nothing for full-text searching).
The concept here is to do something quickly so that the user can get
some data into notmuch and start using it. (The most interesting stuff
is then thread-linkage and labels like inbox and unread.) We can
defer the full-text indexing of the body of the messages for later,
(such as in the background while the user is reading mail).
The initial thread-stitching step is still slower than I would like.
We may have to stop using libgmime for this step as its overhead is
not worth it for the simple case of just parsing the message-id,
references, and in-reply-to headers.
2009-10-19 05:56:30 +02:00
|
|
|
%.o: %.cc
|
2009-11-10 17:27:48 +01:00
|
|
|
$(CXX) -c $(CFLAGS) $(CXXFLAGS) $< -o $@
|
notmuch: Start actually adding messages to the index.
This is the beginning of the notmuch library as well, with its
interface in notmuch.h. So far we've got create, open, close, and
add_message (all with a notmuch_database prefix).
The current add_message function has already been whittled down from
what we have in notmuch-index-message to add only references,
message-id, and thread-id to the index, (that is---just enough to do
thread-linkage but nothing for full-text searching).
The concept here is to do something quickly so that the user can get
some data into notmuch and start using it. (The most interesting stuff
is then thread-linkage and labels like inbox and unread.) We can
defer the full-text indexing of the body of the messages for later,
(such as in the background while the user is reading mail).
The initial thread-stitching step is still slower than I would like.
We may have to stop using libgmime for this step as its overhead is
not worth it for the simple case of just parsing the message-id,
references, and in-reply-to headers.
2009-10-19 05:56:30 +02:00
|
|
|
|
|
|
|
%.o: %.c
|
2009-11-10 17:27:48 +01:00
|
|
|
$(CC) -c $(CFLAGS) $< -o $@
|
notmuch: Start actually adding messages to the index.
This is the beginning of the notmuch library as well, with its
interface in notmuch.h. So far we've got create, open, close, and
add_message (all with a notmuch_database prefix).
The current add_message function has already been whittled down from
what we have in notmuch-index-message to add only references,
message-id, and thread-id to the index, (that is---just enough to do
thread-linkage but nothing for full-text searching).
The concept here is to do something quickly so that the user can get
some data into notmuch and start using it. (The most interesting stuff
is then thread-linkage and labels like inbox and unread.) We can
defer the full-text indexing of the body of the messages for later,
(such as in the background while the user is reading mail).
The initial thread-stitching step is still slower than I would like.
We may have to stop using libgmime for this step as its overhead is
not worth it for the simple case of just parsing the message-id,
references, and in-reply-to headers.
2009-10-19 05:56:30 +02:00
|
|
|
|
2009-11-19 22:20:01 +01:00
|
|
|
%.elc: %.el
|
|
|
|
emacs -batch -f batch-byte-compile $<
|
|
|
|
|
2009-11-10 17:04:54 +01:00
|
|
|
.deps/%.d: %.c
|
|
|
|
@set -e; rm -f $@; mkdir -p $$(dirname $@) ; \
|
2009-11-10 17:27:48 +01:00
|
|
|
$(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \
|
2009-11-13 07:24:55 +01:00
|
|
|
sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \
|
2009-11-10 17:04:54 +01:00
|
|
|
rm -f $@.$$$$
|
|
|
|
|
|
|
|
.deps/%.d: %.cc
|
|
|
|
@set -e; rm -f $@; mkdir -p $$(dirname $@) ; \
|
2009-11-10 17:27:48 +01:00
|
|
|
$(CXX) -M $(CPPFLAGS) $(CXXFLAGS) $< > $@.$$$$; \
|
2009-11-13 07:24:55 +01:00
|
|
|
sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \
|
2009-11-10 17:04:54 +01:00
|
|
|
rm -f $@.$$$$
|
|
|
|
|
|
|
|
DEPS := $(SRCS:%.c=.deps/%.d)
|
|
|
|
DEPS := $(DEPS:%.cc=.deps/%.d)
|
|
|
|
-include $(DEPS)
|
2009-10-30 20:00:55 +01:00
|
|
|
|
2009-10-13 00:50:02 +02:00
|
|
|
clean:
|
2009-11-10 17:04:54 +01:00
|
|
|
rm -f $(CLEAN); rm -rf .deps
|