diff -r 9db71925eaa8 -r 4044131874f9 Makefile --- a/Makefile Fri Nov 18 15:33:58 2016 +0100 +++ b/Makefile Fri Dec 16 23:22:18 2016 +0100 @@ -63,21 +63,21 @@ debug: ucx-debug test-debug -install: ucx $(PREFIX)/lib $(PREFIX)/include/ucx - cp ./build/release/libucx$(LIB_EXT) $(PREFIX)/lib && \ - cp ./build/release/libucx$(SO_EXT) $(PREFIX)/lib && \ - cp ./ucx/*.h $(PREFIX)/include/ucx +install: ucx $(DESTDIR)$(PREFIX)/lib $(DESTDIR)$(PREFIX)/include/ucx + cp ./build/release/libucx$(LIB_EXT) $(DESTDIR)$(PREFIX)/lib && \ + cp ./build/release/libucx$(SO_EXT) $(DESTDIR)$(PREFIX)/lib && \ + cp ./ucx/*.h $(DESTDIR)$(PREFIX)/include/ucx uninstall: - $(RM) $(RMFLAGS) $(PREFIX)/include/ucx &&\ - $(RM) $(RMFLAGS) $(PREFIX)/lib/libucx$(LIB_EXT) &&\ - $(RM) $(RMFLAGS) $(PREFIX)/lib/libucx$(SO_EXT) + $(RM) $(RMFLAGS) $(DESTDIR)$(PREFIX)/include/ucx &&\ + $(RM) $(RMFLAGS) $(DESTDIR)$(PREFIX)/lib/libucx$(LIB_EXT) &&\ + $(RM) $(RMFLAGS) $(DESTDIR)$(PREFIX)/lib/libucx$(SO_EXT) -$(PREFIX)/lib: - mkdir -p $(PREFIX)/lib +$(DESTDIR)$(PREFIX)/lib: + mkdir -p $@ -$(PREFIX)/include/ucx: - mkdir -p $(PREFIX)/include/ucx +$(DESTDIR)$(PREFIX)/include/ucx: + mkdir -p $@ clean: FORCE $(RM) $(RMFLAGS) build