# $OpenBSD: patch-makefile,v 1.3 2003/06/18 12:18:12 naddy Exp $
--- Makefile.orig	Thu Jun 19 11:06:28 1997
+++ Makefile	Wed Jun 18 14:13:30 2003
@@ -2,23 +2,22 @@
 # -------------------
 
 
-CC=gcc
-CFLAGS= -O2
 MODULES=main.o parse_cmd_line.o get_remote_data.o connect_login.o io.o relay_data.o
 DOCS=README COPYING HISTORY
-INSTALL_DIR=/usr/sbin
+INSTALL_DIR=${PREFIX}/libexec
 VERSION=1.2
-DOC_DIR=/usr/doc/pop3gwd-$(VERSION)
+DOC_DIR=${PREFIX}/share/doc/pop3gwd
 
 
 in.pop3gwd:	pop3-gw.h $(MODULES)
 	$(CC) $(CFLAGS) -o $@ $(MODULES)
 	strip $@
 	chmod 755 $@
+all:
+	make
 
 install:
-	make
-	cp -f in.pop3gwd $(INSTALL_DIR)/
+	cp -f in.pop3gwd $(INSTALL_DIR)/pop3gwd
 	[ -d $(DOC_DIR) ] || mkdir $(DOC_DIR)
 	cp -f $(DOCS) $(DOC_DIR)
 
