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
rm -rf ${target} *.a *.so
DESTDIR = /usr/local
+PREFIX = ${DESTDIR}
install : all
$(MKDIR) $(DESTDIR)/include/simavr/avr
$(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/