summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc <devnull@localhost>1998-04-21 17:21:53 +0000
committerwtc <devnull@localhost>1998-04-21 17:21:53 +0000
commit119b636c5da44fdd49b80c2f8be49e5d5c91fa90 (patch)
treef6dea922d0190ed1c2a281ffce7df8f89c42db03
parent80030011aff029e44e6e72ea277e0c32e33999d7 (diff)
downloadnspr-hg-119b636c5da44fdd49b80c2f8be49e5d5c91fa90.tar.gz
Merged the makefile changes from Netscape's internal development versionRHAPSODY_NSPR_BASENSPRPUB_19980421_BASE
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.
-rw-r--r--config/AIX3.2.mk22
-rw-r--r--config/AIX4.1.mk22
-rw-r--r--config/AIX4.2.mk22
-rw-r--r--config/AIX4.3.mk22
-rw-r--r--config/BSD_3862.1.mk22
-rw-r--r--config/BSD_3863.0.mk22
-rw-r--r--config/FreeBSD.mk (renamed from config/FreeBSD2.mk)4
-rw-r--r--config/HP-UX.mk2
-rw-r--r--config/HP-UXA.09.03.mk21
-rw-r--r--config/HP-UXA.09.07.mk21
-rw-r--r--config/HP-UXB.10.01.mk21
-rw-r--r--config/HP-UXB.10.10.mk25
-rw-r--r--config/HP-UXB.10.20.mk25
-rw-r--r--config/HP-UXB.10.30.mk21
-rw-r--r--config/HP-UXB.11.00.mk21
-rw-r--r--config/IRIX.mk12
-rw-r--r--config/IRIX5.2.mk21
-rw-r--r--config/IRIX5.3.mk21
-rw-r--r--config/IRIX6.2.mk26
-rw-r--r--config/IRIX6.3.mk26
-rw-r--r--config/Linux.mk19
-rw-r--r--config/LinuxELF1.2.mk22
-rw-r--r--config/LinuxELF2.0.mk22
-rw-r--r--config/LinuxELFppc.mk22
-rw-r--r--config/NCR.mk (renamed from config/NCR3.0.mk)2
-rw-r--r--config/NEC.mk (renamed from config/NEC4.2.mk)0
-rw-r--r--config/NEWS-OS.mk (renamed from config/NEWS-OS6.1.1.mk)0
-rw-r--r--config/OS2.mk1
-rw-r--r--config/OS24.0.mk22
-rw-r--r--config/OSF1V2.0.mk21
-rw-r--r--config/OSF1V3.0.mk21
-rw-r--r--config/OSF1V3.2.mk21
-rw-r--r--config/OSF1V4.0.mk21
-rw-r--r--config/ReliantUNIX5.4.mk21
-rw-r--r--config/SCOOS.mk (renamed from config/SCO_SV3.2.mk)4
-rw-r--r--config/SCOOS5.0.mk22
-rw-r--r--config/SINIX.mk (renamed from config/ReliantUNIX.mk)2
-rw-r--r--config/SunOS.mk (renamed from config/SunOS5.5.mk)10
-rw-r--r--config/SunOS4.mk (renamed from config/SunOS4.1.3_U1.mk)0
-rw-r--r--config/SunOS5.3.mk24
-rw-r--r--config/SunOS5.4.mk24
-rw-r--r--config/SunOS5.4_i86pc.mk22
-rw-r--r--config/SunOS5.5.1.mk24
-rw-r--r--config/SunOS5.5.1_i86pc.mk24
-rw-r--r--config/SunOS5.6.mk24
-rw-r--r--config/SunOS5.6_i86pc.mk24
-rw-r--r--config/SunOS5.mk10
-rw-r--r--config/UNIX.mk1
-rw-r--r--config/UNIXWARE.mk (renamed from config/UNIXWARE2.1.mk)2
-rw-r--r--config/WIN32.mk139
-rw-r--r--config/WIN95.mk (renamed from config/WIN954.0.mk)2
-rw-r--r--config/WINNT.mk121
-rw-r--r--config/WINNT3.51.mk22
-rw-r--r--config/WINNT4.0.mk22
-rw-r--r--config/WINNT5.0.mk22
-rw-r--r--config/arch.mk122
-rw-r--r--config/config.mk2
-rw-r--r--config/module.df17
-rw-r--r--config/rules.mk16
-rw-r--r--config/win16.mk1
-rw-r--r--lib/Makefile5
-rw-r--r--lib/msgc/tests/Makefile16
-rw-r--r--lib/prstreams/Makefile23
-rw-r--r--lib/prstreams/tests/testprstrm/Makefile19
-rw-r--r--lib/tests/Makefile23
-rw-r--r--pr/src/Makefile178
-rw-r--r--pr/src/md/os2/Makefile1
-rw-r--r--pr/src/md/unix/Makefile8
-rw-r--r--pr/src/md/unix/objs.mk6
-rw-r--r--pr/tests/Makefile53
-rw-r--r--pr/tests/dll/Makefile4
-rw-r--r--pr/tests/w16gui/Makefile12
-rw-r--r--tools/Makefile21
-rw-r--r--tools/winsock.libbin4608 -> 0 bytes
74 files changed, 449 insertions, 1237 deletions
diff --git a/config/AIX3.2.mk b/config/AIX3.2.mk
deleted file mode 100644
index 5eebf76b..00000000
--- 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
diff --git a/config/AIX4.1.mk b/config/AIX4.1.mk
deleted file mode 100644
index 3abdc515..00000000
--- 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
diff --git a/config/AIX4.2.mk b/config/AIX4.2.mk
deleted file mode 100644
index 46332bc4..00000000
--- 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
diff --git a/config/AIX4.3.mk b/config/AIX4.3.mk
deleted file mode 100644
index 7c698c32..00000000
--- 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
diff --git a/config/BSD_3862.1.mk b/config/BSD_3862.1.mk
deleted file mode 100644
index 0adddd36..00000000
--- 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
diff --git a/config/BSD_3863.0.mk b/config/BSD_3863.0.mk
deleted file mode 100644
index df27cd91..00000000
--- 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
diff --git a/config/FreeBSD2.mk b/config/FreeBSD.mk
index 9ceef45f..082df8e2 100644
--- a/config/FreeBSD2.mk
+++ b/config/FreeBSD.mk
@@ -16,7 +16,7 @@
#
#
-# Config stuff for FreeBSD2
+# Config stuff for FreeBSD
#
include $(MOD_DEPTH)/config/UNIX.mk
@@ -28,7 +28,7 @@ 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
+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
diff --git a/config/HP-UX.mk b/config/HP-UX.mk
index 2e40d050..9794d260 100644
--- a/config/HP-UX.mk
+++ b/config/HP-UX.mk
@@ -135,7 +135,7 @@ endif
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
diff --git a/config/HP-UXA.09.03.mk b/config/HP-UXA.09.03.mk
deleted file mode 100644
index 7c99621c..00000000
--- 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
diff --git a/config/HP-UXA.09.07.mk b/config/HP-UXA.09.07.mk
deleted file mode 100644
index 2a2d6103..00000000
--- 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
diff --git a/config/HP-UXB.10.01.mk b/config/HP-UXB.10.01.mk
deleted file mode 100644
index d18a7aee..00000000
--- 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
diff --git a/config/HP-UXB.10.10.mk b/config/HP-UXB.10.10.mk
deleted file mode 100644
index aa5d5abf..00000000
--- 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
diff --git a/config/HP-UXB.10.20.mk b/config/HP-UXB.10.20.mk
deleted file mode 100644
index 51ee3b17..00000000
--- 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
diff --git a/config/HP-UXB.10.30.mk b/config/HP-UXB.10.30.mk
deleted file mode 100644
index 13cc4feb..00000000
--- 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
diff --git a/config/HP-UXB.11.00.mk b/config/HP-UXB.11.00.mk
deleted file mode 100644
index 8f9e2910..00000000
--- 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
diff --git a/config/IRIX.mk b/config/IRIX.mk
index 3dddc81e..851abdd9 100644
--- a/config/IRIX.mk
+++ b/config/IRIX.mk
@@ -39,7 +39,7 @@ endif
else
CC = cc
CCC = CC
-ODD_CFLAGS = -fullwarn -xansi -rdata_shared
+ODD_CFLAGS = -fullwarn -xansi
ifdef BUILD_OPT
ifeq ($(USE_N32),1)
@@ -53,7 +53,8 @@ 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
@@ -91,11 +92,16 @@ 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
diff --git a/config/IRIX5.2.mk b/config/IRIX5.2.mk
deleted file mode 100644
index 9bdf0f3e..00000000
--- 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
diff --git a/config/IRIX5.3.mk b/config/IRIX5.3.mk
deleted file mode 100644
index 693073d5..00000000
--- 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
diff --git a/config/IRIX6.2.mk b/config/IRIX6.2.mk
deleted file mode 100644
index 4fbcdd90..00000000
--- 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
diff --git a/config/IRIX6.3.mk b/config/IRIX6.3.mk
deleted file mode 100644
index e209aca0..00000000
--- 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
diff --git a/config/Linux.mk b/config/Linux.mk
index e9ae9524..1189096f 100644
--- a/config/Linux.mk
+++ b/config/Linux.mk
@@ -39,6 +39,7 @@ ifeq (86,$(findstring 86,$(OS_TEST)))
CPU_ARCH := x86
else
CPU_ARCH := $(OS_TEST)
+CPU_ARCH_TAG = _$(CPU_ARCH)
endif
CC = gcc
@@ -48,9 +49,7 @@ 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)
@@ -61,9 +60,10 @@ OS_CFLAGS = $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)
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)
@@ -71,6 +71,7 @@ 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)
#
@@ -84,7 +85,8 @@ 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
@@ -93,15 +95,14 @@ endif
#
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
######################################################################
diff --git a/config/LinuxELF1.2.mk b/config/LinuxELF1.2.mk
deleted file mode 100644
index 4f9206c0..00000000
--- 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
diff --git a/config/LinuxELF2.0.mk b/config/LinuxELF2.0.mk
deleted file mode 100644
index b0b25cf3..00000000
--- 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
diff --git a/config/LinuxELFppc.mk b/config/LinuxELFppc.mk
deleted file mode 100644
index 4a8a6cd0..00000000
--- 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
diff --git a/config/NCR3.0.mk b/config/NCR.mk
index eb8478e3..98d07596 100644
--- a/config/NCR3.0.mk
+++ b/config/NCR.mk
@@ -16,7 +16,7 @@
#
#
-# Config stuff for NCR SysVr4 v 3.0
+# Config stuff for NCR SVR4 MP-RAS
#
include $(MOD_DEPTH)/config/UNIX.mk
diff --git a/config/NEC4.2.mk b/config/NEC.mk
index 7ca64c7e..7ca64c7e 100644
--- a/config/NEC4.2.mk
+++ b/config/NEC.mk
diff --git a/config/NEWS-OS6.1.1.mk b/config/NEWS-OS.mk
index e9db770d..e9db770d 100644
--- a/config/NEWS-OS6.1.1.mk
+++ b/config/NEWS-OS.mk
diff --git a/config/OS2.mk b/config/OS2.mk
index 405da7e0..61084f69 100644
--- a/config/OS2.mk
+++ b/config/OS2.mk
@@ -48,6 +48,7 @@ RC = rc.exe
GARBAGE =
XP_DEFINE = -DXP_PC
+OBJ_SUFFIX = obj
LIB_SUFFIX = lib
DLL_SUFFIX = dll
diff --git a/config/OS24.0.mk b/config/OS24.0.mk
deleted file mode 100644
index 0b5527ea..00000000
--- 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
diff --git a/config/OSF1V2.0.mk b/config/OSF1V2.0.mk
deleted file mode 100644
index db4fbce1..00000000
--- 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
diff --git a/config/OSF1V3.0.mk b/config/OSF1V3.0.mk
deleted file mode 100644
index b5e8023d..00000000
--- 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
diff --git a/config/OSF1V3.2.mk b/config/OSF1V3.2.mk
deleted file mode 100644
index 54064528..00000000
--- 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
diff --git a/config/OSF1V4.0.mk b/config/OSF1V4.0.mk
deleted file mode 100644
index 3d50275b..00000000
--- 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
diff --git a/config/ReliantUNIX5.4.mk b/config/ReliantUNIX5.4.mk
deleted file mode 100644
index 384ef5fe..00000000
--- 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
diff --git a/config/SCO_SV3.2.mk b/config/SCOOS.mk
index b3990dbc..9ac1cb07 100644
--- a/config/SCO_SV3.2.mk
+++ b/config/SCOOS.mk
@@ -16,7 +16,7 @@
#
#
-# Config stuff for SCO Unix for x86.
+# Config stuff for SCO OpenServer for x86.
#
include $(MOD_DEPTH)/config/UNIX.mk
@@ -32,7 +32,7 @@ DEFINES += -D_PR_LOCAL_THREADS_ONLY
# -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_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)
diff --git a/config/SCOOS5.0.mk b/config/SCOOS5.0.mk
deleted file mode 100644
index a046d347..00000000
--- 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
diff --git a/config/ReliantUNIX.mk b/config/SINIX.mk
index 86a130cd..8e992692 100644
--- a/config/ReliantUNIX.mk
+++ b/config/SINIX.mk
@@ -16,7 +16,7 @@
#
#
-# Config stuff for ReliantUNIX
+# Config stuff for SNI SINIX-N (aka ReliantUNIX)
#
include $(MOD_DEPTH)/config/UNIX.mk
diff --git a/config/SunOS5.5.mk b/config/SunOS.mk
index 76f76041..0a3b0c40 100644
--- a/config/SunOS5.5.mk
+++ b/config/SunOS.mk
@@ -16,9 +16,11 @@
#
#
-# Config stuff for SunOS5.5
+# Config stuff for SunOS.
+# 4 and 5 are vastly different, so we use 2 different files.
#
-
-SOL_CFLAGS = -D_SVID_GETTOD
-
+ifeq ($(basename $(OS_RELEASE)),4.1)
+include $(MOD_DEPTH)/config/SunOS4.mk
+else
include $(MOD_DEPTH)/config/SunOS5.mk
+endif
diff --git a/config/SunOS4.1.3_U1.mk b/config/SunOS4.mk
index 20d74c1d..20d74c1d 100644
--- a/config/SunOS4.1.3_U1.mk
+++ b/config/SunOS4.mk
diff --git a/config/SunOS5.3.mk b/config/SunOS5.3.mk
deleted file mode 100644
index d578ca05..00000000
--- 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
diff --git a/config/SunOS5.4.mk b/config/SunOS5.4.mk
deleted file mode 100644
index fb9165ae..00000000
--- 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
diff --git a/config/SunOS5.4_i86pc.mk b/config/SunOS5.4_i86pc.mk
deleted file mode 100644
index 9d0db5ee..00000000
--- 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
diff --git a/config/SunOS5.5.1.mk b/config/SunOS5.5.1.mk
deleted file mode 100644
index 6c938836..00000000
--- 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
diff --git a/config/SunOS5.5.1_i86pc.mk b/config/SunOS5.5.1_i86pc.mk
deleted file mode 100644
index 20645cb4..00000000
--- 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
diff --git a/config/SunOS5.6.mk b/config/SunOS5.6.mk
deleted file mode 100644
index 6a854570..00000000
--- 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
diff --git a/config/SunOS5.6_i86pc.mk b/config/SunOS5.6_i86pc.mk
deleted file mode 100644
index 1eba3eee..00000000
--- 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
diff --git a/config/SunOS5.mk b/config/SunOS5.mk
index 7e644116..76881adb 100644
--- a/config/SunOS5.mk
+++ b/config/SunOS5.mk
@@ -95,8 +95,9 @@ 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
@@ -104,6 +105,11 @@ 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)
@@ -149,10 +155,8 @@ NOSUCHFILE = /no-such-file
# 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
diff --git a/config/UNIX.mk b/config/UNIX.mk
index 66f64d9d..ad45ddb1 100644
--- a/config/UNIX.mk
+++ b/config/UNIX.mk
@@ -16,6 +16,7 @@
#
XP_DEFINE = -DXP_UNIX
+OBJ_SUFFIX = o
LIB_SUFFIX = a
DLL_SUFFIX = so
AR = ar cr $@
diff --git a/config/UNIXWARE2.1.mk b/config/UNIXWARE.mk
index e8b19281..e8b45c9c 100644
--- a/config/UNIXWARE2.1.mk
+++ b/config/UNIXWARE.mk
@@ -16,7 +16,7 @@
#
#
-# Config stuff for SCO Unixware 2.1
+# Config stuff for SCO UnixWare
#
include $(MOD_DEPTH)/config/UNIX.mk
diff --git a/config/WIN32.mk b/config/WIN32.mk
new file mode 100644
index 00000000..6036367e
--- /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
diff --git a/config/WIN954.0.mk b/config/WIN95.mk
index 19040944..ed1e4e4d 100644
--- a/config/WIN954.0.mk
+++ b/config/WIN95.mk
@@ -19,4 +19,4 @@
# Config stuff for WIN95
#
-include $(MOD_DEPTH)/config/WINNT.mk
+include $(MOD_DEPTH)/config/WIN32.mk
diff --git a/config/WINNT.mk b/config/WINNT.mk
index 8e8b5a51..be0bf6e2 100644
--- a/config/WINNT.mk
+++ b/config/WINNT.mk
@@ -16,124 +16,7 @@
#
#
-# 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
diff --git a/config/WINNT3.51.mk b/config/WINNT3.51.mk
deleted file mode 100644
index 621f550d..00000000
--- 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
diff --git a/config/WINNT4.0.mk b/config/WINNT4.0.mk
deleted file mode 100644
index b17d3b26..00000000
--- 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
diff --git a/config/WINNT5.0.mk b/config/WINNT5.0.mk
deleted file mode 100644
index 3bed0a02..00000000
--- 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
diff --git a/config/arch.mk b/config/arch.mk
index 92ec312d..5cc7d0a2 100644
--- a/config/arch.mk
+++ b/config/arch.mk
@@ -20,101 +20,79 @@
#######################################################################
#
-# Macros for getting the OS architecture
+# Important internal static macros
#
-OS_ARCH := $(subst /,_,$(shell uname -s))
+OS_ARCH := $(subst /,_,$(shell uname -s))
+OS_RELEASE := $(shell uname -r)
+OS_TEST := $(shell uname -m)
#
-# Attempt to differentiate between sparc and x86 Solaris
+# Tweak the default OS_ARCH and OS_RELEASE macros as needed.
#
-
-OS_TEST := $(shell uname -m)
-ifeq ($(OS_TEST),i86pc)
- OS_RELEASE := $(shell uname -r)_$(OS_TEST)
-else
- OS_RELEASE := $(shell uname -r)
+ifeq ($(OS_ARCH),AIX)
+OS_RELEASE := $(shell uname -v).$(shell uname -r)
+endif
+ifeq ($(OS_ARCH),BSD_386)
+OS_ARCH := BSD_OS
endif
-
-#
-# Force the IRIX64 machines to use IRIX.
-#
-
ifeq ($(OS_ARCH),IRIX64)
- OS_ARCH := IRIX
+OS_ARCH := IRIX
endif
-
-#
-# Force the newer BSDI versions to use the old arch name.
-#
-
-ifeq ($(OS_ARCH),BSD_OS)
- OS_ARCH := BSD_386
+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
-
-#
-# Drop all but the major revision for FreeBSD releases.
-#
-# 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
endif
-
-#
-# Catch NCR butchering of SVR4
-#
-
-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)
+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
+OS_ARCH := NEC
endif
-
-ifeq ($(OS_ARCH),AIX)
- OS_RELEASE := $(shell uname -v).$(shell uname -r)
+ifeq ($(OS_ARCH),SCO_SV)
+OS_ARCH := SCOOS
+OS_RELEASE := 5.0
endif
-
-ifeq (osfmach3,$(findstring osfmach3,$(OS_RELEASE)))
- OS_RELEASE := ppc
+ifeq ($(OS_ARCH),SINIX-N)
+OS_ARCH := SINIX
endif
-
-#
# SINIX changes name to ReliantUNIX with 5.43
-#
-
ifeq ($(OS_ARCH),ReliantUNIX-N)
- OS_ARCH := ReliantUNIX
- OS_RELEASE := 5.4
+OS_ARCH := SINIX
+endif
+ifeq ($(OS_ARCH),UnixWare)
+OS_ARCH := UNIXWARE
+OS_RELEASE := $(shell uname -v)
endif
-ifeq ($(OS_ARCH),SINIX-N)
- OS_ARCH := ReliantUNIX
- OS_RELEASE := 5.4
+#
+# Handle FreeBSD 2.2-STABLE and Linux 2.0.30-osfmach3
+#
+
+ifeq (,$(filter-out Linux FreeBSD,$(OS_ARCH)))
+OS_RELEASE := $(shell echo $(OS_RELEASE) | sed 's/-.*//')
endif
#
-# OS_OBJTYPE is used only by Linux
+# Distinguish between OSF1 V4.0B and V4.0D
#
-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
#######################################################################
@@ -219,4 +197,4 @@ ifeq ($(OS_TARGET), WIN16)
# OS_RELEASE := _3.11
endif
-OS_CONFIG := $(OS_TARGET)$(OS_OBJTYPE)$(OS_RELEASE)
+OS_CONFIG := $(OS_TARGET)$(OS_RELEASE)
diff --git a/config/config.mk b/config/config.mk
index 884d4a54..2d3526e0 100644
--- a/config/config.mk
+++ b/config/config.mk
@@ -48,7 +48,7 @@ CFLAGS = $(OPTIMIZER) $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
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)
diff --git a/config/module.df b/config/module.df
index 67f37346..c43afbb3 100644
--- a/config/module.df
+++ b/config/module.df
@@ -1,3 +1,20 @@
+#
+# 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.
diff --git a/config/rules.mk b/config/rules.mk
index 0ce9d0da..c424e5cf 100644
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -118,8 +118,8 @@ endif
#
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)
@@ -291,7 +291,7 @@ else
endif
endif
else
- $(MKSHLIB) -o $@ $(OBJS) $(LD_LIBS) $(EXTRA_LIBS) $(OS_LIBS)
+ $(MKSHLIB) -o $@ $(OBJS) $(EXTRA_LIBS) $(OS_LIBS)
endif
endif
@@ -313,7 +313,7 @@ endif
@echo $(RES) finished
endif
-$(OBJDIR)/%.o: %.cpp
+$(OBJDIR)/%.$(OBJ_SUFFIX): %.cpp
@$(MAKE_OBJDIR)
ifeq ($(OS_ARCH), WINNT)
$(CCC) -Fo$@ -c $(CFLAGS) $<
@@ -324,13 +324,13 @@ 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
@@ -339,7 +339,7 @@ else
$(CC) -o $@ -c $(CFLAGS) $*.c
endif
-$(OBJDIR)/%.o: %.s
+$(OBJDIR)/%.$(OBJ_SUFFIX): %.s
@$(MAKE_OBJDIR)
$(AS) -o $@ $(ASFLAGS) -c $*.s
@@ -358,7 +358,7 @@ $(OBJDIR)/%.o: %.s
# 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
diff --git a/config/win16.mk b/config/win16.mk
index 6219223e..d6db9427 100644
--- a/config/win16.mk
+++ b/config/win16.mk
@@ -60,6 +60,7 @@ INSTALL = $(NSINSTALL)
MAKE_OBJDIR = mkdir $(OBJDIR)
XP_DEFINE = -DXP_PC
+OBJ_SUFFIX = obj
LIB_SUFFIX = lib
DLL_SUFFIX = dll
diff --git a/lib/Makefile b/lib/Makefile
index 3c20e2c6..8b062c3f 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -23,12 +23,7 @@ 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
diff --git a/lib/msgc/tests/Makefile b/lib/msgc/tests/Makefile
index 71dee48b..d4512540 100644
--- a/lib/msgc/tests/Makefile
+++ b/lib/msgc/tests/Makefile
@@ -23,7 +23,7 @@ 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)
@@ -78,7 +78,7 @@ 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
@@ -138,10 +138,6 @@ 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
@@ -235,10 +231,10 @@ ifeq ($(AIX_PRE_4_2),1)
# 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
@@ -249,7 +245,7 @@ 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)
diff --git a/lib/prstreams/Makefile b/lib/prstreams/Makefile
index 42693734..28b7840e 100644
--- a/lib/prstreams/Makefile
+++ b/lib/prstreams/Makefile
@@ -42,7 +42,7 @@ 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)))
@@ -56,11 +56,20 @@ 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
@@ -72,7 +81,7 @@ 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
diff --git a/lib/prstreams/tests/testprstrm/Makefile b/lib/prstreams/tests/testprstrm/Makefile
index d170a1b7..92c7c013 100644
--- a/lib/prstreams/tests/testprstrm/Makefile
+++ b/lib/prstreams/tests/testprstrm/Makefile
@@ -29,7 +29,7 @@ CXXSRCS = \
testprstrm.cpp \
$(NULL)
-OBJS = $(addprefix $(OBJDIR)/,$(CXXSRCS:.cpp=.o))
+OBJS = $(addprefix $(OBJDIR)/,$(CXXSRCS:.cpp=.$(OBJ_SUFFIX)))
ifeq ($(OS_ARCH), WINNT)
PROG_SUFFIX = .exe
@@ -78,9 +78,18 @@ 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
@@ -158,10 +167,10 @@ ifeq ($(AIX_PRE_4_2),1)
# 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
@@ -172,7 +181,7 @@ 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)
diff --git a/lib/tests/Makefile b/lib/tests/Makefile
index 7cab1301..bc9efd42 100644
--- a/lib/tests/Makefile
+++ b/lib/tests/Makefile
@@ -27,9 +27,7 @@ endif
CSRCS = \
string.c \
- base64t.c \
- timeperf.c \
- $(NULL)
+ base64t.c
ifeq ($(OS_ARCH), WINNT)
PROG_SUFFIX = .exe
@@ -100,10 +98,6 @@ 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
@@ -148,10 +142,10 @@ ifeq ($(AIX_PRE_4_2),1)
# 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
@@ -162,14 +156,7 @@ 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)
diff --git a/pr/src/Makefile b/pr/src/Makefile
index 2dd9ea1b..4438bfe2 100644
--- a/pr/src/Makefile
+++ b/pr/src/Makefile
@@ -38,9 +38,6 @@ 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
@@ -50,7 +47,6 @@ 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
@@ -144,61 +140,61 @@ endif
#
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)
@@ -209,17 +205,17 @@ 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, \
@@ -233,39 +229,37 @@ W16_EXPORTS = EXPORT _malloc.2=_PR_MD_malloc 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
diff --git a/pr/src/md/os2/Makefile b/pr/src/md/os2/Makefile
index 1b23db00..7ff5fd27 100644
--- a/pr/src/md/os2/Makefile
+++ b/pr/src/md/os2/Makefile
@@ -43,7 +43,6 @@ 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
diff --git a/pr/src/md/unix/Makefile b/pr/src/md/unix/Makefile
index 2c3a3f77..1f09acbb 100644
--- a/pr/src/md/unix/Makefile
+++ b/pr/src/md/unix/Makefile
@@ -161,7 +161,7 @@ ifeq ($(OS_ARCH), AIX)
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)
@@ -183,7 +183,7 @@ 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
@@ -194,7 +194,7 @@ ifeq ($(OS_ARCH),SunOS)
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
@@ -208,7 +208,7 @@ 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
diff --git a/pr/src/md/unix/objs.mk b/pr/src/md/unix/objs.mk
index 7882ce27..c7862b7f 100644
--- a/pr/src/md/unix/objs.mk
+++ b/pr/src/md/unix/objs.mk
@@ -154,7 +154,7 @@ ifeq ($(OS_ARCH), AIX)
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)
@@ -171,6 +171,6 @@ 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)))
diff --git a/pr/tests/Makefile b/pr/tests/Makefile
index 2e6a5842..eb3d5dc9 100644
--- a/pr/tests/Makefile
+++ b/pr/tests/Makefile
@@ -23,7 +23,7 @@ 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)
@@ -161,7 +161,7 @@ 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
@@ -219,10 +219,6 @@ 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
@@ -329,10 +325,10 @@ ifeq ($(AIX_PRE_4_2),1)
# 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
@@ -345,7 +341,7 @@ else
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 $@
@@ -359,7 +355,7 @@ endif
endif
-$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.o
+$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
@$(MAKE_OBJDIR)
ifeq ($(OS_ARCH), WINNT)
ifeq ($(OS_TARGET),WIN16)
@@ -395,3 +391,38 @@ 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"
diff --git a/pr/tests/dll/Makefile b/pr/tests/dll/Makefile
index 92aeb2dd..cdceade3 100644
--- a/pr/tests/dll/Makefile
+++ b/pr/tests/dll/Makefile
@@ -31,8 +31,8 @@ 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))
diff --git a/pr/tests/w16gui/Makefile b/pr/tests/w16gui/Makefile
index e3457bef..866f9970 100644
--- a/pr/tests/w16gui/Makefile
+++ b/pr/tests/w16gui/Makefile
@@ -24,7 +24,7 @@ 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 \
@@ -51,11 +51,11 @@ $(OBJDIR)/poppad.exe: $(OBJS)
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
diff --git a/tools/Makefile b/tools/Makefile
index 32adc1b1..0e8b3aa5 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -31,7 +31,6 @@ DIRS =
CSRCS = \
httpget.c \
tail.c \
- unbundle.c \
$(NULL)
ifeq ($(OS_ARCH), WINNT)
@@ -105,10 +104,6 @@ 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
@@ -170,10 +165,10 @@ ifeq ($(AIX_PRE_4_2),1)
# 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
@@ -184,15 +179,7 @@ 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)
diff --git a/tools/winsock.lib b/tools/winsock.lib
deleted file mode 100644
index 0da11ca0..00000000
--- a/tools/winsock.lib
+++ /dev/null
Binary files differ