Merged the makefile changes from Netscape's internal development version NSPRPUB_19980421_BASE RHAPSODY_NSPR_BASE
authorwtc
Tue, 21 Apr 1998 17:21:53 +0000
changeset 51 3caa87b929ebf0648c7ca58928766f7a0ce39f90
parent 50 92700b6ba8b21570147cd2b39dd3d2d3e96f008e
child 52 3c8688d587e5fe45d957986705be1e08a701747e
child 53 47e0294b04faed9e08b7bd2a16e163d5839e12ba
child 54 163d59787310957a748182e6f0f19bdc78626da1
child 58 5710bbbaab5887354a6d79ac1aa95c3995489e69
push idunknown
push userunknown
push dateunknown
Merged the makefile changes from Netscape's internal development version of NSPR to the public ns/nsprpub on mozilla.org. Removed ns/nsprpub/tools/winsock.lib, which should not have been released. This file can be generated from winsock.dll by following the NSPR build instructions for Windows 3.11 at http://www.mozilla.org/docs/refList/refNSPR/win16.html.
config/AIX3.2.mk
config/AIX4.1.mk
config/AIX4.2.mk
config/AIX4.3.mk
config/BSD_3862.1.mk
config/BSD_3863.0.mk
config/FreeBSD.mk
config/FreeBSD2.mk
config/HP-UX.mk
config/HP-UXA.09.03.mk
config/HP-UXA.09.07.mk
config/HP-UXB.10.01.mk
config/HP-UXB.10.10.mk
config/HP-UXB.10.20.mk
config/HP-UXB.10.30.mk
config/HP-UXB.11.00.mk
config/IRIX.mk
config/IRIX5.2.mk
config/IRIX5.3.mk
config/IRIX6.2.mk
config/IRIX6.3.mk
config/Linux.mk
config/LinuxELF1.2.mk
config/LinuxELF2.0.mk
config/LinuxELFppc.mk
config/NCR.mk
config/NCR3.0.mk
config/NEC.mk
config/NEC4.2.mk
config/NEWS-OS.mk
config/NEWS-OS6.1.1.mk
config/OS2.mk
config/OS24.0.mk
config/OSF1V2.0.mk
config/OSF1V3.0.mk
config/OSF1V3.2.mk
config/OSF1V4.0.mk
config/ReliantUNIX.mk
config/ReliantUNIX5.4.mk
config/SCOOS.mk
config/SCOOS5.0.mk
config/SCO_SV3.2.mk
config/SINIX.mk
config/SunOS.mk
config/SunOS4.1.3_U1.mk
config/SunOS4.mk
config/SunOS5.3.mk
config/SunOS5.4.mk
config/SunOS5.4_i86pc.mk
config/SunOS5.5.1.mk
config/SunOS5.5.1_i86pc.mk
config/SunOS5.5.mk
config/SunOS5.6.mk
config/SunOS5.6_i86pc.mk
config/SunOS5.mk
config/UNIX.mk
config/UNIXWARE.mk
config/UNIXWARE2.1.mk
config/WIN32.mk
config/WIN95.mk
config/WIN954.0.mk
config/WINNT.mk
config/WINNT3.51.mk
config/WINNT4.0.mk
config/WINNT5.0.mk
config/arch.mk
config/config.mk
config/module.df
config/rules.mk
config/win16.mk
lib/Makefile
lib/msgc/tests/Makefile
lib/prstreams/Makefile
lib/prstreams/tests/testprstrm/Makefile
lib/tests/Makefile
pr/src/Makefile
pr/src/md/os2/Makefile
pr/src/md/unix/Makefile
pr/src/md/unix/objs.mk
pr/tests/Makefile
pr/tests/dll/Makefile
pr/tests/w16gui/Makefile
tools/Makefile
tools/winsock.lib
deleted file mode 100644
--- a/config/AIX3.2.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for AIX3.2.5
-#
-
-include $(MOD_DEPTH)/config/AIX.mk
deleted file mode 100644
--- a/config/AIX4.1.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for AIX4.1
-#
-
-include $(MOD_DEPTH)/config/AIX.mk
deleted file mode 100644
--- a/config/AIX4.2.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for AIX4.2
-#
-
-include $(MOD_DEPTH)/config/AIX.mk
deleted file mode 100644
--- a/config/AIX4.3.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for AIX4.3
-#
-
-include $(MOD_DEPTH)/config/AIX.mk
deleted file mode 100644
--- a/config/BSD_3862.1.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for BSDI BSD/OS 2.1.
-#
-
-include $(MOD_DEPTH)/config/BSD_OS.mk
deleted file mode 100644
--- a/config/BSD_3863.0.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for BSDI BSD/OS 3.0.
-#
-
-include $(MOD_DEPTH)/config/BSD_OS.mk
new file mode 100644
--- /dev/null
+++ b/config/FreeBSD.mk
@@ -0,0 +1,50 @@
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL.  You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+# 
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+# 
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation.  Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+# Reserved.
+#
+
+#
+# Config stuff for FreeBSD
+#
+
+include $(MOD_DEPTH)/config/UNIX.mk
+
+CC			= gcc
+CCC			= g++
+RANLIB			= ranlib
+
+OS_REL_CFLAGS		= -mno-486 -Di386
+CPU_ARCH		= x86
+
+OS_CFLAGS		= $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK -D_PR_NEED_POLL
+
+ifeq ($(USE_PTHREADS),1)
+OS_LIBS			= -lc_r
+# XXX probably should define _THREAD_SAFE too.
+DEFINES			+= -D_PR_NEED_FAKE_POLL
+else
+OS_LIBS			= -lc
+DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
+endif
+
+ARCH			= freebsd
+
+DSO_CFLAGS		= -fPIC
+DSO_LDOPTS		= -Bshareable
+DSO_LDFLAGS		=
+
+MKSHLIB			= $(LD) $(DSO_LDOPTS)
+
+G++INCLUDES		= -I/usr/include/g++
deleted file mode 100644
--- a/config/FreeBSD2.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for FreeBSD2
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-CC			= gcc
-CCC			= g++
-RANLIB			= ranlib
-
-OS_REL_CFLAGS		= -mno-486 -Di386
-CPU_ARCH		= x86
-
-OS_CFLAGS		= $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
-
-ifeq ($(USE_PTHREADS),1)
-OS_LIBS			= -lc_r
-# XXX probably should define _THREAD_SAFE too.
-DEFINES			+= -D_PR_NEED_FAKE_POLL
-else
-OS_LIBS			= -lc
-DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
-endif
-
-ARCH			= freebsd
-
-DSO_CFLAGS		= -fPIC
-DSO_LDOPTS		= -Bshareable
-DSO_LDFLAGS		=
-
-MKSHLIB			= $(LD) $(DSO_LDOPTS)
-
-G++INCLUDES		= -I/usr/include/g++
--- a/config/HP-UX.mk
+++ b/config/HP-UX.mk
@@ -130,17 +130,17 @@ endif
 #
 # To use the true pthread (kernel thread) library on 10.30 and
 # 11.00, we should define _POSIX_C_SOURCE to be 199506L.
 # The _REENTRANT macro is deprecated.
 #
 
 ifdef USE_PTHREADS
 ifeq (,$(filter-out B.10.10 B.10.20,$(OS_RELEASE)))
-OS_CFLAGS		+= -D_REENTRANT
+OS_CFLAGS		+= -D_REENTRANT -D_PR_DCETHREADS
 else
 OS_CFLAGS		+= -D_POSIX_C_SOURCE=199506L
 endif
 endif
 
 ifdef PTHREADS_USER
 OS_CFLAGS		+= -D_POSIX_C_SOURCE=199506L
 endif
deleted file mode 100644
--- a/config/HP-UXA.09.03.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for HP-UXA.09.03
-#
-include $(MOD_DEPTH)/config/HP-UX.mk
deleted file mode 100644
--- a/config/HP-UXA.09.07.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for HP-UXA.09.07
-#
-include $(MOD_DEPTH)/config/HP-UX.mk
deleted file mode 100644
--- a/config/HP-UXB.10.01.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for HP-UXB.10.01
-#
-include $(MOD_DEPTH)/config/HP-UX.mk
deleted file mode 100644
--- a/config/HP-UXB.10.10.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for HP-UXB.10.10
-#
-include $(MOD_DEPTH)/config/HP-UX.mk
-
-ifeq ($(USE_PTHREADS),1)
-OS_CFLAGS		+= -D_PR_DCETHREADS
-endif
deleted file mode 100644
--- a/config/HP-UXB.10.20.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for HP-UXB.10.20
-#
-include $(MOD_DEPTH)/config/HP-UX.mk
-
-ifeq ($(USE_PTHREADS),1)
-OS_CFLAGS		+= -D_PR_DCETHREADS
-endif
deleted file mode 100644
--- a/config/HP-UXB.10.30.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for HP-UXB.10.30.
-#
-include $(MOD_DEPTH)/config/HP-UX.mk
deleted file mode 100644
--- a/config/HP-UXB.11.00.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for HP-UXB.11.00.
-#
-include $(MOD_DEPTH)/config/HP-UX.mk
--- a/config/IRIX.mk
+++ b/config/IRIX.mk
@@ -34,31 +34,32 @@ COMPILER_TAG		= _gcc
 AS			= $(CC) -x assembler-with-cpp
 ODD_CFLAGS		= -Wall -Wno-format
 ifdef BUILD_OPT
 OPTIMIZER		= -O6
 endif
 else
 CC			= cc
 CCC         = CC
-ODD_CFLAGS		= -fullwarn -xansi -rdata_shared
+ODD_CFLAGS		= -fullwarn -xansi
 ifdef BUILD_OPT
 
 ifeq ($(USE_N32),1)
 OPTIMIZER		= -O -OPT:Olimit=4000
 else
 OPTIMIZER		= -O -Olimit 4000
 endif
 
 endif
 
 # For 6.x machines, include this flag
 ifeq (6.,$(findstring 6.,$(OS_RELEASE)))
 ifeq ($(USE_N32),1)
-ODD_CFLAGS		+= -n32 -exceptions
+ODD_CFLAGS		+= -n32 -exceptions -woff 1209,1642,3201
+COMPILER_TAG		= _n32
 else
 ODD_CFLAGS		+=  -32 -multigot
 endif
 else
 ODD_CFLAGS		+= -xgot
 endif
 endif
 
@@ -86,21 +87,26 @@ OS_CFLAGS               += -DIRIX6_3
 endif
 
 ifndef NO_MDUPDATE
 OS_CFLAGS		+= $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
 else
 OS_CFLAGS		+= $(NOMD_OS_CFLAGS)
 endif
 
+# catch unresolved symbols
+ifeq ($(basename $(OS_RELEASE)),6)
+SHLIB_LD_OPTS = -no_unresolved
+endif
+
 ifeq ($(USE_N32),1)
 SHLIB_LD_OPTS		+= -n32
 endif
 
-MKSHLIB			= $(LD) $(SHLIB_LD_OPTS) -shared -soname $(@:$(OBJDIR)/%.so=%.so)
+MKSHLIB			= $(LD) $(SHLIB_LD_OPTS) -rdata_shared -shared -soname $(@:$(OBJDIR)/%.so=%.so)
 
 HAVE_PURIFY		= 1
 
 DSO_LDOPTS		= -elf -shared -all
 
 ifdef DSO_BACKEND
 DSO_LDOPTS		+= -soname $(DSO_NAME)
 
deleted file mode 100644
--- a/config/IRIX5.2.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for IRIX5.2
-#
-include $(MOD_DEPTH)/config/IRIX.mk
deleted file mode 100644
--- a/config/IRIX5.3.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for IRIX5.3
-#
-include $(MOD_DEPTH)/config/IRIX.mk
deleted file mode 100644
--- a/config/IRIX6.2.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for IRIX6.2
-#
-
-# catch unresolved symbols
-
-SHLIB_LD_OPTS = -no_unresolved
-
-include $(MOD_DEPTH)/config/IRIX.mk
deleted file mode 100644
--- a/config/IRIX6.3.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for IRIX6.3
-#
-
-# catch unresolved symbols
-
-SHLIB_LD_OPTS = -no_unresolved
-
-include $(MOD_DEPTH)/config/IRIX.mk
--- a/config/Linux.mk
+++ b/config/Linux.mk
@@ -34,78 +34,79 @@ DEFINES			+= -D_REENTRANT
 else
 DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
 endif
 
 ifeq (86,$(findstring 86,$(OS_TEST)))
 CPU_ARCH		:= x86
 else
 CPU_ARCH		:= $(OS_TEST)
+CPU_ARCH_TAG		= _$(CPU_ARCH)
 endif
 
 CC			= gcc
 CCC			= g++
 RANLIB			= ranlib
 
 OS_INCLUDES		=
 G++INCLUDES		= -I/usr/include/g++
 
-# The -pipe flag doesn't work on Alpha Linux in recursive sub-makes
-#PLATFORM_FLAGS		= -ansi -Wall -pipe -DLINUX -Dlinux
-PLATFORM_FLAGS		= -ansi -Wall -DLINUX -Dlinux
+PLATFORM_FLAGS		= -ansi -Wall -pipe -DLINUX -Dlinux
 PORT_FLAGS		= -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR
 
 OS_CFLAGS		= $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)
 
 ######################################################################
 # Version-specific stuff
 ######################################################################
 
 ifeq ($(CPU_ARCH),alpha)
 PLATFORM_FLAGS		+= -DLINUX1_2 -D_ALPHA_ -D__alpha
+PORT_FLAGS		+= -D_XOPEN_SOURCE
 endif
 ifeq ($(CPU_ARCH),ppc)
-PLATFORM_FLAGS		+= -DMKLINUX -DMACLINUX -DLINUX1_2
+PLATFORM_FLAGS		+= -DMKLINUX -DLINUX1_2
 OS_INCLUDES		+= -I/usr/local/include
 endif
 ifeq ($(CPU_ARCH),sparc)
 PLATFORM_FLAGS		+= -DLINUX1_2
 endif
 ifeq ($(CPU_ARCH),x86)
 PLATFORM_FLAGS		+= -mno-486 -DLINUX1_2 -Di386
