diff --git a/src/Makefile b/src/Makefile index 30ba106..f7f6827 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,6 +1,8 @@ DESTDIR ?= /usr/local CFLAGS = $(shell pkg-config --cflags guile-2.0) -fPIC LDFLAGS = $(shell pkg-config --libs guile-2.0) +EXTDIR = $(shell pkg-config guile-2.0 --variable=extensiondir \ + --define-variable=prefix=$(DESTDIR)) objects = gitto-path.o @@ -18,10 +20,9 @@ libguile-gitto-path.so: gitto-path.o install-gitto: gitto install -Dm 755 $^ ${DESTDIR}/bin/$^ install-libguile-gitto-path: libguile-gitto-path.so - install -Dm 755 $^ \ - $(shell pkg-config guile-2.0 --variable=extensiondir)/$^ + install -Dm 755 $^ ${EXTDIR}/$^ install: install-gitto install-libguile-gitto-path uninstall: rm -f ${DESTDIR}/bin/gitto - rm -f $(shell pkg-config guile-2.0 --variable=extensiondir)/libguile-gitto-path.so + rm -f ${EXTDIR}/libguile-gitto-path.so