diff options
author | cls%seawood.org <devnull@localhost> | 1998-08-19 20:42:01 +0000 |
---|---|---|
committer | cls%seawood.org <devnull@localhost> | 1998-08-19 20:42:01 +0000 |
commit | abe169192c1a36d36a462a044df505d5d0ad3eb6 (patch) | |
tree | 33ef23f7b0baaaca1cf87f329b4b895c17bfdf2a | |
parent | 41e22ad80dfa67fbcf0940f9c101111bb039dcf9 (diff) | |
download | nspr-hg-abe169192c1a36d36a462a044df505d5d0ad3eb6.tar.gz |
AUTOCONF_1_0 landing.PROGRESS_19980824_BASEColorSync_19980824_BASE
57 files changed, 3892 insertions, 12 deletions
diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 00000000..3e4bc9da --- /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." diff --git a/config/AIX.mk b/config/AIX.mk index 4305ddc2..5dfc9cc9 100644 --- a/config/AIX.mk +++ b/config/AIX.mk @@ -67,6 +67,10 @@ 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 @@ -82,6 +86,8 @@ 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 diff --git a/config/BSD_OS.mk b/config/BSD_OS.mk index ad13200f..c865aa89 100644 --- a/config/BSD_OS.mk +++ b/config/BSD_OS.mk @@ -35,6 +35,10 @@ 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 diff --git a/config/FreeBSD.mk b/config/FreeBSD.mk index a7154795..ceed49cb 100644 --- a/config/FreeBSD.mk +++ b/config/FreeBSD.mk @@ -28,7 +28,11 @@ 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 diff --git a/config/HP-UX.mk b/config/HP-UX.mk index bbc541b1..f6471f41 100644 --- a/config/HP-UX.mk +++ b/config/HP-UX.mk @@ -173,3 +173,7 @@ DSO_CFLAGS = +Z endif HAVE_PURIFY = 1 + +ifdef USE_AUTOCONF +OS_CFLAGS = +endif diff --git a/config/IRIX.mk b/config/IRIX.mk index 8487cbad..686e98cd 100644 --- a/config/IRIX.mk +++ b/config/IRIX.mk @@ -111,3 +111,7 @@ DSO_LDOPTS = -elf -shared -all ifdef DSO_BACKEND DSO_LDOPTS += -soname $(DSO_NAME) endif + +ifdef USE_AUTOCONF +OS_CFLAGS = +endif diff --git a/config/Linux.mk b/config/Linux.mk index b8f4e6d0..83e13e9a 100644 --- a/config/Linux.mk +++ b/config/Linux.mk @@ -52,7 +52,11 @@ 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 diff --git a/config/NCR.mk b/config/NCR.mk index 98d07596..3922d3da 100644 --- a/config/NCR.mk +++ b/config/NCR.mk @@ -31,7 +31,9 @@ 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 diff --git a/config/NEC.mk b/config/NEC.mk index 7ca64c7e..3a884748 100644 --- a/config/NEC.mk +++ b/config/NEC.mk @@ -36,7 +36,11 @@ 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 diff --git a/config/NEWS-OS.mk b/config/NEWS-OS.mk index b0307c02..443ef1db 100644 --- a/config/NEWS-OS.mk +++ b/config/NEWS-OS.mk @@ -39,7 +39,11 @@ G++INCLUDES = 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 diff --git a/config/NetBSD.mk b/config/NetBSD.mk index b1a5c759..2d3b1ba6 100644 --- a/config/NetBSD.mk +++ b/config/NetBSD.mk @@ -32,7 +32,11 @@ 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 diff --git a/config/OSF1.mk b/config/OSF1.mk index 0c4ccbb1..2f8c5792 100644 --- a/config/OSF1.mk +++ b/config/OSF1.mk @@ -76,6 +76,9 @@ endif NON_LD_FLAGS = -ieee_with_inexact +ifdef USE_AUTOCONF +OS_CFLAGS = +else OS_CFLAGS = -DOSF1 -D_REENTRANT -taso ifeq ($(OS_RELEASE),V3.2) @@ -85,6 +88,7 @@ endif ifeq (V4,$(findstring V4,$(OS_RELEASE))) OS_CFLAGS += -DOSF1V4 endif +endif # USE_AUTOCONF ifeq ($(USE_PTHREADS),1) OS_CFLAGS += -pthread diff --git a/config/Rhapsody.mk b/config/Rhapsody.mk index 1d5fb7ed..37ef1e61 100644 --- a/config/Rhapsody.mk +++ b/config/Rhapsody.mk @@ -45,7 +45,11 @@ CPU_ARCH = ppc # 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 diff --git a/config/SCOOS.mk b/config/SCOOS.mk index c1d24468..8890f551 100644 --- a/config/SCOOS.mk +++ b/config/SCOOS.mk @@ -33,7 +33,12 @@ 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) diff --git a/config/SINIX.mk b/config/SINIX.mk index 1be48be5..6cf899e3 100644 --- a/config/SINIX.mk +++ b/config/SINIX.mk @@ -70,7 +70,11 @@ RANLIB = /bin/true 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 diff --git a/config/SunOS.mk b/config/SunOS.mk index 0a3b0c40..9aca9f61 100644 --- a/config/SunOS.mk +++ b/config/SunOS.mk @@ -20,7 +20,7 @@ # 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 diff --git a/config/SunOS4.mk b/config/SunOS4.mk index 20d74c1d..c0aa387d 100644 --- a/config/SunOS4.mk +++ b/config/SunOS4.mk @@ -35,7 +35,11 @@ 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) diff --git a/config/SunOS5.mk b/config/SunOS5.mk index 1c14851c..8801afbf 100644 --- a/config/SunOS5.mk +++ b/config/SunOS5.mk @@ -121,7 +121,11 @@ 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) diff --git a/config/UNIX.mk b/config/UNIX.mk index ad45ddb1..774b1da8 100644 --- a/config/UNIX.mk +++ b/config/UNIX.mk @@ -21,6 +21,7 @@ LIB_SUFFIX = a DLL_SUFFIX = so AR = ar cr $@ +ifndef USE_AUTOCONF ifdef BUILD_OPT OPTIMIZER = -O DEFINES = -UDEBUG -DNDEBUG @@ -32,7 +33,8 @@ 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 diff --git a/config/UNIXWARE.mk b/config/UNIXWARE.mk index f15a5a41..c2b14602 100644 --- a/config/UNIXWARE.mk +++ b/config/UNIXWARE.mk @@ -33,7 +33,11 @@ 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 diff --git a/config/config.mk b/config/config.mk index 2d3526e0..4563eca4 100644 --- a/config/config.mk +++ b/config/config.mk @@ -16,14 +16,18 @@ # 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)/.. @@ -48,7 +52,19 @@ CFLAGS = $(OPTIMIZER) $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \ 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) @@ -59,8 +75,17 @@ 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 diff --git a/config/nsinstall.c b/config/nsinstall.c index 5090376b..f7e05bc9 100644 --- a/config/nsinstall.c +++ b/config/nsinstall.c @@ -24,6 +24,7 @@ #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> @@ -78,7 +79,8 @@ 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') @@ -91,7 +93,11 @@ mkdirs(char *path, mode_t mode) } *cp = '/'; } - return mkdir(path, mode); + res = mkdir(path, mode); + if ((res != 0) && (errno == EEXIST)) + return 0; + else + return res; } static uid_t diff --git a/config/rules.mk b/config/rules.mk index 337df248..29f991fc 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -47,9 +47,12 @@ # ($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 # @@ -148,6 +151,10 @@ 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 \ @@ -180,7 +187,11 @@ clean:: +$(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:: @@ -335,18 +346,18 @@ 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. diff --git a/include/config.h.in b/include/config.h.in new file mode 100644 index 00000000..cbed5385 --- /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 + diff --git a/lib/Makefile.in b/lib/Makefile.in new file mode 100644 index 00000000..091558fe --- /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 diff --git a/lib/ds/Makefile.in b/lib/ds/Makefile.in new file mode 100644 index 00000000..8c424110 --- /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 + diff --git a/lib/libc/Makefile.in b/lib/libc/Makefile.in new file mode 100644 index 00000000..2e890d26 --- /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 diff --git a/lib/libc/include/Makefile.in b/lib/libc/include/Makefile.in new file mode 100644 index 00000000..2801cfec --- /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 + diff --git a/lib/libc/src/Makefile.in b/lib/libc/src/Makefile.in new file mode 100644 index 00000000..0f86f5af --- /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 + diff --git a/lib/msgc/Makefile.in b/lib/msgc/Makefile.in new file mode 100644 index 00000000..2995f2b4 --- /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 diff --git a/lib/msgc/include/Makefile.in b/lib/msgc/include/Makefile.in new file mode 100644 index 00000000..b378b3ef --- /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 diff --git a/lib/msgc/src/Makefile.in b/lib/msgc/src/Makefile.in new file mode 100644 index 00000000..c050d74f --- /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 diff --git a/lib/msgc/tests/Makefile.in b/lib/msgc/tests/Makefile.in new file mode 100644 index 00000000..87400a7f --- /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) diff --git a/lib/prstreams/Makefile.in b/lib/prstreams/Makefile.in new file mode 100644 index 00000000..8101481a --- /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 diff --git a/lib/tests/Makefile.in b/lib/tests/Makefile.in new file mode 100644 index 00000000..05e990ca --- /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) + + + diff --git a/pr/Makefile.in b/pr/Makefile.in new file mode 100644 index 00000000..d8b37c3d --- /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 diff --git a/pr/include/Makefile.in b/pr/include/Makefile.in new file mode 100644 index 00000000..3172b64e --- /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 diff --git a/pr/include/md/Makefile.in b/pr/include/md/Makefile.in new file mode 100644 index 00000000..970ab299 --- /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 diff --git a/pr/include/obsolete/Makefile.in b/pr/include/obsolete/Makefile.in new file mode 100644 index 00000000..7c15fea4 --- /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 diff --git a/pr/include/private/Makefile.in b/pr/include/private/Makefile.in new file mode 100644 index 00000000..8f0811d7 --- /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 diff --git a/pr/src/Makefile.in b/pr/src/Makefile.in new file mode 100644 index 00000000..8275757a --- /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 diff --git a/pr/src/io/Makefile.in b/pr/src/io/Makefile.in new file mode 100644 index 00000000..fcae3a31 --- /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 diff --git a/pr/src/linking/Makefile.in b/pr/src/linking/Makefile.in new file mode 100644 index 00000000..8f1730f2 --- /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 diff --git a/pr/src/malloc/Makefile.in b/pr/src/malloc/Makefile.in new file mode 100644 index 00000000..e904cc02 --- /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 diff --git a/pr/src/md/Makefile.in b/pr/src/md/Makefile.in new file mode 100644 index 00000000..947bbd39 --- /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 diff --git a/pr/src/md/os2/Makefile.in b/pr/src/md/os2/Makefile.in new file mode 100644 index 00000000..6310c02a --- /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 + + + diff --git a/pr/src/md/unix/Makefile.in b/pr/src/md/unix/Makefile.in new file mode 100644 index 00000000..1a96f03e --- /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 diff --git a/pr/src/md/windows/Makefile.in b/pr/src/md/windows/Makefile.in new file mode 100644 index 00000000..a8925b61 --- /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 diff --git a/pr/src/memory/Makefile.in b/pr/src/memory/Makefile.in new file mode 100644 index 00000000..97b55781 --- /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 + diff --git a/pr/src/misc/Makefile.in b/pr/src/misc/Makefile.in new file mode 100644 index 00000000..ddf5d4b8 --- /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 + diff --git a/pr/src/pthreads/Makefile.in b/pr/src/pthreads/Makefile.in new file mode 100644 index 00000000..8912fddf --- /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 + diff --git a/pr/src/threads/Makefile.in b/pr/src/threads/Makefile.in new file mode 100644 index 00000000..d79b81d7 --- /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 diff --git a/pr/src/threads/combined/Makefile.in b/pr/src/threads/combined/Makefile.in new file mode 100644 index 00000000..cd88d0fa --- /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 diff --git a/pr/tests/Makefile.in b/pr/tests/Makefile.in new file mode 100644 index 00000000..67b82156 --- /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" diff --git a/pr/tests/dll/Makefile.in b/pr/tests/dll/Makefile.in new file mode 100644 index 00000000..335d56fb --- /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) diff --git a/pr/tests/w16gui/Makefile.in b/pr/tests/w16gui/Makefile.in new file mode 100644 index 00000000..b2d2c8ad --- /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) diff --git a/tools/Makefile.in b/tools/Makefile.in new file mode 100644 index 00000000..c3bef718 --- /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) + |