AUTOCONF_1_0 landing. ColorSync_19980824_BASE PROGRESS_19980824_BASE
authorcls%seawood.org
Wed, 19 Aug 1998 20:42:01 +0000
changeset 218 f9e83853420ec1f25b3b4f89137552aae2a5d86a
parent 216 32640f0e90fcecf2b05ec12cab8c19ffda2e70d3
child 219 928e027e6892990e54c39645a77452b751d8d2ec
child 220 f1a6ad9152c0067130f19ccbd26077856acae15e
child 221 d63ee3244fadaf76870070c4ed903e21b0364e94
push idunknown
push userunknown
push dateunknown
AUTOCONF_1_0 landing.
Makefile.in
config/AIX.mk
config/BSD_OS.mk
config/FreeBSD.mk
config/HP-UX.mk
config/IRIX.mk
config/Linux.mk
config/NCR.mk
config/NEC.mk
config/NEWS-OS.mk
config/NetBSD.mk
config/OSF1.mk
config/Rhapsody.mk
config/SCOOS.mk
config/SINIX.mk
config/SunOS.mk
config/SunOS4.mk
config/SunOS5.mk
config/UNIX.mk
config/UNIXWARE.mk
config/config.mk
config/nsinstall.c
config/rules.mk
include/config.h.in
lib/Makefile.in
lib/ds/Makefile.in
lib/libc/Makefile.in
lib/libc/include/Makefile.in
lib/libc/src/Makefile.in
lib/msgc/Makefile.in
lib/msgc/include/Makefile.in
lib/msgc/src/Makefile.in
lib/msgc/tests/Makefile.in
lib/prstreams/Makefile.in
lib/tests/Makefile.in
pr/Makefile.in
pr/include/Makefile.in
pr/include/md/Makefile.in
pr/include/obsolete/Makefile.in
pr/include/private/Makefile.in
pr/src/Makefile.in
pr/src/io/Makefile.in
pr/src/linking/Makefile.in
pr/src/malloc/Makefile.in
pr/src/md/Makefile.in
pr/src/md/os2/Makefile.in
pr/src/md/unix/Makefile.in
pr/src/md/windows/Makefile.in
pr/src/memory/Makefile.in
pr/src/misc/Makefile.in
pr/src/pthreads/Makefile.in
pr/src/threads/Makefile.in
pr/src/threads/combined/Makefile.in
pr/tests/Makefile.in
pr/tests/dll/Makefile.in
pr/tests/w16gui/Makefile.in
tools/Makefile.in
new file mode 100644
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,110 @@
+#! gmake
+
+#
+# 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.
+#
+
+MOD_DEPTH = .
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+DIRS = config pr lib
+
+ifdef MOZILLA_CLIENT
+PR_CLIENT_BUILD = 1
+PR_CLIENT_BUILD_UNIX = 1
+endif
+
+include $(topsrcdir)/config/rules.mk
+
+#
+# The -ll option of zip converts CR LF to LF.
+#
+ifeq ($(OS_ARCH),WINNT)
+ZIP_ASCII_OPT = -ll
+endif
+
+ifdef PR_CLIENT_BUILD
+export::
+	rm -r -f $(DIST)/../public/nspr
+ifdef PR_CLIENT_BUILD_UNIX
+	rm -f $(DIST)/lib/libnspr.a
+	rm -f $(DIST)/bin/libnspr.$(DLL_SUFFIX)
+endif
+endif
+
+release::
+	echo $(BUILD_NUMBER) > $(RELEASE_DIR)/$(BUILD_NUMBER)/version.df
+	@if test -f imports.df; then \
+	    echo "cp -f imports.df $(RELEASE_DIR)/$(BUILD_NUMBER)/imports.df"; \
+	    cp -f imports.df $(RELEASE_DIR)/$(BUILD_NUMBER)/imports.df; \
+	else \
+	    echo "echo > $(RELEASE_DIR)/$(BUILD_NUMBER)/imports.df"; \
+	    echo > $(RELEASE_DIR)/$(BUILD_NUMBER)/imports.df; \
+	fi
+	cd $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
+	rm -rf META-INF; mkdir META-INF; cd META-INF; \
+	echo "Manifest-Version: 1.0" > MANIFEST.MF; \
+	echo "" >> MANIFEST.MF; \
+	cd ..; rm -f mdbinary.jar; zip -r mdbinary.jar META-INF lib; \
+	rm -rf META-INF; \
+	cd include; \
+	rm -rf META-INF; mkdir META-INF; cd META-INF; \
+	echo "Manifest-Version: 1.0" > MANIFEST.MF; \
+	echo "" >> MANIFEST.MF; \
+	cd ..; rm -f mdheader.jar; zip $(ZIP_ASCII_OPT) -r mdheader.jar *; \
+	rm -rf META-INF
+ifeq ($(OS_ARCH),WINNT)
+	@if test ! -d $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); then \
+		rm -rf $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
+		echo "making directory /m/dist/$(MOD_NAME)/$(BUILD_NUMBER)"; \
+		config/prmkdir.bat $(MDIST_DOS)\\$(MOD_NAME)\\$(BUILD_NUMBER); \
+	fi
+	@if test ! -d $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); then \
+		rm -rf $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
+		echo "making directory /m/dist/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME)"; \
+		config/prmkdir.bat $(MDIST_DOS)\\$(MOD_NAME)\\$(BUILD_NUMBER)\\$(OBJDIR_NAME); \
+	fi
+else
+	@if test ! -d $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); then \
+		rm -rf $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
+		echo "making directory /m/dist/$(MOD_NAME)/$(BUILD_NUMBER)"; \
+		$(NSINSTALL) -D $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
+		chmod 775 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
+	fi
+	@if test ! -d $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); then \
+		rm -rf $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
+		echo "making directory /m/dist/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME)"; \
+		$(NSINSTALL) -D $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
+		chmod 775 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
+	fi
+endif
+	cd $(RELEASE_DIR)/$(BUILD_NUMBER); \
+	cp -f version.df imports.df $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
+	chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/version.df; \
+	chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/imports.df; \
+	cd $(OBJDIR_NAME); \
+	cp -f mdbinary.jar $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
+	chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/mdbinary.jar; \
+	cd include; \
+	cp -f mdheader.jar $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
+	chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/mdheader.jar
+
+depend:
+	@echo "NSPR20 has no dependencies.  Skipped."
--- a/config/AIX.mk
+++ b/config/AIX.mk
@@ -62,31 +62,37 @@ else
 CC		= xlC_r
 CCC		= xlC_r
 endif
 
 CPU_ARCH	= rs6000
 
 RANLIB		= ranlib
 
+ifdef USE_AUTOCONF
+OS_CFLAGS	=
+else
+
 OS_CFLAGS 	= -qro -qroconst -DAIX -DSYSV
 ifeq ($(CC),xlC_r)
 OS_CFLAGS 	+= -qarch=com
 endif
 
 ifeq ($(OS_RELEASE),4.1)
 OS_CFLAGS	+= -DAIX4_1
 else
 DSO_LDOPTS	= -brtl -bM:SRE -bnoentry -bexpall
 MKSHLIB		= $(LD) $(DSO_LDOPTS)
 ifeq ($(OS_RELEASE),4.3)
 OS_CFLAGS	+= -DAIX4_3
 endif
 endif
 
+endif # USE_AUTOCONF
+
 #
 # Special link info for constructing AIX programs. On AIX we have to
 # statically link programs that use NSPR into a single .o, rewriting the
 # calls to select to call "aix". Once that is done we then can
 # link that .o with a .o built in nspr which implements the system call.
 #
 ifneq ($(OS_RELEASE),4.1)
 AIX_LINK_OPTS	= -brtl -bnso -berok
--- a/config/BSD_OS.mk
+++ b/config/BSD_OS.mk
@@ -30,16 +30,20 @@ RANLIB		= ranlib
 DEFINES		+= -D_PR_LOCAL_THREADS_ONLY
 OS_CFLAGS	= -DBSDI -DHAVE_STRERROR -D__386BSD__ -DNEED_BSDREGEX -Di386
 OS_LIBS		= -lcompat -ldl
 
 ifeq ($(OS_RELEASE),2.1)
 OS_CFLAGS	+= -DBSDI_2
 endif
 
+ifdef USE_AUTOCONF
+OS_CFLAGS	=
+endif
+
 G++INCLUDES	= -I/usr/include/g++
 
 CPU_ARCH	= x86
 
 NOSUCHFILE	= /no-such-file
 
 MKSHLIB		= $(LD) $(DSO_LDOPTS)
 DSO_LDOPTS	= -r
--- a/config/FreeBSD.mk
+++ b/config/FreeBSD.mk
@@ -23,17 +23,21 @@ include $(MOD_DEPTH)/config/UNIX.mk
 
 CC			= gcc
 CCC			= g++
 RANLIB			= ranlib
 
 OS_REL_CFLAGS		= -mno-486 -Di386
 CPU_ARCH		= x86
 
+ifdef USE_AUTOCONF
+OS_CFLAGS		= $(DSO_CFLAGS)
+else
 OS_CFLAGS		= $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK -D_PR_NEED_POLL
+endif
 
 ifeq ($(USE_PTHREADS),1)
 OS_LIBS			= -lc_r
 # XXX probably should define _THREAD_SAFE too.
 DEFINES			+= -D_PR_NEED_FAKE_POLL
 else
 OS_LIBS			= -lc
 DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
--- a/config/HP-UX.mk
+++ b/config/HP-UX.mk
@@ -168,8 +168,12 @@ DSO_LDFLAGS		=
 # libraries.
 ifdef NS_USE_GCC
 DSO_CFLAGS		= -fPIC
 else
 DSO_CFLAGS		= +Z
 endif
 
 HAVE_PURIFY		= 1
+
+ifdef USE_AUTOCONF
+OS_CFLAGS		=
+endif
--- a/config/IRIX.mk
+++ b/config/IRIX.mk
@@ -106,8 +106,12 @@ MKSHLIB			= $(LD) $(SHLIB_LD_OPTS) -rdat
 
 HAVE_PURIFY		= 1
 
 DSO_LDOPTS		= -elf -shared -all
 
 ifdef DSO_BACKEND
 DSO_LDOPTS		+= -soname $(DSO_NAME)
 endif
+
+ifdef USE_AUTOCONF
+OS_CFLAGS		=
+endif
--- a/config/Linux.mk
+++ b/config/Linux.mk
@@ -47,17 +47,21 @@ CCC			= g++
 RANLIB			= ranlib
 
 OS_INCLUDES		=
 G++INCLUDES		= -I/usr/include/g++
 
 PLATFORM_FLAGS		= -ansi -Wall -pipe -DLINUX -Dlinux
 PORT_FLAGS		= -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR
 
+ifdef USE_AUTOCONF
+OS_CFLAGS		= $(DSO_CFLAGS) #-include $(MOD_DEPTH)/include/config.h
+else
 OS_CFLAGS		= $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)
+endif
 
 ######################################################################
 # Version-specific stuff
 ######################################################################
 
 ifeq ($(CPU_ARCH),alpha)
 PLATFORM_FLAGS		+= -D_ALPHA_ -D__alpha -mieee
 PORT_FLAGS		+= -D_XOPEN_SOURCE
--- a/config/NCR.mk
+++ b/config/NCR.mk
@@ -26,17 +26,19 @@ NS_USE_NATIVE = 1
 # NS_USE_GCC = 1
 
 export PATH:=$(PATH):/opt/ncc/bin
 ###
 
 RANLIB          = true
 GCC_FLAGS_EXTRA = -pipe
 
