Various makefile cleanups. On SCO OpenServer, the value of OS_ARCH
authorwtc
Thu, 30 Apr 1998 19:36:53 +0000
changeset 75 649729814855d730218233b46573f3616a79dc9d
parent 73 e30e8b8611c904be15399237ae88863360560169
child 76 484c3f410ea8cc5fdc8c9a7bbb4fc420792cd0c6
push idunknown
push userunknown
push dateunknown
Various makefile cleanups. On SCO OpenServer, the value of OS_ARCH is now 'SCOOS' instead of 'SCO_SV'. Also, we just use the cpp macro 'SCO' and deleted the macro 'SCO_SV'. In pr/src/md/unix/Makefile, we do not assemble the ultrasparc assembly file if we are compiling with gcc.
config/SCOOS.mk
config/SINIX.mk
config/UNIXWARE.mk
lib/ds/Makefile
lib/libc/src/Makefile
lib/msgc/src/Makefile
lib/msgc/tests/Makefile
lib/prstreams/Makefile
lib/prstreams/tests/testprstrm/Makefile
pr/include/md/Makefile
pr/src/md/unix/Makefile
pr/src/md/unix/objs.mk
pr/src/md/unix/unix_errors.c
pr/tests/Makefile
tools/Makefile
--- a/config/SCOOS.mk
+++ b/config/SCOOS.mk
@@ -12,32 +12,33 @@
 # 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.
+# SCO OpenServer 5, based on SVR3.2, is intended for small to
+# medium customers.
 #
 
 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_CFLAGS		= -DSYSV -D_SVID3 -DHAVE_STRERROR -D_PR_NEED_H_ERRNO -DSCO -Dsco
 #OS_LIBS			= -lpmapi -lsocket -lc
 
 MKSHLIB			= $(LD) $(DSO_LDOPTS)
 
 XINC			= /usr/include/X11
 MOTIFLIB		= -lXm
 INCLUDES		+= -I$(XINC)
 
--- a/config/SINIX.mk
+++ b/config/SINIX.mk
@@ -11,64 +11,62 @@
 # 
 # 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)
+# Config stuff for SNI SINIX (aka ReliantUNIX)
 #
 
 include $(MOD_DEPTH)/config/UNIX.mk
 
 # use gcc -tf-
 NS_USE_GCC		= 1
 
-ifdef NS_USE_GCC
+ifeq ($(NS_USE_GCC),1)
 ## 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
+MKSHLIB			= $(LD) -G -z defs -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
+MKSHLIB			= $(LD) -G -z defs -h $(@:$(OBJDIR)/%.so=%.so)
+#DSO_LDOPTS		= -G -W l,-Blargedynsym
 endif
 
-ODD_CFLAGS		+= -DSVR4 -DSNI -DRELIANTUNIX -D_SVID_GETTOD
+ODD_CFLAGS		+= -DSVR4 -DSNI -DRELIANTUNIX -Dsinix -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
+OS_LIBS			= -lsocket -lnsl -lresolv -ldl -lc
 NOSUCHFILE		= /no-such-file
 
 HAVE_PURIFY		= 0
 
 DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
-OS_CFLAGS		= $(ODD_CFLAGS) -DSVR4 -DSNI -Dsinix
--- a/config/UNIXWARE.mk
+++ b/config/UNIXWARE.mk
@@ -12,16 +12,22 @@
 # 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
+# UnixWare is intended for high-end enterprise customers.
+# UnixWare 2.1 and 2.1.1 are based on SVR4.  (2.1.2 is a maintenance
+# release.)
+# UnixWare 7 (codename Gemini) is based on what SCO calls SVR5.
+# The somewhat odd version number 7 was chosen to suggest that
+#     UnixWare 2 + OpenServer 5 = UnixWare 7
 #
 
 include $(MOD_DEPTH)/config/UNIX.mk
 
 CC		= $(NSDEPTH)/build/hcc
 CCC		= $(NSDEPTH)/build/hcpp
 
 RANLIB		= true
--- a/lib/ds/Makefile
+++ b/lib/ds/Makefile
@@ -64,24 +64,24 @@ 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
+# On NCR and SCOOS, 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.
 ifeq ($(OS_ARCH),NCR)
 EXTRA_LIBS =
 endif