+PORT_FLAGS		+= -D_XOPEN_SOURCE
 endif
 ifeq ($(CPU_ARCH),m68k)
 #
 # gcc on Linux/m68k either has a bug or triggers a code-sequence
 # bug in the 68060 which causes gcc to crash.  The simplest way to
 # avoid this is to enable a minimum level of optimization.
 #
 ifndef BUILD_OPT
 OPTIMIZER		+= -O
 endif
 PLATFORM_FLAGS		+= -m68020-40 -DLINUX1_2
 endif
 
-ifeq ($(OS_RELEASE),2.0)
+# These are CPU_ARCH independent
+ifeq ($(basename $(OS_RELEASE)),2.0)
 PLATFORM_FLAGS		+= -DLINUX2_0
 endif
 
 #
 # Linux ppc and 2.0 have shared libraries.
 #
 
 MKSHLIB			= $(LD) $(DSO_LDOPTS) -soname $(@:$(OBJDIR)/%.so=%.so)
+ifdef BUILD_OPT
+OPTIMIZER		= -O2
+endif
 
 ######################################################################
 # Overrides for defaults in config.mk (or wherever)
 ######################################################################
 
-ifneq (,$(filter-out x86 ppc,$(CPU_ARCH)))
-CPU_ARCH_TAG		= _$(CPU_ARCH)
-endif
-
 ######################################################################
 # Other
 ######################################################################
 
 DSO_CFLAGS		= -fPIC
 DSO_LDOPTS		= -shared
 DSO_LDFLAGS		=
deleted file mode 100644
--- a/config/LinuxELF1.2.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for Linux 1.2 (ELF)
-#
-
-include $(MOD_DEPTH)/config/Linux.mk
deleted file mode 100644
--- a/config/LinuxELF2.0.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for Linux 2.0 (ELF)
-#
-
-include $(MOD_DEPTH)/config/Linux.mk
deleted file mode 100644
--- a/config/LinuxELFppc.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for Mac Linux 2.0 (ELF)
-#
-
-include $(MOD_DEPTH)/config/Linux.mk
new file mode 100644
--- /dev/null
+++ b/config/NCR.mk
@@ -0,0 +1,75 @@
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL.  You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+# 
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+# 
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation.  Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+# Reserved.
+#
+
+#
+# Config stuff for NCR SVR4 MP-RAS
+#
+
+include $(MOD_DEPTH)/config/UNIX.mk
+###
+NS_USE_NATIVE = 1
+
+# NS_USE_GCC = 1
+
+export PATH:=$(PATH):/opt/ncc/bin
+###
+
+RANLIB          = true
+GCC_FLAGS_EXTRA = -pipe
+
+DEFINES		+= -DSVR4 -DSYSV -DHAVE_STRERROR -DNCR -D_PR_LOCAL_THREADS_ONLY
+
+ifdef NS_USE_NATIVE
+CC              = cc
+CCC             = ncc
+OS_CFLAGS	= -Hnocopyr
+#OS_LIBS         = -L/opt/ncc/lib 
+else
+#OS_LIBS		=
+endif
+
+CCC	= g++
+
+#OS_LIBS	       += -lsocket -lnsl -ldl -lc
+
+MKSHLIB		= $(LD) $(DSO_LDOPTS)
+#DSO_LDOPTS	= -G -z defs
+DSO_LDOPTS	= -G
+
+CPU_ARCH	= x86
+ARCH		= ncr
+
+NOSUCHFILE	= /no-such-file
+
+# now take care of default GCC (rus@5/5/97)
+ 
+ifdef NS_USE_GCC
+# if gcc-settings are redefined already - don't touch it
+#
+ifeq (,$(findstring gcc, $(CC)))
+CC      = gcc
+CCC     = g++
+CXX     = g++
+COMPILER_TAG = _gcc
+# always use -fPIC - some makefiles are still broken and don't distinguish
+# situation when they build shared and static libraries
+CFLAGS  += -fPIC -Wall $(GCC_FLAGS_EXTRA)
+#OS_LIBS += -L/usr/local/lib -lstdc++ -lg++ -lgcc
+endif
+endif
+###
+
deleted file mode 100644
--- a/config/NCR3.0.mk
+++ /dev/null
@@ -1,75 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for NCR SysVr4 v 3.0
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-###
-NS_USE_NATIVE = 1
-
-# NS_USE_GCC = 1
-
-export PATH:=$(PATH):/opt/ncc/bin
-###
-
-RANLIB          = true
-GCC_FLAGS_EXTRA = -pipe
-
-DEFINES		+= -DSVR4 -DSYSV -DHAVE_STRERROR -DNCR -D_PR_LOCAL_THREADS_ONLY
-
-ifdef NS_USE_NATIVE
-CC              = cc
-CCC             = ncc
-OS_CFLAGS	= -Hnocopyr
-#OS_LIBS         = -L/opt/ncc/lib 
-else
-#OS_LIBS		=
-endif
-
-CCC	= g++
-
-#OS_LIBS	       += -lsocket -lnsl -ldl -lc
-
-MKSHLIB		= $(LD) $(DSO_LDOPTS)
-#DSO_LDOPTS	= -G -z defs
-DSO_LDOPTS	= -G
-
-CPU_ARCH	= x86
-ARCH		= ncr
-
-NOSUCHFILE	= /no-such-file
-
-# now take care of default GCC (rus@5/5/97)
- 
-ifdef NS_USE_GCC
-# if gcc-settings are redefined already - don't touch it
-#
-ifeq (,$(findstring gcc, $(CC)))
-CC      = gcc
-CCC     = g++
-CXX     = g++
-COMPILER_TAG = _gcc
-# always use -fPIC - some makefiles are still broken and don't distinguish
-# situation when they build shared and static libraries
-CFLAGS  += -fPIC -Wall $(GCC_FLAGS_EXTRA)
-#OS_LIBS += -L/usr/local/lib -lstdc++ -lg++ -lgcc
-endif
-endif
-###
-
new file mode 100644
--- /dev/null
+++ b/config/NEC.mk
@@ -0,0 +1,45 @@
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL.  You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+# 
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+# 
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation.  Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+# Reserved.
+#
+
+#
+# Config stuff for NEC Mips SYSV
+#
+
+include $(MOD_DEPTH)/config/UNIX.mk
+
+CPU_ARCH		= mips
+
+ifdef NS_USE_GCC
+CC			= gcc
+CCC			= g++
+else
+CC			= $(NSDEPTH)/build/hcc -Xa -KGnum=0 -KOlimit=4000
+CCC			= g++
+endif
+
+MKSHLIB			= $(LD) $(DSO_LDOPTS)
+
+RANLIB			= /bin/true
+
+DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
+OS_CFLAGS		= $(ODD_CFLAGS) -DSVR4 -D__SVR4 -DNEC -Dnec_ews -DHAVE_STRERROR
+OS_LIBS			= -lsocket -lnsl -ldl $(LDOPTIONS)
+LDOPTIONS		= -lc -L/usr/ucblib -lucb
+
+NOSUCHFILE		= /no-such-file
+
+DSO_LDOPTS		= -G
deleted file mode 100644
--- a/config/NEC4.2.mk
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for NEC Mips SYSV
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-CPU_ARCH		= mips
-
-ifdef NS_USE_GCC
-CC			= gcc
-CCC			= g++
-else
-CC			= $(NSDEPTH)/build/hcc -Xa -KGnum=0 -KOlimit=4000
-CCC			= g++
-endif
-
-MKSHLIB			= $(LD) $(DSO_LDOPTS)
-
-RANLIB			= /bin/true
-
-DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
-OS_CFLAGS		= $(ODD_CFLAGS) -DSVR4 -D__SVR4 -DNEC -Dnec_ews -DHAVE_STRERROR
-OS_LIBS			= -lsocket -lnsl -ldl $(LDOPTIONS)
-LDOPTIONS		= -lc -L/usr/ucblib -lucb
-
-NOSUCHFILE		= /no-such-file
-
-DSO_LDOPTS		= -G
new file mode 100644
--- /dev/null
+++ b/config/NEWS-OS.mk
@@ -0,0 +1,59 @@
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL.  You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+# 
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+# 
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation.  Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+# Reserved.
+#
+
+######################################################################
+# Config stuff for Sony NEWS-OS
+######################################################################
+ 
+######################################################################
+# Version-independent
+######################################################################
+
+include $(MOD_DEPTH)/config/UNIX.mk
+
+ARCH			:= sony
+CPU_ARCH		:= mips
+ 
+CC			= cc
+CCC			= CC
+RANLIB			= /bin/true
+
+OS_INCLUDES		= -I/usr/include
+G++INCLUDES		=
+#OS_LIBS			= -lsocket -lnsl -lgen -lresolv
+
+PLATFORM_FLAGS		= -Xa -fullwarn -DSONY
+PORT_FLAGS		= -DSYSV -DSVR4 -D__svr4 -D__svr4__ -D_PR_LOCAL_THREADS_ONLY
+
+OS_CFLAGS		= $(PLATFORM_FLAGS) $(PORT_FLAGS)
+
+######################################################################
+# Version-specific stuff
+######################################################################
+
+######################################################################
+# Overrides for defaults in config.mk (or wherever)
+######################################################################
+
+######################################################################
+# Other
+######################################################################
+
+MKSHLIB			= $(LD) $(DSO_LDOPTS)
+ 
+DSO_LDOPTS		= -G
+DSO_LDFLAGS		=
deleted file mode 100644
--- a/config/NEWS-OS6.1.1.mk
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-######################################################################
-# Config stuff for Sony NEWS-OS
-######################################################################
- 
-######################################################################
-# Version-independent
-######################################################################
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-ARCH			:= sony
-CPU_ARCH		:= mips
- 
-CC			= cc
-CCC			= CC
-RANLIB			= /bin/true
-
-OS_INCLUDES		= -I/usr/include
-G++INCLUDES		=
-#OS_LIBS			= -lsocket -lnsl -lgen -lresolv
-
-PLATFORM_FLAGS		= -Xa -fullwarn -DSONY
-PORT_FLAGS		= -DSYSV -DSVR4 -D__svr4 -D__svr4__ -D_PR_LOCAL_THREADS_ONLY
-
-OS_CFLAGS		= $(PLATFORM_FLAGS) $(PORT_FLAGS)
-
-######################################################################
-# Version-specific stuff
-######################################################################
-
-######################################################################
-# Overrides for defaults in config.mk (or wherever)
-######################################################################
-
-######################################################################
-# Other
-######################################################################
-
-MKSHLIB			= $(LD) $(DSO_LDOPTS)
- 
-DSO_LDOPTS		= -G
-DSO_LDFLAGS		=
--- a/config/OS2.mk
+++ b/config/OS2.mk
@@ -43,16 +43,17 @@ INSTALL	= $(NSINSTALL)
 MAKE_OBJDIR = mkdir $(OBJDIR)
 IMPLIB = flipper implib -nologo -noignorecase
 FILTER = flipper cppfilt -q
 RC = rc.exe
 
 GARBAGE =
 
 XP_DEFINE = -DXP_PC
+OBJ_SUFFIX = obj
 LIB_SUFFIX = lib
 DLL_SUFFIX = dll
 
 OS_CFLAGS     = -I. -W3 -gm -gd+ -sd- -su4 -ge-
 OS_EXE_CFLAGS = -I. -W3 -gm -gd+ -sd- -su4 
 AR_EXTRA_ARGS = ,,
 
 ifdef BUILD_OPT
