File: build-system.patch

package info (click to toggle)
rply 1.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 292 kB
  • sloc: ansic: 1,549; makefile: 24
file content (51 lines) | stat: -rw-r--r-- 1,221 bytes parent folder | download
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Forwarded: not-needed
From 0e5e1d80e09e72728b5f26fa9b922a2a85a40f05 Mon Sep 17 00:00:00 2001
From: Dima Kogan <dkogan@debian.org>
Date: Tue, 5 Nov 2024 08:25:52 -0800
Subject: [PATCH] simple build system

---
 Makefile | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 Makefile

Index: rply/Makefile
===================================================================
--- /dev/null
+++ rply/Makefile
@@ -0,0 +1,35 @@
+# Upstream doesn't include a build system. I provide a simple one here
+all: librply.so librply.so.1
+.PHONY: all
+
+%.o: %.c
+	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+ABI_VERSION  := 1
+TAIL_VERSION := 1.4
+
+CFLAGS += -fPIC -O3 -g -Wall -Wextra -fPIC
+
+
+LIB_SO      := librply.so
+LIB_OBJECTS := $(patsubst %.c,%.o,$(wildcard *.c))
+
+LIB_SO_ABI  := $(LIB_SO).$(ABI_VERSION)
+LIB_SO_FULL := $(LIB_SO_ABI).$(TAIL_VERSION)
+
+$(LIB_SO_FULL): LDFLAGS += -shared -fPIC -Wl,-soname,$(LIB_SO_ABI)
+
+$(LIB_SO) $(LIB_SO_ABI): $(LIB_SO_FULL)
+	ln -fs $(LIB_SO_FULL) $@
+
+$(LIB_SO_FULL): $(LIB_OBJECTS)
+	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
+
+# I'll do this with debian/install
+install:
+	true
+.PHONY: install
+
+clean:
+	rm -rf *.o *.so *.so.*
+.PHONY: clean