]> git.armaanb.net Git - libacheam.git/blobdiff - Makefile
Generate acheam.pc from DESTDIR in Makefile
[libacheam.git] / Makefile
index a301e4aed716f72e877fb7a4dcd01a8d9d66ace7..3d0bd0da1b2338ab689f957456765c2265935787 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 DESTDIR  ?= /usr/local
 CFLAGS   := -Wall -Wextra -pedantic -std=c99 -fPIC ${CFLAGS}
 
-all: shared static man
+all: shared static man pkgconfig
 
 shared:
        ${CC} -shared ${LDFLAGS} -o libacheam.so src/libacheam/*.c ${CFLAGS}
@@ -10,6 +10,9 @@ static:
        ${CC} ${LDFLAGS} src/libacheam/*.c ${CFLAGS} -c
        ar rcs libacheam.a *.o
 
+pkgconfig:
+       sed "s|PREFIX_HERE|${DESTDIR}|g" acheam.pc.in > acheam.pc
+
 man:
        for i in man/*.scd; do \
                outp=$$(echo "$$i" | rev | cut -f 2- -d '.' | rev); \