deleted file mode 100644
--- a/config/OS24.0.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for OS/2 4.0.
-#
-
-include $(MOD_DEPTH)/config/OS2.mk
deleted file mode 100644
--- a/config/OSF1V2.0.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for DEC OSF/1 V2.0
-#
-include $(MOD_DEPTH)/config/OSF1.mk
deleted file mode 100644
--- a/config/OSF1V3.0.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for DEC OSF/1 V3.0
-#
-include $(MOD_DEPTH)/config/OSF1.mk
deleted file mode 100644
--- a/config/OSF1V3.2.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for DEC OSF/1 V3.2
-#
-include $(MOD_DEPTH)/config/OSF1.mk
deleted file mode 100644
--- a/config/OSF1V4.0.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for DEC OSF/1 V4.0
-#
-include $(MOD_DEPTH)/config/OSF1.mk
deleted file mode 100644
--- a/config/ReliantUNIX.mk
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for ReliantUNIX
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-# use gcc -tf-
-NS_USE_GCC		= 1
-
-ifdef NS_USE_GCC
-## gcc-2.7.2 homebrewn
-CC			= gcc
-COMPILER_TAG		= _gcc
-CCC			= g++
-AS			= $(CC) -x assembler-with-cpp
-LD			= gld
-ODD_CFLAGS		= -pipe -Wall -Wno-format
-ifdef BUILD_OPT
-OPTIMIZER		= -O
-#OPTIMIZER		= -O6
-endif
-MKSHLIB			= $(LD) -G -h $(@:$(OBJDIR)/%.so=%.so)
-DSO_LDOPTS		= -G -Xlinker -Blargedynsym
-else
-## native compiler (CDS++ 1.0)
-CC			= /usr/bin/cc
-CCC			= /usr/bin/CC
-AS			= /usr/bin/cc
-#ODD_CFLAGS		= -fullwarn -xansi
-ODD_CFLAGS		= 
-ifdef BUILD_OPT
-#OPTIMIZER		= -Olimit 4000
-OPTIMIZER		= -O -F Olimit,4000
-endif
-MKSHLIB			= $(CC) -G -h $(@:$(OBJDIR)/%.so=%.so)
-DSO_LDOPTS		= -G -W l,-Blargedynsym
-endif
-
-ODD_CFLAGS		+= -DSVR4 -DSNI -DRELIANTUNIX -D_SVID_GETTOD
-
-CPU_ARCH		= mips
-
-RANLIB			= /bin/true
-
-# For purify
-NOMD_OS_CFLAGS		= $(ODD_CFLAGS)
-
-# we do not have -MDupdate ...
-OS_CFLAGS		= $(NOMD_OS_CFLAGS)
-OS_LIBS			= -lsocket -lnsl -lresolv -lgen -ldl -lc $(UCBLIB)
-UCBLIB			= -L/usr/ucblib -lucb
-NOSUCHFILE		= /no-such-file
-
-HAVE_PURIFY		= 0
-
-DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
-OS_CFLAGS		= $(ODD_CFLAGS) -DSVR4 -DSNI -Dsinix
deleted file mode 100644
--- a/config/ReliantUNIX5.4.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for ReliantUNIX5.4
-#
-include $(MOD_DEPTH)/config/ReliantUNIX.mk
new file mode 100644
--- /dev/null
+++ b/config/SCOOS.mk
@@ -0,0 +1,74 @@
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL.  You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+# 
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+# 
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation.  Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+# Reserved.
+#
+
+#
+# Config stuff for SCO OpenServer for x86.
+#
+
+include $(MOD_DEPTH)/config/UNIX.mk
+
+CC			= cc -b elf -KPIC
+CCC			= g++ -b elf -I/usr/local/lib/g++-include
+# CCC			= $(DEPTH)/build/hcpp +.cpp +w
+RANLIB			= /bin/true
+
+DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
+#
+# -DSCO_PM - Policy Manager AKA: SCO Licensing
+# -DSCO - Changes to Netscape source (consistent with AIX, LINUX, etc..)
+# -Dsco - Needed for /usr/include/X11/*
+#
+OS_CFLAGS		= -DSCO_SV -DSYSV -D_SVID3 -DHAVE_STRERROR -D_PR_NEED_H_ERRNO -DSCO_PM -DSCO -Dsco
+#OS_LIBS			= -lpmapi -lsocket -lc
+
+MKSHLIB			= $(LD) $(DSO_LDOPTS)
+
+XINC			= /usr/include/X11
+MOTIFLIB		= -lXm
+INCLUDES		+= -I$(XINC)
+
+CPU_ARCH		= x86
+GFX_ARCH		= x
+ARCH			= sco
+
+LOCALE_MAP		= $(DEPTH)/cmd/xfe/intl/sco.lm
+EN_LOCALE		= C
+DE_LOCALE		= de_DE.ISO8859-1
+FR_LOCALE		= fr_FR.ISO8859-1
+JP_LOCALE		= ja
+SJIS_LOCALE		= ja_JP.SJIS
+KR_LOCALE		= ko_KR.EUC
+CN_LOCALE		= zh
+TW_LOCALE		= zh
+I2_LOCALE		= i2
+
+LOC_LIB_DIR		= /usr/lib/X11
+
+NOSUCHFILE		= /no-such-file
+
+BSDECHO			= /bin/echo
+
+#
+# These defines are for building unix plugins
+#
+BUILD_UNIX_PLUGINS	= 1
+#DSO_LDOPTS		= -b elf -G -z defs
+DSO_LDOPTS		= -b elf -G
+DSO_LDFLAGS		= -nostdlib -L/lib -L/usr/lib -lXm -lXt -lX11 -lgen
+
+# Used for Java compiler
+EXPORT_FLAGS = -W l,-Bexport
deleted file mode 100644
--- a/config/SCOOS5.0.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for SCO OpenServer 5.0 for x86.
-#
-
-include $(MOD_DEPTH)/config/SCO_SV3.2.mk
deleted file mode 100644
--- a/config/SCO_SV3.2.mk
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for SCO Unix for x86.
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-CC			= cc -b elf -KPIC
-CCC			= g++ -b elf -I/usr/local/lib/g++-include
-# CCC			= $(DEPTH)/build/hcpp +.cpp +w
-RANLIB			= /bin/true
-
-DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
-#
-# -DSCO_PM - Policy Manager AKA: SCO Licensing
-# -DSCO - Changes to Netscape source (consistent with AIX, LINUX, etc..)
-# -Dsco - Needed for /usr/include/X11/*
-#
-OS_CFLAGS		= -DSCO_SV -DSYSV -D_SVID3 -DHAVE_STRERROR -DSCO_PM -DSCO -Dsco
-#OS_LIBS			= -lpmapi -lsocket -lc
-
-MKSHLIB			= $(LD) $(DSO_LDOPTS)
-
-XINC			= /usr/include/X11
-MOTIFLIB		= -lXm
-INCLUDES		+= -I$(XINC)
-
-CPU_ARCH		= x86
-GFX_ARCH		= x
-ARCH			= sco
-
-LOCALE_MAP		= $(DEPTH)/cmd/xfe/intl/sco.lm
-EN_LOCALE		= C
-DE_LOCALE		= de_DE.ISO8859-1
-FR_LOCALE		= fr_FR.ISO8859-1
-JP_LOCALE		= ja
-SJIS_LOCALE		= ja_JP.SJIS
-KR_LOCALE		= ko_KR.EUC
-CN_LOCALE		= zh
-TW_LOCALE		= zh
-I2_LOCALE		= i2
-
-LOC_LIB_DIR		= /usr/lib/X11
-
-NOSUCHFILE		= /no-such-file
-
-BSDECHO			= /bin/echo
-
-#
-# These defines are for building unix plugins
-#
-BUILD_UNIX_PLUGINS	= 1
-#DSO_LDOPTS		= -b elf -G -z defs
-DSO_LDOPTS		= -b elf -G
-DSO_LDFLAGS		= -nostdlib -L/lib -L/usr/lib -lXm -lXt -lX11 -lgen
-
-# Used for Java compiler
-EXPORT_FLAGS = -W l,-Bexport
new file mode 100644
--- /dev/null
+++ b/config/SINIX.mk
@@ -0,0 +1,74 @@
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL.  You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+# 
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+# 
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation.  Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+# Reserved.
+#
+
+#
+# Config stuff for SNI SINIX-N (aka ReliantUNIX)
+#
+
+include $(MOD_DEPTH)/config/UNIX.mk
+
+# use gcc -tf-
+NS_USE_GCC		= 1
+
+ifdef NS_USE_GCC
+## gcc-2.7.2 homebrewn
+CC			= gcc
+COMPILER_TAG		= _gcc
+CCC			= g++
+AS			= $(CC) -x assembler-with-cpp
+LD			= gld
+ODD_CFLAGS		= -pipe -Wall -Wno-format
+ifdef BUILD_OPT
+OPTIMIZER		= -O
+#OPTIMIZER		= -O6
+endif
+MKSHLIB			= $(LD) -G -h $(@:$(OBJDIR)/%.so=%.so)
+DSO_LDOPTS		= -G -Xlinker -Blargedynsym
+else
+## native compiler (CDS++ 1.0)
+CC			= /usr/bin/cc
+CCC			= /usr/bin/CC
+AS			= /usr/bin/cc
+#ODD_CFLAGS		= -fullwarn -xansi
+ODD_CFLAGS		= 
+ifdef BUILD_OPT
+#OPTIMIZER		= -Olimit 4000
+OPTIMIZER		= -O -F Olimit,4000
+endif
+MKSHLIB			= $(CC) -G -h $(@:$(OBJDIR)/%.so=%.so)
+DSO_LDOPTS		= -G -W l,-Blargedynsym
+endif
+
+ODD_CFLAGS		+= -DSVR4 -DSNI -DRELIANTUNIX -D_SVID_GETTOD
+
+CPU_ARCH		= mips
+
+RANLIB			= /bin/true
+
+# For purify
+NOMD_OS_CFLAGS		= $(ODD_CFLAGS)
+
+# we do not have -MDupdate ...
+OS_CFLAGS		= $(NOMD_OS_CFLAGS)
+OS_LIBS			= -lsocket -lnsl -lresolv -lgen -ldl -lc $(UCBLIB)
+UCBLIB			= -L/usr/ucblib -lucb
+NOSUCHFILE		= /no-such-file
+
+HAVE_PURIFY		= 0
+
+DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
+OS_CFLAGS		= $(ODD_CFLAGS) -DSVR4 -DSNI -Dsinix
new file mode 100644
--- /dev/null
+++ b/config/SunOS.mk
@@ -0,0 +1,26 @@
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL.  You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+# 
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+# 
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation.  Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+# Reserved.
+#
+
+#
+# Config stuff for SunOS.
+# 4 and 5 are vastly different, so we use 2 different files.
+#
+ifeq ($(basename $(OS_RELEASE)),4.1)
+include $(MOD_DEPTH)/config/SunOS4.mk
+else
+include $(MOD_DEPTH)/config/SunOS5.mk
+endif
deleted file mode 100644
--- a/config/SunOS4.1.3_U1.mk
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for SunOS4.1
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-# SunOS 4 _requires_ that shared libs have a version number.
-# XXX FIXME: Version number should use NSPR_VERSION_NUMBER?
-DLL_SUFFIX	= so.1.0
-
-CC			= gcc
-COMPILER_TAG		= _gcc
-
-RANLIB			= ranlib
-
-CPU_ARCH		= sparc
-
-DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
-# Purify doesn't like -MDupdate
-NOMD_OS_CFLAGS		= -Wall -Wno-format -DSUNOS4
-OS_CFLAGS		= $(DSO_CFLAGS) $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
-
-MKSHLIB			= $(LD) $(DSO_LDOPTS)
-
-HAVE_PURIFY		= 1
-
-NOSUCHFILE		= /no-such-file
-
-DSO_LDOPTS		=
-# -fPIC generates position-independent code for use in a shared library.
-DSO_CFLAGS		= -fPIC
new file mode 100644
--- /dev/null
+++ b/config/SunOS4.mk
@@ -0,0 +1,48 @@
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL.  You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+# 
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+# 
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation.  Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+# Reserved.
+#
+
+#
+# Config stuff for SunOS4.1
+#
+
+include $(MOD_DEPTH)/config/UNIX.mk
+
+# SunOS 4 _requires_ that shared libs have a version number.
+# XXX FIXME: Version number should use NSPR_VERSION_NUMBER?
+DLL_SUFFIX	= so.1.0
+
+CC			= gcc
+COMPILER_TAG		= _gcc
+
+RANLIB			= ranlib
+
+CPU_ARCH		= sparc
+
+DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
+# Purify doesn't like -MDupdate
+NOMD_OS_CFLAGS		= -Wall -Wno-format -DSUNOS4
+OS_CFLAGS		= $(DSO_CFLAGS) $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
+
+MKSHLIB			= $(LD) $(DSO_LDOPTS)
+
+HAVE_PURIFY		= 1
+
+NOSUCHFILE		= /no-such-file
+
+DSO_LDOPTS		=
+# -fPIC generates position-independent code for use in a shared library.
+DSO_CFLAGS		= -fPIC
deleted file mode 100644
--- a/config/SunOS5.3.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for SunOS5.3
-#
-
-SOL_CFLAGS	=
-
-include $(MOD_DEPTH)/config/SunOS5.mk
deleted file mode 100644
--- a/config/SunOS5.4.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for SunOS5.4
-#
-
-SOL_CFLAGS	=
-
-include $(MOD_DEPTH)/config/SunOS5.mk
deleted file mode 100644
--- a/config/SunOS5.4_i86pc.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for Solaris 2.4 on x86
-# 
-
-include $(MOD_DEPTH)/config/SunOS5.mk
deleted file mode 100644
--- a/config/SunOS5.5.1.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for SunOS5.5.1
-#
-
-SOL_CFLAGS	= -D_SVID_GETTOD
-
-include $(MOD_DEPTH)/config/SunOS5.mk
deleted file mode 100644
--- a/config/SunOS5.5.1_i86pc.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for Solaris 2.5.1 on x86
-# 
-
-SOL_CFLAGS	= -D_SVID_GETTOD
-
-include $(MOD_DEPTH)/config/SunOS5.mk
deleted file mode 100644
--- a/config/SunOS5.5.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for SunOS5.5
-#
-
-SOL_CFLAGS	= -D_SVID_GETTOD
-
-include $(MOD_DEPTH)/config/SunOS5.mk
deleted file mode 100644
--- a/config/SunOS5.6.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for SunOS5.6
-#
-
-SOL_CFLAGS	= -D_SVID_GETTOD
-
-include $(MOD_DEPTH)/config/SunOS5.mk
deleted file mode 100644
--- a/config/SunOS5.6_i86pc.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for Solaris 2.6 on x86
-# 
-
-SOL_CFLAGS	= -D_SVID_GETTOD
-
-include $(MOD_DEPTH)/config/SunOS5.mk
--- a/config/SunOS5.mk
+++ b/config/SunOS5.mk
@@ -90,25 +90,31 @@ OS_CFLAGS		+= -xs
 endif
 endif
 endif
 
 RANLIB			= echo
 
 OS_DEFINES		= -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS
 
-ifeq (i86pc,$(findstring i86pc,$(OS_RELEASE)))
+ifeq ($(OS_TEST),i86pc)
 CPU_ARCH		= x86
+CPU_ARCH_TAG		= _i86pc
 OS_DEFINES		+= -Di386
 else
 CPU_ARCH		= sparc
 endif
 
 ifeq (5.5,$(findstring 5.5,$(OS_RELEASE)))
 OS_DEFINES		+= -DSOLARIS2_5
+SOL_CFLAGS		= -D_SVID_GETTOD
+endif
+
+ifeq ($(OS_RELEASE),5.6)
+SOL_CFLAGS		= -D_SVID_GETTOD
 endif
 
 ifneq ($(LOCAL_THREADS_ONLY),1)
 OS_DEFINES		+= -D_REENTRANT
 endif
 
 # Purify doesn't like -MDupdate
 NOMD_OS_CFLAGS		= $(DSO_CFLAGS) $(OS_DEFINES) $(SOL_CFLAGS)
@@ -144,15 +150,13 @@ NOSUCHFILE		= /no-such-file
 # value of $(ULTRASPARC_FILTER_LIBRARY).
 # For an application to use the assembly-language implementation, a link should be
 # made so that opening ULTRASPARC_FILTER_LIBRARY results in opening
 # ULTRASPARC_LIBRARY. This indirection requires the user to explicitly set up
 # library for use on UltraSparc systems, thereby helping to avoid using it by
 # accident on non-UltraSparc systems.
 # The directory containing the ultrasparc libraries should be in LD_LIBRARY_PATH.
 #
-ifneq ($(OS_RELEASE),4.1.3_U1)
 ifeq ($(OS_TEST),sun4u)
 ULTRASPARC_LIBRARY = ultrasparc
 ULTRASPARC_FILTER_LIBRARY = libatomic.so
 DSO_LDOPTS		+= -f $(ULTRASPARC_FILTER_LIBRARY)
 endif
