$NetBSD: patch-aa,v 1.3 2000/07/07 02:42:10 dmcmahill Exp $

--- Makefile.orig	Fri Jan 20 00:33:04 1995
+++ Makefile	Thu Jul  6 16:59:59 2000
@@ -1,11 +1,14 @@
-ASFLAGS= -mips2
+#ASFLAGS= -mips2
 CC= cc
 AR= ar
-INSTALL= install
 MV= mv
 CHMOD= chmod
-CFLAGS= -g
-LIB_INSTALL_DIR= /usr/lib
-MAN_INSTALL_DIR= /usr/man/man3
+.if ${MACHINE_ARCH} == "mipsel"
+CFLAGS= -g -DPAGE_PROTECTION_VIOLATED_SIGNAL=SIGBUS
+.else
+CFLAGS= -g 
+.endif
+LIB_INSTALL_DIR= ${PREFIX}/lib
+MAN_INSTALL_DIR= ${PREFIX}/man/man3
 
 PACKAGE_SOURCE= README libefence.3 Makefile efence.h \
@@ -40,8 +43,7 @@
 
 install: libefence.a libefence.3
-	$(MV) libefence.a $(LIB_INSTALL_DIR)
-	$(CHMOD) 644 $(LIB_INSTALL_DIR)/libefence.a
-	$(INSTALL) libefence.3 $(MAN_INSTALL_DIR)/libefence.3
-	$(CHMOD) 644 $(MAN_INSTALL_DIR)/libefence.3
+	${INSTALL} -c -m 0644 -o root -g wheel libefence.a $(LIB_INSTALL_DIR)
+	${RANLIB} ${LIB_INSTALL_DIR}/libefence.a
+	${INSTALL} -c -m 0644 -o root -g wheel libefence.3 $(MAN_INSTALL_DIR)/libefence.3
 
 clean: