--- Makefile.orig	2003-02-02 18:33:55 UTC
+++ Makefile
@@ -1,5 +1,7 @@
+CC ?= gcc
+CFLAGS+=-DFREEBSD
 DESTDIR=
-prefix=/usr/local
+prefix=${PREFIX}
 
 all:
 	@case "`uname -s`" in \
@@ -19,14 +21,14 @@
 	gcc -DLINUX -Wall -o trfs trfs.c
 
 freebsd:
-	gcc -DFREEBSD -Wall -o trfs trfs.c
+	$(CC) $(CFLAGS) -o trfs trfs.c
 
 trfs:
 	make all
 
 install: trfs
-	install -o root -g wheel -m 755 trfs $(DESTDIR)$(prefix)/bin
-	install -o root -g wheel -m 755 trf  $(DESTDIR)$(prefix)/bin
+	$(BSD_INSTALL_PROGRAM) trfs $(DESTDIR)$(prefix)/bin
+	$(BSD_INSTALL_SCRIPT) trf  $(DESTDIR)$(prefix)/bin
 
 clean:
 	rm trfs || true
