2010-04-01 07:47:12 +02:00
|
|
|
SONAME = libnotmuch.so.1
|
|
|
|
|
2010-03-10 19:59:57 +01:00
|
|
|
dir := lib
|
2010-03-12 14:47:34 +01:00
|
|
|
extra_cflags += -I$(dir) -fPIC
|
2009-11-10 16:14:49 +01:00
|
|
|
|
2009-11-10 17:04:54 +01:00
|
|
|
libnotmuch_c_srcs = \
|
|
|
|
$(dir)/libsha1.c \
|
|
|
|
$(dir)/message-file.c \
|
2009-11-15 08:05:17 +01:00
|
|
|
$(dir)/messages.c \
|
2009-11-10 17:04:54 +01:00
|
|
|
$(dir)/sha1.c \
|
|
|
|
$(dir)/tags.c \
|
|
|
|
$(dir)/xutil.c
|
2009-11-10 16:14:49 +01:00
|
|
|
|
2009-11-10 17:04:54 +01:00
|
|
|
libnotmuch_cxx_srcs = \
|
|
|
|
$(dir)/database.cc \
|
2010-01-05 22:29:23 +01:00
|
|
|
$(dir)/directory.cc \
|
2009-11-10 17:04:54 +01:00
|
|
|
$(dir)/index.cc \
|
|
|
|
$(dir)/message.cc \
|
|
|
|
$(dir)/query.cc \
|
|
|
|
$(dir)/thread.cc
|
|
|
|
|
|
|
|
libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o)
|
2010-03-12 14:47:35 +01:00
|
|
|
|
|
|
|
$(dir)/$(SONAME) : $(libnotmuch_modules)
|
2010-03-12 14:47:34 +01:00
|
|
|
$(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -shared -Wl,-soname=$(SONAME) -o $@
|
2010-03-12 14:47:35 +01:00
|
|
|
|
|
|
|
$(dir)/libnotmuch.so: $(dir)/$(SONAME)
|
2010-04-01 08:54:21 +02:00
|
|
|
$(call quiet_symlink, $(SONAME) $@)
|
2009-11-10 16:14:49 +01:00
|
|
|
|
2010-04-01 07:47:12 +02:00
|
|
|
install: install-$(dir)
|
|
|
|
|
|
|
|
install-$(dir):
|
2010-04-01 08:54:21 +02:00
|
|
|
$(call quiet_mkdir, $(DESTDIR)$(libdir)/)
|
|
|
|
$(call quiet_install_data, $(dir)/$(SONAME) $(DESTDIR)$(libdir)/)
|
|
|
|
$(call quiet_install_data, $(dir)/notmuch.h $(DESTDIR)$(prefix)/include/)
|
|
|
|
$(call quiet_symlink, $(SONAME) $(DESTDIR)$(libdir)/libnotmuch.so)
|
2010-04-01 07:47:12 +02:00
|
|
|
|
2009-11-10 17:04:54 +01:00
|
|
|
SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)
|
2010-03-12 14:47:35 +01:00
|
|
|
CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/$(SONAME) $(dir)/libnotmuch.so *.so
|