$OpenBSD: patch-Makefile,v 1.2 2009/01/18 23:19:15 jasper Exp $
--- Makefile.orig	Mon Nov  7 23:32:46 2005
+++ Makefile	Mon Jan 19 00:17:30 2009
@@ -1,17 +1,17 @@
 .SUFFIXES:
 
 DESTDIR=
-prefix=/usr/local
+prefix=$(PREFIX)
 bindir=$(prefix)/bin
 mandir=$(prefix)/man
 man1dir=$(mandir)/man1
 libdir=$(prefix)/lib
 sharedir=$(prefix)/share
-getoptdir=$(libdir)/getopt
+getoptdir=$(sharedir)/examples/getopt
 localedir=$(sharedir)/locale
 
 # Define this to 0 to use the getopt(3) routines in this package.
-LIBCGETOPT=1
+LIBCGETOPT=0
 
 # Define this to 1 if you do not have the gettext routines
 WITHOUT_GETTEXT=0
@@ -24,7 +24,7 @@ UNLIKELYNAME=a8vwjfd92
 
 SHELL=/bin/sh
 
-CC=gcc
+CC?=gcc
 LD=ld
 RM=rm -f
 INSTALL=install
@@ -33,7 +33,7 @@ MSGFMT=msgfmt
 LANGUAGES = cs de es fr it ja nl pt_BR
 MOFILES:=$(patsubst %,po/%.mo,$(LANGUAGES))
 
-CPPFLAGS=-DLIBCGETOPT=$(LIBCGETOPT) -DWITH_GETTEXT=$(WITH_GETTEXT) -DLOCALEDIR=\"$(localedir)\" -DNOT_UTIL_LINUX
+CPPFLAGS+=-DLIBCGETOPT=$(LIBCGETOPT) -DWITH_GETTEXT=$(WITH_GETTEXT) -DLOCALEDIR=\"$(localedir)\" -DNOT_UTIL_LINUX
 ifeq ($(LIBCGETOPT),0)
 CPPFLAGS+=-I./gnu 
 endif
@@ -43,8 +43,6 @@ WARNINGS=-Wall \
          -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
          -Wnested-externs -Winline
 OPTIMIZE=-O3 -fno-strength-reduce
-CFLAGS=$(WARNINGS) $(OPTIMIZE)
-LDFLAGS=
 
 sources=getopt.c
 ifeq ($(LIBCGETOPT),0)
