From ef14ee964ac098888a662b0a98fd88869d255d86 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Mon, 16 Oct 2023 00:13:24 +0200 Subject: Install .pc file --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 784e171..f032535 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,8 @@ .POSIX: PREFIX = /usr/local +DST = $(PREFIX)/lib +PC_DST = $(DST)/pkgconfig PROJECT = libdynstr.a CFLAGS = -Iinclude DEPS = \ @@ -22,7 +24,7 @@ DEPS = \ all: $(PROJECT) -install: $(PROJECT) +install: $(PROJECT) $(PC_DST)/dynstr.pc mkdir -p $(PREFIX)/include cp include/dynstr.h $(PREFIX)/include chmod 0644 $(PREFIX)/include/dynstr.h @@ -35,3 +37,8 @@ clean: $(PROJECT): $(DEPS) $(AR) $(ARFLAGS) $@ $(DEPS) + +$(PC_DST)/dynstr.pc: dynstr.pc + mkdir -p $(PC_DST) + sed -e 's,/usr/local,$(PREFIX),' $< > $@ + chmod 0644 $@ -- cgit v1.2.3