--- Makefile.orig 2005-01-17 05:42:22.000000000 +0800 +++ Makefile 2014-06-09 12:04:06.347905833 +0800 @@ -1,5 +1,5 @@ # change this to use another location -PREFIX=/usr/local +PREFIX?=/usr/local BINFILES = netleak netleakd CFILES= netleak.conf netleakd.conf @@ -10,15 +10,15 @@ main: @echo "type 'make uninstall' to uninstall" install: - @mkdir -p $(PREFIX)/sbin - @mkdir -p $(PREFIX)/etc - @mkdir -p $(PREFIX)/share/man/man8 - install netleak $(PREFIX)/sbin - install netleakd $(PREFIX)/sbin - install netleak.conf $(PREFIX)/etc - install netleakd.conf $(PREFIX)/etc - install netleak.8 $(PREFIX)/share/man/man8 - install netleakd.8 $(PREFIX)/share/man/man8 + @mkdir -p $(DESTDIR)$(PREFIX)/sbin + @mkdir -p $(DESTDIR)$(PREFIX)/etc + @mkdir -p $(DESTDIR)$(PREFIX)/man/man8 + install netleak $(DESTDIR)$(PREFIX)/sbin + install netleakd $(DESTDIR)$(PREFIX)/sbin + install netleak.conf $(DESTDIR)$(PREFIX)/etc/netleak.conf.sample + install netleakd.conf $(DESTDIR)$(PREFIX)/etc/netleakd.conf.sample + install netleak.8 $(DESTDIR)$(PREFIX)/man/man8 + install netleakd.8 $(DESTDIR)$(PREFIX)/man/man8 uninstall: rm -f $(PREFIX)/sbin/netleak