From 5659eb6439e19732b90650fdd41092053e1b0498 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Wed, 27 Sep 2023 00:10:16 +0200 Subject: Add slweb.pc --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 283c005..6d4a294 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ PROJECT = libslweb.a PREFIX = /usr/local DST = $(PREFIX)/lib +PC_DST = $(DST)/pkgconfig O = -Og CDEFS = -D_FILE_OFFSET_BITS=64 # Required for large file support on 32-bit. CFLAGS = $(O) $(CDEFS) -g -Iinclude -Idynstr/include -MD -MF $(@:.o=.d) @@ -16,7 +17,7 @@ OBJECTS = \ all: $(PROJECT) -install: all +install: all $(PC_DST)/slweb.pc mkdir -p $(PREFIX)/include cp -R include/slweb $(PREFIX)/include chmod 0644 $(PREFIX)/include/slweb/*.h @@ -36,4 +37,9 @@ examples: FORCE $(PROJECT): $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS) +$(PC_DST)/slweb.pc: slweb.pc + mkdir -p $(PC_DST) + sed -e 's,/usr/local,$(PREFIX),' $< > $@ + chmod 0644 $@ + -include $(DEPS) -- cgit v1.2.3