1 # The major version of the library interface. This will control the soname.
2 # As such, this number must be incremented for any incompatible change to
3 # the library interface, (such as the deletion of an API or a major
4 # semantic change that breaks formerly functioning code).
5 LIBNOTMUCH_VERSION_MAJOR = 1
7 # The minor version of the library interface. This should be incremented at
8 # the time of release for any additions to the library interface.
9 LIBNOTMUCH_VERSION_MINOR = 0
11 # The release version the library interface. This should be incremented at
12 # the time of release if there have been no changes to the interface, (but
13 # simply compatible changes to the implementation).
14 LIBNOTMUCH_VERSION_RELEASE = 0
16 LINKER_NAME = libnotmuch.so
17 SONAME = $(LINKER_NAME).$(LIBNOTMUCH_VERSION_MAJOR)
18 LIBNAME = $(SONAME).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE)
21 extra_cflags += -I$(dir) -fPIC
25 $(dir)/message-file.c \
31 libnotmuch_cxx_srcs = \
39 libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o)
41 $(dir)/libnotmuch.a: $(libnotmuch_modules)
42 $(call quiet,AR) rcs $@ $^
44 $(dir)/$(LIBNAME): $(libnotmuch_modules)
45 $(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -shared -Wl,-soname=$(SONAME) -o $@
47 $(dir)/$(SONAME): $(dir)/$(LIBNAME)
48 $(call quiet_symlink, $(LIBNAME) $@)
50 $(dir)/$(LINKER_NAME): $(dir)/$(SONAME)
51 $(call quiet_symlink, $(LIBNAME) $@)
53 install: install-$(dir)
56 $(call quiet_mkdir, $(DESTDIR)$(libdir)/)
57 $(call quiet_install_data, $(dir)/$(LIBNAME) $(DESTDIR)$(libdir)/)
58 $(call quiet_symlink, $(LIBNAME) $(DESTDIR)$(libdir)/$(SONAME))
59 $(call quiet_symlink, $(LIBNAME) $(DESTDIR)$(libdir)/$(LINKER_NAME))
60 $(call quiet_mkdir, $(DESTDIR)$(prefix)/include/)
61 $(call quiet_install_data, $(dir)/notmuch.h $(DESTDIR)$(prefix)/include/)
63 SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)
64 CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/$(SONAME) $(dir)/$(LINKER_NAME) $(dir)$(LIBNAME) libnotmuch.a