summaryrefslogtreecommitdiffstats
path: root/ffi/Makefile
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2018-03-20 15:45:01 +0100
committerJustus Winter <justus@sequoia-pgp.org>2018-03-23 11:31:27 +0100
commitff607851dc5173ff446bd878f921a6554b7ddea1 (patch)
treed112c5116dc662a7c72a1dea620dc6e6fe801dc9 /ffi/Makefile
parenta9ab4082e13434591131e0041a4234be6d92fea0 (diff)
ffi: Build and install a pkg-config file.
Diffstat (limited to 'ffi/Makefile')
-rw-r--r--ffi/Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/ffi/Makefile b/ffi/Makefile
index c97852e4..ed3b0d3f 100644
--- a/ffi/Makefile
+++ b/ffi/Makefile
@@ -31,8 +31,16 @@ examples:
.PHONY: build-release
build-release:
+sequoia.pc: sequoia.pc.in
+ sed -e 's|VERSION|$(VERSION)|g' \
+ -e 's|PREFIX|$(PREFIX)|g' \
+ $< >$@
+
.PHONY: install
-install:
+install: sequoia.pc
+ $(INSTALL) -d $(DESTDIR)$(PREFIX)/share/pkgconfig
+ $(INSTALL) -t $(DESTDIR)$(PREFIX)/share/pkgconfig \
+ sequoia.pc
$(INSTALL) -d $(DESTDIR)$(PREFIX)/include
$(INSTALL) -t $(DESTDIR)$(PREFIX)/include include/sequoia.h
$(INSTALL) -d $(DESTDIR)$(PREFIX)/include/sequoia
@@ -49,4 +57,5 @@ install:
# Housekeeping.
.PHONY: clean
clean:
+ rm -f sequoia.pc
$(MAKE) -Cexamples clean