$NetBSD: patch-aa,v 1.9 2003/10/08 03:01:32 danw Exp $

--- Makefile.orig	Thu Jan  9 01:19:34 1997
+++ Makefile	Tue Oct  7 22:51:21 2003
@@ -17,21 +17,19 @@
 # can be disabled to make dialog a bit smaller (could be done for more things)
 HAVE_GUAGE=true
 
-BINDIR = /usr/bin
-MANDIR = /usr/man/man1/
+BINDIR = ${PREFIX}/bin
+MANDIR = ${PREFIX}/man/man1
 
-CC = gcc
-CPP = gcc -E
-OPTIM = -O2 -Wall -Wstrict-prototypes -fomit-frame-pointer -pipe
+#CC = gcc
+CPP = $(CC) -E
+#OPTIM = -O2 -Wall -Wstrict-prototypes -fomit-frame-pointer -pipe
 #OPTIM = -O -Wall -Wstrict-prototypes -g -pipe
 
 # end of the configuration part
 #----------------------------------------------------------------------------
 # do not edit below this line
 
-CFLAGS = $(OPTIM) -DLOCALE -DVERSION=\"0.6z\"
-LDFLAGS = -L .
-LDLIBS = -ldialog
+CFLAGS += $(OPTIM) -DLOCALE -DVERSION=\"0.6z\"
 
 OBJS = checklist.o inputbox.o menubox.o msgbox.o \
 	 textbox.o util.o yesno.o
@@ -42,7 +40,7 @@
 OBJS+=mouse.o
 endif
 ifeq ($(HAVE_NCURSES), true)
-CFLAGS+=-DHAVE_NCURSES -I/usr/include/ncurses
+CFLAGS+=-DHAVE_NCURSES
 LDLIBS+=-lncurses
 endif
 ifeq ($(HAVE_RC_FILE), true)
@@ -56,12 +54,9 @@
 
 SRCS = $(OBJS:.o=.c)
 
-all: libdialog.a dialog
+all: dialog
 
-libdialog.a: $(OBJS)
-	ar rcs libdialog.a $(OBJS)
-
-dialog: dialog.o
+dialog: dialog.o $(OBJS)
 
 clean:
 	rm -f core *.o *~ dialog .depend libdialog.a dialog.1 dialog.in
@@ -69,8 +64,8 @@
 
 include .depend
 
-install: dialog libdialog.a
-	install -s dialog $(BINDIR)
+install: dialog 
+	${BSD_INSTALL_PROGRAM} dialog $(BINDIR)
 	cp dialog.man dialog.1
 ifeq ($(HAVE_RC_FILE),false)
 	mv dialog.1 dialog.in
@@ -82,7 +77,7 @@
 endif
 	mv dialog.1 dialog.in
 	sed -e "/COMMENTSTART/,/COMMENTEND/d" dialog.in >dialog.1
-	install -m 644 dialog.1 $(MANDIR)
+	${BSD_INSTALL_MAN} dialog.1 $(MANDIR)
 #	install -m 644 libdialog.a /usr/lib/
 
 depend:
