Use PREFIX and DESTDIR in standard way:
https://www.gnu.org/prep/standards/html_node/DESTDIR.html