--- Makefile.orig	2003-04-12 10:04:41.000000000 +0200
+++ Makefile	2011-06-23 00:18:51.000000000 +0200
@@ -1,5 +1,6 @@
 
-CFLAGS=-Wall -g -O0 -ansi -pedantic
+CC?=	gcc
+CFLAGS+=-Wall -ansi -pedantic
 
 SRCS=$(wildcard *.c)
 
@@ -8,13 +9,13 @@
 OBJECTS=$(SRCS:.c=.o)
 
 sheerdns: $(OBJECTS)
-	gcc -o sheerdns $(OBJECTS)
+	$(CC) -o sheerdns $(OBJECTS)
 
 sheerdnshash: hash.c
-	gcc $(CFLAGS) -o sheerdnshash hash.c -DSTANDALONE -Wall
+	$(CC) $(CFLAGS) -o sheerdnshash hash.c -DSTANDALONE -Wall
 
 .c.o: $(SRCS)
-	gcc $(CFLAGS) -c $<
+	$(CC) $(CFLAGS) -c $<
 
 clean:
 	rm -f sheerdns sheerdnshash *.o
@@ -26,7 +27,6 @@
 	groff -Tps -mandoc sheerdns.8 > sheerdns.ps
 
 install: all
-	install sheerdnshash sheerdns /usr/sbin/
-	install sheerdns.8 /usr/share/man/man8/
-	install sheerdns.8 /usr/man/man8/
+	install sheerdnshash sheerdns ${PREFIX}/sbin/
+	install sheerdns.8 ${MANPREFIX}/man/man8/
 