-endif
--- a/config/UNIX.mk
+++ b/config/UNIX.mk
@@ -11,16 +11,17 @@
 # 
 # The Initial Developer of this code under the NPL is Netscape
 # Communications Corporation.  Portions created by Netscape are
 # Copyright (C) 1998 Netscape Communications Corporation.  All Rights
 # Reserved.
 #
 
 XP_DEFINE	= -DXP_UNIX
+OBJ_SUFFIX	= o
 LIB_SUFFIX	= a
 DLL_SUFFIX	= so
 AR		= ar cr $@
 
 ifdef BUILD_OPT
 OPTIMIZER	= -O
 DEFINES		= -UDEBUG -DNDEBUG
 OBJDIR_TAG	= _OPT
new file mode 100644
--- /dev/null
+++ b/config/UNIXWARE.mk
@@ -0,0 +1,38 @@
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL.  You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+# 
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+# 
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation.  Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+# Reserved.
+#
+
+#
+# Config stuff for SCO UnixWare
+#
+
+include $(MOD_DEPTH)/config/UNIX.mk
+
+CC		= $(NSDEPTH)/build/hcc
+CCC		= $(NSDEPTH)/build/hcpp
+
+RANLIB		= true
+
+DEFINES		+= -D_PR_LOCAL_THREADS_ONLY
+OS_CFLAGS	= -DSVR4 -DSYSV -DUNIXWARE
+
+MKSHLIB		= $(LD) $(DSO_LDOPTS)
+DSO_LDOPTS	= -G
+
+CPU_ARCH	= x86
+ARCH		= sco
+
+NOSUCHFILE	= /no-such-file
deleted file mode 100644
--- a/config/UNIXWARE2.1.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for SCO Unixware 2.1
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-CC		= $(NSDEPTH)/build/hcc
-CCC		= $(NSDEPTH)/build/hcpp
-
-RANLIB		= true
-
-DEFINES		+= -D_PR_LOCAL_THREADS_ONLY
-OS_CFLAGS	= -DSVR4 -DSYSV -DUNIXWARE
-
-MKSHLIB		= $(LD) $(DSO_LDOPTS)
-DSO_LDOPTS	= -G
-
-CPU_ARCH	= x86
-ARCH		= sco
-
-NOSUCHFILE	= /no-such-file
new file mode 100644
--- /dev/null
+++ b/config/WIN32.mk
@@ -0,0 +1,139 @@
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL.  You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+# 
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+# 
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation.  Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+# Reserved.
+#
+
+#
+# Configuration common to all versions of Windows NT
+# and Windows 95.
+#
+
+#
+# Client build: make sure we use the shmsdos.exe under $(MOZ_TOOLS).
+# $(MOZ_TOOLS_FLIPPED) is $(MOZ_TOOLS) with all the backslashes
+# flipped, so that gmake won't interpret them as escape characters.
+#
+ifdef PR_CLIENT_BUILD_WINDOWS
+SHELL = $(MOZ_TOOLS_FLIPPED)/bin/shmsdos.exe
+endif
+
+CC = cl
+CCC = cl
+LINK = link
+AR = lib -NOLOGO -OUT:"$@"
+RANLIB = echo
+BSDECHO = echo
+NSINSTALL = nsinstall
+INSTALL	= $(NSINSTALL)
+define MAKE_OBJDIR
+if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
+endef
+RC = rc.exe
+
+GARBAGE = $(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb
+
+XP_DEFINE = -DXP_PC
+OBJ_SUFFIX = obj
+LIB_SUFFIX = lib
+DLL_SUFFIX = dll
+
+OS_CFLAGS = -W3 -nologo -GF -Gy
+
+ifdef MOZ_PROF
+
+#
+# compile with debug symbols, but without DEBUG code and ASSERTs
+#
+ifdef USE_DEBUG_RTL
+OS_CFLAGS += -MDd
+else
+OS_CFLAGS += -MD
+endif
+OPTIMIZER = -Od -Z7
+#OPTIMIZER = -Zi -Fd$(OBJDIR)/ -Od
+DEFINES = -UDEBUG -U_DEBUG -DNDEBUG
+DLLFLAGS = -DEBUG -DEBUGTYPE:CV -OUT:"$@"
+OBJDIR_TAG = _DBG
+LDFLAGS = -DEBUG -DEBUGTYPE:CV
+
+else
+
+ifdef BUILD_OPT
+OS_CFLAGS += -MD
+OPTIMIZER = -O2
+DEFINES = -UDEBUG -U_DEBUG -DNDEBUG
+DLLFLAGS = -OUT:"$@"
+OBJDIR_TAG = _OPT
+else
+#
+# Define USE_DEBUG_RTL if you want to use the debug runtime library
+# (RTL) in the debug build
+#
+ifdef USE_DEBUG_RTL
+OS_CFLAGS += -MDd
+else
+OS_CFLAGS += -MD
+endif
+OPTIMIZER = -Od -Z7
+#OPTIMIZER = -Zi -Fd$(OBJDIR)/ -Od
+DEFINES = -DDEBUG -D_DEBUG -UNDEBUG
+DLLFLAGS = -DEBUG -DEBUGTYPE:CV -OUT:"$@"
+OBJDIR_TAG = _DBG
+LDFLAGS = -DEBUG -DEBUGTYPE:CV
+endif
+endif
+
+DEFINES += -DWIN32
+ifeq ($(OS_TARGET),WINNT)
+#
+# Win NT needs -GT so that fibers can work
+#
+OS_CFLAGS += -GT
+DEFINES += -DWINNT
+else
+DEFINES += -DWIN95 -D_PR_GLOBAL_THREADS_ONLY
+endif
+
+ifeq ($(CPU_ARCH),x386)
+DEFINES += -D_X86_
+else
+ifeq ($(CPU_ARCH),MIPS)
+DEFINES += -D_MIPS_
+else
+ifeq ($(CPU_ARCH),ALPHA)
+DEFINES += -D_ALPHA_=1
+else
+CPU_ARCH = processor_is_undefined
+endif
+endif
+endif
+
+# Name of the binary code directories
+
+ifeq ($(CPU_ARCH),x386)
+CPU_ARCH_TAG =
+else
+CPU_ARCH_TAG = $(CPU_ARCH)
+endif
+
+ifdef USE_DEBUG_RTL
+OBJDIR_SUFFIX = OBJD
+else
+OBJDIR_SUFFIX = OBJ
+endif
+
+OBJDIR_NAME = $(OS_CONFIG)$(CPU_ARCH_TAG)$(OBJDIR_TAG).$(OBJDIR_SUFFIX)
+
+OS_DLLFLAGS = -nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE
new file mode 100644
--- /dev/null
+++ b/config/WIN95.mk
@@ -0,0 +1,22 @@
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL.  You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+# 
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+# 
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation.  Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+# Reserved.
+#
+
+#
+# Config stuff for WIN95
+#
+
+include $(MOD_DEPTH)/config/WIN32.mk
deleted file mode 100644
--- a/config/WIN954.0.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for WIN95
-#
-
-include $(MOD_DEPTH)/config/WINNT.mk
--- a/config/WINNT.mk
+++ b/config/WINNT.mk
@@ -11,129 +11,12 @@
 # 
 # The Initial Developer of this code under the NPL is Netscape
 # Communications Corporation.  Portions created by Netscape are
 # Copyright (C) 1998 Netscape Communications Corporation.  All Rights
 # Reserved.
 #
 
 #
-# Configuration common to all versions of Windows NT
-# and Windows 95.  This file should probably be called
-# WIN32.mk.
+# Config stuff for WINNT
 #
 
-#
-# Client build: make sure we use the shmsdos.exe under $(MOZ_TOOLS).
-# $(MOZ_TOOLS_FLIPPED) is $(MOZ_TOOLS) with all the backslashes
-# flipped, so that gmake won't interpret them as escape characters.
-#
-ifdef PR_CLIENT_BUILD_WINDOWS
-SHELL = $(MOZ_TOOLS_FLIPPED)/bin/shmsdos.exe
-endif
-
-CC = cl
-CCC = cl
-LINK = link
-AR = lib -NOLOGO -OUT:"$@"
-RANLIB = echo
-BSDECHO = echo
-NSINSTALL = nsinstall
-INSTALL	= $(NSINSTALL)
-define MAKE_OBJDIR
-if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
-endef
-RC = rc.exe
-
-GARBAGE = $(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb
-
-XP_DEFINE = -DXP_PC
-LIB_SUFFIX = lib
-DLL_SUFFIX = dll
-
-OS_CFLAGS = -W3 -nologo -GF -Gy
-
-ifdef MOZ_PROF
-
-#
-# compile with debug symbols, but without DEBUG code and ASSERTs
-#
-ifdef USE_DEBUG_RTL
-OS_CFLAGS += -MDd
-else
-OS_CFLAGS += -MD
-endif
-OPTIMIZER = -Od -Z7
-#OPTIMIZER = -Zi -Fd$(OBJDIR)/ -Od
-DEFINES = -UDEBUG -U_DEBUG -DNDEBUG
-DLLFLAGS = -DEBUG -DEBUGTYPE:CV -OUT:"$@"
-OBJDIR_TAG = _DBG
-LDFLAGS = -DEBUG -DEBUGTYPE:CV
-
-else
-
-ifdef BUILD_OPT
-OS_CFLAGS += -MD
-OPTIMIZER = -O2
-DEFINES = -UDEBUG -U_DEBUG -DNDEBUG
-DLLFLAGS = -OUT:"$@"
-OBJDIR_TAG = _OPT
-else
-#
-# Define USE_DEBUG_RTL if you want to use the debug runtime library
-# (RTL) in the debug build
-#
-ifdef USE_DEBUG_RTL
-OS_CFLAGS += -MDd
-else
-OS_CFLAGS += -MD
-endif
-OPTIMIZER = -Od -Z7
-#OPTIMIZER = -Zi -Fd$(OBJDIR)/ -Od
-DEFINES = -DDEBUG -D_DEBUG -UNDEBUG
-DLLFLAGS = -DEBUG -DEBUGTYPE:CV -OUT:"$@"
-OBJDIR_TAG = _DBG
-LDFLAGS = -DEBUG -DEBUGTYPE:CV
-endif
-endif
-
-DEFINES += -DWIN32
-ifeq ($(OS_TARGET),WINNT)
-#
-# Win NT needs -GT so that fibers can work
-#
-OS_CFLAGS += -GT
-DEFINES += -DWINNT
-else
-DEFINES += -DWIN95 -D_PR_GLOBAL_THREADS_ONLY
-endif
-
-ifeq ($(CPU_ARCH),x386)
-DEFINES += -D_X86_
-else
-ifeq ($(CPU_ARCH),MIPS)
-DEFINES += -D_MIPS_
-else
-ifeq ($(CPU_ARCH),ALPHA)
-DEFINES += -D_ALPHA_=1
-else
-CPU_ARCH = processor_is_undefined
-endif
-endif
-endif
-
-# Name of the binary code directories
-
-ifeq ($(CPU_ARCH),x386)
-CPU_ARCH_TAG =
-else
-CPU_ARCH_TAG = $(CPU_ARCH)
-endif
-
-ifdef USE_DEBUG_RTL
-OBJDIR_SUFFIX = OBJD
-else
-OBJDIR_SUFFIX = OBJ
-endif
-
-OBJDIR_NAME = $(OS_CONFIG)$(CPU_ARCH_TAG)$(OBJDIR_TAG).$(OBJDIR_SUFFIX)
-
-OS_DLLFLAGS = -nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE
+include $(MOD_DEPTH)/config/WIN32.mk
deleted file mode 100644
--- a/config/WINNT3.51.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for WINNT 3.51
-#
-
-include $(MOD_DEPTH)/config/WINNT.mk
deleted file mode 100644
--- a/config/WINNT4.0.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for WINNT 4.0
-#
-
-include $(MOD_DEPTH)/config/WINNT.mk
deleted file mode 100644
--- a/config/WINNT5.0.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for WINNT 5.0
-#
-
-include $(MOD_DEPTH)/config/WINNT.mk
--- a/config/arch.mk
+++ b/config/arch.mk
@@ -15,111 +15,89 @@
 # Reserved.
 #
 
 #######################################################################
 # Master "Core Components" macros for getting the OS architecture     #
 #######################################################################
 
 #
-# Macros for getting the OS architecture
-#
-
-OS_ARCH := $(subst /,_,$(shell uname -s))
-
-#
-# Attempt to differentiate between sparc and x86 Solaris
-#
-
-OS_TEST := $(shell uname -m)
-ifeq ($(OS_TEST),i86pc)
-	OS_RELEASE := $(shell uname -r)_$(OS_TEST)
-else
-	OS_RELEASE := $(shell uname -r)
-endif
-
-#
-# Force the IRIX64 machines to use IRIX.
+# Important internal static macros
 #
 
-ifeq ($(OS_ARCH),IRIX64)
-	OS_ARCH := IRIX
-endif
+OS_ARCH		:= $(subst /,_,$(shell uname -s))
+OS_RELEASE	:= $(shell uname -r)
+OS_TEST		:= $(shell uname -m)
 
 #
-# Force the newer BSDI versions to use the old arch name.
-#
-
-ifeq ($(OS_ARCH),BSD_OS)
-	OS_ARCH := BSD_386
-endif
-
-#
-# Drop all but the major revision for FreeBSD releases.
+# Tweak the default OS_ARCH and OS_RELEASE macros as needed.
 #
-# Handle one dot (2.2-STABLE) and two dot (2.2.5-RELEASE) forms.
-#
-
-ifeq ($(OS_ARCH),FreeBSD)
-	OS_RELEASE := $(basename $(shell uname -r))
-	NEW_OS_RELEASE := $(basename $(OS_RELEASE))
-	ifneq ($(NEW_OS_RELEASE),"")
-		OS_RELEASE := $(NEW_OS_RELEASE)
-	endif
+ifeq ($(OS_ARCH),AIX)
+OS_RELEASE	:= $(shell uname -v).$(shell uname -r)
+endif
+ifeq ($(OS_ARCH),BSD_386)
+OS_ARCH		:= BSD_OS
+endif
+ifeq ($(OS_ARCH),IRIX64)
+OS_ARCH		:= IRIX
+endif
+ifeq ($(OS_ARCH),UNIX_SV)
+ifneq ($(findstring NCR,$(shell grep NCR /etc/bcheckrc | head -1 )),)
+OS_ARCH		:= NCR
+else
+OS_ARCH		:= UNIXWARE
+OS_RELEASE	:= $(shell uname -v)
+endif
+endif
+ifeq ($(OS_ARCH),ncr)
+OS_ARCH		:= NCR
+endif
+# This is the only way to correctly determine the actual OS version on NCR boxes.
+ifeq ($(OS_ARCH),NCR)
+OS_RELEASE	:= $(shell awk '{print $$3}' /etc/.relid | sed 's/^\([0-9]\)\(.\)\(..\)\(.*\)$$/\2.\3/')
+endif
+ifeq ($(OS_ARCH),UNIX_System_V)
+OS_ARCH		:= NEC
+endif
+ifeq ($(OS_ARCH),SCO_SV)
+OS_ARCH		:= SCOOS
+OS_RELEASE	:= 5.0
+endif
+ifeq ($(OS_ARCH),SINIX-N)
+OS_ARCH		:= SINIX
+endif
+# SINIX changes name to ReliantUNIX with 5.43
+ifeq ($(OS_ARCH),ReliantUNIX-N)
+OS_ARCH		:= SINIX
+endif
+ifeq ($(OS_ARCH),UnixWare)
+OS_ARCH		:= UNIXWARE
+OS_RELEASE	:= $(shell uname -v)
 endif
 
 #
-# Catch NCR butchering of SVR4
+# Handle FreeBSD 2.2-STABLE and Linux 2.0.30-osfmach3
 #
 
-ifeq ($(OS_ARCH),UNIX_SV)
-	ifneq ($(findstring NCR, $(shell grep NCR /etc/bcheckrc | head -1 )),)
-		OS_ARCH := NCR
-	else
-		# Make UnixWare something human readable
-		OS_ARCH := UNIXWARE
-	endif
-
-	# Get the OS release number, not 4.2
-	OS_RELEASE := $(shell uname -v)
-endif
-
-ifeq ($(OS_ARCH),UNIX_System_V)
-	OS_ARCH	:= NEC
-endif
-
-ifeq ($(OS_ARCH),AIX)
-	OS_RELEASE := $(shell uname -v).$(shell uname -r)
-endif
-
-ifeq (osfmach3,$(findstring osfmach3,$(OS_RELEASE)))
-	OS_RELEASE	:= ppc
+ifeq (,$(filter-out Linux FreeBSD,$(OS_ARCH)))
+OS_RELEASE	:= $(shell echo $(OS_RELEASE) | sed 's/-.*//')
 endif
 
 #
-# SINIX changes name to ReliantUNIX with 5.43
+# Distinguish between OSF1 V4.0B and V4.0D
 #
 
-ifeq ($(OS_ARCH),ReliantUNIX-N)
-	OS_ARCH    := ReliantUNIX
-	OS_RELEASE := 5.4
-endif
-
-ifeq ($(OS_ARCH),SINIX-N)
-	OS_ARCH    := ReliantUNIX
-	OS_RELEASE := 5.4
-endif
-
-#
-# OS_OBJTYPE is used only by Linux
-#
-
-ifeq ($(OS_ARCH),Linux)
-	OS_OBJTYPE := ELF
-	OS_RELEASE := $(basename $(OS_RELEASE))
+ifeq ($(OS_ARCH)$(OS_RELEASE),OSF1V4.0)
+	OS_VERSION := $(shell uname -v)
+	ifeq ($(OS_VERSION),564)
+		OS_RELEASE := V4.0B
+	endif
+	ifeq ($(OS_VERSION),878)
+		OS_RELEASE := V4.0D
+	endif
 endif
 
 #######################################################################
 # Master "Core Components" macros for getting the OS target           #
 #######################################################################
 
 #
 # Note: OS_TARGET should be specified on the command line for gmake.
@@ -214,9 +192,9 @@ ifeq ($(OS_TARGET), WIN95)
 	OS_RELEASE := 4.0
 endif
 
 ifeq ($(OS_TARGET), WIN16)
 	OS_RELEASE :=
 #	OS_RELEASE := _3.11
 endif
 
-OS_CONFIG := $(OS_TARGET)$(OS_OBJTYPE)$(OS_RELEASE)
+OS_CONFIG := $(OS_TARGET)$(OS_RELEASE)
--- a/config/config.mk
+++ b/config/config.mk
@@ -43,17 +43,17 @@ LIBNSPR		= $(DIST)/lib/libnspr.$(LIB_SUF
 PURELIBNSPR	= $(DIST)/lib/libpurenspr.$(LIB_SUFFIX)
 
 CFLAGS		= $(OPTIMIZER) $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
 				$(XCFLAGS)
 # For purify
 NOMD_CFLAGS	= $(OPTIMIZER) $(NOMD_OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
 				$(XCFLAGS)
 
-include $(MOD_DEPTH)/config/$(OS_CONFIG).mk
+include $(MOD_DEPTH)/config/$(OS_TARGET).mk
 
 # Figure out where the binary code lives.
 BUILD		= $(OBJDIR_NAME)
 OBJDIR		= $(OBJDIR_NAME)
 DIST		= $(NSDEPTH)/dist/$(OBJDIR_NAME)
 ifeq ($(MOZ_BITS),16)
 MOZ_INCL	= $(NSDEPTH)/dist/public/win16
 MOZ_DIST	= $(NSDEPTH)/dist/WIN16D_D.OBJ
--- a/config/module.df
+++ b/config/module.df
@@ -1,6 +1,23 @@
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL.  You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+# 
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+# 
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation.  Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+# Reserved.
+#
+
 # Module description file
 #
 # A module is also called a component or a subsystem.
 
 MOD_NAME = nspr20
 MOD_VERSION = 21
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -113,18 +113,18 @@ endif
 
 #
 # OBJS is the list of object files.  It can be constructed by
 # specifying CSRCS (list of C source files) and ASFILES (list
 # of assembly language source files).
 #
 
 ifndef OBJS
-OBJS		= $(addprefix $(OBJDIR)/,$(CSRCS:.c=.o)) \
-		  $(addprefix $(OBJDIR)/,$(ASFILES:.s=.o))
+OBJS		= $(addprefix $(OBJDIR)/,$(CSRCS:.c=.$(OBJ_SUFFIX))) \
+		  $(addprefix $(OBJDIR)/,$(ASFILES:.s=.$(OBJ_SUFFIX)))
 endif
 
 ifeq ($(OS_TARGET), WIN16)
 	comma := ,
 	empty :=
 	space := $(empty) $(empty)
 	W16OBJS = $(subst $(space),$(comma)$(space),$(strip $(OBJS)))
 	W16TEMP =$(OS_LIBS) $(EXTRA_LIBS)
@@ -286,17 +286,17 @@ ifeq ($(OS_TARGET), OS2)
 	@cmd /C "echo EXPORTS >>$@.def"
 	@cmd /C "$(FILTER) -B -P $(LIBRARY) >> $@.def"
 	$(LINK_DLL) -MAP $(DLLBASE) $(OS_LIBS) $(EXTRA_LIBS) $(OBJS) $@.def
 else
 	$(LINK_DLL) -MAP $(DLLBASE) $(OS_LIBS) $(EXTRA_LIBS) $(OBJS)
 endif
 endif
 else
-	$(MKSHLIB) -o $@ $(OBJS) $(LD_LIBS) $(EXTRA_LIBS) $(OS_LIBS)
+	$(MKSHLIB) -o $@ $(OBJS) $(EXTRA_LIBS) $(OS_LIBS)
 endif
 endif
 
 $(PURE_LIBRARY):
 	rm -f $@
 ifneq ($(OS_ARCH), WINNT)
 	$(AR) $(OBJS)
 endif
@@ -308,43 +308,43 @@ ifeq ($(OS_ARCH), WINNT)
 ifeq ($(OS_TARGET),OS2)
 	$(RC) -DOS2 -r $(RESNAME) $(RES)
 else
 	$(RC) -Fo$(RES) $(RESNAME)
 endif
 	@echo $(RES) finished
 endif
 
-$(OBJDIR)/%.o: %.cpp
+$(OBJDIR)/%.$(OBJ_SUFFIX): %.cpp
 	@$(MAKE_OBJDIR)
 ifeq ($(OS_ARCH), WINNT)
 	$(CCC) -Fo$@ -c $(CFLAGS) $<
 else
 	$(CCC) -o $@ -c $(CFLAGS) $< 
 endif
 
 WCCFLAGS1 = $(subst /,\\,$(CFLAGS))
 WCCFLAGS2 = $(subst -I,-i=,$(WCCFLAGS1))
 WCCFLAGS3 = $(subst -D,-d,$(WCCFLAGS2))
-$(OBJDIR)/%.o: %.c
+$(OBJDIR)/%.$(OBJ_SUFFIX): %.c
 	@$(MAKE_OBJDIR)
 ifeq ($(OS_ARCH), WINNT)
 ifeq ($(OS_TARGET), WIN16)
 #	$(MOD_DEPTH)/config/w16opt $(WCCFLAGS3)
 	echo $(WCCFLAGS3) >w16wccf
-	$(CC) -zq -fo$(OBJDIR)\\$*.o  @w16wccf $*.c
+	$(CC) -zq -fo$(OBJDIR)\\$*.$(OBJ_SUFFIX)  @w16wccf $*.c
 	rm w16wccf
 else
 	$(CC) -Fo$@ -c $(CFLAGS) $*.c
 endif
 else
 	$(CC) -o $@ -c $(CFLAGS) $*.c
 endif
 
-$(OBJDIR)/%.o: %.s
+$(OBJDIR)/%.$(OBJ_SUFFIX): %.s
 	@$(MAKE_OBJDIR)
 	$(AS) -o $@ $(ASFLAGS) -c $*.s
 
 %.i: %.c
 	$(CC) -C -E $(CFLAGS) $< > $*.i
 
 %: %.pl
 	rm -f $@; cp $*.pl $@; chmod +x $@
@@ -353,15 +353,15 @@ endif
 # Special gmake rules.
 ################################################################################
 
 #
 # Re-define the list of default suffixes, so gmake won't have to churn through
 # hundreds of built-in suffix rules for stuff we don't need.
 #
 .SUFFIXES:
-.SUFFIXES: .a .o .c .cpp .s .h .i .pl
+.SUFFIXES: .a .$(OBJ_SUFFIX) .c .cpp .s .h .i .pl
 
 #
 # Fake targets.  Always run these rules, even if a file/directory with that
 # name already exists.
 #
 .PHONY: all alltags clean export install libs realclean release
--- a/config/win16.mk
+++ b/config/win16.mk
@@ -55,16 +55,17 @@ AR = wlib -q $@
 RC = wrc.exe /r /dWIN16=1 /bt=windows
 RANLIB = echo
 BSDECHO = echo
 NSINSTALL = nsinstall
 INSTALL	= $(NSINSTALL)
 MAKE_OBJDIR = mkdir $(OBJDIR)
 
 XP_DEFINE = -DXP_PC
+OBJ_SUFFIX = obj
 LIB_SUFFIX = lib
 DLL_SUFFIX = dll
 
 ifdef BUILD_OPT
 OBJDIR_TAG = _O
 OPTIMIZER = -oneatx -oh -oi -ei -3 -fpi87 -fp3 -s
 else
 ifdef USE_WATCOM_DEBUG_DATA
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -18,20 +18,15 @@
 #! gmake
 
 MOD_DEPTH = ..
 
 export NSPR20=1
 
 include $(MOD_DEPTH)/config/config.mk
 
-#
-# On all platforms, we build ds and libc.
-#
 DIRS = ds libc msgc
-ifneq (,$(filter-out WIN16 NEWS-OS,$(OS_TARGET)))
-endif
 
 include $(MOD_DEPTH)/config/rules.mk
 
 export:: $(TARGETS)
 
 install:: export
--- a/lib/msgc/tests/Makefile
+++ b/lib/msgc/tests/Makefile
@@ -18,17 +18,17 @@
 #! gmake
 
 MOD_DEPTH = ../../..
 
 include $(MOD_DEPTH)/config/config.mk
 
 ifeq ($(OS_TARGET), WIN16)
 OS_CFLAGS = $(OS_EXE_CFLAGS)
-W16STDIO = $(MOD_DEPTH)/pr/src/md/windows/$(OBJDIR)/w16stdio.o
+W16STDIO = $(MOD_DEPTH)/pr/src/md/windows/$(OBJDIR)/w16stdio.$(OBJ_SUFFIX)
 endif
 
 ifeq ($(OS_TARGET), OS2)
 OS_CFLAGS = $(OS_EXE_CFLAGS)
 endif
 
 CSRCS = gc1.c thrashgc.c
 
@@ -73,17 +73,17 @@ endif
 endif
 endif
 
 ifneq ($(OS_ARCH), WINNT)
 PWD = $(shell pwd)
 endif
 
 ifeq ($(OS_ARCH), IRIX)
-LDOPTS += -rpath $(PWD)/$(DIST)/lib
+LDOPTS += -rpath $(PWD)/$(DIST)/lib -rdata_shared
 
 ifeq ($(USE_N32),1)
 LDOPTS += -n32
 endif
 
 endif
 
 ifeq ($(OS_ARCH), OSF1)
@@ -133,20 +133,16 @@ endif
 ifneq ($(LOCAL_THREADS_ONLY),1)
 # SunOS 5.4 and 5.5 need to link with -lthread or -lpthread,
 # even though we already linked with these system libraries
 # when we built libnspr.so.
 ifeq ($(OS_RELEASE), 5.4)
 EXTRA_LIBS = -lthread
 endif
 
-ifeq ($(OS_RELEASE), 5.4_i86pc)
-EXTRA_LIBS = -lthread
-endif
-
 ifeq ($(OS_RELEASE), 5.5)
 ifdef USE_PTHREADS
 EXTRA_LIBS = -lpthread
 else
 EXTRA_LIBS = -lthread
 endif
 endif
 endif # LOCAL_THREADS_ONLY
@@ -230,31 +226,31 @@ endif
 
 ifeq ($(AIX_PRE_4_2),1)
 
 # AIX releases prior to 4.2 need a special two-step linking hack
 # in order to both override the system select() and be able to 
 # get at the original system select().
 #
 # We use a pattern rule in ns/nspr20/config/rules.mk to generate
-# the .o file from the .c source file, then do the two-step linking
-# hack below.
+# the .$(OBJ_SUFFIX) file from the .c source file, then do the
+# two-step linking hack below.
 
-$(OBJDIR)/%: $(OBJDIR)/%.o
+$(OBJDIR)/%: $(OBJDIR)/%.$(OBJ_SUFFIX)
 	@$(MAKE_OBJDIR)
 	rm -f $@ $(AIX_TMP)
 	$(CC) $(AIX_LINK_OPTS) -o $(AIX_TMP) $< $(DIST)/lib/libnspr$(NSPR_VERSION).a
 	$(CC) -o $@ $(AIX_TMP) $(AIX_WRAP)
 	rm -f $(AIX_TMP)
 
 else
 
 # All platforms that are not AIX pre-4.2.
 
-$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.o
+$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
 	@$(MAKE_OBJDIR)
 ifeq ($(OS_ARCH), WINNT)
 ifeq ($(OS_TARGET),WIN16)
 	echo system windows >w16link
 	echo name $@  >>w16link
 	echo option map >>w16link
 #	echo option CASEEXACT >>w16link
 	echo option stack=16K >>w16link
--- a/lib/prstreams/Makefile
+++ b/lib/prstreams/Makefile
@@ -37,47 +37,56 @@ endif
 INCLUDES = -I$(DIST)/include -I../../../include
 
 HEADERS = *.h
 
 CXXSRCS =           \
 	prstrms.cpp    \
 	$(NULL)
 
-OBJS = $(addprefix $(OBJDIR)/,$(CXXSRCS:.cpp=.o))
+OBJS = $(addprefix $(OBJDIR)/,$(CXXSRCS:.cpp=.$(OBJ_SUFFIX)))
 
 ifeq ($(OS_ARCH), WINNT)
 ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET)))
 EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).lib
 else
 DLLBASE=/BASE:0x30000000
 RES=$(OBJDIR)/prstrms.res
 RESNAME=$(MOD_DEPTH)/pr/src/nspr.rc
 OS_LIBS = user32.lib
 EXTRA_LIBS = $(DIST)/lib/libnspr$(MOD_VERSION).lib
 endif
 else
 ifeq ($(OS_ARCH), AIX)
