From 4f0e56559c96971c530b5b663bbcdbc2b3fdb16c Mon Sep 17 00:00:00 2001 From: Jakob Gruber Date: Mon, 10 Sep 2012 11:29:35 +0200 Subject: [PATCH] Makefiles: Use PREFIX instead of DESTDIR in simavr.pc This is needed when DESTDIR does not equal the actual intended destination (this usually occurs when building packages for distribution). An example make invocation: make DESTDIR=pkg/usr PREFIX=/usr install --- simavr/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simavr/Makefile b/simavr/Makefile index 0894c16..f701b0b 100644 --- a/simavr/Makefile +++ b/simavr/Makefile @@ -82,6 +82,7 @@ clean: clean-${OBJ} rm -rf ${target} *.a *.so DESTDIR = /usr/local +PREFIX = ${DESTDIR} install : all $(MKDIR) $(DESTDIR)/include/simavr/avr @@ -91,7 +92,7 @@ install : all $(MKDIR) $(DESTDIR)/lib $(INSTALL) ${OBJ}/libsimavr.a $(DESTDIR)/lib/ $(MKDIR) $(DESTDIR)/lib/pkgconfig/ - sed -e "s|PREFIX|${DESTDIR}|g" -e "s|VERSION|${SIMAVR_VERSION}|g" \ + sed -e "s|PREFIX|${PREFIX}|g" -e "s|VERSION|${SIMAVR_VERSION}|g" \ simavr.pc >$(DESTDIR)/lib/pkgconfig/simavr.pc ifeq (${shell uname}, Linux) $(INSTALL) ${OBJ}/libsimavr.so.1 $(DESTDIR)/lib/ -- 2.39.5