--- Makefile.orig	2004-08-18 10:29:22
+++ Makefile	2023-11-24 01:46:00
@@ -4,13 +4,12 @@
 #*  Copyright (c) 2004 Thomas Perl <perl.thomas@aon.at>                     *
 #\**************************************************************************/
 
-CC        =  gcc
-PREFIX    =  /usr/local
+CC        ?=  gcc
+PREFIX    ?=  /usr/local
 MANPAGES  =  highlnk.1
 VERSION   =  0.2
 
 #FLAGS     =  -DDEBUG
-FLAGS     =  
 
 .PHONY: all clean install uninstall release
 .DEFAULT: all
@@ -30,8 +29,8 @@
 	$(CC) $(FLAGS) -c finder.c -o finder.o
 
 install: highlnk
-	install -s highlnk $(PREFIX)/bin/highlnk
-	for MANPAGE in $(MANPAGES); do install $${MANPAGE} $(PREFIX)/man/man1/$${MANPAGE}; gzip -f $(PREFIX)/man/man1/$${MANPAGE}; done
+	install highlnk $(DESTDIR)$(PREFIX)/bin/highlnk
+	for MANPAGE in $(MANPAGES); do install -m 0644 $${MANPAGE} $(DESTDIR)$(PREFIX)/share/man/man1/$${MANPAGE}; gzip -f $(DESTDIR)$(PREFIX)/share/man/man1/$${MANPAGE}; done
 
 uninstall:
 	rm -f $(PREFIX)/bin/highlnk