+ifndef USE_AUTOCONF
 DEFINES		+= -DSVR4 -DSYSV -DHAVE_STRERROR -DNCR -D_PR_LOCAL_THREADS_ONLY
+endif
 
 ifdef NS_USE_NATIVE
 CC              = cc
 CCC             = ncc
 OS_CFLAGS	= -Hnocopyr
 #OS_LIBS         = -L/opt/ncc/lib 
 else
 #OS_LIBS		=
--- a/config/NEC.mk
+++ b/config/NEC.mk
@@ -31,15 +31,19 @@ CC			= $(NSDEPTH)/build/hcc -Xa -KGnum=0
 CCC			= g++
 endif
 
 MKSHLIB			= $(LD) $(DSO_LDOPTS)
 
 RANLIB			= /bin/true
 
 DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
+ifdef USE_AUTOCONF
+OS_CFLAGS		=
+else
 OS_CFLAGS		= $(ODD_CFLAGS) -DSVR4 -D__SVR4 -DNEC -Dnec_ews -DHAVE_STRERROR
+endif
 OS_LIBS			= -lsocket -lnsl -ldl $(LDOPTIONS)
 LDOPTIONS		= -lc -L/usr/ucblib -lucb
 
 NOSUCHFILE		= /no-such-file
 
 DSO_LDOPTS		= -G
--- a/config/NEWS-OS.mk
+++ b/config/NEWS-OS.mk
@@ -34,17 +34,21 @@ RANLIB			= /bin/true
 
 OS_INCLUDES		= -I/usr/include
 G++INCLUDES		=
 #OS_LIBS			= -lsocket -lnsl -lgen -lresolv
 
 PLATFORM_FLAGS		= -Xa -fullwarn -DSONY
 PORT_FLAGS		= -DSYSV -DSVR4 -D__svr4 -D__svr4__ -D_PR_LOCAL_THREADS_ONLY -DHAVE_SVID_GETTOD
 
+ifdef USE_AUTOCONF
+OS_CFLAGS		=
+else
 OS_CFLAGS		= $(PLATFORM_FLAGS) $(PORT_FLAGS)
+endif
 
 ######################################################################
 # Version-specific stuff
 ######################################################################
 
 ######################################################################
 # Overrides for defaults in config.mk (or wherever)
 ######################################################################
--- a/config/NetBSD.mk
+++ b/config/NetBSD.mk
@@ -27,17 +27,21 @@ RANLIB			= ranlib
 
 OS_REL_CFLAGS		=
 ifeq (86,$(findstring 86,$(OS_TEST)))
 CPU_ARCH		= x86
 else
 CPU_ARCH		= $(OS_TEST)
 endif
 
+ifdef USE_AUTOCONF
+OS_CFLAGS		= $(DSO_CFLAGS)
+else
 OS_CFLAGS		= $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DNETBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
+endif
 
 ifeq ($(USE_PTHREADS),1)
 OS_LIBS			= -lc_r
 # XXX probably should define _THREAD_SAFE too.
 else
 OS_LIBS			= -lc
 DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
 endif
--- a/config/OSF1.mk
+++ b/config/OSF1.mk
@@ -71,25 +71,29 @@ RANLIB			= /bin/true
 CPU_ARCH		= alpha
 
 ifdef BUILD_OPT
 OPTIMIZER		+= -Olimit 4000
 endif
 
 NON_LD_FLAGS		= -ieee_with_inexact
 
+ifdef USE_AUTOCONF
+OS_CFLAGS		=
+else
 OS_CFLAGS		= -DOSF1 -D_REENTRANT -taso
 
 ifeq ($(OS_RELEASE),V3.2)
 OS_CFLAGS		+= -DOSF1V3
 endif
 
 ifeq (V4,$(findstring V4,$(OS_RELEASE)))
 OS_CFLAGS		+= -DOSF1V4
 endif
+endif # USE_AUTOCONF
 
 ifeq ($(USE_PTHREADS),1)
 OS_CFLAGS		+= -pthread
 endif
 
 # The command to build a shared library on OSF1.
 MKSHLIB = ld -shared -all -expect_unresolved "*"
 DSO_LDOPTS		= -shared
--- a/config/Rhapsody.mk
+++ b/config/Rhapsody.mk
@@ -40,17 +40,21 @@ CPU_ARCH		= ppc
 # The meaning of a common is ambiguous.  It may be a true definition:
 #     int x = 0;
 # or it may be a declaration of a symbol defined in another file:
 #     extern int x;
 # Use the -fno-common option to force all commons to become true
 # definitions so that the linker can catch multiply-defined symbols.
 # Also, common symbols are not allowed with Rhapsody dynamic libraries.
 
+ifdef USE_AUTOCONF
+OS_CFLAGS		= $(DSO_CFLAGS)
+else
 OS_CFLAGS		= $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wmost -fno-common -pipe -DRHAPSODY -DHAVE_STRERROR -DHAVE_BSD_FLOCK
+endif
 
 DEFINES			+= -D_PR_LOCAL_THREADS_ONLY -D_PR_NEED_FAKE_POLL
 
 ARCH			= rhapsody
 
 # May override this with -bundle to create a loadable module.
 DSO_LDOPTS		= -dynamiclib
 
--- a/config/SCOOS.mk
+++ b/config/SCOOS.mk
@@ -28,17 +28,22 @@ CCC			= g++ -b elf -I/usr/local/lib/g++-
 # CCC			= $(DEPTH)/build/hcpp +.cpp +w
 RANLIB			= /bin/true
 
 DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
 #
 # -DSCO - Changes to Netscape source (consistent with AIX, LINUX, etc..)
 # -Dsco - Needed for /usr/include/X11/*
 #
+ifdef USE_AUTOCONF
+OS_CFLAGS
+else
 OS_CFLAGS		= -DSYSV -D_SVID3 -DHAVE_STRERROR -D_PR_NEED_H_ERRNO -DSCO -Dsco
+endif
+
 #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
@@ -65,15 +65,19 @@ endif
 CPU_ARCH		= mips
 
 RANLIB			= /bin/true
 
 # For purify
 NOMD_OS_CFLAGS		= $(ODD_CFLAGS)
 
 # we do not have -MDupdate ...
+ifdef USE_AUTOCONF
+OS_CFLAGS		= 
+else
 OS_CFLAGS		= $(NOMD_OS_CFLAGS)
+endif
 OS_LIBS			= -lsocket -lnsl -lresolv -ldl -lc
 NOSUCHFILE		= /no-such-file
 
 HAVE_PURIFY		= 0
 
 DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
--- a/config/SunOS.mk
+++ b/config/SunOS.mk
@@ -15,12 +15,12 @@
 # Reserved.
 #
 
 #
 # Config stuff for SunOS.
 # 4 and 5 are vastly different, so we use 2 different files.
 #
 ifeq ($(basename $(OS_RELEASE)),4.1)
-include $(MOD_DEPTH)/config/SunOS4.mk
+include $(topsrcdir)/config/SunOS4.mk
 else
-include $(MOD_DEPTH)/config/SunOS5.mk
+include $(topsrcdir)/config/SunOS5.mk
 endif
--- a/config/SunOS4.mk
+++ b/config/SunOS4.mk
@@ -30,17 +30,21 @@ COMPILER_TAG		= _gcc
 
 RANLIB			= ranlib
 
 CPU_ARCH		= sparc
 
 DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
 # Purify doesn't like -MDupdate
 NOMD_OS_CFLAGS		= -Wall -Wno-format -DSUNOS4
+ifdef USE_AUTOCONF
+OS_CFLAGS		= $(DSO_CFLAGS)
+else
 OS_CFLAGS		= $(DSO_CFLAGS) $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
+endif
 
 MKSHLIB			= $(LD) $(DSO_LDOPTS)
 
 HAVE_PURIFY		= 1
 
 NOSUCHFILE		= /no-such-file
 
 DSO_LDOPTS		=