-ifeq ($(OS_ARCH),SCO_SV)
+ifeq ($(OS_ARCH),SCOOS)
 EXTRA_LIBS =
 endif
 
 LIBRARY_NAME	= plds
 LIBRARY_VERSION	= $(MOD_VERSION)
 
 RELEASE_HEADERS = $(HEADERS)
 RELEASE_HEADERS_DEST = $(RELEASE_INCLUDE_DIR)
--- a/lib/libc/src/Makefile
+++ b/lib/libc/src/Makefile
@@ -70,24 +70,24 @@ 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
+# On NCR and SCOOS, 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.
 ifeq ($(OS_ARCH),NCR)
 EXTRA_LIBS =
 endif
-ifeq ($(OS_ARCH),SCO_SV)
+ifeq ($(OS_ARCH),SCOOS)
 EXTRA_LIBS =
 endif
 
 include $(MOD_DEPTH)/config/rules.mk
 
 #
 # The Client build wants the shared libraries in $(DIST)/bin,
 # so we also install them there.
--- a/lib/msgc/src/Makefile
+++ b/lib/msgc/src/Makefile
@@ -68,24 +68,24 @@ endif
 endif
 ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
 EXTRA_LIBS = -L$(DIST)/lib -lnspr$(NSPR_VERSION)_shr
 else
 EXTRA_LIBS = -L$(DIST)/lib -lnspr$(NSPR_VERSION)
 endif
 endif
 
-# On NCR and SCO_SV, we can't link with extra libraries when
+# On NCR and SCOOS, 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.
 ifeq ($(OS_ARCH),NCR)
 EXTRA_LIBS =
 endif
-ifeq ($(OS_ARCH),SCO_SV)
+ifeq ($(OS_ARCH),SCOOS)
 EXTRA_LIBS =
 endif
 
 LIBRARY_NAME = msgc
 LIBRARY_VERSION = $(MOD_VERSION)
 
 RELEASE_LIBS = $(TARGETS)
 
--- a/lib/msgc/tests/Makefile
+++ b/lib/msgc/tests/Makefile
@@ -176,28 +176,28 @@ EXTRA_LIBS = -lsocket -lnsl -ldl
 endif
 
 ifeq ($(OS_ARCH), Linux)
 ifeq ($(OS_RELEASE), 1.2)
 EXTRA_LIBS = -ldl
 endif
 endif
 
-ifeq ($(OS_ARCH), SCO_SV)
+ifeq ($(OS_ARCH), SCOOS)
 # SCO Unix needs to link against -lsocket again even though we
 # already linked with these system libraries when we built libnspr.so.
 EXTRA_LIBS = -lsocket
 # This hardcodes in the executable programs the directory to find
 # libnspr.so etc. at program startup.  Equivalent to the -R or -rpath 
 # option for ld on other platforms.
 export LD_RUN_PATH = $(PWD)/$(DIST)/lib
 endif
 
 ifeq ($(OS_ARCH),SINIX)
-EXTRA_LIBS = -lsocket -lnsl -lgen -ldl -lresolv /usr/ucblib/libucb.a
+EXTRA_LIBS = -lsocket -lnsl -lresolv -ldl
 # This hardcodes in the executable programs the directory to find
 # libnspr.so etc. at program startup.  Equivalent to the -R or -rpath
 # option for ld on other platforms.
 export LD_RUN_PATH = $(PWD)/$(DIST)/lib
 endif
 
 ifeq ($(OS_ARCH), UNIXWARE)
 export LD_RUN_PATH = $(PWD)/$(DIST)/lib
--- a/lib/prstreams/Makefile
+++ b/lib/prstreams/Makefile
@@ -73,24 +73,24 @@ ifeq ($(OS_ARCH), AIX)
 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
+# On NCR and SCOOS, 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 object files.
 ifeq ($(OS_ARCH),NCR)
 EXTRA_LIBS =
 endif
-ifeq ($(OS_ARCH),SCO_SV)
+ifeq ($(OS_ARCH),SCOOS)
 EXTRA_LIBS =
 endif
 
 ifeq ($(OS_ARCH), UNIXWARE)
 OS_LIBS += -lC
 endif
 
 LIBRARY_NAME    = prstrms
--- a/lib/prstreams/tests/testprstrm/Makefile
+++ b/lib/prstreams/tests/testprstrm/Makefile
@@ -124,17 +124,17 @@ EXTRA_LIBS = -lsocket -lnsl -ldl
 # system libraries when we built libnspr.so.
 #EXTRA_LIBS = -lsocket -lnsl
 # This hardcodes in the executable programs the directory to find
 # libnspr.so etc. at program startup.  Equivalent to the -R or -rpath 
 # option for ld on other platforms.
 #export LD_RUN_PATH = $(PWD)/$(DIST)/lib
 endif
 
-ifeq ($(OS_ARCH), SCO_SV)
+ifeq ($(OS_ARCH), SCOOS)
 # SCO Unix needs to link against -lsocket again even though we
 # already linked with these system libraries when we built libnspr.so.
 EXTRA_LIBS = -lsocket
 # This hardcodes in the executable programs the directory to find
 # libnspr.so etc. at program startup.  Equivalent to the -R or -rpath
 # option for ld on other platforms.
 export LD_RUN_PATH = $(PWD)/$(DIST)/lib
 endif
--- a/pr/include/md/Makefile
+++ b/pr/include/md/Makefile
@@ -82,17 +82,17 @@ endif
 ifeq ($(OS_ARCH),NEWS-OS)
 MDCPUCFG_H = _sony.cfg
 endif
 
 ifeq ($(OS_ARCH),NEC)
 MDCPUCFG_H = _nec.cfg
 endif
 
-ifeq ($(OS_ARCH),SCO_SV)
+ifeq ($(OS_ARCH),SCOOS)
 MDCPUCFG_H = _scoos.cfg
 endif
 
 ifeq ($(OS_ARCH),UNIXWARE)
 MDCPUCFG_H = _unixware.cfg
 endif
 
 ifeq ($(OS_ARCH),NCR)
--- a/pr/src/md/unix/Makefile
+++ b/pr/src/md/unix/Makefile
@@ -141,17 +141,17 @@ ifeq ($(OS_ARCH),NEC)
 CSRCS += $(NEC_CSRCS)
 endif
 ifeq ($(OS_ARCH),NEWS-OS)
 CSRCS += $(SONY_CSRCS)
 endif
 ifeq ($(OS_ARCH),NCR)
 CSRCS += $(NCR_CSRCS)
 endif
-ifeq ($(OS_ARCH),SCO_SV)
+ifeq ($(OS_ARCH),SCOOS)
 CSRCS += $(SCOOS_CSRCS)
 endif
 
 #
 # Some Unix platforms have an assembly language file.
 # E.g., AIX 3.2, Solaris (both sparc and x86).
 #
 ifeq ($(OS_ARCH), AIX)
@@ -186,44 +186,48 @@ ifneq ($(USE_PTHREADS), 1)
 #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=.$(OBJ_SUFFIX)))
-			TARGETS		+= $(ULTRASPARC_ASOBJS) $(SHARED_LIBRARY)
+			ifneq ($(NS_USE_GCC),1)
+				LIBRARY_NAME = $(ULTRASPARC_LIBRARY)
+				LIBRARY_VERSION = $(MOD_VERSION)
+				ULTRASPARC_ASFILES = os_$(OS_ARCH)_ultrasparc.s
+				ULTRASPARC_ASOBJS = $(addprefix $(OBJDIR)/,$(ULTRASPARC_ASFILES:.s=.$(OBJ_SUFFIX)))
+				TARGETS		+= $(ULTRASPARC_ASOBJS) $(SHARED_LIBRARY)
+			endif
 		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.$(OBJ_SUFFIX) $(DIST)/lib
 #endif
 #endif
 #endif
+
 ifeq ($(OS_ARCH),SunOS)
 ifneq ($(OS_RELEASE),4.1.3_U1)
 ifeq ($(OS_TEST),sun4u)
