mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-27 20:01:42 +01:00
7b52b2c318
We had a fairly ugly violation of modularity with the top-level Makefile.local isntalling everything, (even when the build commands for the library were down in lib/Makefile.local).
39 lines
1,002 B
Text
39 lines
1,002 B
Text
SONAME = libnotmuch.so.1
|
|
|
|
dir := lib
|
|
extra_cflags += -I$(dir) -fPIC
|
|
|
|
libnotmuch_c_srcs = \
|
|
$(dir)/libsha1.c \
|
|
$(dir)/message-file.c \
|
|
$(dir)/messages.c \
|
|
$(dir)/sha1.c \
|
|
$(dir)/tags.c \
|
|
$(dir)/xutil.c
|
|
|
|
libnotmuch_cxx_srcs = \
|
|
$(dir)/database.cc \
|
|
$(dir)/directory.cc \
|
|
$(dir)/index.cc \
|
|
$(dir)/message.cc \
|
|
$(dir)/query.cc \
|
|
$(dir)/thread.cc
|
|
|
|
libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o)
|
|
|
|
$(dir)/$(SONAME) : $(libnotmuch_modules)
|
|
$(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -shared -Wl,-soname=$(SONAME) -o $@
|
|
|
|
$(dir)/libnotmuch.so: $(dir)/$(SONAME)
|
|
ln -fs $(SONAME) $@
|
|
|
|
install: install-$(dir)
|
|
|
|
install-$(dir):
|
|
install -d $(DESTDIR)$(libdir)/
|
|
install $(dir)/$(SONAME) $(DESTDIR)$(libdir)/
|
|
install $(dir)/notmuch.h $(DESTDIR)$(prefix)/include/
|
|
ln -sf $(SONAME) $(DESTDIR)$(libdir)/libnotmuch.so
|
|
|
|
SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)
|
|
CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/$(SONAME) $(dir)/libnotmuch.so *.so
|