2010-04-01 09:41:25 +02:00
|
|
|
# The major version of the library interface. This will control the soname.
|
|
|
|
# As such, this number must be incremented for any incompatible change to
|
|
|
|
# the library interface, (such as the deletion of an API or a major
|
|
|
|
# semantic change that breaks formerly functioning code).
|
|
|
|
LIBNOTMUCH_VERSION_MAJOR = 1
|
|
|
|
|
|
|
|
# The minor version of the library interface. This should be incremented at
|
|
|
|
# the time of release for any additions to the library interface.
|
|
|
|
LIBNOTMUCH_VERSION_MINOR = 0
|
|
|
|
|
|
|
|
# The release version the library interface. This should be incremented at
|
|
|
|
# the time of release if there have been no changes to the interface, (but
|
|
|
|
# simply compatible changes to the implementation).
|
|
|
|
LIBNOTMUCH_VERSION_RELEASE = 0
|
|
|
|
|
|
|
|
LINKER_NAME = libnotmuch.so
|
|
|
|
SONAME = $(LINKER_NAME).$(LIBNOTMUCH_VERSION_MAJOR)
|
|
|
|
LIBNAME = $(SONAME).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE)
|
2010-04-01 07:47:12 +02:00
|
|
|
|
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
|
|
|
|
2010-04-01 09:41:25 +02:00
|
|
|
$(dir)/$(LIBNAME) : $(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
|
|
|
|
2010-04-01 09:41:25 +02:00
|
|
|
$(dir)/$(SONAME): $(dir)/$(LIBNAME)
|
|
|
|
$(call quiet_symlink, $(LIBNAME) $@)
|
|
|
|
|
|
|
|
$(dir)/$(LINKER_NAME): $(dir)/$(SONAME)
|
|
|
|
$(call quiet_symlink, $(LIBNAME) $@)
|
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)/)
|
2010-04-01 09:41:25 +02:00
|
|
|
$(call quiet_install_data, $(dir)/$(LIBNAME) $(DESTDIR)$(libdir)/)
|
|
|
|
$(call quiet_symlink, $(LIBNAME) $(DESTDIR)$(libdir)/$(SONAME))
|
|
|
|
$(call quiet_symlink, $(LIBNAME) $(DESTDIR)$(libdir)/$(LINKER_NAME))
|
2010-04-01 13:47:45 +02:00
|
|
|
$(call quiet_mkdir, $(DESTDIR)$(prefix)/include/)
|
2010-04-01 08:54:21 +02:00
|
|
|
$(call quiet_install_data, $(dir)/notmuch.h $(DESTDIR)$(prefix)/include/)
|
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-04-01 09:41:25 +02:00
|
|
|
CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/$(SONAME) $(dir)/$(LINKER_NAME) $(dir)$(LIBNAME)
|