Makefile.am: Include a pkgconfig file.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 6 Sep 2015 23:22:22 +0000 (00:22 +0100)
Makefile.am
sod.pc.in [new file with mode: 0644]

index e1b1bbf..421bf26 100644 (file)
@@ -28,6 +28,17 @@ include      $(top_srcdir)/vars.am
 SUBDIRS                         =
 
 ###--------------------------------------------------------------------------
+### Package-configuration file.
+
+pkgconfigdir            = $(libdir)/pkgconfig
+pkgconfig_DATA          = sod.pc
+CLEANFILES             += sod.pc
+EXTRA_DIST             += sod.pc.in
+
+sod.pc: sod.pc.in Makefile
+       $(SUBST) $(srcdir)/sod.pc.in >$@.new $(SUBSTITUTIONS) && mv $@.new $@
+
+###--------------------------------------------------------------------------
 ### Subdirectories to build
 
 ## The SOD translator.
diff --git a/sod.pc.in b/sod.pc.in
new file mode 100644 (file)
index 0000000..7b7709e
--- /dev/null
+++ b/sod.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: sod
+Description: Sensible object design, runtime library
+Version: @VERSION@
+Libs: -L${libdir} -lsod
+Cflags: -I${includedir}