3 # The major version of the library interface. This will control the soname.
4 # As such, this number must be incremented for any incompatible change to
5 # the library interface, (such as the deletion of an API or a major
6 # semantic change that breaks formerly functioning code).
8 # Note: We don't currently have plans to increment this at this time.
9 # If we *do* want to make an incompatible change to the library
10 # interface, we'll have to decide whether to increment this (creating
11 # a new soname) or to introduce symbol versioning to be able to
12 # provide support for both old and new interfaces without having to
14 LIBNOTMUCH_VERSION_MAJOR = 1
16 # The minor version of the library interface. This should be incremented at
17 # the time of release for any additions to the library interface.
18 LIBNOTMUCH_VERSION_MINOR = 0
20 # The release version the library interface. This should be incremented at
21 # the time of release if there have been no changes to the interface, (but
22 # simply compatible changes to the implementation).
23 LIBNOTMUCH_VERSION_RELEASE = 0
25 LINKER_NAME = libnotmuch.so
26 SONAME = $(LINKER_NAME).$(LIBNOTMUCH_VERSION_MAJOR)
27 LIBNAME = $(SONAME).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE)
30 extra_cflags += -I$(dir) -fPIC
34 $(dir)/message-file.c \
40 libnotmuch_cxx_srcs = \
48 libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o)
50 $(dir)/libnotmuch.a: $(libnotmuch_modules)
51 $(call quiet,AR) rcs $@ $^
53 $(dir)/$(LIBNAME): $(libnotmuch_modules)
54 $(call quiet,CXX $(CXXFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) -shared -Wl,-soname=$(SONAME) -o $@
56 $(dir)/$(SONAME): $(dir)/$(LIBNAME)
59 $(dir)/$(LINKER_NAME): $(dir)/$(SONAME)
62 install: install-$(dir)
65 mkdir -p $(DESTDIR)$(libdir)/
66 install -m0644 $(dir)/$(LIBNAME) $(DESTDIR)$(libdir)/
67 ln -sf $(LIBNAME) $(DESTDIR)$(libdir)/$(SONAME)
68 ln -sf $(LIBNAME) $(DESTDIR)$(libdir)/$(LINKER_NAME)
69 mkdir -p $(DESTDIR)$(includedir)
70 install -m0644 $(dir)/notmuch.h $(DESTDIR)$(includedir)/
72 SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)
73 CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/$(SONAME) $(dir)/$(LINKER_NAME) $(dir)$(LIBNAME) libnotmuch.a