Debian Codegraph @

Makefile

raw ◀ ▶
1 Debian patch touch this file
•1 # Upstream doesn't include a build system. I provide a simple one here
2 all: librply.so librply.so.1
3 .PHONY: all
4
5 %.o: %.c
6 $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
7
8 ABI_VERSION := 1
9 TAIL_VERSION := 1.4
10
11 CFLAGS += -fPIC -O3 -g -Wall -Wextra -fPIC
12
13
14 LIB_SO := librply.so
15 LIB_OBJECTS := $(patsubst %.c,%.o,$(wildcard *.c))
16
17 LIB_SO_ABI := $(LIB_SO).$(ABI_VERSION)
18 LIB_SO_FULL := $(LIB_SO_ABI).$(TAIL_VERSION)
19
20 $(LIB_SO_FULL): LDFLAGS += -shared -fPIC -Wl,-soname,$(LIB_SO_ABI)
21
22 $(LIB_SO) $(LIB_SO_ABI): $(LIB_SO_FULL)
23 ln -fs $(LIB_SO_FULL) $@
24
25 $(LIB_SO_FULL): $(LIB_OBJECTS)
26 $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
27
28 # I'll do this with debian/install
29 install:
30 true
31 .PHONY: install
32
33 clean:
34 rm -rf *.o *.so *.so.*
35 .PHONY: clean