$NetBSD: patch-ad,v 1.3 1999/09/17 00:06:21 jlam Exp $

--- src/config/platforms/netbsd.mk.orig	Fri Jul  9 15:13:57 1999
+++ src/config/platforms/netbsd.mk	Thu Sep 16 11:50:53 1999
@@ -30,8 +30,37 @@
 ## compiler/loader options are used.  It will probably also be used
 ## in constructing the name object file destination directory.
 
-OS_ARCH		:= $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/ | sed "s/\//-/")
+# Get value of OS_ARCH from environment variable MACHINE.
+#
+OS_ARCH		= ${MACHINE}
+
+# Set OS_ENDIAN to appropriate value.  For NetBSD, most architectures are
+# big-endian, so test for the architectures which are little-endian and
+# reset OS_ENDIAN.  Why doesn't GNU make have an OR statement!?
+#
+OS_ENDIAN	= BigEndian32
+
+ifeq ($(OS_ARCH),alpha)
+OS_ENDIAN	= LittleEndian32
+endif
+ifeq ($(OS_ARCH),arm32)
+OS_ENDIAN	= LittleEndian32
+endif
+ifeq ($(OS_ARCH),i386)
+OS_ENDIAN	= LittleEndian32
+endif
+ifeq ($(OS_ARCH),pc532)
+OS_ENDIAN	= LittleEndian32
+endif
+ifeq ($(OS_ARCH),pica)
 OS_ENDIAN	= LittleEndian32
+endif
+ifeq ($(OS_ARCH),pmax)
+OS_ENDIAN	= LittleEndian32
+endif
+ifeq ($(OS_ARCH),vax)
+OS_ENDIAN	= LittleEndian32
+endif
 
 # Define tools
 CC		= gcc
@@ -65,24 +94,27 @@
 endif
 
 # Includes
-OS_INCLUDES		=
+OS_INCLUDES		+=
 G++INCLUDES		= -I/usr/include/g++
 
 # Compiler flags
 PLATFORM_FLAGS		= -pipe -DNETBSD -DNetBSD
 PORT_FLAGS		= -DHAVE_STRERROR
-OS_CFLAGS		= $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)
+OS_CFLAGS		+= $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)
 
 PLATFORM_FLAGS		+= 
 PORT_FLAGS		+= 
 
+# Linker flags
+OS_DLLFLAGS		+=
+
 # Shared library flags
 MKSHLIB			= $(LD) $(DSO_LDOPTS) -soname $(@:$(OBJDIR)/%.so=%.so)
 
 # Which links can this platform create.  Define one or
 # both of these options.
 UNIX_CAN_BUILD_DYNAMIC=1
-UNIX_CAN_BUILD_STATIC=1
+UNIX_CAN_BUILD_STATIC=0		# 1.4.x can't seem to build statically
 
 # Compiler options for static and dynamic linkage
 DL_LIBS			= 
@@ -90,5 +122,12 @@
 
 ABI_NATIVE	= unix
 ABI_FE		= Unix
+
+##################################################################
+## ABIPKGDIR defines the directory containing the Makefile to use to
+## build a set of distribution archives (.deb, .rpm, .tgz, .exe, etc)
+## This is relative to $(ABI_ROOT)/src/pkg
+
+ABIPKGDIR	= netbsd
 
 # End of NetBSD defs
