Add ifdefs for using autoconf. Designed with cross-compiling as a secondary objective. unlabeled-1.4.2
authorcls%seawood.org
Tue, 22 Jun 1999 08:12:19 +0000
branchunlabeled-1.4.2
changeset 661 9b79f93997630e19882d377f95c95e9df4873da7
child 725 c3fe4f02edd3be94520824d0daee7aff452b4fd6
push idunknown
push userunknown
push dateunknown
Add ifdefs for using autoconf. Designed with cross-compiling as a secondary objective.
lib/msgc/tests/Makefile.in
pr/include/md/Makefile.in
pr/src/md/unix/Makefile.in
new file mode 100644
--- /dev/null
+++ b/lib/msgc/tests/Makefile.in
@@ -0,0 +1,293 @@
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.1 (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.
+#
+
+#! gmake
+
+MOD_DEPTH	= ../../..
+topsrcdir	= @top_srcdir@
+srcdir		= @srcdir@
+VPATH		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+ifeq ($(OS_TARGET), WIN16)
+OS_CFLAGS = $(OS_EXE_CFLAGS)
+W16STDIO = $(MOD_DEPTH)/pr/src/md/windows/$(OBJDIR)/w16stdio.$(OBJ_SUFFIX)
+endif
+
+ifeq ($(OS_TARGET), OS2)
+OS_CFLAGS = $(OS_EXE_CFLAGS)
+endif
+
+CSRCS = gc1.c thrashgc.c
+
+ifeq ($(OS_ARCH), WINNT)
+PROG_SUFFIX = .exe
+else
+PROG_SUFFIX =
+endif
+
+PROGS = $(addprefix $(OBJDIR)/, $(CSRCS:.c=$(PROG_SUFFIX)))
+
+TARGETS = $(PROGS) $(OBJS)
+
+INCLUDES = -I$(DIST)/include
+
+# Setting the variables LDOPTS and LIBPR.  We first initialize
+# them to the default values, then adjust them for some platforms.
+LDOPTS = -L$(DIST)/lib
+NSPR_VERSION = $(MOD_VERSION)
+GC_VERSION = $(MOD_VERSION)
+LIBPR = -lnspr$(NSPR_VERSION)
+LIBPLC = -lplc$(NSPR_VERSION)
+LIBGC = -lmsgc$(GC_VERSION)
+
+ifeq ($(OS_ARCH), WINNT)
+ifeq ($(OS_TARGET), WIN16)
+  LIBPR = $(DIST)/lib/nspr$(NSPR_VERSION).lib
+  LIBPLC = $(DIST)/lib/plc$(NSPR_VERSION).lib
+  LIBGC= $(DIST)/lib/msgc$(GC_VERSION).lib
+else
+ifeq ($(OS_TARGET),OS2)
+  LDOPTS = -NOE -DEBUG -nologo -PMTYPE:VIO
+  LIBPR = $(DIST)/lib/nspr$(NSPR_VERSION).lib
+  LIBPLC = $(DIST)/lib/plc$(NSPR_VERSION).lib
+  LIBGC= $(DIST)/lib/msgc$(GC_VERSION).lib
+else
+  LDOPTS = -NOLOGO -DEBUG -DEBUGTYPE:CV -INCREMENTAL:NO
+  LIBPR = $(DIST)/lib/libnspr$(NSPR_VERSION).$(LIB_SUFFIX)
+  LIBPLC = $(DIST)/lib/libplc$(NSPR_VERSION).$(LIB_SUFFIX)
+  LIBGC= $(DIST)/lib/libmsgc$(GC_VERSION).$(LIB_SUFFIX)
+endif
+endif
+endif
+
+ifneq ($(OS_ARCH), WINNT)
+PWD = $(shell pwd)
+endif
+
+ifeq ($(OS_ARCH), IRIX)
+LDOPTS += -rpath $(PWD)/$(DIST)/lib -rdata_shared
+
+# For 6.x machines, include this flag
+ifeq ($(basename $(OS_RELEASE)),6)
+ifeq ($(USE_N32),1)
+LDOPTS += -n32
+else
+LDOPTS += -32
+endif
+endif
+
+endif
+
+ifeq ($(OS_ARCH), OSF1)
+# I haven't figured out how to pass -rpath to cc on OSF1 V3.2, so
+# we do static linking.
+ifeq ($(OS_RELEASE), V3.2)
+  LIBPR = $(DIST)/lib/libnspr$(NSPR_VERSION).a
+  LIBPLC = $(DIST)/lib/libplc$(NSPR_VERSION).a
+  LIBGC = $(DIST)/lib/libmsgc$(GC_VERSION).a
+  EXTRA_LIBS = -lc_r
+else
+  LDOPTS += -rpath $(PWD)/$(DIST)/lib
+endif
+endif
+
+ifeq ($(OS_ARCH), HP-UX)
+LDOPTS += -z -Wl,+s,+b,$(PWD)/$(DIST)/lib
+endif
+
+# AIX
+ifeq ($(OS_ARCH),AIX)
+LDOPTS += -blibpath:$(PWD)/$(DIST)/lib:/usr/lib:/lib
+ifeq ($(OS_ARCH)$(OS_RELEASE),AIX4.1)
+LIBPR = -lnspr$(NSPR_VERSION)_shr
+LIBPLC = -lplc$(NSPR_VERSION)_shr
+LIBGC = -lmsgc$(GC_VERSION)_shr
+else
+LDOPTS += -brtl
+EXTRA_LIBS = -ldl
+endif
+endif
+
+# Solaris
+ifeq ($(OS_ARCH), SunOS)
+ifneq ($(OS_RELEASE), 4.1.3_U1)
+ifdef NS_USE_GCC
+LDOPTS += -Xlinker -R -Xlinker $(PWD)/$(DIST)/lib
+else
+LDOPTS += -R $(PWD)/$(DIST)/lib
+endif
+endif
+
+ifneq ($(LOCAL_THREADS_ONLY),1)
+# SunOS 5.4 and 5.5 need to link with -lthread or -lpthread,
+# even though we already linked with these system libraries
+# when we built libnspr.so.
+ifeq ($(OS_RELEASE), 5.4)
+EXTRA_LIBS = -lthread
+endif
+
+ifeq ($(OS_RELEASE), 5.5)
+ifdef USE_PTHREADS
+EXTRA_LIBS = -lpthread
+else
+EXTRA_LIBS = -lthread
+endif
+endif
+endif # LOCAL_THREADS_ONLY
+endif # SunOS
+
+ifeq ($(OS_ARCH),NEC)
+EXTRA_LIBS = $(OS_LIBS)
+# 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), NCR)
+# XXX: We see some strange problems when we link with libnspr.so.
+# So for now we use static libraries on NCR.  The shared library
+# stuff below is commented out.
+LIBPR = $(DIST)/lib/libnspr$(NSPR_VERSION).a
+LIBPLC = $(DIST)/lib/libplc$(NSPR_VERSION).a
+LIBGC = $(DIST)/lib/libmsgc$(GC_VERSION).a
+EXTRA_LIBS = -lsocket -lnsl -ldl
+
+# NCR needs to link against -lsocket -lnsl (and -lc, which is linked
+# implicitly by $(CC)) again even though we already linked with these
+# 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), Linux)
+ifeq ($(OS_RELEASE), 1.2)
+EXTRA_LIBS = -ldl
+endif
+endif
+
+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 -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
+endif
+
+ifeq ($(OS_ARCH),BSD_OS)
+EXTRA_LIBS = -ldl
+endif
+
+ifeq ($(OS_ARCH),DGUX)
+EXTRA_LIBS = -lsocket -lnsl -ldl
+endif
+
+#####################################################
+#
+# The rules
+#
+#####################################################
+
+include $(topsrcdir)/config/rules.mk
+
+AIX_PRE_4_2 = 0
+ifeq ($(OS_ARCH),AIX)
+ifneq ($(OS_RELEASE),4.2)
+ifneq ($(USE_PTHREADS), 1)
+#AIX_PRE_4_2 = 1
+endif
+endif
+endif
+
+ifeq ($(AIX_PRE_4_2),1)
+
+# AIX releases prior to 4.2 need a special two-step linking hack
+# in order to both override the system select() and be able to 
+# get at the original system select().
+#
+# We use a pattern rule in ns/nspr20/config/rules.mk to generate
+# the .$(OBJ_SUFFIX) file from the .c source file, then do the
+# two-step linking hack below.
+
+$(OBJDIR)/%: $(OBJDIR)/%.$(OBJ_SUFFIX)
+	@$(MAKE_OBJDIR)
+	rm -f $@ $(AIX_TMP)
+	$(CC) $(AIX_LINK_OPTS) -o $(AIX_TMP) $< $(DIST)/lib/libnspr$(NSPR_VERSION).a
+	$(CC) -o $@ $(AIX_TMP) $(AIX_WRAP)
+	rm -f $(AIX_TMP)
+
+else
+
+# All platforms that are not AIX pre-4.2.
+
+$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
+	@$(MAKE_OBJDIR)
+ifeq ($(OS_ARCH), WINNT)
+ifeq ($(OS_TARGET),WIN16)
+	echo system windows >w16link
+	echo name $@  >>w16link
+	echo option map >>w16link
+#	echo option CASEEXACT >>w16link
+	echo option stack=16K >>w16link
+	echo debug $(DEBUGTYPE) all >>w16link
+	echo file >>w16link
+	echo $< ,  >>w16link
+	echo $(W16STDIO) >>w16link
+	echo library  >>w16link
+	echo $(LIBPR),	     >>w16link
+	echo $(LIBPLC),		>>w16link
+	echo $(LIBGC),		 >>w16link
+	echo winsock.lib     >>w16link
+	wlink @w16link.
+else
+ifeq ($(OS_TARGET),OS2)
+	$(LINK) $(LDOPTS) $< $(LIBGC) $(LIBPLC) $(LIBPR) so32dll.lib tcp32dll.lib -MAP:$(@:.exe=.map) -out:$@
+else
+	link $(LDOPTS) $< $(LIBGC) $(LIBPLC) $(LIBPR) wsock32.lib -out:$@
+endif
+endif
+else
+	$(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBGC) $(LIBPLC) $(LIBPR) $(EXTRA_LIBS) -o $@
+endif
+
+endif
+
+export:: $(TARGETS)
+export:: install
+clean::
+	rm -f $(TARGETS)
new file mode 100644
--- /dev/null
+++ b/pr/include/md/Makefile.in
@@ -0,0 +1,184 @@
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.1 (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.
+#
+
+#! gmake
+
+MOD_DEPTH	= ../../..
+topsrcdir	= @top_srcdir@
+srcdir		= @srcdir@
+VPATH		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+HEADERS = $(wildcard $(srcdir)/*.h)
+
+include $(topsrcdir)/config/rules.mk
+
+ifndef USE_AUTOCONF
+
+ifeq ($(OS_ARCH),IRIX)
+ifeq ($(USE_64), 1)
+MDCPUCFG_H = _irix64.cfg
+else
+MDCPUCFG_H = _irix32.cfg
+endif
+endif
+
+ifeq ($(OS_ARCH),WINNT)
+ifeq ($(OS_TARGET), WIN95)
+MDCPUCFG_H = _win95.cfg
+else
+ifeq ($(OS_TARGET), WIN16)
+MDCPUCFG_H = _win16.cfg
+else
+ifeq ($(OS_TARGET),OS2)
+MDCPUCFG_H = _os2.cfg
+else
+MDCPUCFG_H = _winnt.cfg
+endif
+endif
+endif
+endif
+
+ifeq ($(OS_ARCH),AIX)
+ifeq ($(USE_64),1)
+MDCPUCFG_H = _aix64.cfg
+else
+MDCPUCFG_H = _aix32.cfg
+endif
+endif
+
+ifeq ($(OS_ARCH),BSD_OS)
+MDCPUCFG_H = _bsdi.cfg
+endif
+
+ifeq ($(OS_ARCH),FreeBSD)
+MDCPUCFG_H = _freebsd.cfg
+endif
+
+ifeq ($(OS_ARCH),OpenBSD)
+MDCPUCFG_H = _openbsd.cfg
+endif
+
+ifeq ($(OS_ARCH),OpenVMS)
+MDCPUCFG_H = _openvms.cfg
+endif
+
+ifeq ($(OS_ARCH),NetBSD)
+MDCPUCFG_H = _netbsd.cfg
+endif
+
+ifeq ($(OS_ARCH),HP-UX)
+ifeq ($(USE_64), 1)
+MDCPUCFG_H = _hpux64.cfg
+else
+MDCPUCFG_H = _hpux32.cfg
+endif
+endif
+
+ifeq ($(OS_ARCH),Linux)
+MDCPUCFG_H = _linux.cfg
+endif
+
+ifeq ($(OS_ARCH),OSF1)
+MDCPUCFG_H = _osf1.cfg
+endif
+
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+MDCPUCFG_H = _sunos4.cfg
+else
+MDCPUCFG_H = _solaris.cfg
+endif
+endif
+
+ifeq ($(OS_ARCH),SINIX)
+MDCPUCFG_H = _reliantunix.cfg
+endif
+
+ifeq ($(OS_ARCH),Rhapsody)
+MDCPUCFG_H = _rhapsody.cfg
+endif
+
+ifeq ($(OS_ARCH),NEXTSTEP)
+MDCPUCFG_H = _nextstep.cfg
+endif
+
+ifeq ($(OS_ARCH),NEWS-OS)
+MDCPUCFG_H = _sony.cfg
+endif
+
+ifeq ($(OS_ARCH),NEC)
+MDCPUCFG_H = _nec.cfg
+endif
+
+ifeq ($(OS_ARCH),SCOOS)
+MDCPUCFG_H = _scoos.cfg
+endif
+
+ifeq ($(OS_ARCH),UNIXWARE)
+MDCPUCFG_H = _unixware.cfg
+endif
+
+ifeq ($(OS_ARCH),NCR)
+MDCPUCFG_H = _ncr.cfg
+endif
+
+ifeq ($(OS_ARCH),DGUX)
+MDCPUCFG_H = _dgux.cfg
+endif
+
+ifeq ($(OS_ARCH),QNX)
+MDCPUCFG_H = _qnx.cfg
+endif
+
+ifeq ($(OS_ARCH),BeOS)
+MDCPUCFG_H = _beos.cfg
+endif
+
+endif # ! USE_AUTOCONF
+
+export:: $(MDCPUCFG_H)
+	$(INSTALL) -m 444 $(srcdir)/$(MDCPUCFG_H) $(DIST)/include
+ifeq ($(MOZ_BITS),16)
+	cp $(DIST)/include/$(MDCPUCFG_H) $(DIST)/include/prcpucfg.h
+	$(INSTALL) -m 444 $(MDCPUCFG_H) $(MOZ_INCL)
+	mv -f $(DIST)/include/$(MDCPUCFG_H) $(MOZ_INCL)/prcpucfg.h
+else
+	mv -f $(DIST)/include/$(MDCPUCFG_H) $(DIST)/include/prcpucfg.h
+endif
+ifeq ($(OS_ARCH),OpenVMS)
+# mv'ing a link causes the file itself to move, not the link, so fix it.
+	rm -f $(DIST)/include/$(MDCPUCFG_H)
+	if [ ! -L $(DIST)/include/prcpucfg.h ]; then \
+	  mv -f $(DIST)/include/prcpucfg.h $(MDCPUCFG_H); \
+	  ln -fs ../../../nsprpub/pr/include/md/$(MDCPUCFG_H) \
+	    $(DIST)/include/prcpucfg.h; \
+	fi
+endif
+
+release:: export
+	@echo "Copying machine-dependent prcpucfg.h"
+	@if test -z "$(BUILD_NUMBER)"; then \
+		echo "BUILD_NUMBER must be defined"; \
+		false; \
+	fi
+	@if test ! -d $(RELEASE_INCLUDE_DIR); then \
+		rm -rf $(RELEASE_INCLUDE_DIR); \
+		$(NSINSTALL) -D $(RELEASE_INCLUDE_DIR);\
+	fi
+	cp $(MDCPUCFG_H) $(RELEASE_INCLUDE_DIR)/prcpucfg.h
new file mode 100644
--- /dev/null
+++ b/pr/src/md/unix/Makefile.in
@@ -0,0 +1,312 @@
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.1 (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.
+#
+
+MOD_DEPTH	= ../../../..
+topsrcdir	= @top_srcdir@
+srcdir		= @srcdir@
+VPATH		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+ifndef USE_AUTOCONF
+
+# Disable optimization of the nspr on SunOS4.1.3
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+OPTIMIZER =
+endif
+endif
+
+endif # ! USE_AUTOCONF
+
+CSRCS =          \
+	unix.c    \
+	unix_errors.c    \
+	uxproces.c \
+	uxwrap.c \
+	uxpoll.c \
+	$(NULL)
+
+PTH_USER_CSRCS =          \
+	pthreads_user.c \
+	$(NULL)
+
+ifndef USE_AUTOCONF
+
+IRIX_CSRCS =	 \
+	irix.c	 \
+	$(NULL)
+
+SUNOS4_CSRCS =	 \
+	sunos4.c	 \
+	$(NULL)
+
+SOLARIS_CSRCS = \
+	solaris.c	\
+	$(NULL)
+
+AIX_CSRCS =	\
+	aix.c	\
+	$(NULL)
+
+FREEBSD_CSRCS = \
+	freebsd.c \
+	$(NULL)
+
+NETBSD_CSRCS = \
+	netbsd.c \
+	$(NULL)
+
+OPENBSD_CSRCS = \
+       openbsd.c \
+       $(NULL)
+
+BSDI_CSRCS = \
+	bsdi.c \
+	$(NULL)
+
+HPUX_CSRCS = \
+	hpux.c \
+	$(NULL)
+
+OPENVMS_CSRCS = \
+       openvms.c \
+       $(NULL)
+
+OSF1_CSRCS = \
+	osf1.c \
+	$(NULL)
+
+LINUX_CSRCS = \
+	linux.c \
+	$(NULL)
+
+UNIXWARE_CSRCS = \
+	unixware.c \
+	$(NULL)
+
+RELIANTUNIX_CSRCS = \
+      reliantunix.c \
+      $(NULL)
+
+RHAPSODY_CSRCS = \
+	rhapsody.c \
+	$(NULL)
+
+NEXTSTEP_CSRCS = \
+	nextstep.c \
+	$(NULL)
+
+NEC_CSRCS = \
+	nec.c \
+	$(NULL)
+
+SONY_CSRCS = \
+	sony.c \
+	$(NULL)
+
+NCR_CSRCS = \
+	ncr.c \
+	$(NULL)
+
+SCOOS_CSRCS = \
+	scoos.c \
+	$(NULL)
+
+DGUX_CSRCS = \
+	dgux.c \
+	$(NULL)
+
+QNX_CSRCS = \
+	qnx.c \
+	$(NULL)
+endif # !USE_AUTOCONF
+
+ifeq ($(PTHREADS_USER),1)
+CSRCS += $(PTH_USER_CSRCS)
+endif
+
+ifndef USE_AUTOCONF
+
+ifeq ($(OS_ARCH),IRIX)
+CSRCS += $(IRIX_CSRCS)
+endif
+
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+CSRCS += $(SUNOS4_CSRCS)
+else
+CSRCS += $(SOLARIS_CSRCS)
+endif
+endif
+
+ifeq ($(OS_ARCH),AIX)
+CSRCS += $(AIX_CSRCS)
+endif
+ifeq ($(OS_ARCH),FreeBSD)
+CSRCS += $(FREEBSD_CSRCS)
+endif
+ifeq ($(OS_ARCH),NetBSD)
+CSRCS += $(NETBSD_CSRCS)
+endif
+ifeq ($(OS_ARCH),OpenBSD)
+CSRCS += $(OPENBSD_CSRCS)
+endif
+ifeq ($(OS_ARCH),BSD_OS)
+CSRCS += $(BSDI_CSRCS)
+endif
+ifeq ($(OS_ARCH),HP-UX)
+CSRCS += $(HPUX_CSRCS)
+endif
+ifeq ($(OS_ARCH),OpenVMS)
+CSRCS += $(OPENVMS_CSRCS)
+endif
+ifeq ($(OS_ARCH),OSF1)
+CSRCS += $(OSF1_CSRCS)
+endif
+ifeq ($(OS_ARCH),Linux)
+CSRCS += $(LINUX_CSRCS)
+endif
+ifeq ($(OS_ARCH),UNIXWARE)
+CSRCS += $(UNIXWARE_CSRCS)
+endif
+ifeq ($(OS_ARCH),SINIX)
+CSRCS += $(RELIANTUNIX_CSRCS)
+endif
+ifeq ($(OS_ARCH),Rhapsody)
+CSRCS += $(RHAPSODY_CSRCS)
+endif
+ifeq ($(OS_ARCH),NEXTSTEP)
+CSRCS += $(NEXTSTEP_CSRCS)
+endif
+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),SCOOS)
+CSRCS += $(SCOOS_CSRCS)
+endif
+ifeq ($(OS_ARCH),DGUX)
+CSRCS += $(DGUX_CSRCS)
+endif
+ifeq ($(OS_ARCH),QNX)
+CSRCS += $(QNX_CSRCS)
+endif
+
+#
+# Some Unix platforms have an assembly language file.
+# E.g., AIX 3.2, Solaris (both sparc and x86).
+#
+ifeq ($(OS_ARCH), AIX)
+    ifeq ($(OS_RELEASE), 3.2)
+	ASFILES   = os_$(OS_ARCH).s
+    endif
+endif
+
+ifeq ($(OS_ARCH),SunOS)
+    ifeq ($(CPU_ARCH),x86)
+	ASFILES = os_$(OS_ARCH)_x86.s
+    else
+	ifneq ($(OS_RELEASE),4.1.3_U1)
+	ifneq ($(LOCAL_THREADS_ONLY),1)
+		ASFILES = os_$(OS_ARCH).s
+	endif
+	endif
+    endif
+endif
+
+ifeq ($(OS_ARCH), SINIX)
+    ifeq ($(CPU_ARCH),mips)
+        ASFILES   = os_ReliantUNIX.s
+    endif
+endif
+
+ifeq ($(OS_ARCH)$(OS_RELEASE),BSD_OS2.1)
+    ASFILES = os_BSD_386_2.s
+endif
+
+ifeq ($(OS_ARCH), IRIX)
+    ASFILES   = os_Irix.s
+endif
+
+TARGETS		= $(OBJS)
+
+ifeq ($(OS_ARCH),AIX)
+ifeq (,$(filter-out 3.2 4.1,$(OS_RELEASE)))
+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)
+			RELEASE_LIBS = $(SHARED_LIBRARY)
+		endif
+	endif
+endif
+
+else # USE_AUTOCONF
+
+CSRCS += $(PR_MD_CSRCS)
+ASFILES += $(PR_MD_ASFILES)
+
+TARGETS = $(OBJS)
+
+endif # ! USE_AUTOCONF
+
+INCLUDES = -I$(DIST)/include -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(TARGETS)
+#ifeq ($(OS_ARCH),AIX)
+#ifeq (,$(filter-out 3.2 4.1,$(OS_RELEASE)))
+#ifneq ($(USE_PTHREADS), 1)
+#	$(INSTALL) -m 444 $(OBJDIR)/aixwrap.$(OBJ_SUFFIX) $(DIST)/lib
+#endif
+#endif
+#endif
+
+ifndef USE_AUTOCONF
+ifeq ($(OS_ARCH),SunOS)
+ifneq ($(OS_RELEASE),4.1.3_U1)
+ifeq ($(OS_TEST),sun4u)
+$(SHARED_LIBRARY): $(ULTRASPARC_ASOBJS)
+	$(LD) -G -z text -o $@ $(ULTRASPARC_ASOBJS)
+	$(INSTALL) -m 444 $(SHARED_LIBRARY) $(DIST)/lib
+
+$(ULTRASPARC_ASOBJS): $(ULTRASPARC_ASFILES)
+	/usr/ccs/bin/as -o $@ -K PIC -P -D_ASM -D__STDC__=0 -xarch=v8plus $<
+endif
+endif
+endif
+endif #!USE_AUTOCONF
+install:: export