blob: 1221d54a63a489e728b1e4522221b200cac29642 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
Description: declare SONAME
Author: Yadd <yadd@debian.org>
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
|