-ifeq ($(CLASSIC_NSPR),1)
-OS_LIBS += -lC -lc
-else
-OS_LIBS += -lC_r -lc_r
-endif
+  ifeq ($(OS_RELEASE), 4.1)
+    ifeq ($(CLASSIC_NSPR),1)
+    OS_LIBS += -lC -lc
+    else
+    OS_LIBS += -lC_r -lc_r
+    endif
+  else
+    ifeq ($(CLASSIC_NSPR),1)
+    MKSHLIB = /usr/lpp/xlC/bin/makeC++SharedLib -p 0
+    else
+    MKSHLIB = /usr/lpp/xlC/bin/makeC++SharedLib_r -p 0
+    endif
+    OS_LIBS += -ldl
+  endif
 endif
 ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
 EXTRA_LIBS = -L$(DIST)/lib -lnspr$(MOD_VERSION)_shr
 else
 EXTRA_LIBS = -L$(DIST)/lib -lnspr$(MOD_VERSION)
 endif
 endif
 
 # On NCR and SCO_SV, we can't link with extra libraries when
 # we build a shared library.  If we do so, the linker doesn't
 # complain, but we would run into weird problems at run-time.
-# Therefore on these platforms, we link just the .o files.
+# Therefore on these platforms, we link just the object files.
 ifeq ($(OS_ARCH),NCR)
 EXTRA_LIBS =
 endif
 ifeq ($(OS_ARCH),SCO_SV)
 EXTRA_LIBS =
 endif
 
 ifeq ($(OS_ARCH), UNIXWARE)
