From b7aeedc7bbd86d8327207b3fdac58b214cd515aa Mon Sep 17 00:00:00 2001 From: Lennart Grahl Date: Fri, 28 Apr 2017 14:15:16 +0200 Subject: [PATCH] Makefile improvements (#50) * Add Libs.private to pkg-config file * Allow users to specify `PREFIX` in Makefile --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 65da3f6..7551501 100644 --- a/Makefile +++ b/Makefile @@ -35,9 +35,9 @@ MODULES += json INSTALL := install ifeq ($(DESTDIR),) -PREFIX := /usr/local +PREFIX ?= /usr/local else -PREFIX := /usr +PREFIX ?= /usr endif ifeq ($(LIBDIR),) LIBDIR := $(PREFIX)/lib @@ -85,6 +85,7 @@ libre.pc: @echo 'Version: '$(VERSION) >> libre.pc @echo 'URL: http://creytiv.com/re.html' >> libre.pc @echo 'Libs: -L$${libdir} -lre' >> libre.pc + @echo 'Libs.private: -L$${libdir} -lre ${LIBS}' >> libre.pc @echo 'Cflags: -I$${includedir}' >> libre.pc $(BUILD)/%.o: src/%.c $(BUILD) Makefile $(MK) $(MODMKS)