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).
7 LIBNOTMUCH_VERSION_MAJOR = 1
9 # The minor version of the library interface. This should be incremented at
10 # the time of release for any additions to the library interface.
11 LIBNOTMUCH_VERSION_MINOR = 0
13 # The release version the library interface. This should be incremented at
14 # the time of release if there have been no changes to the interface, (but
15 # simply compatible changes to the implementation).
16 LIBNOTMUCH_VERSION_RELEASE = 0
18 LINKER_NAME = libnotmuch.so
19 SONAME = $(LINKER_NAME).$(LIBNOTMUCH_VERSION_MAJOR)
20 LIBNAME = $(SONAME).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE)
23 extra_cflags += -I$(dir) -fPIC
27 $(dir)/message-file.c \
33 libnotmuch_cxx_srcs = \
41 libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o)
43 $(dir)/libnotmuch.a: $(libnotmuch_modules)
44 $(call quiet,AR) rcs $@ $^
46 $(dir)/$(LIBNAME): $(libnotmuch_modules)
47 $(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -shared -Wl,-soname=$(SONAME) -o $@
49 $(dir)/$(SONAME): $(dir)/$(LIBNAME)
50 $(call quiet_symlink, $(LIBNAME) $@)
52 $(dir)/$(LINKER_NAME): $(dir)/$(SONAME)
53 $(call quiet_symlink, $(LIBNAME) $@)
55 install: install-$(dir)
58 $(call quiet_mkdir, $(DESTDIR)$(libdir)/)
59 $(call quiet_install_data, $(dir)/$(LIBNAME) $(DESTDIR)$(libdir)/)
60 $(call quiet_symlink, $(LIBNAME) $(DESTDIR)$(libdir)/$(SONAME))
61 $(call quiet_symlink, $(LIBNAME) $(DESTDIR)$(libdir)/$(LINKER_NAME))
62 $(call quiet_mkdir, $(DESTDIR)$(prefix)/include/)
63 $(call quiet_install_data, $(dir)/notmuch.h $(DESTDIR)$(prefix)/include/)
65 SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)
66 CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/$(SONAME) $(dir)/$(LINKER_NAME) $(dir)$(LIBNAME) libnotmuch.a