--- a/lib/prstreams/tests/testprstrm/Makefile
+++ b/lib/prstreams/tests/testprstrm/Makefile
@@ -24,17 +24,17 @@ include $(MOD_DEPTH)/config/config.mk
 ifeq ($(OS_TARGET), WIN16)
 OS_CFLAGS = $(OS_EXE_CFLAGS)
 endif
 
 CXXSRCS =           \
 	testprstrm.cpp    \
 	$(NULL)
 
-OBJS = $(addprefix $(OBJDIR)/,$(CXXSRCS:.cpp=.o))
+OBJS = $(addprefix $(OBJDIR)/,$(CXXSRCS:.cpp=.$(OBJ_SUFFIX)))
 
 ifeq ($(OS_ARCH), WINNT)
 PROG_SUFFIX = .exe
 else
 PROG_SUFFIX =
 endif
 
 PROGS = $(addprefix $(OBJDIR)/, $(CXXSRCS:.cpp=$(PROG_SUFFIX)))
@@ -73,19 +73,28 @@ LDOPTS += -rpath $(PWD)/$(DIST)/lib
 endif
 
 ifeq ($(OS_ARCH), HP-UX)
 LDOPTS += -Wl,+s,+b,$(PWD)/$(DIST)/lib
 endif
 
 # AIX
 ifeq ($(OS_ARCH),AIX)
+ifeq ($(CLASSIC_NSPR),1)
+LDOPTS += -blibpath:.:$(PWD)/$(DIST)/lib:/usr/lpp/xlC/lib:/usr/lib:/lib
+else
 LDOPTS += -blibpath:.:$(PWD)/$(DIST)/lib:/usr/lib/threads:/usr/lpp/xlC/lib:/usr/lib:/lib                                        
+endif
+ifeq ($(OS_ARCH)$(OS_RELEASE),AIX4.1)
 LIBPR = -lnspr$(MOD_VERSION)_shr
 LIBPRSTRMS = -lprstrms$(MOD_VERSION)_shr
+else
+LDOPTS += -brtl
+EXTRA_LIBS = -ldl
+endif
 endif
 
 # Solaris
 ifeq ($(OS_ARCH), SunOS)
 ifneq ($(OS_RELEASE), 4.1.3_U1)
 ifdef NS_USE_GCC
 LDOPTS += -Xlinker -R -Xlinker $(PWD)/$(DIST)/lib
 else
@@ -153,31 +162,31 @@ endif
 
 ifeq ($(AIX_PRE_4_2),1)
 
 # AIX releases prior to 4.2 need a special two-step linking hack
 # in order to both override the system select() and be able to 
 # get at the original system select().
 #
 # We use a pattern rule in ns/nspr20/config/rules.mk to generate
-# the .o file from the .c source file, then do the two-step linking
-# hack below.
+# the .$(OBJ_SUFFIX) file from the .c source file, then do the
+# two-step linking hack below.
 
-$(OBJDIR)/%: $(OBJDIR)/%.o
+$(OBJDIR)/%: $(OBJDIR)/%.$(OBJ_SUFFIX)
 	@$(MAKE_OBJDIR)
 	rm -f $@ $(AIX_TMP)
 	$(CC) $(AIX_LINK_OPTS) -o $(AIX_TMP) $< $(DIST)/lib/libnspr$(MOD_VERSION).a
 	$(CC) -o $@ $(AIX_TMP) $(AIX_WRAP)
 	rm -f $(AIX_TMP)
 
 else
 
 # All platforms that are not AIX pre-4.2.
 
-$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.o
+$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
 	@$(MAKE_OBJDIR)
 ifeq ($(OS_ARCH), WINNT)
 ifeq ($(OS_TARGET),WIN16)
 	echo system windows >w16link
 	echo option map >>w16link
 	echo option stack=10K >>w16link
 	echo option heapsize=32K >>w16link
 	echo debug $(DEBUGTYPE) all >>w16link
--- a/lib/tests/Makefile
+++ b/lib/tests/Makefile
@@ -22,19 +22,17 @@ MOD_DEPTH = ../..
 include $(MOD_DEPTH)/config/config.mk
 
 ifeq ($(OS_TARGET), WIN16)
 OS_CFLAGS = $(OS_EXE_CFLAGS)
 endif
 
 CSRCS = \
 	string.c \
-	base64t.c \
-	timeperf.c \
-	$(NULL)
+	base64t.c
 
 ifeq ($(OS_ARCH), WINNT)
 PROG_SUFFIX = .exe
 else
 PROG_SUFFIX =
 endif
 
 PROGS = $(addprefix $(OBJDIR)/, $(CSRCS:.c=$(PROG_SUFFIX)))
@@ -95,20 +93,16 @@ endif
 
 # SunOS 5.4 and 5.5 need to link with -lthread or -lpthread,
 # even though we already linked with these system libraries
 # when we built libnspr.so.
 ifeq ($(OS_RELEASE), 5.4)
 EXTRA_LIBS = -lthread
 endif
 
-ifeq ($(OS_RELEASE), 5.4_i86pc)
-EXTRA_LIBS = -lthread
-endif
-
 ifeq ($(OS_RELEASE), 5.5)
 ifdef USE_PTHREADS
 EXTRA_LIBS = -lpthread
 else
 EXTRA_LIBS = -lthread
 endif
 endif
 endif # SunOS
@@ -143,38 +137,31 @@ endif
 
 ifeq ($(AIX_PRE_4_2),1)
 
 # AIX releases prior to 4.2 need a special two-step linking hack
 # in order to both override the system select() and be able to 
 # get at the original system select().
 #
 # We use a pattern rule in ns/nspr20/config/rules.mk to generate
-# the .o file from the .c source file, then do the two-step linking
-# hack below.
+# the .$(OBJ_SUFFIX) file from the .c source file, then do the
+# two-step linking hack below.
 
-$(OBJDIR)/%: $(OBJDIR)/%.o
+$(OBJDIR)/%: $(OBJDIR)/%.$(OBJ_SUFFIX)
 	@$(MAKE_OBJDIR)
 	rm -f $@ $(AIX_TMP)
 	$(CC) $(AIX_LINK_OPTS) -o $(AIX_TMP) $< $(DIST)/lib/libnspr$(MOD_VERSION).a
 	$(CC) -o $@ $(AIX_TMP) $(AIX_WRAP)
 	rm -f $(AIX_TMP)
 
 else
 
 # All platforms that are not AIX pre-4.2.
 
-# ifeq ($(USE_PTHREADS), 1)
-# $(OBJDIR)/attach: $(OBJDIR)/attach.o
-# 	@$(MAKE_OBJDIR)
-# 	$(CC) $< $(LDOPTS) $(LIBPR) $(LIBPLC) -lpthread -o $@
-# endif
-
-
-$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.o
+$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
 	@$(MAKE_OBJDIR)
 
 ifeq ($(OS_ARCH), WINNT)
 ifeq ($(OS_TARGET),WIN16)
 	echo system windows >w16link
 	echo option map >>w16link
 	echo option stack=10K >>w16link
 	echo option heapsize=32K >>w16link
--- a/pr/src/Makefile
+++ b/pr/src/Makefile
@@ -33,29 +33,25 @@ endif
 
 # Disable optimization of the nspr on SunOS4.1.3
 ifeq ($(OS_ARCH),SunOS)
 ifeq ($(OS_RELEASE),4.1.3_U1)
 OPTIMIZER =
 export OPTIMIZER
 OS_LIBS			= -lm
 else	# 4.1.3_U1
-ifeq ($(OS_RELEASE),5.4_i86pc)
-OS_LIBS                 = -lthread -lposix4 -lsocket -lnsl -lgen -lresolv -ldl
-else
 ifdef USE_PTHREADS
 OS_LIBS			= -lpthread -lposix4 -lsocket -lnsl -ldl
 else
 ifdef LOCAL_THREADS_ONLY
 OS_LIBS			= -lsocket -lnsl -ldl
 else
 OS_LIBS			= -lthread -lposix4 -lsocket -lnsl -ldl
 endif	# LOCAL_THREADS_ONLY
 endif	# USE_PTHREADS
-endif	# 5.4_i86pc
 endif	# 4.1.3_U1
 endif	# SunOS
 
 ifeq ($(OS_ARCH), IRIX)
 ifeq ($(USE_PTHREADS), 1)
 OS_LIBS += -lpthread
 endif
 endif
@@ -139,138 +135,136 @@ endif
 endif
 endif
 
 #
 # Define platform-dependent OBJS
 #
 
 OBJS = \
-    io/$(OBJDIR)/prmwait.o \
-    io/$(OBJDIR)/prmapopt.o \
-    io/$(OBJDIR)/priometh.o \
-    io/$(OBJDIR)/prlayer.o \
-    io/$(OBJDIR)/prlog.o \
-    io/$(OBJDIR)/prmmap.o \
-    io/$(OBJDIR)/prprf.o \
-    io/$(OBJDIR)/prscanf.o \
-    io/$(OBJDIR)/prstdio.o \
-    threads/$(OBJDIR)/prcmon.o \
-    linking/$(OBJDIR)/prlink.o \
-    malloc/$(OBJDIR)/prmalloc.o \
-    malloc/$(OBJDIR)/prmem.o \
-    md/$(OBJDIR)/prosdep.o \
-    memory/$(OBJDIR)/prseg.o \
-    misc/$(OBJDIR)/pralarm.o \
-    misc/$(OBJDIR)/pratom.o \
-    misc/$(OBJDIR)/prdtoa.o \
-    misc/$(OBJDIR)/prenv.o \
-    misc/$(OBJDIR)/prerror.o \
-    misc/$(OBJDIR)/prinit.o \
-    misc/$(OBJDIR)/prinrval.o \
-    misc/$(OBJDIR)/prlog2.o \
-    misc/$(OBJDIR)/prlong.o \
-    misc/$(OBJDIR)/prnetdb.o \
-    misc/$(OBJDIR)/prsystem.o \
-    misc/$(OBJDIR)/prthinfo.o \
-    misc/$(OBJDIR)/prtime.o
+    io/$(OBJDIR)/prmwait.$(OBJ_SUFFIX) \
+    io/$(OBJDIR)/prmapopt.$(OBJ_SUFFIX) \
+    io/$(OBJDIR)/priometh.$(OBJ_SUFFIX) \
+    io/$(OBJDIR)/prlayer.$(OBJ_SUFFIX) \
+    io/$(OBJDIR)/prlog.$(OBJ_SUFFIX) \
+    io/$(OBJDIR)/prmmap.$(OBJ_SUFFIX) \
+    io/$(OBJDIR)/prprf.$(OBJ_SUFFIX) \
+    io/$(OBJDIR)/prscanf.$(OBJ_SUFFIX) \
+    io/$(OBJDIR)/prstdio.$(OBJ_SUFFIX) \
+    threads/$(OBJDIR)/prcmon.$(OBJ_SUFFIX) \
+    linking/$(OBJDIR)/prlink.$(OBJ_SUFFIX) \
+    malloc/$(OBJDIR)/prmalloc.$(OBJ_SUFFIX) \
+    malloc/$(OBJDIR)/prmem.$(OBJ_SUFFIX) \
+    md/$(OBJDIR)/prosdep.$(OBJ_SUFFIX) \
+    memory/$(OBJDIR)/prseg.$(OBJ_SUFFIX) \
+    misc/$(OBJDIR)/pralarm.$(OBJ_SUFFIX) \
+    misc/$(OBJDIR)/pratom.$(OBJ_SUFFIX) \
+    misc/$(OBJDIR)/prdtoa.$(OBJ_SUFFIX) \
+    misc/$(OBJDIR)/prenv.$(OBJ_SUFFIX) \
+    misc/$(OBJDIR)/prerror.$(OBJ_SUFFIX) \
+    misc/$(OBJDIR)/prinit.$(OBJ_SUFFIX) \
+    misc/$(OBJDIR)/prinrval.$(OBJ_SUFFIX) \
+    misc/$(OBJDIR)/prlog2.$(OBJ_SUFFIX) \
+    misc/$(OBJDIR)/prlong.$(OBJ_SUFFIX) \
+    misc/$(OBJDIR)/prnetdb.$(OBJ_SUFFIX) \
+    misc/$(OBJDIR)/prsystem.$(OBJ_SUFFIX) \
+    misc/$(OBJDIR)/prthinfo.$(OBJ_SUFFIX) \
+    misc/$(OBJDIR)/prtime.$(OBJ_SUFFIX)
 
 ifdef USE_PTHREADS
 OBJS += \