+ifneq ($(NS_USE_GCC),1)
 $(SHARED_LIBRARY): $(ULTRASPARC_ASOBJS)
 	$(LD) -G -z text -o $@ $(ULTRASPARC_ASOBJS)
 	$(INSTALL) -m 444 $(SHARED_LIBRARY) $(DIST)/lib
 
 $(ULTRASPARC_ASOBJS): $(ULTRASPARC_ASFILES)
 	as -o $@ -K PIC -P -D_ASM -D__STDC__=0 -xarch=v8plus $(ULTRASPARC_ASFILES)
 endif
 endif
 endif
-
+endif
 
 install:: export
--- a/pr/src/md/unix/objs.mk
+++ b/pr/src/md/unix/objs.mk
@@ -134,17 +134,17 @@ ifeq ($(OS_ARCH),NEC)
 CSRCS += $(NEC_CSRCS)
 endif
 ifeq ($(OS_ARCH),NEWS-OS)
 CSRCS += $(SONY_CSRCS)
 endif
 ifeq ($(OS_ARCH),NCR)
 CSRCS += $(NCR_CSRCS)
 endif
-ifeq ($(OS_ARCH),SCO_SV)
+ifeq ($(OS_ARCH),SCOOS)
 CSRCS += $(SCOOS_CSRCS)
 endif
  
 #
 # Some Unix platforms have an assembly language file.
 # E.g., AIX 3.2, Solaris (both sparc and x86).
 #
 ifeq ($(OS_ARCH), AIX)
--- a/pr/src/md/unix/unix_errors.c
+++ b/pr/src/md/unix/unix_errors.c
@@ -665,19 +665,19 @@ void _MD_unix_map_socket_error(int err)
 			PR_SetError(PR_PROC_DESC_TABLE_FULL_ERROR, err);
 			break;
 		case ENFILE:
 			PR_SetError(PR_SYS_DESC_TABLE_FULL_ERROR, err);
 			break;
 		case EACCES:
 			PR_SetError(PR_NO_ACCESS_RIGHTS_ERROR, err);
 			break;
-#if !defined(SCO_SV)
+#if !defined(SCO)
 		case ENOBUFS:
-#endif /* !defined(SCO_SV) */
+#endif /* !defined(SCO) */
 		case ENOMEM:
 #ifdef ENOSR
 		case ENOSR:
 			PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, err);
 			break;
 #endif
 		default:
 			PR_SetError(PR_UNKNOWN_ERROR, err);
@@ -781,21 +781,21 @@ void _MD_unix_map_send_error(int err)
 			break;
 		case ENOTSOCK:
 			PR_SetError(PR_NOT_SOCKET_ERROR, err);
 			break;
 		case EMSGSIZE:
 		case EINVAL:
 			PR_SetError(PR_INVALID_ARGUMENT_ERROR, err);
 			break;
-#if !defined(SCO_SV)
+#if !defined(SCO)
 		case ENOBUFS:
 			PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, err);
 			break;
-#endif /* !defined(SCO_SV) */
+#endif /* !defined(SCO) */
 		case ECONNREFUSED:
 			PR_SetError(PR_CONNECT_REFUSED_ERROR, err);
 			break;
 		case EISCONN:
 			PR_SetError(PR_IS_CONNECTED_ERROR, err);
 			break;
 		case EFAULT:
 			PR_SetError(PR_ACCESS_FAULT_ERROR, err);
@@ -835,21 +835,21 @@ void _MD_unix_map_sendto_error(int err)
 			break;
 		case ENOTSOCK:
 			PR_SetError(PR_NOT_SOCKET_ERROR, err);
 			break;
 		case EMSGSIZE:
 		case EINVAL:
 			PR_SetError(PR_INVALID_ARGUMENT_ERROR, err);
 			break;
-#if !defined(SCO_SV)
+#if !defined(SCO)
 		case ENOBUFS:
 			PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, err);
 			break;
-#endif /* !defined(SCO_SV) */
+#endif /* !defined(SCO) */
 		case ECONNREFUSED:
 			PR_SetError(PR_CONNECT_REFUSED_ERROR, err);
 			break;
 		case EISCONN:
 			PR_SetError(PR_IS_CONNECTED_ERROR, err);
 			break;
 		case EFAULT:
 			PR_SetError(PR_ACCESS_FAULT_ERROR, err);
