Description: declare SONAME Author: Yadd Forwarded: not-needed Last-Update: 2024-01-18 --- a/llhttp/Makefile +++ b/llhttp/Makefile @@ -1,6 +1,7 @@ CLANG ?= clang CFLAGS ?= OS ?= +SONAME ?= CFLAGS += -Os -g3 -Wall -Wextra -Wno-unused-parameter ifneq ($(OS),Windows_NT) @@ -23,7 +24,7 @@ build/libllhttp.so: build/c/llhttp.o build/native/api.o \ build/native/http.o - $(CLANG) -shared $^ -o $@ + $(CLANG) -shared $^ -Wl,-soname,$(SONAME) -o $@ build/libllhttp.a: build/c/llhttp.o build/native/api.o \ build/native/http.o @@ -88,6 +89,8 @@ $(INSTALL) -d $(DESTDIR)$(LIBDIR) $(INSTALL) -C build/llhttp.h $(DESTDIR)$(INCLUDEDIR)/llhttp.h $(INSTALL) -C build/libllhttp.a $(DESTDIR)$(LIBDIR)/libllhttp.a - $(INSTALL) build/libllhttp.so $(DESTDIR)$(LIBDIR)/libllhttp.so + $(INSTALL) build/libllhttp.so $(DESTDIR)$(LIBDIR)/$(SONAME) + ln -s $(SONAME) $(DESTDIR)$(LIBDIR)/$(SONAMEALIAS) + ln -s $(SONAME) $(DESTDIR)$(LIBDIR)/libllhttp.so .PHONY: all generate clean release postversion github-release