$NetBSD: patch-ae,v 1.7 2011/01/13 15:09:58 pooka Exp $

--- Makefile.orig	Tue Mar 19 19:16:06 1996
+++ Makefile	Sat Nov 22 17:32:15 2003
@@ -9,12 +9,10 @@
 # pick gcc if you'd rather , and/or do -g instead of -O if debugging
 # debugging
 # DFLAGS = -DTEST -DDEBUG
-CFLAGS = -O
 XFLAGS = 	# xtra cflags, set by systype targets
 XLIBS =		# xtra libs if necessary?
 # -Bstatic for sunos,  -static for gcc, etc.  You want this, trust me.
 STATIC =
-CC = cc $(CFLAGS)
 LD = $(CC) -s	# linker; defaults to stripped executables
 o = o		# object extension
 
@@ -28,7 +26,7 @@
 ### HARD TARGETS
 
 nc:	netcat.c
-	$(LD) $(DFLAGS) $(XFLAGS) $(STATIC) -o nc netcat.c $(XLIBS)
+	$(CC) $(CFLAGS) $(DFLAGS) $(XFLAGS) -o nc netcat.c $(XLIBS)
 
 nc-dos:
 	@echo "DOS?!  Maybe someday, but not now"
@@ -56,12 +54,12 @@
 # Kludged for gcc, which many regard as the only thing available.
 solaris-static:
 	make -e $(ALL) $(MFLAGS) XFLAGS='-DSYSV=4 -D__svr4__ -DSOLARIS' \
-	CC=gcc STATIC=-static XLIBS='-lnsl -lsocket -lresolv'
+	STATIC=-static XLIBS='-lnsl -lsocket -lresolv'
 
 # the more usual shared-lib version...
 solaris:
 	make -e $(ALL) $(MFLAGS) XFLAGS='-DSYSV=4 -D__svr4__ -DSOLARIS' \
-	CC=gcc STATIC= XLIBS='-lnsl -lsocket -lresolv'
+	STATIC= XLIBS='-lnsl -lsocket -lresolv'
 
 aix:
 	make -e $(ALL) $(MFLAGS) XFLAGS='-DAIX'
@@ -103,7 +101,7 @@
 
 # from Declan Rieb at sandia, for a/ux 3.1.1 [also suggests using gcc]:
 aux:
-	make -e $(ALL) $(MFLAGS) XFLAGS='-DAUX' STATIC=-static CC=gcc
+	make -e $(ALL) $(MFLAGS) XFLAGS='-DAUX' STATIC=-static
 
 # Nexstep from mudge: NeXT cc is really old gcc
 next:
