aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-09-27 00:10:16 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-09-27 21:55:48 +0200
commit5659eb6439e19732b90650fdd41092053e1b0498 (patch)
treebe82998c8e67311e5bc3562d77c61b56e276375a /Makefile
parent6a72955270246168febed859116904e4c55fd699 (diff)
downloadlibweb-5659eb6439e19732b90650fdd41092053e1b0498.tar.gz
Add slweb.pc
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
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)