X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2FMakefile.local;h=7105070b2a7b1ed9d6efd337898505a3b675076a;hp=70489e17207b13c8dad862ff63221277cf65a191;hb=bf159bd829efb6aa73c68542949eb11d9a44d93c;hpb=d807e28f43579ecc91aa40ae3e42760991c2f810 diff --git a/lib/Makefile.local b/lib/Makefile.local index 70489e17..7105070b 100644 --- a/lib/Makefile.local +++ b/lib/Makefile.local @@ -1,5 +1,5 @@ -dir=lib -extra_cflags += -I$(dir) +dir := lib +extra_cflags += -I$(dir) -fPIC libnotmuch_c_srcs = \ $(dir)/libsha1.c \ @@ -18,8 +18,12 @@ libnotmuch_cxx_srcs = \ $(dir)/thread.cc libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o) -$(dir)/notmuch.a: $(libnotmuch_modules) - $(call quiet,AR) rcs $@ $^ + +$(dir)/$(SONAME) : $(libnotmuch_modules) + $(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -shared -Wl,-soname=$(SONAME) -o $@ + +$(dir)/libnotmuch.so: $(dir)/$(SONAME) + ln -fs $(SONAME) $@ SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs) -CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/notmuch.a +CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/$(SONAME) $(dir)/libnotmuch.so *.so