dir=lib extra_cflags += -I$(dir) libnotmuch_c_srcs = \ $(dir)/libsha1.c \ $(dir)/message-file.c \ $(dir)/messages.c \ $(dir)/sha1.c \ $(dir)/tags.c \ $(dir)/xutil.c libnotmuch_cxx_srcs = \ $(dir)/database.cc \ $(dir)/index.cc \ $(dir)/message.cc \ $(dir)/query.cc \ $(dir)/thread.cc libnotmuch_modules = $(libnotmuch_c_srcs:.c=.lo) $(libnotmuch_cxx_srcs:.cc=.lo) $(dir)/libnotmuch.la: $(libnotmuch_modules) $(call quiet,libtool) --mode=link $(CXX) -rpath $(DESTDIR)$(prefix)/lib -o $@ $^ SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs) CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/libnotmuch.la