--- a/config/SunOS5.mk
+++ b/config/SunOS5.mk
@@ -116,17 +116,21 @@ ifeq (5.5,$(findstring 5.5,$(OS_RELEASE)
 OS_DEFINES		+= -DSOLARIS2_5
 endif
 
 ifneq ($(LOCAL_THREADS_ONLY),1)
 OS_DEFINES		+= -D_REENTRANT
 endif
 
 # Purify doesn't like -MDupdate
+ifdef USE_AUTOCONF
+NOMD_OS_CFLAGS		= $(DSO_CFLAGS) #-DSOLARIS
+else
 NOMD_OS_CFLAGS		= $(DSO_CFLAGS) $(OS_DEFINES) $(SOL_CFLAGS)
+endif
 
 MKSHLIB			= $(LD) $(DSO_LDOPTS)
 
 # ld options:
 # -G: produce a shared object
 # -z defs: no unresolved symbols allowed
 DSO_LDOPTS		= -G
 
--- a/config/UNIX.mk
+++ b/config/UNIX.mk
@@ -16,28 +16,30 @@
 #
 
 XP_DEFINE	= -DXP_UNIX
 OBJ_SUFFIX	= o
 LIB_SUFFIX	= a
 DLL_SUFFIX	= so
 AR		= ar cr $@
 
+ifndef USE_AUTOCONF
 ifdef BUILD_OPT
 OPTIMIZER	= -O
 DEFINES		= -UDEBUG -DNDEBUG
 OBJDIR_TAG	= _OPT
 else
 OPTIMIZER	= -g
 DEFINES		= -DDEBUG -UNDEBUG -DDEBUG_$(shell whoami)
 OBJDIR_TAG	= _DBG
 endif
 
 # Name of the binary code directories
-OBJDIR_NAME	= $(OS_CONFIG)$(CPU_ARCH_TAG)$(COMPILER_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
+OBJDIR_NAME	= Linux2.1.10902_x86_DBG.OBJ
+endif # !USE_AUTOCONF
 
 MKDEPEND_DIR    = $(DEPTH)/config/mkdepend
 MKDEPEND 	= $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend
 MKDEPENDENCIES  = $(OBJDIR)/depend.mk
 
 ####################################################################
 #
 # One can define the makefile variable NSDISTMODE to control
--- a/config/UNIXWARE.mk
+++ b/config/UNIXWARE.mk
@@ -28,17 +28,21 @@
 include $(MOD_DEPTH)/config/UNIX.mk
 
 CC		= $(NSDEPTH)/build/hcc
 CCC		= $(NSDEPTH)/build/hcpp
 
 RANLIB		= true
 
 DEFINES		+= -D_PR_LOCAL_THREADS_ONLY
+ifdef USE_AUTOCONF
+OS_CFLAGS	=
+else
 OS_CFLAGS	= -DSVR4 -DSYSV -DUNIXWARE
+endif
 
 MKSHLIB		= $(LD) $(DSO_LDOPTS)
 DSO_LDOPTS	= -G
 
 CPU_ARCH	= x86
 ARCH		= sco
 
 NOSUCHFILE	= /no-such-file
--- a/config/config.mk
+++ b/config/config.mk
@@ -11,24 +11,28 @@
 # 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.
 #
 
+ifndef topsrcdir
+topsrcdir = $(MOD_DEPTH)
+endif
+
 # Configuration information for building in the NSPR source module
 
 # Define an include-at-most-once-flag
 NSPR_CONFIG_MK	= 1
 
-include $(MOD_DEPTH)/config/module.df
+include $(topsrcdir)/config/module.df
 
-include $(MOD_DEPTH)/config/arch.mk
+include $(topsrcdir)/config/arch.mk
 
 ifndef NSDEPTH
 NSDEPTH = $(MOD_DEPTH)/..
 endif
 
 #
 # Default command macros; can be overridden in <arch>.mk.
 #
@@ -43,29 +47,50 @@ LIBNSPR		= $(DIST)/lib/libnspr.$(LIB_SUF
 PURELIBNSPR	= $(DIST)/lib/libpurenspr.$(LIB_SUFFIX)
 
 CFLAGS		= $(OPTIMIZER) $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
 				$(XCFLAGS)
 # For purify
 NOMD_CFLAGS	= $(OPTIMIZER) $(NOMD_OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
 				$(XCFLAGS)
 
-include $(MOD_DEPTH)/config/$(OS_TARGET).mk
+ifdef USE_AUTOCONF
+OPTIMIZER	= $(ACCFLAGS)
+DEFINES		+=  -UDEBUG -DNDEBUG -DTRIMMED
+endif
+
+ifdef MOZ_DEBUG
+OPTIMIZER	= -g
+JAVA_OPTIMIZER	= -g
+DEFINES		= -DDEBUG -UNDEBUG -DDEBUG_$(shell $(WHOAMI)) -DTRACING
+XBCFLAGS	= -FR$*
+endif
+
+include $(topsrcdir)/config/$(OS_TARGET).mk
 
 # Figure out where the binary code lives.
 BUILD		= $(OBJDIR_NAME)
 OBJDIR		= $(OBJDIR_NAME)
 DIST		= $(NSDEPTH)/dist/$(OBJDIR_NAME)
 ifeq ($(MOZ_BITS),16)
 MOZ_INCL	= $(NSDEPTH)/dist/public/win16
 MOZ_DIST	= $(NSDEPTH)/dist/WIN16D_D.OBJ
 endif
 
+ifdef USE_AUTOCONF
+EMACS			= $(ACEMACS)
+PERL			= $(ACPERL)
+RANLIB			= $(ACRANLIB)
+UNZIP_PROG		= $(ACUNZIP)
+WHOAMI			= $(ACWHOAMI)
+ZIP_PROG		= $(ACZIP)
+else
 VPATH		= $(OBJDIR)
 DEPENDENCIES	= $(OBJDIR)/.md
+endif
 
 ifdef BUILD_DEBUG_GC
 DEFINES		+= -DDEBUG_GC
 endif
 
 GARBAGE		+= $(DEPENDENCIES) core $(wildcard core.[0-9]*)
 
 ####################################################################
--- a/config/nsinstall.c
+++ b/config/nsinstall.c
@@ -19,16 +19,17 @@
 /*
 ** Netscape portable install command.
 **
 ** Brendan Eich, 7/20/95
 */
 #include <stdio.h>  /* OSF/1 requires this before grp.h, so put it first */
 #include <assert.h>
 #include <fcntl.h>
+#include <errno.h>
 #include <grp.h>
 #include <pwd.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 #include <utime.h>
 #include <sys/types.h>
@@ -73,30 +74,35 @@ usage(void)
     exit(2);
 }
 
 static int
 mkdirs(char *path, mode_t mode)
 {
     char *cp;
     struct stat sb;
-    
+    int res;
+
     while (*path == '/' && path[1] == '/')
 	path++;
     while ((cp = strrchr(path, '/')) && cp[1] == '\0')
 	*cp = '\0';
     if (cp && cp != path) {
 	*cp = '\0';
 	if ((lstat(path, &sb) < 0 || !S_ISDIR(sb.st_mode)) &&
 	    mkdirs(path, mode) < 0) {
 	    return -1;
 	}
 	*cp = '/';
     }
-    return mkdir(path, mode);
+    res = mkdir(path, mode);
+    if ((res != 0) && (errno == EEXIST))
+      return 0;
+    else
+      return res;
 }
 
 static uid_t
 touid(char *owner)
 {
     struct passwd *pw;
     uid_t uid;
     char *cp;
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -42,19 +42,22 @@
 # d)
 #	PROGRAM	-- the target program name to create from $OBJS
 #			($OBJDIR automatically prepended to it)
 # e)
 #	LIBRARY	-- the target library name to create from $OBJS
 #			($OBJDIR automatically prepended to it)
 #
 ################################################################################
+ifndef topsrcdir
+topsrcdir = $(MOD_DEPTH)
+endif
 
 ifndef NSPR_CONFIG_MK
-include $(MOD_DEPTH)/config/config.mk
+include $(topsrcdir)/config/config.mk
 endif
 
 #
 # This makefile contains rules for building the following kinds of
 # libraries:
 # - LIBRARY: a static (archival) library
 # - SHARED_LIBRARY: a shared (dynamic link) library
 # - IMPORT_LIBRARY: an import library, used only on Windows and OS/2
@@ -143,16 +146,20 @@ OBJS += $(RES)
 endif
 endif
 endif
 
 ALL_TRASH		= $(TARGETS) $(OBJS) $(OBJDIR) LOGS TAGS $(GARBAGE) \
 			  $(NOSUCHFILE) \
 			  so_locations
 
+ifdef USE_AUTOCONF
+ALL_TRASH		:= $(filter-out $(OBJDIR), $(ALL_TRASH))
+endif
+
 ifdef DIRS
 LOOP_OVER_DIRS		=					\
 	@for d in $(DIRS); do					\
 		if test -d $$d; then				\
 			set -e;					\
 			echo "cd $$d; $(MAKE) $@";		\
 			$(MAKE) -C $$d $@;			\
 			set +e;					\
@@ -175,17 +182,21 @@ libs::
 install::
 	+$(LOOP_OVER_DIRS)
 
 clean::
 	rm -rf $(OBJS) so_locations $(NOSUCHFILE)
 	+$(LOOP_OVER_DIRS)
 
 clobber::
+ifdef USE_AUTOCONF
+	rm -rf $(OBJS) $(TARGETS) $(GARBAGE) so_locations $(NOSUCHFILE)
+else
 	rm -rf $(OBJS) $(TARGETS) $(OBJDIR) $(GARBAGE) so_locations $(NOSUCHFILE)
+endif
 	+$(LOOP_OVER_DIRS)
 
 realclean clobber_all::
 	rm -rf $(wildcard *.OBJ *.OBJD) dist $(ALL_TRASH)
 	+$(LOOP_OVER_DIRS)
 
 release:: export
 ifdef RELEASE_LIBS
@@ -330,28 +341,28 @@ ifeq ($(OS_TARGET), WIN16)
 #	$(MOD_DEPTH)/config/w16opt $(WCCFLAGS3)
 	echo $(WCCFLAGS3) >w16wccf
 	$(CC) -zq -fo$(OBJDIR)\\$*.$(OBJ_SUFFIX)  @w16wccf $*.c
 	rm w16wccf
 else
 	$(CC) -Fo$@ -c $(CFLAGS) $*.c
 endif
 else
-	$(CC) -o $@ -c $(CFLAGS) $*.c
+	$(CC) -o $@ -c $(CFLAGS) $<
 endif
 
 $(OBJDIR)/%.$(OBJ_SUFFIX): %.s
 	@$(MAKE_OBJDIR)
-	$(AS) -o $@ $(ASFLAGS) -c $*.s
+	$(AS) -o $@ $(ASFLAGS) -c $<
 
 %.i: %.c
 	$(CC) -C -E $(CFLAGS) $< > $*.i
 
 %: %.pl
-	rm -f $@; cp $*.pl $@; chmod +x $@
+	rm -f $@; cp $< $@; chmod +x $@
 
 ################################################################################
 # Special gmake rules.
 ################################################################################
 
 #
 # Re-define the list of default suffixes, so gmake won't have to churn through
 # hundreds of built-in suffix rules for stuff we don't need.
new file mode 100644
--- /dev/null
+++ b/include/config.h.in
@@ -0,0 +1,145 @@
+/* 
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License
+ * at http://www.mozilla.org/MPL/
+ * 
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 
+ * the License for the specific language governing rights and 
+ * limitations under the License.
+ * 
+ * The Original Code is this file as it was released upon August 6, 1998.
+ *
+ * The Initial Developer of this code under the MPL is Christopher
+ * Seawood, <cls@seawood.org>.  Portions created by Christopher Seawood 
+ * are Copyright (C) 1998 Christopher Seawood.  All Rights Reserved.
+ */
+
+/* Define if using alloca.c.  */
+#undef C_ALLOCA
+
+/* Define to empty if the keyword does not work.  */
+#undef const
+
+/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
+   This function is required for alloca.c support on those systems.  */
+#undef CRAY_STACKSEG_END
+
+/* Define if you have alloca, as a function or macro.  */
+#undef HAVE_ALLOCA
+
+/* Define if you have <alloca.h> and it should be used (not on Ultrix).  */
+#undef HAVE_ALLOCA_H
+
+/* Define if you don't have vprintf but do have _doprnt.  */
+#undef HAVE_DOPRNT
+
+/* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
+#undef HAVE_SYS_WAIT_H
+
+/* Define if you have the vprintf function.  */
+#undef HAVE_VPRINTF
+
+/* Define to `int' if <sys/types.h> doesn't define.  */
+#undef pid_t
+
+/* Define if you need to in order for stat and other things to work.  */
+#undef _POSIX_SOURCE
+
+/* Define for reasons UNKNOWN */
+#undef _BSD_SOURCE
+
+/* Define as the return type of signal handlers (int or void).  */
+#undef RETSIGTYPE
+
+/* Define to `unsigned' if <sys/types.h> doesn't define.  */
+#undef size_t
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
+ */
+#undef STACK_DIRECTION
+
+/* Define if you have the ANSI C header files.  */
+#undef STDC_HEADERS
+
+/* Define if `sys_siglist' is declared by <signal.h>.  */
+#undef SYS_SIGLIST_DECLARED
+
+/* Define if you can safely include both <sys/time.h> and <time.h>.  */
+#undef TIME_WITH_SYS_TIME
+
+/* Define if the X Window System is missing or not being used.  */
+#undef X_DISPLAY_MISSING
+
+/* package name */
+#undef PACKAGE 
+
+/* package version */
+#undef VERSION 
+
+/* Define if you have the gethostname function.  */
+#undef HAVE_GETHOSTNAME
+
+/* Define if you have the gettimeofday function.  */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define if you have the memmove function.  */
+#undef HAVE_MEMMOVE
+
+/* Define if you have the poll function.  */
+#undef HAVE_POLL
+
+/* Define if you have the select function.  */
+#undef HAVE_SELECT
+
+/* Define if you have the strcspn function.  */
+#undef HAVE_STRCSPN
+
+/* Define if you have the strdup function.  */
+#undef HAVE_STRDUP
+
+/* Define if you have the strerror function.  */
+#undef HAVE_STRERROR
+
+/* Define if you have the strncasecmp function.  */
+#undef HAVE_STRNCASECMP
+
+/* Define if you have the usleep function.  */
+#undef HAVE_USLEEP
+
+/* Define if you have the <fcntl.h> header file.  */
+#undef HAVE_FCNTL_H
+
+/* Define if you have the <getopt.h> header file.  */
+#undef HAVE_GETOPT_H
+
+/* Define if you have the <ioctl.h> header file.  */
+#undef HAVE_IOCTL_H
+
+/* Define if you have the <libintl.h> header file.  */
+#undef HAVE_LIBINTL_H
+
+/* Define if you have the <limits.h> header file.  */
+#undef HAVE_LIMITS_H
+
+/* Define if you have the <sys/bitypes.h> header file.  */
+#undef HAVE_SYS_BITYPES_H
+
+/* Define if you have the <sys/ioctl.h> header file.  */
+#undef HAVE_SYS_IOCTL_H
+
+/* Define if you have the <sys/time.h> header file.  */
+#undef HAVE_SYS_TIME_H
+
+/* Define if you have the <sys/types.h> header file.  */
+#undef HAVE_SYS_TYPES_H
+
+/* Define if you have the <unistd.h> header file.  */
+#undef HAVE_UNISTD_H
+
new file mode 100644
--- /dev/null
+++ b/lib/Makefile.in
@@ -0,0 +1,37 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+export NSPR20=1
+
+include $(topsrcdir)/config/config.mk
+
+DIRS = ds libc msgc
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(TARGETS)
+
+install:: export
new file mode 100644
--- /dev/null
+++ b/lib/ds/Makefile.in
@@ -0,0 +1,124 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../..
+topsrcdir	= @top_srcdir@/nsprpub
+srcdir		= @srcdir@
+VPATH		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+# Disable optimization of the nspr on SunOS4.1.3
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+OPTIMIZER =
+endif
+endif
+
+INCLUDES = -I$(DIST)/include/private -I$(DIST)/include
+
+CSRCS = \
+	plarena.c \
+	plevent.c \
+	plhash.c \
+	plvector.c \
+	$(NULL)
+
+HEADERS = \
+	plarenas.h \
+	plarena.h \
+	plevent.h \
+	plhash.h \
+	plvector.h \
+	$(NULL)
+
+HEADERS := $(addprefix $(srcdir)/, $(HEADERS))
+
+ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET)))
+# OS_CFLAGS = $(OS_EXE_CFLAGS)
+EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).lib
+else
+DLLBASE=/BASE:0x30000000
+RES=$(OBJDIR)/ds.res
+RESNAME=$(MOD_DEPTH)/pr/src/nspr.rc
+OS_LIBS = user32.lib
+EXTRA_LIBS = $(DIST)/lib/libnspr$(MOD_VERSION).lib
+
+ifdef MOZ_DEBUG
+ifdef GLOWCODE
+EXTRA_LIBS += $(GLOWDIR)/glowcode.lib
+endif
+endif
+
+endif
+else
+ifeq ($(OS_ARCH), AIX)
+ifeq ($(CLASSIC_NSPR),1)
+OS_LIBS += -lc
+else
+OS_LIBS += -lc_r
+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 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),SCOOS)
+EXTRA_LIBS =
+endif
+
+LIBRARY_NAME	= plds
+LIBRARY_VERSION	= $(MOD_VERSION)
+
+RELEASE_HEADERS = $(HEADERS)
+RELEASE_HEADERS_DEST = $(RELEASE_INCLUDE_DIR)
+RELEASE_LIBS	= $(TARGETS)
+
+include $(topsrcdir)/config/rules.mk
+
+#
+# The Client build wants the shared libraries in $(DIST)/bin,
+# so we also install them there.
+#
+
+export:: $(TARGETS)
+	$(INSTALL) -m 444 $(HEADERS) $(DIST)/include
+	$(INSTALL) -m 444 $(TARGETS) $(DIST)/lib
+	$(INSTALL) -m 444 $(SHARED_LIBRARY) $(DIST)/bin
+ifeq ($(MOZ_BITS),16)
+	$(INSTALL) -m 444 $(HEADERS) $(MOZ_INCL)
+	$(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/lib
+	$(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/bin
+endif
+
+install:: export
+
new file mode 100644
--- /dev/null
+++ b/lib/libc/Makefile.in
@@ -0,0 +1,37 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+export NSPR20=1
+
+include $(topsrcdir)/config/config.mk
+
+DIRS = include src
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(TARGETS)
+
+install:: export
new file mode 100644
--- /dev/null
+++ b/lib/libc/include/Makefile.in
@@ -0,0 +1,43 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+HEADERS = $(wildcard $(srcdir)/*.h)
+
+RELEASE_HEADERS = $(HEADERS)
+RELEASE_HEADERS_DEST = $(RELEASE_INCLUDE_DIR)
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(HEADERS)
+	$(INSTALL) -m 444 $(HEADERS) $(DIST)/include
+ifeq ($(MOZ_BITS),16)
+	$(INSTALL) -m 444 $(HEADERS) $(MOZ_INCL)
+endif
+
+install:: export
+
new file mode 100644
--- /dev/null
+++ b/lib/libc/src/Makefile.in
@@ -0,0 +1,117 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../..
+topsrcdir	= @top_srcdir@/nsprpub
+srcdir		= @srcdir@
+VPATH		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+# Disable optimization of the nspr on SunOS4.1.3
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+OPTIMIZER =
+endif
+endif
+
+INCLUDES = -I$(DIST)/include
+
+CSRCS =\
+	strlen.c  \
+	strcpy.c  \
+	strdup.c  \
+	strcat.c  \
+	strcmp.c  \
+	strccmp.c \
+	strchr.c  \
+	strpbrk.c \
+	strstr.c  \
+	strcstr.c \
+	base64.c \
+	plerror.c \
+	plgetopt.c \
+	$(NULL)
+
+LIBRARY_NAME	= plc
+LIBRARY_VERSION	= $(MOD_VERSION)
+
+RELEASE_LIBS = $(TARGETS)
+
+ifeq ($(OS_ARCH),WINNT)
+ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET)))
+EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).lib
+else
+DLLBASE=/BASE:0x30000000
+RES=$(OBJDIR)/plc.res
+RESNAME=$(MOD_DEPTH)/pr/src/nspr.rc
+EXTRA_LIBS = $(DIST)/lib/libnspr$(MOD_VERSION).lib
+
+ifdef MOZ_DEBUG
+ifdef GLOWCODE
+EXTRA_LIBS += $(GLOWDIR)/glowcode.lib
+endif
+endif
+
+endif
+else
+ifeq ($(OS_ARCH), AIX)
+ifeq ($(CLASSIC_NSPR),1)
+OS_LIBS += -lc
+else
+OS_LIBS += -lc_r
+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 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),SCOOS)
+EXTRA_LIBS =
+endif
+
+include $(topsrcdir)/config/rules.mk
+
+#
+# The Client build wants the shared libraries in $(DIST)/bin,
+# so we also install them there.
+#
+
+export:: $(TARGETS)
+	$(INSTALL) -m 444 $(TARGETS) $(DIST)/lib
+	$(INSTALL) -m 444 $(SHARED_LIBRARY) $(DIST)/bin
+ifeq ($(MOZ_BITS),16)
+	$(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/lib
+	$(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/bin
+endif
+
+install:: export
+
new file mode 100644
--- /dev/null
+++ b/lib/msgc/Makefile.in
@@ -0,0 +1,37 @@
+#
+# 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.
+#
+
+MOD_DEPTH = ../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+DIRS = include src
+
+ifdef ENABLE_TESTS
+DIRS += tests
+endif
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(TARGETS)
+
+install:: export
new file mode 100644
--- /dev/null
+++ b/lib/msgc/include/Makefile.in
@@ -0,0 +1,43 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+EXPORT_HEADERS = $(srcdir)/prgc.h
+HEADERS = $(EXPORT_HEADERS) $(srcdir)/gcint.h
+
+RELEASE_HEADERS = $(EXPORT_HEADERS)
+RELEASE_HEADERS_DEST = $(RELEASE_INCLUDE_DIR)
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(EXPORT_HEADERS)
+	$(INSTALL) -m 444 $(EXPORT_HEADERS) $(DIST)/include
+ifeq ($(MOZ_BITS),16)
+	$(INSTALL) -m 444 $(EXPORT_HEADERS) $(MOZ_INCL)
+endif
+
+install:: export
new file mode 100644
--- /dev/null
+++ b/lib/msgc/src/Makefile.in
@@ -0,0 +1,119 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../..
+topsrcdir	= @top_srcdir@/nsprpub
+srcdir		= @srcdir@
+VPATH		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+# Disable optimization of the nspr on SunOS4.1.3
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+OPTIMIZER =
+endif
+endif
+
+INCLUDES = -I$(DIST)/include -I$(srcdir)/../include
+
+CSRCS = prgcapi.c prmsgc.c
+
+ifeq ($(OS_ARCH),WINNT)
+ifeq ($(OS_TARGET),WIN16)
+CSRCS += win16gc.c
+else
+ifeq ($(OS_TARGET),OS2)
+CSRCS += os2gc.c
+else
+CSRCS += win32gc.c
+endif
+endif
+else
+CSRCS += unixgc.c
+endif
+
+NSPR_VERSION = $(MOD_VERSION)
+
+ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET)))
+EXTRA_LIBS = $(DIST)/lib/nspr$(NSPR_VERSION).lib
+else
+DLLBASE=/BASE:0x30000000
+#RES=$(OBJDIR)/ds.res
+#RESNAME=$(MOD_DEPTH)/pr/src/nspr.rc
+#OS_LIBS = user32.lib
+EXTRA_LIBS = $(DIST)/lib/libnspr$(NSPR_VERSION).lib
+
+ifdef MOZ_DEBUG
+ifdef GLOWCODE
+EXTRA_LIBS += $(GLOWDIR)/glowcode.lib
+endif
+endif
+
+endif
+else
+ifeq ($(OS_ARCH), AIX)
+ifeq ($(CLASSIC_NSPR),1)
+OS_LIBS += -lc
+else
+OS_LIBS += -lc_r
+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 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),SCOOS)
+EXTRA_LIBS =
+endif
+
+LIBRARY_NAME = msgc
+LIBRARY_VERSION = $(MOD_VERSION)
+
+RELEASE_LIBS = $(TARGETS)
+
+include $(topsrcdir)/config/rules.mk
+
+#
+# The Client build wants the shared libraries in $(DIST)/bin,
+# so we also install them there.
+#
+
+export:: $(TARGETS)
+	$(INSTALL) -m 444 $(TARGETS) $(DIST)/lib
+	$(INSTALL) -m 444 $(SHARED_LIBRARY) $(DIST)/bin
+ifeq ($(MOZ_BITS),16)
+	$(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/lib
+	$(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/bin
+endif	
+
+install:: export
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.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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @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 += -Wl,+s,+b,$(PWD)/$(DIST)/lib
+endif
+
+# AIX
+ifeq ($(OS_ARCH),AIX)
+ifeq ($(CLASSIC_NSPR),1)
+LDOPTS += -blibpath:.:$(PWD)/$(DIST)/lib:/usr/lpp/xlC/lib:/usr/lib:/lib
+else
+LDOPTS += -blibpath:.:$(PWD)/$(DIST)/lib:/usr/lib/threads:/usr/lpp/xlC/lib:/usr/lib:/lib
+endif
+ifeq ($(OS_ARCH)$(OS_RELEASE),AIX4.1)
+LIBPR = -lnspr$(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
+
+#####################################################
+#
+# 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/lib/prstreams/Makefile.in
@@ -0,0 +1,114 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+# Disable optimization of the nspr on SunOS4.1.3
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+OPTIMIZER =
+endif
+endif
+ifeq ($(OS_ARCH), IRIX)
+CFLAGS += -KPIC
+ifneq ($(OS_RELEASE),5.3)
+CFLAGS += -exceptions
+endif
+endif
+
+INCLUDES = -I$(DIST)/include -I$(srcdir)/../../../include
+
+HEADERS = $(wildcard $(srcdir)/*.h)
+
+CXXSRCS =           \
+	prstrms.cpp    \
+	$(NULL)
+
+OBJS = $(addprefix $(OBJDIR)/,$(CXXSRCS:.cpp=.$(OBJ_SUFFIX)))
+
+ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET)))
+EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).lib
+else
+DLLBASE=/BASE:0x30000000
+RES=$(OBJDIR)/prstrms.res
+RESNAME=$(MOD_DEPTH)/pr/src/nspr.rc
+OS_LIBS = user32.lib
+EXTRA_LIBS = $(DIST)/lib/libnspr$(MOD_VERSION).lib
+endif
+else
+ifeq ($(OS_ARCH), AIX)
+  ifeq ($(OS_RELEASE), 4.1)
+    ifeq ($(CLASSIC_NSPR),1)
+    OS_LIBS += -lC -lc
+    else
+    OS_LIBS += -lC_r -lc_r
+    endif
+  else
+    ifeq ($(CLASSIC_NSPR),1)
+    MKSHLIB = /usr/lpp/xlC/bin/makeC++SharedLib -p 0
+    else
+    MKSHLIB = /usr/lpp/xlC/bin/makeC++SharedLib_r -p 0
+    endif
+    OS_LIBS += -ldl
+  endif
+endif
+ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
+EXTRA_LIBS = -L$(DIST)/lib -lnspr$(MOD_VERSION)_shr
+else
+EXTRA_LIBS = -L$(DIST)/lib -lnspr$(MOD_VERSION)
+endif
+endif
+
+# On NCR and 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),SCOOS)
+EXTRA_LIBS =
+endif
+
+ifeq ($(OS_ARCH), UNIXWARE)
+OS_LIBS += -lC
+endif
+
+LIBRARY_NAME    = prstrms
+LIBRARY_VERSION = $(MOD_VERSION)
+
+RELEASE_HEADERS = $(HEADERS)
+RELEASE_HEADERS_DEST = $(RELEASE_INCLUDE_DIR)
+RELEASE_LIBS    = $(TARGETS)
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(TARGETS) $(HEADERS)
+	$(INSTALL) -m 444 $(HEADERS) $(DIST)/include
+	$(INSTALL) -m 444 $(TARGETS) $(DIST)/lib
+
+install:: export
new file mode 100644
--- /dev/null
+++ b/lib/tests/Makefile.in
@@ -0,0 +1,197 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+ifeq ($(OS_TARGET), WIN16)
+OS_CFLAGS = $(OS_EXE_CFLAGS)
+endif
+
+CSRCS = \
+	string.c \
+	base64t.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
+LIBPR = -lnspr$(MOD_VERSION)
+LIBPLC = -lplc$(MOD_VERSION)
+
+ifeq ($(OS_ARCH), WINNT)
+ifeq ($(OS_TARGET), WIN16)
+  LIBPR = $(DIST)/lib/nspr$(MOD_VERSION).lib
+  LIBPLC= $(DIST)/lib/plc$(MOD_VERSION).lib
+else
+LDOPTS = -NOLOGO -DEBUG -DEBUGTYPE:CV -INCREMENTAL:NO
+LIBPR = $(DIST)/lib/libnspr$(MOD_VERSION).$(LIB_SUFFIX)
+LIBPLC= $(DIST)/lib/libplc$(MOD_VERSION).$(LIB_SUFFIX)
+endif
+endif
+
+ifneq ($(OS_ARCH), WINNT)
+PWD = $(shell pwd)
+endif
+
+ifeq ($(OS_ARCH), IRIX)
+LDOPTS += -rpath $(PWD)/$(DIST)/lib
+endif
+
+ifeq ($(OS_ARCH), OSF1)
+LDOPTS += -rpath $(PWD)/$(DIST)/lib -lpthread
+endif
+
+ifeq ($(OS_ARCH), HP-UX)
+LDOPTS += -Wl,+s,+b,$(PWD)/$(DIST)/lib
+endif
+
+# AIX
+ifeq ($(OS_ARCH),AIX)
+LDOPTS += -blibpath:.:$(PWD)/$(DIST)/lib:/usr/lib/threads:/usr/lpp/xlC/lib:/usr/lib:/lib                                        
+LIBPR = -lnspr$(MOD_VERSION)_shr
+LIBPLC = -lplc$(MOD_VERSION)_shr
+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
+
+# 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 # SunOS
+
+ifeq ($(OS_ARCH), NCR)
+# 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
+
+#####################################################
+#
+# 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$(MOD_VERSION).a
+	$(CC) -o $@ $(AIX_TMP) $(AIX_WRAP)
+	rm -f $(AIX_TMP)
+
+else
+
+# All platforms that are not AIX pre-4.2.
+
+$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
+	@$(MAKE_OBJDIR)
+
+ifeq ($(OS_ARCH), WINNT)
+ifeq ($(OS_TARGET),WIN16)
+	echo system windows >w16link
+	echo option map >>w16link
+	echo option stack=10K >>w16link
+	echo option heapsize=32K >>w16link
+	echo debug $(DEBUGTYPE) all >>w16link
+	echo name $@  >>w16link
+	echo file >>w16link
+	echo $<  >>w16link
+	echo library  >>w16link
+	echo $(LIBPR),	     >>w16link
+	echo $(LIBPLC),		 >>w16link
+	echo winsock.lib     >>w16link
+	wlink @w16link.
+else
+	link $(LDOPTS) $< $(LIBPR) $(LIBPLC) wsock32.lib -out:$@
+endif
+else
+	$(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPR) $(LIBPLC) $(EXTRA_LIBS) -o $@
+endif
+
+endif
+
+export:: $(TARGETS)
+install:: export
+clean::
+	rm -f $(TARGETS)
+
+
+
new file mode 100644
--- /dev/null
+++ b/pr/Makefile.in
@@ -0,0 +1,29 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+DIRS = include src
+
+include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/pr/include/Makefile.in
@@ -0,0 +1,42 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+DIRS = md private obsolete
+
+include $(topsrcdir)/config/config.mk
+
+HEADERS = $(wildcard $(srcdir)/*.h)
+
+RELEASE_HEADERS = $(HEADERS)
+RELEASE_HEADERS_DEST = $(RELEASE_INCLUDE_DIR)
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(HEADERS)
+	$(INSTALL) -m 444 $(HEADERS) $(DIST)/include
+ifeq ($(MOZ_BITS),16)
+	$(INSTALL) -m 444 $(HEADERS) $(MOZ_INCL)
+endif
new file mode 100644
--- /dev/null
+++ b/pr/include/md/Makefile.in
@@ -0,0 +1,137 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+HEADERS = $(wildcard $(srcdir)/*.h)
+
+include $(topsrcdir)/config/rules.mk
+
+ifeq ($(OS_ARCH),IRIX)
+MDCPUCFG_H = _irix.cfg
+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)
+MDCPUCFG_H = _aix.cfg
+endif
+
+ifeq ($(OS_ARCH),BSD_OS)
+MDCPUCFG_H = _bsdi.cfg
+endif
+
+ifeq ($(OS_ARCH),FreeBSD)
+MDCPUCFG_H = _freebsd.cfg
+endif
+
+ifeq ($(OS_ARCH),NetBSD)
+MDCPUCFG_H = _netbsd.cfg
+endif
+
+ifeq ($(OS_ARCH),HP-UX)
+MDCPUCFG_H = _hpux.cfg
+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),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
+
+export:: $(HEADERS) $(MDCPUCFG_H)
+	$(INSTALL) -m 444 $(HEADERS) $(DIST)/include/md
+	$(INSTALL) -m 444 $(srcdir)/$(MDCPUCFG_H) $(DIST)/include
+ifeq ($(MOZ_BITS),16)
+	cp $(DIST)/include/$(MDCPUCFG_H) $(DIST)/include/prcpucfg.h
+	$(INSTALL) -m 444 $(HEADERS) $(MOZ_INCL)/md
+	$(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
+
+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/include/obsolete/Makefile.in
@@ -0,0 +1,40 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+HEADERS = $(wildcard $(srcdir)/*.h)
+
+RELEASE_HEADERS = $(HEADERS)
+RELEASE_HEADERS_DEST = $(RELEASE_INCLUDE_DIR)/obsolete
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(HEADERS)
+	$(INSTALL) -m 444 $(HEADERS) $(DIST)/include/obsolete
+ifeq ($(MOZ_BITS),16)
+	$(INSTALL) -m 444 $(HEADERS) $(MOZ_INCL)/obsolete
+endif
new file mode 100644
--- /dev/null
+++ b/pr/include/private/Makefile.in
@@ -0,0 +1,41 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+RELEASE_HEADERS = pprio.h pprthred.h prpriv.h
+RELEASE_HEADERS_DEST = $(RELEASE_INCLUDE_DIR)/private
+
+HEADERS = $(RELEASE_HEADERS) primpl.h
+HEADERS := $(addprefix $(srcdir)/, $(HEADERS))
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(HEADERS)
+	$(INSTALL) -m 444 $(HEADERS) $(DIST)/include/private
+ifeq ($(MOZ_BITS),16)
+	$(INSTALL) -m 444 $(HEADERS) $(MOZ_INCL)/private
+endif
new file mode 100644
--- /dev/null
+++ b/pr/src/Makefile.in
@@ -0,0 +1,322 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../..
+topsrcdir	= @top_srcdir@/nsprpub
+srcdir		= @srcdir@
+VPATH		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+ifdef USE_PTHREADS
+    DIRS = io linking malloc md memory misc pthreads threads
+else
+    DIRS = io linking malloc md memory misc threads
+endif
+
+#
+# Define platform-dependent OS_LIBS
+#
+
+# Disable optimization of the nspr on SunOS4.1.3
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+OPTIMIZER =
+export OPTIMIZER
+OS_LIBS			= -lm
+else	# 4.1.3_U1
+ifdef USE_PTHREADS
+OS_LIBS			= -lpthread -lposix4 -lsocket -lnsl -ldl
+else
+ifdef LOCAL_THREADS_ONLY
+OS_LIBS			= -lsocket -lnsl -ldl
+else
+OS_LIBS			= -lthread -lposix4 -lsocket -lnsl -ldl
+endif	# LOCAL_THREADS_ONLY
+endif	# USE_PTHREADS
+endif	# 4.1.3_U1
+endif	# SunOS
+
+ifeq ($(OS_ARCH), IRIX)
+ifeq ($(USE_PTHREADS), 1)
+OS_LIBS += -lpthread
+endif
+endif
+
+ifeq ($(OS_ARCH),AIX)
+ifeq ($(CLASSIC_NSPR),1)
+ifeq ($(OS_RELEASE),4.1)
+OS_LIBS		+= -lsvld -lc
+else
+OS_LIBS		+= -ldl -lc
+endif
+else
+ifeq ($(OS_RELEASE),4.1)
+OS_LIBS		+= -lsvld -lC_r -lC -lpthreads -lc_r -lm /usr/lib/libc.a
+else
+OS_LIBS		+= -ldl -lC_r -lC -lpthreads -lc_r -lm /usr/lib/libc.a
+endif
+endif
+endif
+
+# On AIX, we override malloc in non-pthread versions.  On AIX 4.2 or
+# above, this requires that we use the rtl-enabled version of libc.a.
+ifeq ($(OS_ARCH),AIX)
+ifneq ($(OS_RELEASE),4.1)
+ifneq ($(USE_PTHREADS),1)
+BUILD_AIX_RTL_LIBC = 1
+AIX_RTL_LIBC	= $(OBJDIR)/libc.a
+endif
+endif
+endif
+
+ifeq ($(OS_ARCH),OSF1)
+ifneq ($(OS_RELEASE),V2.0)
+OS_LIBS		= -lc_r
+endif
+ifeq ($(USE_PTHREADS), 1)
+OS_LIBS 	+= -lpthread -lrt
+endif
+ifeq ($(USE_IPV6), 1)
+OS_LIBS		+= -lip6
+endif
+endif
+
+ifeq ($(OS_ARCH),Linux)
+ifeq ($(USE_PTHREADS), 1)
+OS_LIBS		= -L/lib -lpthread -ldl -lc
+else
+OS_LIBS		= -L/lib -ldl -lc
+endif
+endif
+
+ifeq ($(OS_ARCH),HP-UX)
+ifeq ($(basename $(OS_RELEASE)),A.09)
+OS_LIBS		= -ldld -L/lib/pa1.1 -lm
+else
+OS_LIBS		= -ldld -lm -lc
+endif
+ifeq ($(USE_PTHREADS), 1)
+OS_LIBS 	+= -lpthread
+endif
+ifeq ($(PTHREADS_USER), 1)
+OS_LIBS 	+= -lpthread
+endif
+endif
+
+ifeq ($(OS_ARCH),UNIXWARE)
+OS_LIBS		= -lsocket -lc
+endif
+
+ifeq ($(OS_ARCH),NEWS-OS)
+OS_LIBS		= -lsocket -lnsl -lgen -lresolv
+endif
+
+ifeq ($(OS_ARCH),WINNT)
+ifeq ($(OS_TARGET),OS2)
+OS_LIBS		= so32dll.lib tcp32dll.lib
+else
+ifneq ($(OS_TARGET),WIN16)
+OS_LIBS		= wsock32.lib winmm.lib
+endif
+endif
+endif
+
+#
+# Define platform-dependent OBJS
+#
+
+OBJS = \
+    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.$(OBJ_SUFFIX) \
+    pthreads/$(OBJDIR)/ptio.$(OBJ_SUFFIX) \
+    pthreads/$(OBJDIR)/ptthread.$(OBJ_SUFFIX) \
+    pthreads/$(OBJDIR)/ptmisc.$(OBJ_SUFFIX)
+else
+OBJS += \
+    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.$(OBJ_SUFFIX)
+endif
+
+ifeq ($(OS_ARCH), WINNT)
+ifneq (,$(filter-out WIN16 OS2,$(OS_TARGET)))
+DLLBASE=/BASE:0x30000000
+RES=$(OBJDIR)/nspr.res
+RESNAME=nspr.rc
+endif
+
+ifeq ($(OS_TARGET), WIN16)
+OBJS +=	md/windows/$(OBJDIR)/w16null.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/w16proc.$(OBJ_SUFFIX)      \
+	md/windows/$(OBJDIR)/w16thred.$(OBJ_SUFFIX)      \
+	md/windows/$(OBJDIR)/w16fmem.$(OBJ_SUFFIX)      \
+	md/windows/$(OBJDIR)/w16sock.$(OBJ_SUFFIX)      \
+	md/windows/$(OBJDIR)/w16mem.$(OBJ_SUFFIX)      \
+    md/windows/$(OBJDIR)/w16io.$(OBJ_SUFFIX)       \
+    md/windows/$(OBJDIR)/w16gc.$(OBJ_SUFFIX)       \
+    md/windows/$(OBJDIR)/w16error.$(OBJ_SUFFIX)       \
+    md/windows/$(OBJDIR)/w16callb.$(OBJ_SUFFIX)       \
+	md/windows/$(OBJDIR)/ntinrval.$(OBJ_SUFFIX)
+EXTRA_LIBS += $(MOD_DEPTH)/tools/winsock.lib
+W16_EXPORTS = EXPORT _malloc.2=_PR_MD_malloc RESIDENT, \
+	_realloc.3=_PR_MD_realloc RESIDENT, \
+	_calloc.4=_PR_MD_calloc RESIDENT, \
+	_free.5=_PR_MD_free RESIDENT, \
+	_getenv.9=_PR_MD_getenv RESIDENT, \
+	_printf.11=_PR_MD_printf RESIDENT, \
+	_strftime.13=_PR_MD_strftime RESIDENT, \
+	_sscanf.33=_PR_MD_sscanf RESIDENT, \
+    _putenv.10=_PR_MD_putenv RESIDENT, \
+    _fprintf.12=_PR_MD_fprintf RESIDENT
+else
+ifeq ($(OS_TARGET), WIN95)
+OBJS +=	md/windows/$(OBJDIR)/w95io.$(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)
+ifeq ($(MOZ_BITS),32)
+ifdef MOZ_DEBUG
+ifdef GLOWCODE
+	EXTRA_LIBS += $(GLOWDIR)/glowcode.lib
+endif
+endif
+endif
+else
+ifeq ($(OS_TARGET), OS2)
+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.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/ntgc.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/ntthread.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/ntmisc.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/ntinrval.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/ntsem.$(OBJ_SUFFIX)	\
+	md/windows/$(OBJDIR)/win32_errors.$(OBJ_SUFFIX) \
+	md/windows/$(OBJDIR)/w32poll.$(OBJ_SUFFIX)
+endif
+endif
+endif
+
+else
+
+	THREAD_DIR=threads/combined/$(OBJDIR)
+
+ifeq ($(OS_ARCH), MAC)
+	MD_DIR = md/mac/$(OBJDIR)
+else
+	MD_DIR = md/unix/$(OBJDIR)
+	include $(srcdir)/md/unix/objs.mk
+endif
+
+endif
+
+LIBRARY_NAME = nspr
+LIBRARY_VERSION = $(MOD_VERSION)
+
+RELEASE_LIBS = $(TARGETS)
+
+include $(topsrcdir)/config/rules.mk
+
+ifeq ($(BUILD_AIX_RTL_LIBC),1)
+TARGETS		+= $(AIX_RTL_LIBC)
+# XXX is this a shared library?
+endif
+
+#
+# The Client build wants the shared libraries in $(DIST)/bin,
+# so we also install them there.
+#
+
+export:: $(TARGETS)
+	$(INSTALL) -m 444 $(TARGETS) $(DIST)/lib
+	$(INSTALL) -m 444 $(SHARED_LIBRARY) $(DIST)/bin
+ifeq ($(MOZ_BITS),16)
+	$(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/lib
+	$(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/bin
+endif
+
+ifeq ($(BUILD_AIX_RTL_LIBC),1)
+$(AIX_RTL_LIBC): /usr/ccs/lib/libc.a
+	rtl_enable -o $@ $<
+endif
+
+install:: export
new file mode 100644
--- /dev/null
+++ b/pr/src/io/Makefile.in
@@ -0,0 +1,73 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+# Disable optimization of the nspr on SunOS4.1.3
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+OPTIMIZER =
+endif
+endif
+
+CSRCS = \
+    prmwait.c \
+    priometh.c \
+	prmapopt.c \
+    prlayer.c \
+    prlog.c \
+	prmmap.c \
+	prprf.c \
+	prscanf.c \
+	prstdio.c  \
+	$(NULL)
+
+ifndef USE_PTHREADS
+    CSRCS += \
+	    prdir.c \
+	    prfile.c \
+	    prio.c \
+	    prlog.c \
+	    prmmap.c \
+	    prprf.c \
+	    prsocket.c \
+	    prstdio.c \
+	    $(NULL)
+endif
+
+ifdef USE_IPV6
+CSRCS += pripv6.c
+endif
+
+TARGETS	= $(OBJS)
+
+INCLUDES = -I$(DIST)/include/private -I$(DIST)/include
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(TARGETS)
+
+install:: export
new file mode 100644
--- /dev/null
+++ b/pr/src/linking/Makefile.in
@@ -0,0 +1,48 @@
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL.  You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+# 
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+# 
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation.  Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+# Reserved.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+# Disable optimization of the nspr on SunOS4.1.3
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+OPTIMIZER =
+endif
+endif
+
+CSRCS =           \
+	prlink.c   \
+	$(NULL)
+
+TARGETS	= $(OBJS)
+
+INCLUDES = -I$(DIST)/include/private -I$(DIST)/include
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(TARGETS)
+
+install:: export
new file mode 100644
--- /dev/null
+++ b/pr/src/malloc/Makefile.in
@@ -0,0 +1,46 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+# Disable optimization of the nspr on SunOS4.1.3
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+OPTIMIZER =
+endif
+endif
+
+TARGETS	= $(OBJS)
+
+INCLUDES = -I$(DIST)/include/private -I$(DIST)/include
+
+CSRCS = prmalloc.c prmem.c
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(TARGETS)
+
+install:: export
new file mode 100644
--- /dev/null
+++ b/pr/src/md/Makefile.in
@@ -0,0 +1,62 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+ifeq ($(OS_ARCH),MAC)
+DIRS = mac
+else 
+  ifeq ($(OS_ARCH),WINNT)
+    ifeq ($(OS_TARGET),OS2)
+      DIRS = os2
+    else
+      DIRS = windows
+    endif
+  else
+    DIRS = unix
+  endif
+endif
+
+# Disable optimization of the nspr on SunOS4.1.3
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+OPTIMIZER =
+endif
+endif
+
+CSRCS =          \
+	prosdep.c \
+	$(NULL)
+
+TARGETS	= $(OBJS)
+
+INCLUDES = -I$(DIST)/include/private -I$(DIST)/include
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(TARGETS)
+
+install:: export
new file mode 100644
--- /dev/null
+++ b/pr/src/md/os2/Makefile.in
@@ -0,0 +1,55 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+ifeq ($(OS_TARGET), OS2)
+CSRCS = \
+    os2misc.c \
+    os2sem.c   \
+    os2inrval.c \
+    os2gc.c \
+    os2thred.c \
+    os2io.c \
+    os2cv.c \
+    os2sock.c \
+    os2_errors.c \
+    os2poll.c \
+    $(NULL)
+endif
+
+TARGETS	= $(OBJS)
+
+INCLUDES = -I$(DIST)/include/private -I$(DIST)/include
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(TARGETS)
+
+install:: export
+
+
+
new file mode 100644
--- /dev/null
+++ b/pr/src/md/unix/Makefile.in
@@ -0,0 +1,248 @@
+#
+# 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.
+#
+
+MOD_DEPTH = ../../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+# Disable optimization of the nspr on SunOS4.1.3
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+OPTIMIZER =
+endif
+endif
+
+CSRCS =          \
+	unix.c    \
+	unix_errors.c    \
+	uxproces.c \
+	uxwrap.c \
+	$(NULL)
+
+PTH_USER_CSRCS =          \
+	pthreads_user.c \
+	$(NULL)
+
+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)
+
+BSDI_CSRCS = \
+	bsdi.c \
+	$(NULL)
+
+HPUX_CSRCS = \
+	hpux.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)
+
+NEC_CSRCS = \
+	nec.c \
+	$(NULL)
+
+SONY_CSRCS = \
+	sony.c \
+	$(NULL)
+
+NCR_CSRCS = \
+	ncr.c \
+	$(NULL)
+
+SCOOS_CSRCS = \
+	scoos.c \
+	$(NULL)
+
+ifeq ($(PTHREADS_USER),1)
+CSRCS += $(PTH_USER_CSRCS)
+endif
+
+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),BSD_OS)
+CSRCS += $(BSDI_CSRCS)
+endif
+ifeq ($(OS_ARCH),HP-UX)
+CSRCS += $(HPUX_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),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
+
+#
+# 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)
+		ASFILES = os_$(OS_ARCH).s
+	endif
+    endif
+endif
+
+ifeq ($(OS_ARCH), SINIX)
+    ASFILES   = os_ReliantUNIX.s
+endif
+
+ifeq ($(OS_ARCH)$(OS_RELEASE),BSD_OS2.1)
+    ASFILES = os_BSD_386_2.s
+endif
+
+TARGETS		= $(OBJS)
+
+ifeq ($(OS_ARCH),AIX)
+ifneq ($(OS_RELEASE),4.2)
+ifneq ($(USE_PTHREADS), 1)
+#TARGETS		+= $(OBJDIR)/aixwrap.$(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)
+		endif
+	endif
+endif
+
+INCLUDES = -I$(DIST)/include/private -I$(DIST)/include
+
+include $(topsrcdir)/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)
+$(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
+
+install:: export
new file mode 100644
--- /dev/null
+++ b/pr/src/md/windows/Makefile.in
@@ -0,0 +1,80 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+ifeq ($(OS_TARGET), WIN16)
+CSRCS = \
+	w16null.c \
+	w16thred.c \
+	w16proc.c \
+    w16fmem.c \
+    w16sock.c \
+    w16mem.c \
+    w16io.c  \
+    w16gc.c  \
+    w16error.c  \
+    w16stdio.c  \
+    w16callb.c \
+    ntinrval.c \
+    $(NULL)
+else
+ifeq ($(OS_TARGET), WIN95)
+CSRCS =          \
+    ntmisc.c \
+    ntsem.c   \
+    ntinrval.c \
+    ntgc.c \
+	w95thred.c \
+	w95io.c \
+	w95cv.c \
+	w95sock.c \
+	win32_errors.c \
+    w32poll.c \
+    $(NULL)
+else
+CSRCS =          \
+    ntmisc.c \
+    ntsem.c   \
+    ntinrval.c \
+    ntgc.c \
+    ntthread.c \
+    ntio.c    \
+	win32_errors.c \
+    w32poll.c \
+    $(NULL)
+endif
+endif
+
+TARGETS	= $(OBJS)
+
+INCLUDES = -I$(DIST)/include/private -I$(DIST)/include
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(TARGETS)
+
+install:: export
new file mode 100644
--- /dev/null
+++ b/pr/src/memory/Makefile.in
@@ -0,0 +1,47 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+# Disable optimization of the nspr on SunOS4.1.3
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+OPTIMIZER =
+endif
+endif
+
+CSRCS = prseg.c
+
+TARGETS	= $(OBJS)
+
+INCLUDES = -I$(DIST)/include/private -I$(DIST)/include
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(TARGETS)
+
+install:: export
+
new file mode 100644
--- /dev/null
+++ b/pr/src/misc/Makefile.in
@@ -0,0 +1,69 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+# Disable optimization of the nspr on SunOS4.1.3
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+OPTIMIZER =
+endif
+endif
+
+CSRCS =            \
+	pralarm.c  \
+	pratom.c   \
+	prdtoa.c   \
+	prenv.c    \
+	prerror.c  \
+	prinit.c   \
+	prinrval.c \
+	prlog2.c   \
+	prlong.c   \
+	prnetdb.c  \
+	prsystem.c \
+	prtime.c   \
+	prthinfo.c \
+	$(NULL)
+
+TARGETS	= $(OBJS)
+
+INCLUDES = -I$(DIST)/include/private -I$(DIST)/include
+
+include $(topsrcdir)/config/rules.mk
+
+# An AIX Optimization bug causes PR_dtoa() to produce wrong result.
+# This suppresses optimization for this single compilation unit.
+ifeq ($(OS_ARCH), AIX)
+$(OBJDIR)/prdtoa.o:
+	@$(MAKE_OBJDIR)
+	$(CC) -o $@ -c $(filter-out -O, $(CFLAGS)) prdtoa.c
+endif
+
+export:: $(TARGETS)
+
+install:: export
+
new file mode 100644
--- /dev/null
+++ b/pr/src/pthreads/Makefile.in
@@ -0,0 +1,52 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+# Disable optimization of the nspr on SunOS4.1.3
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+OPTIMIZER =
+endif
+endif
+
+CSRCS = \
+	ptio.c \
+	ptsynch.c \
+	ptthread.c \
+	ptmisc.c \
+	$(NULL)
+
+TARGETS	= $(OBJS)
+
+INCLUDES = -I$(DIST)/include/private -I$(DIST)/include
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(TARGETS)
+
+install:: export
+
new file mode 100644
--- /dev/null
+++ b/pr/src/threads/Makefile.in
@@ -0,0 +1,64 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+ifdef USE_PTHREADS
+    DIRS =
+else
+    DIRS = combined
+endif
+
+# Disable optimization of the nspr on SunOS4.1.3
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+OPTIMIZER =
+endif
+endif
+
+ifdef USE_PTHREADS
+CSRCS = prcmon.c \
+	$(NULL)
+else
+CSRCS =          \
+	prcmon.c  \
+	prdump.c  \
+	prmon.c   \
+	prsem.c   \
+	prcthr.c \
+	prtpd.c \
+	$(NULL)
+endif
+
+TARGETS	= $(OBJS)
+
+INCLUDES = -I$(DIST)/include/private -I$(DIST)/include
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(TARGETS)
+
+install:: export
new file mode 100644
--- /dev/null
+++ b/pr/src/threads/combined/Makefile.in
@@ -0,0 +1,57 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+# Disable optimization of the nspr on SunOS4.1.3
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+OPTIMIZER =
+endif
+endif
+
+ifdef USE_PTHREADS
+CSRCS =         \
+	$(NULL)
+else
+CSRCS =         \
+    prucpu.c      \
+	prucv.c      \
+	prulock.c    \
+	pruthr.c     \
+    prustack.c    \
+	$(NULL)
+endif
+
+TARGETS	= $(OBJS)
+
+INCLUDES = -I$(DIST)/include/private -I$(DIST)/include
+
+include $(topsrcdir)/config/rules.mk
+
+export:: $(TARGETS)
+
+install:: export
new file mode 100644
--- /dev/null
+++ b/pr/tests/Makefile.in
@@ -0,0 +1,446 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @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),WIN16)
+DIRS = dll w16gui
+else
+DIRS = dll
+endif
+
+ifeq ($(OS_TARGET),OS2)
+OS_CFLAGS = $(OS_EXE_CFLAGS)
+endif
+
+CSRCS =             \
+	accept.c		\
+	alarm.c			\
+	atomic.c		\
+	attach.c		\
+	bigfile.c		\
+	cleanup.c		\
+	cltsrv.c		\
+	concur.c	    \
+	cvar.c			\
+	cvar2.c			\
+	dceemu.c		\
+	dlltest.c		\
+	dtoa.c			\
+	exit.c  		\
+	fileio.c		\
+	forktest.c	    \
+	fsync.c	        \
+	getproto.c		\
+	i2l.c		    \
+	inrval.c		\
+	intrupt.c       \
+	io_timeout.c    \
+	ipv6.c          \
+	join.c    		\
+	joinkk.c        \
+	joinku.c        \
+	joinuk.c        \
+	joinuu.c        \
+	layer.c		    \
+	lazyinit.c		\
+	lltest.c        \
+	lock.c          \
+	lockfile.c      \
+	logger.c		\
+	multiwait.c		\
+	many_cv.c		\
+	nbconn.c		\
+	nblayer.c		\
+	nonblock.c		\
+	op_2long.c      \
+	op_filnf.c		\
+	op_filok.c		\
+	op_noacc.c		\
+	op_nofil.c		\
+	parent.c    	\
+	perf.c    		\
+	poll_er.c		\
+	poll_nm.c		\
+	poll_to.c		\
+	prftest1.c		\
+	prftest2.c		\
+	priotest.c		\
+	ranfile.c       \
+	sel_spd.c  		\
+	selct_er.c	    \
+	selct_nm.c	    \
+	selct_to.c	    \
+	select2.c  		\
+	sem.c 	  		\
+	servr_kk.c		\
+	servr_ku.c		\
+	servr_uk.c		\
+	short_thread.c	\
+	sigpipe.c		\
+	socket.c		\
+	sockopt.c		\
+	sprintf.c		\
+	sproc_ch.c	    \
+	sproc_p.c	    \
+	stdio.c		    \
+	strod.c			\
+	suspend.c		\
+	switch.c		\
+	system.c		\
+	testbit.c    	\
+	testfile.c    	\
+	threads.c 	  	\
+	thruput.c 	  	\
+	timemac.c		\
+	timetest.c		\
+	tmoacc.c        \
+	tmocon.c        \
+	tpd.c			\
+	udpsrv.c	    \
+	writev.c        \
+	xnotify.c       \
+	$(NULL)
+
+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/obsolete -I$(DIST)/include/private -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
+LIBPR = -lnspr$(MOD_VERSION)
+LIBPLC = -lplc$(MOD_VERSION)
+
+ifeq ($(OS_ARCH), WINNT)
+ifeq ($(OS_TARGET), WIN16)
+  LIBPR = $(DIST)/lib/nspr$(MOD_VERSION).lib
+  LIBPLC= $(DIST)/lib/plc$(MOD_VERSION).lib
+else
+ifeq ($(OS_TARGET), OS2)
+  LDOPTS = -NOE -DEBUG -nologo -PMTYPE:VIO
+  LIBPR = $(DIST)/lib/nspr$(MOD_VERSION).lib
+  LIBPLC= $(DIST)/lib/plc$(MOD_VERSION).lib
+else
+  LDOPTS = -NOLOGO -DEBUG -DEBUGTYPE:CV -INCREMENTAL:NO
+  LIBPR = $(DIST)/lib/libnspr$(MOD_VERSION).$(LIB_SUFFIX)
+  LIBPLC= $(DIST)/lib/libplc$(MOD_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$(MOD_VERSION).a
+  LIBPLC = $(DIST)/lib/libplc$(MOD_VERSION).a
+  EXTRA_LIBS = -lc_r
+else
+  LDOPTS += -rpath $(PWD)/$(DIST)/lib
+endif
+endif
+
+ifeq ($(OS_ARCH), HP-UX)
+LDOPTS += -Wl,+s,+b,$(PWD)/$(DIST)/lib
+endif
+
+# AIX
+ifeq ($(OS_ARCH),AIX)
+ifeq ($(CLASSIC_NSPR),1)
+LDOPTS += -blibpath:.:$(PWD)/$(DIST)/lib:/usr/lpp/xlC/lib:/usr/lib:/lib
+else
+LDOPTS += -blibpath:.:$(PWD)/$(DIST)/lib:/usr/lib/threads:/usr/lpp/xlC/lib:/usr/lib:/lib
+endif
+ifeq ($(OS_ARCH)$(OS_RELEASE),AIX4.1)
+LIBPR = -lnspr$(MOD_VERSION)_shr
+LIBPLC = -lplc$(MOD_VERSION)_shr
+else
+LDOPTS += -brtl
+EXTRA_LIBS = -ldl
+endif
+endif
+
+# Solaris
+ifeq ($(OS_ARCH), SunOS)
+ifneq ($(OS_RELEASE), 4.1.3_U1)
+ifdef NS_USE_GCC
+LDOPTS += -Xlinker -R -Xlinker $(PWD)/$(DIST)/lib
+else
+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)
+# NCR needs to link against -lsocket -lnsl -ldl (and -lc, which is
+# linked implicitly by $(CC)).  Note that we did not link with these
+# system libraries when we built libnspr.so.
+EXTRA_LIBS = -lsocket -lnsl -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), NEWS-OS)
+# 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
+  LIBPR = $(DIST)/lib/libnspr$(MOD_VERSION).a
+  LIBPLC = $(DIST)/lib/libplc$(MOD_VERSION).a
+  EXTRA_LIBS = -lsocket -lnsl -lgen -lresolv
+endif
+
+ifeq ($(OS_ARCH), Linux)
+ifeq ($(OS_RELEASE), 1.2)
+EXTRA_LIBS = -ldl
+else
+LDOPTS += -Xlinker -rpath $(PWD)/$(DIST)/lib
+ifeq ($(USE_PTHREADS),1)
+EXTRA_LIBS = -lpthread
+endif
+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),FreeBSD)
+ifeq ($(USE_PTHREADS),1)
+EXTRA_LIBS = -lc_r
+endif
+endif
+
+ifeq ($(OS_ARCH),BSD_OS)
+EXTRA_LIBS = -ldl
+endif
+
+#####################################################
+#
+# The rules
+#
+#####################################################
+
+include $(topsrcdir)/config/rules.mk
+
+AIX_PRE_4_2 = 0
+ifeq ($(OS_ARCH),AIX)
+ifeq ($(OS_RELEASE),4.1)
+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$(MOD_VERSION).a
+	$(CC) -o $@ $(AIX_TMP) $(AIX_WRAP)
+	rm -f $(AIX_TMP)
+
+else
+
+# All platforms that are not AIX pre-4.2.
+
+
+ifeq ($(USE_PTHREADS), 1)
+$(OBJDIR)/attach: $(OBJDIR)/attach.$(OBJ_SUFFIX)
+	@$(MAKE_OBJDIR)
+ifeq ($(OS_ARCH), AIX)
+	$(CC) $< $(LDOPTS) $(LIBPLC) $(LIBPR) -lpthreads -o $@
+else
+ifeq ($(OS_ARCH),FreeBSD)
+	$(CC) $< $(LDOPTS) $(LIBPLC) $(LIBPR) -lc_r -o $@
+else
+	$(CC) $< $(LDOPTS) $(LIBPLC) $(LIBPR) -lpthread -o $@
+endif
+endif
+endif
+
+
+$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(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 winsock.lib     >>w16link
+	wlink @w16link.
+else
+ifeq ($(OS_TARGET),OS2)
+	$(LINK) $(LDOPTS) $< $(LIBPLC) $(LIBPR) so32dll.lib tcp32dll.lib -MAP:$(@:.exe=.map) -out:$@
+else
+	link $(LDOPTS) $< $(LIBPLC) $(LIBPR) wsock32.lib -out:$@
+endif
+endif
+else
+	$(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) $(EXTRA_LIBS) -o $@
+endif
+
+endif
+
+export:: $(TARGETS)
+install:: export
+clean::
+	rm -f $(TARGETS)
+
+#
+# Run the test programs with no arguments
+#
+# Test output goes to the file pointed to by the environment variable
+# NSPR_TEST_LOGFILE, if set, else to /dev/null
+#
+ECHO = echo
+PROGRAMS = $(notdir $(PROGS))
+ifdef NSPR_TEST_LOGFILE
+LOGFILE = $(NSPR_TEST_LOGFILE)
+else
+ifeq ($(OS_ARCH), WINNT)
+LOGFILE = nul
+else
+LOGFILE = /dev/null
+endif
+endif
+
+ifeq ($(OS_TARGET),Linux)
+ECHO = /bin/echo
+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"
new file mode 100644
--- /dev/null
+++ b/pr/tests/dll/Makefile.in
@@ -0,0 +1,95 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+# Disable optimization of the nspr on SunOS4.1.3
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_RELEASE),4.1.3_U1)
+OPTIMIZER =
+endif
+endif
+
+INCLUDES = -I$(DIST)/include
+
+OBJS = $(OBJDIR)/mygetval.$(OBJ_SUFFIX) \
+	$(OBJDIR)/mysetval.$(OBJ_SUFFIX)
+
+ifeq ($(OS_TARGET), WIN16)
+W16OBJS = $(subst $(space),$(comma)$(space),$(OBJS))
+endif
+
+ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET)))
+# do nothing
+else
+DLLBASE=/BASE:0x30000000
+RES=$(OBJDIR)/my.res
+RESNAME=../../../pr/src/nspr.rc
+endif
+endif
+
+ifeq ($(OS_ARCH), WINNT)
+IMPORT_LIBRARY	= $(OBJDIR)/my.lib
+SHARED_LIBRARY	= $(OBJDIR)/my.dll
+ifeq ($(OS_TARGET), OS2)
+LIBRARY		= $(OBJDIR)/my_s.lib
+# XXX $(LIBRARY) probably doesn't need to be added to TARGETS.
+TARGETS		= $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY)
+else
+TARGETS		= $(SHARED_LIBRARY) $(IMPORT_LIBRARY)
+endif
+else
+SHARED_LIBRARY	= $(OBJDIR)/libmy.$(DLL_SUFFIX)
+TARGETS		= $(SHARED_LIBRARY)
+endif
+
+#
+# To create a loadable module on Rhapsody, we must override
+# -dynamiclib with -bundle.
+#
+ifeq ($(OS_ARCH),Rhapsody)
+DSO_LDOPTS = -bundle
+endif
+
+include $(topsrcdir)/config/rules.mk
+
+ifeq ($(OS_TARGET), WIN16)
+# Note: The Win16 target: my.dll requires these macros
+# to be overridden to build the test .dll
+# default values in win16...mk are for release targets.
+#
+OS_DLL_OPTION = NOCASEEXACT
+OS_LIB_FLAGS = -irn
+endif
+
+export:: $(TARGETS)
+	$(NSINSTALL) $(TARGETS) ../$(OBJDIR)/dll
+
+install:: export
+
+clean::
+	rm -rf $(TARGETS)
new file mode 100644
--- /dev/null
+++ b/pr/tests/w16gui/Makefile.in
@@ -0,0 +1,81 @@
+#
+# 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.
+#
+
+#! gmake
+
+
+
+MOD_DEPTH = ../../..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+INCLUDES = -I$(DIST)/include
+W16STDIO = $(MOD_DEPTH)/pr/src/md/windows/$(OBJDIR)/w16stdio.$(OBJ_SUFFIX)
+
+CSRCS = poppad.c \
+       popfile.c \
+       popfont.c \
+       popfind.c \
+       popprnt0.c
+          
+
+INCLUDES = -I$(DIST)/include/private -I$(DIST)/include 
+LIBPR = $(DIST)/lib/nspr$(MOD_VERSION).lib
+LIBPLDS = $(DIST)/lib/plds$(MOD_VERSION).lib
+TARGETS = $(OBJDIR)/poppad.exe
+OS_CFLAGS = $(OS_EXE_CFLAGS)
+
+include $(topsrcdir)/config/rules.mk
+
+
+ifeq ($(OS_TARGET),WIN16)    
+$(OBJDIR)/poppad.exe: $(OBJS)
+	@$(MAKE_OBJDIR)
+	echo system windows >w16link
+	echo name $@  >>w16link
+	echo option map >>w16link
+	echo option stack=16K >>w16link
+	echo debug $(DEBUGTYPE) all >>w16link
+	echo file >>w16link
+	echo $(OBJDIR)\\poppad.$(OBJ_SUFFIX), >>w16link
+	echo $(OBJDIR)\\popfile.$(OBJ_SUFFIX), >>w16link
+	echo $(OBJDIR)\\popfont.$(OBJ_SUFFIX), >>w16link
+	echo $(OBJDIR)\\popfind.$(OBJ_SUFFIX), >>w16link
+	echo $(OBJDIR)\\popprnt0.$(OBJ_SUFFIX), >>w16link
+	echo $(W16STDIO) >>w16link
+	echo library $(LIBPR)      >>w16link
+	echo library $(LIBPLDS)	   >>w16link
+	echo library clibl, commdlg >>w16link
+	echo library winsock.lib   >>w16link
+	wlink @w16link.
+	wrc -bt=windows poppad.rc $(OBJDIR)\\poppad.exe
+else    
+$(OBJDIR)/poppad.exe: $(OBJS)
+	link $(LDOPTS) $< $(LIBPLC) $(LIBPR) wsock32.lib -out:$@
+endif
+
+export:: $(TARGETS)
+
+install:: export
+
+clean::
+	rm -rf $(TARGETS)
new file mode 100644
--- /dev/null
+++ b/tools/Makefile.in
@@ -0,0 +1,217 @@
+#
+# 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.
+#
+
+#! gmake
+
+MOD_DEPTH = ..
+topsrcdir	= @top_srcdir@/nsprpub
+VPATH		= @srcdir@
+srcdir		= @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+ifeq ($(OS_TARGET), WIN16)
+OS_CFLAGS = $(OS_EXE_CFLAGS)
+endif
+
+
+DIRS =
+
+CSRCS =             \
+	httpget.c	    \
+	tail.c		    \
+	$(NULL)
+
+ifeq ($(OS_ARCH), WINNT)
+PROG_SUFFIX = .exe
+else
+PROG_SUFFIX =
+endif
+
+PROGS = $(addprefix $(OBJDIR)/, $(CSRCS:.c=$(PROG_SUFFIX)))
+
+TARGETS = $(PROGS)
+
+INCLUDES = -I$(DIST)/include/private -I$(DIST)/include 
+
+NSPR_VERSION = 21
+
+# Setting the variables LDOPTS and LIBPR.  We first initialize
+# them to the default values, then adjust them for some platforms.
+LDOPTS = -L$(DIST)/lib
+LIBPR = -lnspr$(NSPR_VERSION)
+LIBPLC = -lplc$(NSPR_VERSION)
+
+ifeq ($(OS_ARCH), WINNT)
+ifeq ($(OS_TARGET), WIN16)
+  LIBPR = $(DIST)/lib/nspr$(NSPR_VERSION).lib
+  LIBPLC= $(DIST)/lib/plc$(NSPR_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)
+endif
+endif
+
+ifneq ($(OS_ARCH), WINNT)
+PWD = $(shell pwd)
+endif
+
+ifeq ($(OS_ARCH), IRIX)
+LDOPTS += -rpath $(PWD)/$(DIST)/lib
+endif
+
+ifeq ($(OS_ARCH), OSF1)
+LDOPTS += -rpath $(PWD)/$(DIST)/lib -lpthread
+endif
+
+ifeq ($(OS_ARCH), HP-UX)
+LDOPTS += -Wl,+s,+b,$(PWD)/$(DIST)/lib
+endif
+
+# AIX
+ifeq ($(OS_ARCH),AIX)
+LDOPTS += -blibpath:.:$(PWD)/$(DIST)/lib:/usr/lib/threads:/usr/lpp/xlC/lib:/usr/lib:/lib                                        
+LIBPR = -lnspr$(NSPR_VERSION)_shr
+LIBPLC = -lplc$(NSPR_VERSION)_shr
+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
+
+# 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 # SunOS
+
+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
+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), 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
+
+#####################################################
+#
+# 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 option map >>w16link
+	echo option stack=10K >>w16link
+	echo option heapsize=32K >>w16link
+	echo debug $(DEBUGTYPE) all >>w16link
+	echo name $@  >>w16link
+	echo file >>w16link
+	echo $<  >>w16link
+	echo library  >>w16link
+	echo $(LIBPR),	     >>w16link
+	echo $(LIBPLC),		 >>w16link
+	echo winsock.lib     >>w16link
+	wlink @w16link.
+else
+	link $(LDOPTS) $< $(LIBPR) $(LIBPLC) wsock32.lib -out:$@
+endif
+else
+	$(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPR) $(LIBPLC) $(EXTRA_LIBS) -o $@
+endif
+
+endif
+
+export:: $(TARGETS)
+install:: export
+clean::
+	rm -f $(TARGETS)
+