From: Jakob Gruber Date: Mon, 10 Sep 2012 09:29:35 +0000 (+0200) Subject: Makefiles: Use PREFIX instead of DESTDIR in simavr.pc X-Git-Tag: v1.0~6 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=4f0e56559c96971c530b5b663bbcdbc2b3fdb16c;p=sx%2Fsimavr.git 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 --- 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/