@@ -1169,19 +1169,19 @@ void _MD_unix_map_getsockname_error(int 
 			PR_SetError(PR_BAD_DESCRIPTOR_ERROR, err);
 			break;
 		case ENOTSOCK:
 			PR_SetError(PR_NOT_SOCKET_ERROR, err);
 			break;
 		case EFAULT:
 			PR_SetError(PR_ACCESS_FAULT_ERROR, err);
 			break;
-#if !defined(SCO_SV)
+#if !defined(SCO)
 		case ENOBUFS:
-#endif /* !defined(SCO_SV) */
+#endif /* !defined(SCO) */
 		case ENOMEM:
 #ifdef ENOSR
 		case ENOSR:
 #endif
 			PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, err);
 			break;
 		default:
 			PR_SetError(PR_UNKNOWN_ERROR, err);
@@ -1200,19 +1200,19 @@ void _MD_unix_map_getpeername_error(int 
 			PR_SetError(PR_NOT_SOCKET_ERROR, err);
 			break;
 		case ENOTCONN:
 			PR_SetError(PR_NOT_CONNECTED_ERROR, err);
 			break;
 		case EFAULT:
 			PR_SetError(PR_ACCESS_FAULT_ERROR, err);
 			break;
-#if !defined(SCO_SV)
+#if !defined(SCO)
 		case ENOBUFS:
-#endif /* !defined(SCO_SV) */
+#endif /* !defined(SCO) */
 		case ENOMEM:
 #ifdef ENOSR
 		case ENOSR:
 #endif
 			PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, err);
 			break;
 		default:
 			PR_SetError(PR_UNKNOWN_ERROR, err);
--- a/pr/tests/Makefile
+++ b/pr/tests/Makefile
@@ -264,28 +264,28 @@ EXTRA_LIBS = -ldl
 else
 LDOPTS += -Xlinker -rpath $(PWD)/$(DIST)/lib
 ifeq ($(USE_PTHREADS),1)
 EXTRA_LIBS = -lpthread
 endif
 endif
 endif
 
-ifeq ($(OS_ARCH), SCO_SV)
+ifeq ($(OS_ARCH), SCOOS)
 # SCO Unix needs to link against -lsocket again even though we
 # already linked with these system libraries when we built libnspr.so.
 EXTRA_LIBS = -lsocket
 # This hardcodes in the executable programs the directory to find
 # libnspr.so etc. at program startup.  Equivalent to the -R or -rpath 
 # option for ld on other platforms.
 export LD_RUN_PATH = $(PWD)/$(DIST)/lib
 endif
 
 ifeq ($(OS_ARCH),SINIX)
-EXTRA_LIBS = -lsocket -lnsl -lgen -ldl -lresolv /usr/ucblib/libucb.a
+EXTRA_LIBS = -lsocket -lnsl -lresolv -ldl
 # This hardcodes in the executable programs the directory to find
 # libnspr.so etc. at program startup.  Equivalent to the -R or -rpath
 # option for ld on other platforms.
 export LD_RUN_PATH = $(PWD)/$(DIST)/lib
 endif
 
 ifeq ($(OS_ARCH), UNIXWARE)
 export LD_RUN_PATH = $(PWD)/$(DIST)/lib
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -126,17 +126,17 @@ EXTRA_LIBS = -lsocket -lnsl -ldl
 # system libraries when we built libnspr.so.
 #EXTRA_LIBS = -lsocket -lnsl
 # This hardcodes in the executable programs the directory to find
 # libnspr.so etc. at program startup.  Equivalent to the -R or -rpath 
 # option for ld on other platforms.
 #export LD_RUN_PATH = $(PWD)/$(DIST)/lib
 endif
 
-ifeq ($(OS_ARCH), SCO_SV)
+ifeq ($(OS_ARCH), SCOOS)
 # SCO Unix needs to link against -lsocket again even though we
 # already linked with these system libraries when we built libnspr.so.
 EXTRA_LIBS = -lsocket
 # This hardcodes in the executable programs the directory to find
 # libnspr.so etc. at program startup.  Equivalent to the -R or -rpath 
 # option for ld on other platforms.
 export LD_RUN_PATH = $(PWD)/$(DIST)/lib
 endif