-    pthreads/$(OBJDIR)/ptsynch.o \
-    pthreads/$(OBJDIR)/ptio.o \
-    pthreads/$(OBJDIR)/ptthread.o \
-    pthreads/$(OBJDIR)/ptmisc.o
+    pthreads/$(OBJDIR)/ptsynch.$(OBJ_SUFFIX) \
+    pthreads/$(OBJDIR)/ptio.$(OBJ_SUFFIX) \
+    pthreads/$(OBJDIR)/ptthread.$(OBJ_SUFFIX) \
+    pthreads/$(OBJDIR)/ptmisc.$(OBJ_SUFFIX)
 else
 OBJS += \
-    io/$(OBJDIR)/prdir.o \
-    io/$(OBJDIR)/prfile.o \
-    io/$(OBJDIR)/prio.o \
-    io/$(OBJDIR)/prsocket.o \
-	threads/$(OBJDIR)/prcthr.o \
-	threads/$(OBJDIR)/prdump.o \
-	threads/$(OBJDIR)/prmon.o \
-	threads/$(OBJDIR)/prsem.o \
-	threads/$(OBJDIR)/prtpd.o \
-	threads/combined/$(OBJDIR)/prucpu.o \
-	threads/combined/$(OBJDIR)/prucv.o \
-	threads/combined/$(OBJDIR)/prulock.o \
-	threads/combined/$(OBJDIR)/prustack.o \
-	threads/combined/$(OBJDIR)/pruthr.o
+    io/$(OBJDIR)/prdir.$(OBJ_SUFFIX) \
+    io/$(OBJDIR)/prfile.$(OBJ_SUFFIX) \
+    io/$(OBJDIR)/prio.$(OBJ_SUFFIX) \
+    io/$(OBJDIR)/prsocket.$(OBJ_SUFFIX) \
+	threads/$(OBJDIR)/prcthr.$(OBJ_SUFFIX) \
+	threads/$(OBJDIR)/prdump.$(OBJ_SUFFIX) \
+	threads/$(OBJDIR)/prmon.$(OBJ_SUFFIX) \
+	threads/$(OBJDIR)/prsem.$(OBJ_SUFFIX) \
+	threads/$(OBJDIR)/prtpd.$(OBJ_SUFFIX) \
+	threads/combined/$(OBJDIR)/prucpu.$(OBJ_SUFFIX) \
+	threads/combined/$(OBJDIR)/prucv.$(OBJ_SUFFIX) \
+	threads/combined/$(OBJDIR)/prulock.$(OBJ_SUFFIX) \
+	threads/combined/$(OBJDIR)/prustack.$(OBJ_SUFFIX) \
+	threads/combined/$(OBJDIR)/pruthr.$(OBJ_SUFFIX)
 endif
 
 ifeq ($(USE_IPV6), 1)
-OBJS += io/$(OBJDIR)/pripv6.o
+OBJS += io/$(OBJDIR)/pripv6.$(OBJ_SUFFIX)
 endif
 
 ifeq ($(OS_ARCH), WINNT)
 ifneq (,$(filter-out WIN16 OS2,$(OS_TARGET)))
 DLLBASE=/BASE:0x30000000
 RES=$(OBJDIR)/nspr.res
 RESNAME=nspr.rc
 endif
 
 ifeq ($(OS_TARGET), WIN16)
-OBJS +=	md/windows/$(OBJDIR)/w16null.o \
-	md/windows/$(OBJDIR)/w16proc.o      \
-	md/windows/$(OBJDIR)/w16thred.o      \
-	md/windows/$(OBJDIR)/w16fmem.o      \
-	md/windows/$(OBJDIR)/w16sock.o      \
-	md/windows/$(OBJDIR)/w16mem.o      \
-    md/windows/$(OBJDIR)/w16io.o       \
-    md/windows/$(OBJDIR)/w16gc.o       \
-    md/windows/$(OBJDIR)/w16error.o       \
-    md/windows/$(OBJDIR)/w16callb.o       \
-	md/windows/$(OBJDIR)/ntinrval.o
+OBJS +=	md/windows/$(OBJDIR)/w16null.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/w16proc.$(OBJ_SUFFIX)      \
+	md/windows/$(OBJDIR)/w16thred.$(OBJ_SUFFIX)      \
+	md/windows/$(OBJDIR)/w16fmem.$(OBJ_SUFFIX)      \
+	md/windows/$(OBJDIR)/w16sock.$(OBJ_SUFFIX)      \
+	md/windows/$(OBJDIR)/w16mem.$(OBJ_SUFFIX)      \
+    md/windows/$(OBJDIR)/w16io.$(OBJ_SUFFIX)       \
+    md/windows/$(OBJDIR)/w16gc.$(OBJ_SUFFIX)       \
+    md/windows/$(OBJDIR)/w16error.$(OBJ_SUFFIX)       \
+    md/windows/$(OBJDIR)/w16callb.$(OBJ_SUFFIX)       \
+	md/windows/$(OBJDIR)/ntinrval.$(OBJ_SUFFIX)
 EXTRA_LIBS += $(MOD_DEPTH)/tools/winsock.lib
 W16_EXPORTS = EXPORT _malloc.2=_PR_MD_malloc RESIDENT, \
 	_realloc.3=_PR_MD_realloc RESIDENT, \
 	_calloc.4=_PR_MD_calloc RESIDENT, \
 	_free.5=_PR_MD_free RESIDENT, \
 	_getenv.9=_PR_MD_getenv RESIDENT, \
 	_printf.11=_PR_MD_printf RESIDENT, \
 	_strftime.13=_PR_MD_strftime RESIDENT, \
 	_sscanf.33=_PR_MD_sscanf RESIDENT, \
     _putenv.10=_PR_MD_putenv RESIDENT, \
     _fprintf.12=_PR_MD_fprintf RESIDENT
 else
 ifeq ($(OS_TARGET), WIN95)
-OBJS +=	md/windows/$(OBJDIR)/w95io.o \
-	md/windows/$(OBJDIR)/w95sock.o \
-	md/windows/$(OBJDIR)/w95thred.o \
-	md/windows/$(OBJDIR)/w95cv.o \
-	md/windows/$(OBJDIR)/ntgc.o \
-	md/windows/$(OBJDIR)/ntmisc.o \
-	md/windows/$(OBJDIR)/ntinrval.o \
-	md/windows/$(OBJDIR)/ntsem.o	\
-	md/windows/$(OBJDIR)/win32_errors.o \
-	md/windows/$(OBJDIR)/w32poll.o
+OBJS +=	md/windows/$(OBJDIR)/w95io.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/w95sock.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/w95thred.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/w95cv.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/ntgc.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/ntmisc.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/ntinrval.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/ntsem.$(OBJ_SUFFIX)	\
+	md/windows/$(OBJDIR)/win32_errors.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/w32poll.$(OBJ_SUFFIX)
 else
 ifeq ($(OS_TARGET), OS2)
-OBJS +=	md/os2/$(OBJDIR)/os2io.o \
-	md/os2/$(OBJDIR)/os2sock.o \
-	md/os2/$(OBJDIR)/os2thred.o \
-	md/os2/$(OBJDIR)/os2cv.o \
-	md/os2/$(OBJDIR)/os2gc.o \
-	md/os2/$(OBJDIR)/os2misc.o \
-	md/os2/$(OBJDIR)/os2inrval.o \
-	md/os2/$(OBJDIR)/os2sem.o	\
-	md/os2/$(OBJDIR)/os2_errors.o \
-	md/os2/$(OBJDIR)/os2poll.o \
-	md/os2/$(OBJDIR)/ramsem.o \
-	md/os2/$(OBJDIR)/sem_x86.o
+OBJS +=	md/os2/$(OBJDIR)/os2io.$(OBJ_SUFFIX) \
+	md/os2/$(OBJDIR)/os2sock.$(OBJ_SUFFIX) \
+	md/os2/$(OBJDIR)/os2thred.$(OBJ_SUFFIX) \
+	md/os2/$(OBJDIR)/os2cv.$(OBJ_SUFFIX) \
+	md/os2/$(OBJDIR)/os2gc.$(OBJ_SUFFIX) \
+	md/os2/$(OBJDIR)/os2misc.$(OBJ_SUFFIX) \
+	md/os2/$(OBJDIR)/os2inrval.$(OBJ_SUFFIX) \
+	md/os2/$(OBJDIR)/os2sem.$(OBJ_SUFFIX)	\
+	md/os2/$(OBJDIR)/os2_errors.$(OBJ_SUFFIX) \
+	md/os2/$(OBJDIR)/os2poll.$(OBJ_SUFFIX)
 else
-OBJS +=	md/windows/$(OBJDIR)/ntio.o \
-	md/windows/$(OBJDIR)/ntgc.o \
-	md/windows/$(OBJDIR)/ntthread.o \
-	md/windows/$(OBJDIR)/ntmisc.o \
-	md/windows/$(OBJDIR)/ntinrval.o \
-	md/windows/$(OBJDIR)/ntsem.o	\
-	md/windows/$(OBJDIR)/win32_errors.o \
-	md/windows/$(OBJDIR)/w32poll.o
+OBJS +=	md/windows/$(OBJDIR)/ntio.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/ntgc.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/ntthread.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/ntmisc.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/ntinrval.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/ntsem.$(OBJ_SUFFIX)	\
+	md/windows/$(OBJDIR)/win32_errors.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/w32poll.$(OBJ_SUFFIX)
 endif
 endif
 endif
 
 else
 
 	THREAD_DIR=threads/combined/$(OBJDIR)
 
--- a/pr/src/md/os2/Makefile
+++ b/pr/src/md/os2/Makefile
@@ -38,14 +38,13 @@ endif
 
 TARGETS	= $(OBJS)
 
 INCLUDES = -I$(DIST)/include/private -I$(DIST)/include
 
 include $(MOD_DEPTH)/config/rules.mk
 
 export:: $(TARGETS)
-	@cmd /C "copy *.obj $(OBJDIR)\*.o > nul"
 
 install:: export
 
 
 
--- a/pr/src/md/unix/Makefile
+++ b/pr/src/md/unix/Makefile
@@ -156,17 +156,17 @@ endif
 #
 ifeq ($(OS_ARCH), AIX)
     ifeq ($(OS_RELEASE), 3.2)
 	ASFILES   = os_$(OS_ARCH).s
     endif
 endif
 
 ifeq ($(OS_ARCH),SunOS)
-    ifeq ($(OS_TEST),i86pc)
+    ifeq ($(CPU_ARCH),x86)
 	ASFILES = os_$(OS_ARCH)_x86.s
     else
 	ifneq ($(OS_RELEASE),4.1.3_U1)
 		ASFILES = os_$(OS_ARCH).s
 	endif
     endif
 endif
 
@@ -178,42 +178,42 @@ ifeq ($(OS_ARCH)$(OS_RELEASE),BSD_3862.1
     ASFILES = os_BSD_386_2.s
 endif
 
 TARGETS		= $(OBJS)
 
 ifeq ($(OS_ARCH),AIX)
 ifneq ($(OS_RELEASE),4.2)
 ifneq ($(USE_PTHREADS), 1)
-#TARGETS		+= $(OBJDIR)/aixwrap.o
+#TARGETS		+= $(OBJDIR)/aixwrap.$(OBJ_SUFFIX)
 endif
 endif
 endif
 
 ifeq ($(OS_ARCH),SunOS)
 	ifneq ($(OS_RELEASE),4.1.3_U1)
     	ifeq ($(OS_TEST),sun4u)
 			LIBRARY_NAME = $(ULTRASPARC_LIBRARY)
 			LIBRARY_VERSION = $(MOD_VERSION)
             ULTRASPARC_ASFILES = os_$(OS_ARCH)_ultrasparc.s
-            ULTRASPARC_ASOBJS = $(addprefix $(OBJDIR)/,$(ULTRASPARC_ASFILES:.s=.o))
+            ULTRASPARC_ASOBJS = $(addprefix $(OBJDIR)/,$(ULTRASPARC_ASFILES:.s=.$(OBJ_SUFFIX)))
 			TARGETS		+= $(ULTRASPARC_ASOBJS) $(SHARED_LIBRARY)
 		endif
 	endif
 endif
 
 INCLUDES = -I$(DIST)/include/private -I$(DIST)/include
 
 include $(MOD_DEPTH)/config/rules.mk
 
 export:: $(TARGETS)
 #ifeq ($(OS_ARCH),AIX)
 #ifneq ($(OS_RELEASE),4.2)
 #ifneq ($(USE_PTHREADS), 1)
-#	$(INSTALL) -m 444 $(OBJDIR)/aixwrap.o $(DIST)/lib
+#	$(INSTALL) -m 444 $(OBJDIR)/aixwrap.$(OBJ_SUFFIX) $(DIST)/lib
 #endif
 #endif
 #endif
 ifeq ($(OS_ARCH),SunOS)
 ifneq ($(OS_RELEASE),4.1.3_U1)
 ifeq ($(OS_TEST),sun4u)
 $(SHARED_LIBRARY): $(ULTRASPARC_ASOBJS)
 	$(LD) -G -z text -o $@ $(ULTRASPARC_ASOBJS)
--- a/pr/src/md/unix/objs.mk
+++ b/pr/src/md/unix/objs.mk
@@ -149,28 +149,28 @@ endif
 #
 ifeq ($(OS_ARCH), AIX)
     ifeq ($(OS_RELEASE), 3.2)
 	ASFILES   = os_$(OS_ARCH).s
     endif
 endif
 
 ifeq ($(OS_ARCH),SunOS)
-    ifeq ($(OS_TEST),i86pc)
+    ifeq ($(CPU_ARCH),x86)
 	ASFILES = os_$(OS_ARCH)_x86.s
     else
 	ifneq ($(OS_RELEASE),4.1.3_U1)
             ASFILES = os_$(OS_ARCH).s
 	endif
     endif
 endif
 
 ifeq ($(OS_ARCH), ReliantUNIX)
     ASFILES   = os_$(OS_ARCH).s
 endif
 
 ifeq ($(OS_ARCH)$(OS_RELEASE),BSD_3862.1)
     ASFILES = os_BSD_386_2.s
 endif
 	
-OBJS += $(addprefix md/unix/$(OBJDIR)/,$(CSRCS:.c=.o))  \
-	$(addprefix md/unix/$(OBJDIR)/,$(ASFILES:.s=.o))
+OBJS += $(addprefix md/unix/$(OBJDIR)/,$(CSRCS:.c=.$(OBJ_SUFFIX)))  \
+	$(addprefix md/unix/$(OBJDIR)/,$(ASFILES:.s=.$(OBJ_SUFFIX)))
 
--- a/pr/tests/Makefile
+++ b/pr/tests/Makefile
@@ -18,17 +18,17 @@
 #! gmake
 
 MOD_DEPTH = ../..
 
 include $(MOD_DEPTH)/config/config.mk
 
 ifeq ($(OS_TARGET), WIN16)
 OS_CFLAGS = $(OS_EXE_CFLAGS)
-W16STDIO = $(MOD_DEPTH)/pr/src/md/windows/$(OBJDIR)/w16stdio.o
+W16STDIO = $(MOD_DEPTH)/pr/src/md/windows/$(OBJDIR)/w16stdio.$(OBJ_SUFFIX)
 endif
 
 ifeq ($(OS_TARGET),WIN16)
 DIRS = dll w16gui
 else
 DIRS = dll
 endif
 
@@ -156,17 +156,17 @@ endif
 endif
 endif
 
 ifneq ($(OS_ARCH), WINNT)
 PWD = $(shell pwd)
 endif
 
 ifeq ($(OS_ARCH), IRIX)
-LDOPTS += -rpath $(PWD)/$(DIST)/lib
+LDOPTS += -rpath $(PWD)/$(DIST)/lib -rdata_shared
 
 ifeq ($(USE_N32),1)
 LDOPTS += -n32
 endif
 
 endif
 
 ifeq ($(OS_ARCH), OSF1)
@@ -214,20 +214,16 @@ endif
 ifneq ($(LOCAL_THREADS_ONLY),1)
 # SunOS 5.4 and 5.5 need to link with -lthread or -lpthread,
 # even though we already linked with these system libraries
 # when we built libnspr.so.
 ifeq ($(OS_RELEASE), 5.4)
 EXTRA_LIBS = -lthread
 endif
 
-ifeq ($(OS_RELEASE), 5.4_i86pc)
-EXTRA_LIBS = -lthread
-endif
-
 ifeq ($(OS_RELEASE), 5.5)
 ifdef USE_PTHREADS
 EXTRA_LIBS = -lpthread
 else
 EXTRA_LIBS = -lthread
 endif
 endif
 endif # LOCAL_THREADS_ONLY
@@ -324,47 +320,47 @@ endif
 
 ifeq ($(AIX_PRE_4_2),1)
 
 # AIX releases prior to 4.2 need a special two-step linking hack
 # in order to both override the system select() and be able to 
 # get at the original system select().
 #
 # We use a pattern rule in ns/nspr20/config/rules.mk to generate
-# the .o file from the .c source file, then do the two-step linking
-# hack below.
+# the .$(OBJ_SUFFIX) file from the .c source file, then do the
+# two-step linking hack below.
 
-$(OBJDIR)/%: $(OBJDIR)/%.o
+$(OBJDIR)/%: $(OBJDIR)/%.$(OBJ_SUFFIX)
 	@$(MAKE_OBJDIR)
 	rm -f $@ $(AIX_TMP)
 	$(CC) $(AIX_LINK_OPTS) -o $(AIX_TMP) $< $(DIST)/lib/libnspr$(MOD_VERSION).a
 	$(CC) -o $@ $(AIX_TMP) $(AIX_WRAP)
 	rm -f $(AIX_TMP)
 
 else
 
 # All platforms that are not AIX pre-4.2.
 
 
 ifeq ($(USE_PTHREADS), 1)
-$(OBJDIR)/attach: $(OBJDIR)/attach.o
+$(OBJDIR)/attach: $(OBJDIR)/attach.$(OBJ_SUFFIX)
 	@$(MAKE_OBJDIR)
 ifeq ($(OS_ARCH), AIX)
 	$(CC) $< $(LDOPTS) $(LIBPLC) $(LIBPR) -lpthreads -o $@
 else
 ifeq ($(OS_ARCH),FreeBSD)
 	$(CC) $< $(LDOPTS) $(LIBPLC) $(LIBPR) -lc_r -o $@
 else
 	$(CC) $< $(LDOPTS) $(LIBPLC) $(LIBPR) -lpthread -o $@
 endif
 endif
 endif
 
 
-$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.o
+$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
 	@$(MAKE_OBJDIR)
 ifeq ($(OS_ARCH), WINNT)
 ifeq ($(OS_TARGET),WIN16)
 	echo system windows >w16link
 	echo name $@  >>w16link
 	echo option map >>w16link
 #	echo option CASEEXACT >>w16link
 	echo option stack=16K >>w16link
@@ -390,8 +386,43 @@ endif
 
 endif
 
 export:: $(TARGETS)
 install:: export
 clean::
 	rm -f $(TARGETS)
 
+#
+# Run the test programs with no arguments
+#
+# Test output goes to the file pointed to by the environment variable
+# NSPR_TEST_LOGFILE, if set, else to /dev/null
+#
+ECHO = echo
+PROGRAMS = $(notdir $(PROGS))
+ifdef NSPR_TEST_LOGFILE
+LOGFILE = $(NSPR_TEST_LOGFILE)
+else
+ifeq ($(OS_ARCH), WINNT)
+LOGFILE = nul
+else
+LOGFILE = /dev/null
+endif
+endif
+
+ALWAYS:
+
+runtests:: $(PROGS) ALWAYS
+	@$(ECHO) "\nNSPR Test Results - $(OBJDIR)\n"
+	@$(ECHO) "BEGIN\t\t\t`date`"
+	@$(ECHO) "NSPR_TEST_LOGFILE\t$(LOGFILE)\n"
+	@$(ECHO) "Test\t\t\tResult\n"
+	@cd $(OBJDIR); for i in $(PROGRAMS); do					\
+	$(ECHO) "$$i\c";										\
+	./$$i >> $(LOGFILE) 2>&1 ;								\
+	if  [ 0 = $$? ] ; then									\
+		$(ECHO) "\t\t\tPassed";								\
+	else													\
+		$(ECHO) "\t\t\tFAILED";								\
+	fi														\
+	done
+	@$(ECHO) "\nEND\t\t`date`\n"
--- a/pr/tests/dll/Makefile
+++ b/pr/tests/dll/Makefile
@@ -26,18 +26,18 @@ ifeq ($(OS_ARCH),SunOS)
 ifeq ($(OS_RELEASE),4.1.3_U1)
 OPTIMIZER =
 endif
 endif
 
 INCLUDES = -I$(DIST)/include
 
 
-OBJS = $(OBJDIR)/mygetval.o \
-	$(OBJDIR)/mysetval.o
+OBJS = $(OBJDIR)/mygetval.$(OBJ_SUFFIX) \
+	$(OBJDIR)/mysetval.$(OBJ_SUFFIX)
 
 ifeq ($(OS_TARGET), WIN16)
 W16OBJS = $(subst $(space),$(comma)$(space),$(OBJS))
 endif
 
 ifeq ($(OS_ARCH), WINNT)
 ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET)))
 # do nothing
--- a/pr/tests/w16gui/Makefile
+++ b/pr/tests/w16gui/Makefile
@@ -19,17 +19,17 @@
 
 
 
 MOD_DEPTH = ../../..
 
 include $(MOD_DEPTH)/config/config.mk
 
 INCLUDES = -I$(DIST)/include
-W16STDIO = $(MOD_DEPTH)/pr/src/md/windows/$(OBJDIR)/w16stdio.o
+W16STDIO = $(MOD_DEPTH)/pr/src/md/windows/$(OBJDIR)/w16stdio.$(OBJ_SUFFIX)
 
 CSRCS = poppad.c \
        popfile.c \
        popfont.c \
        popfind.c \
        popprnt0.c
           
 
@@ -46,21 +46,21 @@ ifeq ($(OS_TARGET),WIN16)
 $(OBJDIR)/poppad.exe: $(OBJS)
 	@$(MAKE_OBJDIR)
 	echo system windows >w16link
 	echo name $@  >>w16link
 	echo option map >>w16link
 	echo option stack=16K >>w16link
 	echo debug $(DEBUGTYPE) all >>w16link
 	echo file >>w16link
-	echo $(OBJDIR)\\poppad.o, >>w16link
-	echo $(OBJDIR)\\popfile.o, >>w16link
-	echo $(OBJDIR)\\popfont.o, >>w16link
-	echo $(OBJDIR)\\popfind.o, >>w16link
-	echo $(OBJDIR)\\popprnt0.o, >>w16link
+	echo $(OBJDIR)\\poppad.$(OBJ_SUFFIX), >>w16link
+	echo $(OBJDIR)\\popfile.$(OBJ_SUFFIX), >>w16link
+	echo $(OBJDIR)\\popfont.$(OBJ_SUFFIX), >>w16link
+	echo $(OBJDIR)\\popfind.$(OBJ_SUFFIX), >>w16link
+	echo $(OBJDIR)\\popprnt0.$(OBJ_SUFFIX), >>w16link
 	echo $(W16STDIO) >>w16link
 	echo library $(LIBPR)      >>w16link
 	echo library $(LIBPLDS)	   >>w16link
 	echo library clibl, commdlg >>w16link
 	echo library winsock.lib   >>w16link
 	wlink @w16link.
 	wrc -bt=windows poppad.rc $(OBJDIR)\\poppad.exe
 else    
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -26,17 +26,16 @@ OS_CFLAGS = $(OS_EXE_CFLAGS)
 endif
 
 
 DIRS =
 
 CSRCS =             \
 	httpget.c	    \
 	tail.c		    \
-	unbundle.c		\
 	$(NULL)
 
 ifeq ($(OS_ARCH), WINNT)
 PROG_SUFFIX = .exe
 else
 PROG_SUFFIX =
 endif
 
@@ -100,20 +99,16 @@ endif
 
 # SunOS 5.4 and 5.5 need to link with -lthread or -lpthread,
 # even though we already linked with these system libraries
 # when we built libnspr.so.
 ifeq ($(OS_RELEASE), 5.4)
 EXTRA_LIBS = -lthread
 endif
 
-ifeq ($(OS_RELEASE), 5.4_i86pc)
-EXTRA_LIBS = -lthread
-endif
-
 ifeq ($(OS_RELEASE), 5.5)
 ifdef USE_PTHREADS
 EXTRA_LIBS = -lpthread
 else
 EXTRA_LIBS = -lthread
 endif
 endif
 endif # SunOS
@@ -165,39 +160,31 @@ endif
 
 ifeq ($(AIX_PRE_4_2),1)
 
 # AIX releases prior to 4.2 need a special two-step linking hack
 # in order to both override the system select() and be able to 
 # get at the original system select().
 #
 # We use a pattern rule in ns/nspr20/config/rules.mk to generate
-# the .o file from the .c source file, then do the two-step linking
-# hack below.
+# the .$(OBJ_SUFFIX) file from the .c source file, then do the
+# two-step linking hack below.
 
-$(OBJDIR)/%: $(OBJDIR)/%.o
+$(OBJDIR)/%: $(OBJDIR)/%.$(OBJ_SUFFIX)
 	@$(MAKE_OBJDIR)
 	rm -f $@ $(AIX_TMP)
 	$(CC) $(AIX_LINK_OPTS) -o $(AIX_TMP) $< $(DIST)/lib/libnspr$(NSPR_VERSION).a
 	$(CC) -o $@ $(AIX_TMP) $(AIX_WRAP)
 	rm -f $(AIX_TMP)
 
 else
 
 # All platforms that are not AIX pre-4.2.
 
-
-# ifeq ($(USE_PTHREADS), 1)
-# $(OBJDIR)/attach: $(OBJDIR)/attach.o
-# 	@$(MAKE_OBJDIR)
-# 	$(CC) $< $(LDOPTS) $(LIBPR) $(LIBPLC) -lpthread -o $@
-# endif
-
-
-$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.o
+$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
 	@$(MAKE_OBJDIR)
 ifeq ($(OS_ARCH), WINNT)
 ifeq ($(OS_TARGET),WIN16)
 	echo system windows >w16link
 	echo option map >>w16link
 	echo option stack=10K >>w16link
 	echo option heapsize=32K >>w16link
 	echo debug $(DEBUGTYPE) all >>w16link
deleted file mode 100644
index 0da11ca0b5006e9edf6f4dfac9bf18266ea4b288..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001