From d883c8e0d193d807a506bba7f877cc68b7d650ef Mon Sep 17 00:00:00 2001 From: "cls%seawood.org" Date: Sat, 30 Dec 2000 00:47:58 +0000 Subject: [PATCH] Sync'ing long lost changes between Makefile & Makefile.in --- nsprpub/config/Makefile.in | 20 ++++- nsprpub/lib/ds/Makefile.in | 25 +++--- nsprpub/lib/libc/src/Makefile.in | 25 +++--- nsprpub/lib/msgc/src/Makefile.in | 17 ++-- nsprpub/lib/msgc/tests/Makefile.in | 28 +++--- nsprpub/lib/prstreams/Makefile.in | 45 ++++++---- .../prstreams/tests/testprstrm/Makefile.in | 20 ++++- nsprpub/lib/tests/Makefile.in | 22 ++++- nsprpub/pr/include/md/Makefile.in | 12 ++- nsprpub/pr/src/Makefile.in | 88 +++++++++++-------- nsprpub/pr/src/cplus/tests/Makefile.in | 17 +++- nsprpub/pr/src/md/Makefile.in | 9 +- nsprpub/pr/src/md/os2/Makefile.in | 1 + nsprpub/pr/src/md/windows/Makefile.in | 4 +- nsprpub/pr/src/misc/Makefile.in | 3 +- nsprpub/pr/tests/Makefile.in | 78 ++++++++++------ nsprpub/pr/tests/dll/Makefile.in | 10 ++- nsprpub/tools/Makefile.in | 17 +++- 18 files changed, 283 insertions(+), 158 deletions(-) diff --git a/nsprpub/config/Makefile.in b/nsprpub/config/Makefile.in index 71291787222..19e6b82b5b8 100644 --- a/nsprpub/config/Makefile.in +++ b/nsprpub/config/Makefile.in @@ -48,11 +48,16 @@ DIST_GARBAGE = nsprincl.mk nsprincl.sh include $(topsrcdir)/config/config.mk -CSRCS = nsinstall.c now.c +CSRCS = now.c +# This version hasn't been ported for us; the one in mozilla/config has +ifneq ($(OS_ARCH),OS2) +CSRCS += nsinstall.c + PLSRCS = nfspwd.pl +endif -ifeq ($(OS_ARCH), WINNT) +ifeq (,$(filter-out WINNT OS2,$(OS_ARCH))) PROG_SUFFIX = .exe else PROG_SUFFIX = @@ -88,7 +93,14 @@ ifeq ($(OS_ARCH), HP-UX) endif endif -ifdef XP_OS2_EMX +ifeq ($(MOZ_OS2_TOOLS),EMX) +XCFLAGS = $(OS_EXE_CFLAGS) +ifeq ($(MOZ_OS2_EMX_OBJECTFORMAT),OMF) +XLDOPTS = -Zlinker /PM:VIO +endif +endif + +ifeq ($(MOZ_OS2_TOOLS),PGCC) XCFLAGS = $(OS_EXE_CFLAGS) XLDOPTS = -Zlinker /PM:VIO endif @@ -101,7 +113,7 @@ include $(topsrcdir)/config/rules.mk PROGS = $(OBJDIR)/now$(PROG_SUFFIX) -ifeq ($(OS_ARCH),WINNT) +ifeq (,$(filter-out OS2 WINNT,$(OS_ARCH))) TARGETS = $(PROGS) else PROGS += $(OBJDIR)/nsinstall$(PROG_SUFFIX) diff --git a/nsprpub/lib/ds/Makefile.in b/nsprpub/lib/ds/Makefile.in index ea95fbb87d5..5ebda05054f 100644 --- a/nsprpub/lib/ds/Makefile.in +++ b/nsprpub/lib/ds/Makefile.in @@ -69,13 +69,9 @@ HEADERS := $(addprefix $(srcdir)/, $(HEADERS)) ifndef USE_AUTOCONF ifeq ($(OS_ARCH), WINNT) -ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET))) +ifeq ($(OS_TARGET), WIN16) # OS_CFLAGS = $(OS_EXE_CFLAGS) -ifdef XP_OS2_EMX -EXTRA_LIBS = -L$(DIST)/lib -lnspr$(MOD_VERSION) -else EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).$(LIB_SUFFIX) -endif else DLLBASE=/BASE:0x30000000 RES=$(OBJDIR)/plds.res @@ -92,8 +88,12 @@ ifdef GLOWCODE EXTRA_LIBS += $(GLOWDIR)/glowcode.lib endif endif - endif + +else +ifeq ($(MOZ_OS2_TOOLS),VACPP) +EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).$(LIB_SUFFIX) + else ifeq ($(OS_ARCH), AIX) ifeq ($(CLASSIC_NSPR),1) @@ -108,6 +108,7 @@ else EXTRA_LIBS = -L$(DIST)/lib -lnspr$(MOD_VERSION) endif 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 @@ -145,11 +146,7 @@ SH_DATE = $(shell date) SH_NOW = $(shell $(NOW)) ifeq ($(OS_ARCH), WINNT) -ifeq ($(OS_TARGET),OS2) - SUF = -else SUF = i64 -endif else SUF = LL endif @@ -169,14 +166,14 @@ $(TINC): $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC) ifeq ($(OS_ARCH), WINNT) -ifdef XP_OS2_EMX - $(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $< -else $(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) $< -endif +else +ifeq ($(MOZ_OS2_TOOLS), VACPP) + $(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) $< else $(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $< endif +endif # # Version information generation (end) # diff --git a/nsprpub/lib/libc/src/Makefile.in b/nsprpub/lib/libc/src/Makefile.in index 44b78882aef..2c179b1f54b 100644 --- a/nsprpub/lib/libc/src/Makefile.in +++ b/nsprpub/lib/libc/src/Makefile.in @@ -78,12 +78,8 @@ RELEASE_LIBS = $(TARGETS) ifndef USE_AUTOCONF ifeq ($(OS_ARCH),WINNT) -ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET))) -ifdef XP_OS2_EMX -EXTRA_LIBS = -L$(DIST)/lib -lnspr$(MOD_VERSION) -else +ifeq ($(OS_TARGET), WIN16) EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).lib -endif else DLLBASE=/BASE:0x30000000 RES=$(OBJDIR)/plc.res @@ -99,8 +95,12 @@ ifdef GLOWCODE EXTRA_LIBS += $(GLOWDIR)/glowcode.lib endif endif - endif + +else +ifeq ($(MOZ_OS2_TOOLS),VACPP) +EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).$(LIB_SUFFIX) + else ifeq ($(OS_ARCH), AIX) ifeq ($(CLASSIC_NSPR),1) @@ -115,6 +115,7 @@ else EXTRA_LIBS = -L$(DIST)/lib -lnspr$(MOD_VERSION) endif 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 @@ -145,11 +146,7 @@ SH_DATE = $(shell date) SH_NOW = $(shell $(NOW)) ifeq ($(OS_ARCH), WINNT) -ifeq ($(OS_TARGET),OS2) - SUF = -else SUF = i64 -endif else SUF = LL endif @@ -169,14 +166,14 @@ $(TINC): $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC) ifeq ($(OS_ARCH), WINNT) -ifdef XP_OS2_EMX - $(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $< -else $(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) $< -endif +else +ifeq ($(MOZ_OS2_TOOLS), VACPP) + $(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) $< else $(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $< endif +endif # # Version information generation (end) # diff --git a/nsprpub/lib/msgc/src/Makefile.in b/nsprpub/lib/msgc/src/Makefile.in index e717eb82826..593262ecde2 100644 --- a/nsprpub/lib/msgc/src/Makefile.in +++ b/nsprpub/lib/msgc/src/Makefile.in @@ -57,20 +57,20 @@ 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 +ifeq ($(OS_ARCH),OS2) +CSRCS += os2gc.c else CSRCS += unixgc.c endif +endif NSPR_VERSION = $(MOD_VERSION) ifeq ($(OS_ARCH), WINNT) -ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET))) +ifeq ($(OS_TARGET), WIN16) EXTRA_LIBS = $(DIST)/lib/nspr$(NSPR_VERSION).lib else DLLBASE=/BASE:0x30000000 @@ -84,8 +84,12 @@ ifdef GLOWCODE EXTRA_LIBS += $(GLOWDIR)/glowcode.lib endif endif - endif + +else +ifeq ($(MOZ_OS2_TOOLS),VACPP) +EXTRA_LIBS = $(DIST)/lib/nspr$(NSPR_VERSION).$(LIB_SUFFIX) + else ifeq ($(OS_ARCH), AIX) ifeq ($(CLASSIC_NSPR),1) @@ -100,6 +104,7 @@ else EXTRA_LIBS = -L$(DIST)/lib -lnspr$(NSPR_VERSION) endif 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 diff --git a/nsprpub/lib/msgc/tests/Makefile.in b/nsprpub/lib/msgc/tests/Makefile.in index fb98e1aed24..0940e9053ad 100644 --- a/nsprpub/lib/msgc/tests/Makefile.in +++ b/nsprpub/lib/msgc/tests/Makefile.in @@ -53,7 +53,7 @@ endif CSRCS = gc1.c thrashgc.c -ifeq ($(OS_ARCH), WINNT) +ifeq (,$(filter-out WINNT OS2,$(OS_ARCH))) PROG_SUFFIX = .exe else PROG_SUFFIX = @@ -79,12 +79,6 @@ 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) @@ -92,6 +86,16 @@ else LIBGC= $(DIST)/lib/libmsgc$(GC_VERSION).$(LIB_SUFFIX) endif endif + +ifeq ($(OS_ARCH),OS2) +ifeq ($(MOZ_OS2_TOOLS),VACPP) + 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 += -Zomf -Zlinker /PM:VIO +endif endif ifneq ($(OS_ARCH), WINNT) @@ -290,17 +294,15 @@ ifeq ($(OS_TARGET),WIN16) 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 +ifeq ($(OS_ARCH),OS2) + $(LINK) $(LDOPTS) $< $(LIBGC) $(LIBPLC) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS) -o $@ else $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBGC) $(LIBPLC) $(LIBPR) $(EXTRA_LIBS) -o $@ endif - +endif endif export:: $(TARGETS) diff --git a/nsprpub/lib/prstreams/Makefile.in b/nsprpub/lib/prstreams/Makefile.in index 2c5358a9372..36fa9c99596 100644 --- a/nsprpub/lib/prstreams/Makefile.in +++ b/nsprpub/lib/prstreams/Makefile.in @@ -48,21 +48,21 @@ ifeq ($(OS_ARCH),SunOS) ifeq ($(OS_RELEASE),4.1.3_U1) OPTIMIZER = else - # The C++ compiler in Workshop 5.0 uses standard - # iostreams as default. -library=iostream will - # allow Workshop 5.0 to work with classic iostreams. - ifndef NS_USE_GCC - CCC_VERSION := $(shell $(CCC) -V 2>&1) - ifneq (,$(findstring 5.0,$(CCC_VERSION))) - CCC_ONLY_FLAGS += -library=iostream - endif - endif + # The C++ compiler in Workshop 5.0 uses standard + # iostreams as default. -library=iostream will + # allow Workshop 5.0 to work with classic iostreams. + ifndef NS_USE_GCC + CCC_VERSION := $(shell $(CCC) -V 2>&1) + ifneq (,$(findstring 5.0,$(CCC_VERSION))) + CCC_ONLY_FLAGS += -library=iostream + endif + endif endif endif ifeq ($(OS_ARCH), IRIX) ifneq ($(OS_RELEASE),5.3) - CCC_ONLY_FLAGS += -exceptions + CCC_ONLY_FLAGS += -exceptions endif endif @@ -87,7 +87,7 @@ OBJS = $(addprefix $(OBJDIR)/,$(CSRCS:.c=.$(OBJ_SUFFIX)) $(CXXSRCS:.cpp=.$(OBJ_S ifndef USE_AUTOCONF ifeq ($(OS_ARCH), WINNT) - ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET))) + ifeq ($(OS_TARGET), WIN16) EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).lib else DLLBASE=/BASE:0x30000000 @@ -101,6 +101,13 @@ ifeq ($(OS_ARCH), WINNT) endif endif else + ifeq ($(OS_ARCH),OS2) + ifeq ($(MOZ_OS2_TOOLS),VACPP) + EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).$(LIB_SUFFIX) + else + EXTRA_LIBS = -L$(DIST)/lib -lnspr$(MOD_VERSION) -lstdcpp + endif + else ifeq ($(OS_ARCH), AIX) ifeq ($(OS_RELEASE), 4.1) ifeq ($(CLASSIC_NSPR),1) @@ -125,6 +132,7 @@ else EXTRA_LIBS = -L$(DIST)/lib -lnspr$(MOD_VERSION) endif 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 @@ -169,11 +177,7 @@ SH_DATE = $(shell date) SH_NOW = $(shell $(NOW)) ifeq ($(OS_ARCH), WINNT) -ifeq ($(OS_TARGET),OS2) - SUF = -else SUF = i64 -endif else SUF = LL endif @@ -191,13 +195,13 @@ $(TINC): $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC) ifeq ($(OS_ARCH), WINNT) -ifdef XP_OS2_EMX $(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $< else - $(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) $< +ifeq ($(MOZ_OS2_TOOLS), VACPP) + $(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) plvrsion.c +else + $(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) plvrsion.c endif -else - $(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $< endif # # Version information generation (end) @@ -206,6 +210,9 @@ endif export:: $(TARGETS) $(HEADERS) $(INSTALL) -m 444 $(HEADERS) $(DIST)/include $(INSTALL) -m 444 $(TARGETS) $(DIST)/lib +ifeq ($(OS_ARCH),OS2) + $(INSTALL) -m 444 $(TARGETS) $(DIST)/bin +endif ifeq ($(OS_ARCH),HP-UX) ifdef SHARED_LIBRARY $(INSTALL) -m 755 $(SHARED_LIBRARY) $(DIST)/lib diff --git a/nsprpub/lib/prstreams/tests/testprstrm/Makefile.in b/nsprpub/lib/prstreams/tests/testprstrm/Makefile.in index 1c680d1a54a..c98f2c83eb5 100644 --- a/nsprpub/lib/prstreams/tests/testprstrm/Makefile.in +++ b/nsprpub/lib/prstreams/tests/testprstrm/Makefile.in @@ -52,7 +52,7 @@ CXXSRCS = \ OBJS = $(addprefix $(OBJDIR)/,$(CXXSRCS:.cpp=.$(OBJ_SUFFIX))) -ifeq ($(OS_ARCH), WINNT) +ifeq (,$(filter-out WINNT OS2,$(OS_ARCH))) PROG_SUFFIX = .exe else PROG_SUFFIX = @@ -86,6 +86,16 @@ else endif endif +ifeq ($(OS_ARCH),OS2) + ifeq ($(MOZ_OS2_TOOLS),VACPP) + LDOPTS = -NOE -DEBUG -nologo -PMTYPE:VIO /S:32768 + LIBPR = $(DIST)/lib/nspr$(MOD_VERSION).lib + LIBPRSTRMS = $(DIST)/lib/prstrms$(MOD_VERSION).$(LIB_SUFFIX) + else + LDOPTS += -Zomf -Zlinker /PM:VIO -lstdcpp + endif +endif + ifneq ($(OS_ARCH), WINNT) PWD = $(shell pwd) endif @@ -223,13 +233,19 @@ ifeq ($(OS_TARGET),WIN16) else link $(LDOPTS) $< $(LIBPR) $(LIBPRSTRMS) wsock32.lib -out:$@ endif +else +ifeq ($(OS_ARCH),OS2) + $(LINK) $(EXEFLAGS) $(LDOPTS) $< $(LIBPR) $(LIBPRSTRMS) $(OS_LIBS) $(EXTRA_LIBS) else $(CCC) $(XCFLAGS) $< $(LDOPTS) $(LIBPR) $(LIBPRSTRMS) $(EXTRA_LIBS) -o $@ endif - +endif endif export:: $(TARGETS) install:: export clean:: rm -f $(TARGETS) + +testlinker: + echo $(LINK) diff --git a/nsprpub/lib/tests/Makefile.in b/nsprpub/lib/tests/Makefile.in index 0a34cc53931..28f6323abce 100644 --- a/nsprpub/lib/tests/Makefile.in +++ b/nsprpub/lib/tests/Makefile.in @@ -54,7 +54,11 @@ CSRCS = \ string.c \ base64t.c -ifeq ($(OS_ARCH), WINNT) +ifeq (,$(filter-out WINNT OS2,$(OS_ARCH))) +CSRCS += arena.c +endif + +ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)) PROG_SUFFIX = .exe else PROG_SUFFIX = @@ -92,6 +96,17 @@ else endif endif +ifeq ($(OS_ARCH),OS2) + ifeq ($(MOZ_OS2_TOOLS),VACPP) + LDOPTS = -NOE -DEBUG -nologo -PMTYPE:VIO /S:32768 + LIBPR = $(DIST)/lib/nspr$(MOD_VERSION).lib + LIBPLC = $(DIST)/lib/plc$(MOD_VERSION).lib + LIBPLDS= $(DIST)/lib/plds$(MOD_VERSION).$(LIB_SUFFIX) + else + LDOPTS += -Zomf -Zlinker /PM:VIO + endif +endif + ifneq ($(OS_ARCH), WINNT) PWD = $(shell pwd) endif @@ -222,10 +237,13 @@ ifeq ($(OS_TARGET),WIN16) else link $(LDOPTS) $< $(LIBPLC) $(LIBPLDS) $(LIBPR) wsock32.lib -out:$@ endif +else +ifeq ($(OS_ARCH),OS2) + $(LINK) $(EXEFLAGS) $(LDOPTS) $< $(LIBPLC) $(LIBPLDS) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS) else $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPLDS) $(LIBPR) $(EXTRA_LIBS) -o $@ endif - +endif endif export:: $(TARGETS) diff --git a/nsprpub/pr/include/md/Makefile.in b/nsprpub/pr/include/md/Makefile.in index d2f78543ea4..6bbccf9a0c2 100644 --- a/nsprpub/pr/include/md/Makefile.in +++ b/nsprpub/pr/include/md/Makefile.in @@ -63,13 +63,13 @@ 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 + +ifeq ($(OS_ARCH),OS2) +MDCPUCFG_H = _os2.cfg endif ifeq ($(OS_ARCH),AIX) @@ -187,6 +187,11 @@ endif endif # ! USE_AUTOCONF export:: $(MDCPUCFG_H) +ifeq ($(MOZ_BITS),16) + cp $(DIST)/include/$(MDCPUCFG_H) $(DIST)/include/prcpucfg.h + $(INSTALL) -m 444 $(MDCPUCFG_H) $(MOZ_INCL) + mv -f $(DIST)/include/$(MDCPUCFG_H) $(MOZ_INCL)/prcpucfg.h +else $(INSTALL) -m 444 $(CONFIGS) $(DIST)/include/md $(INSTALL) -m 444 $(srcdir)/$(MDCPUCFG_H) $(DIST)/include ifneq ($(OS_ARCH),OpenVMS) @@ -197,6 +202,7 @@ else rm -f $(DIST)/include/prcpucfg.h ln -fs `pwd`/$(MDCPUCFG_H) $(DIST)/include/prcpucfg.h endif +endif release:: export @echo "Copying machine-dependent prcpucfg.h" diff --git a/nsprpub/pr/src/Makefile.in b/nsprpub/pr/src/Makefile.in index 8c85ecb3241..7772ed2fc20 100644 --- a/nsprpub/pr/src/Makefile.in +++ b/nsprpub/pr/src/Makefile.in @@ -44,6 +44,11 @@ include $(topsrcdir)/config/config.mk DIRS = io linking malloc md memory misc threads +# For VAC++ 4 geticcdata rule in config/OS2.mk +ifeq ($(MOZ_OS2_TOOLS),VACPP) +CSRCS = prvrsion.c +endif + ifeq ($(USE_PTHREADS), 1) DIRS += pthreads endif @@ -116,7 +121,7 @@ endif ifeq ($(OS_ARCH),OSF1) ifeq ($(USE_PTHREADS), 1) -OS_LIBS = -lpthread +OS_LIBS = -lpthread -lrt endif ifneq ($(OS_RELEASE),V2.0) OS_LIBS += -lc_r @@ -136,7 +141,7 @@ ifeq ($(USE_PTHREADS), 1) ifeq (,$(filter-out B.10.10 B.10.20,$(OS_RELEASE))) OS_LIBS = -ldce else -OS_LIBS = -lpthread +OS_LIBS = -lpthread -lrt endif endif ifeq ($(PTHREADS_USER), 1) @@ -158,14 +163,10 @@ OS_LIBS = -lsocket -lnsl -lgen -lresolv endif ifeq ($(OS_ARCH),WINNT) -ifeq ($(OS_TARGET),OS2) -# We define this in os2.mk. -else ifneq ($(OS_TARGET),WIN16) OS_LIBS = advapi32.lib wsock32.lib endif endif -endif ifdef GC_LEAK_DETECTOR OS_LIBS += -L$(DIST)/lib -lboehm @@ -194,7 +195,6 @@ OBJS = \ threads/$(OBJDIR)/prrwlock.$(OBJ_SUFFIX) \ threads/$(OBJDIR)/prtpd.$(OBJ_SUFFIX) \ linking/$(OBJDIR)/prlink.$(OBJ_SUFFIX) \ - malloc/$(OBJDIR)/prmalloc.$(OBJ_SUFFIX) \ malloc/$(OBJDIR)/prmem.$(OBJ_SUFFIX) \ md/$(OBJDIR)/prosdep.$(OBJ_SUFFIX) \ memory/$(OBJDIR)/prshm.$(OBJ_SUFFIX) \ @@ -218,9 +218,15 @@ OBJS = \ misc/$(OBJDIR)/prrng.$(OBJ_SUFFIX) \ misc/$(OBJDIR)/prsystem.$(OBJ_SUFFIX) \ misc/$(OBJDIR)/prthinfo.$(OBJ_SUFFIX) \ + misc/$(OBJDIR)/prtpool.$(OBJ_SUFFIX) \ misc/$(OBJDIR)/prtrace.$(OBJ_SUFFIX) \ misc/$(OBJDIR)/prtime.$(OBJ_SUFFIX) +# ilib now rejects empty objects +ifneq ($(MOZ_OS2_TOOLS),VACPP) +OBJS += malloc/$(OBJDIR)/prmalloc.$(OBJ_SUFFIX) +endif + ifdef USE_PTHREADS OBJS += \ pthreads/$(OBJDIR)/ptsynch.$(OBJ_SUFFIX) \ @@ -278,7 +284,7 @@ endif else ifeq ($(OS_ARCH), WINNT) -ifneq (,$(filter-out WIN16 OS2,$(OS_TARGET))) +ifneq ($(OS_TARGET),WIN16) DLLBASE=/BASE:0x30000000 RES=$(OBJDIR)/nspr.res RESNAME=nspr.rc @@ -321,15 +327,34 @@ OBJS += md/windows/$(OBJDIR)/w95io.$(OBJ_SUFFIX) \ md/windows/$(OBJDIR)/ntgc.$(OBJ_SUFFIX) \ md/windows/$(OBJDIR)/ntmisc.$(OBJ_SUFFIX) \ md/windows/$(OBJDIR)/ntinrval.$(OBJ_SUFFIX) \ + md/windows/$(OBJDIR)/ntsec.$(OBJ_SUFFIX) \ md/windows/$(OBJDIR)/ntsem.$(OBJ_SUFFIX) \ md/windows/$(OBJDIR)/win32_errors.$(OBJ_SUFFIX) \ - md/windows/$(OBJDIR)/w32ipcsem.$(OBJ_SUFFIX) \ + md/windows/$(OBJDIR)/w32ipcsem.$(OBJ_SUFFIX) \ md/windows/$(OBJDIR)/w32poll.$(OBJ_SUFFIX) \ - md/windows/$(OBJDIR)/w32rng.$(OBJ_SUFFIX) \ - md/windows/$(OBJDIR)/w32shm.$(OBJ_SUFFIX) \ + md/windows/$(OBJDIR)/w32rng.$(OBJ_SUFFIX) \ + md/windows/$(OBJDIR)/w32shm.$(OBJ_SUFFIX) \ md/windows/$(OBJDIR)/w95dllmain.$(OBJ_SUFFIX) else -ifeq ($(OS_TARGET),OS2) +OBJS += md/windows/$(OBJDIR)/ntdllmn.$(OBJ_SUFFIX) \ + 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)/ntsec.$(OBJ_SUFFIX) \ + md/windows/$(OBJDIR)/ntsem.$(OBJ_SUFFIX) \ + md/windows/$(OBJDIR)/win32_errors.$(OBJ_SUFFIX) \ + md/windows/$(OBJDIR)/w32ipcsem.$(OBJ_SUFFIX) \ + md/windows/$(OBJDIR)/w32rng.$(OBJ_SUFFIX) \ + md/windows/$(OBJDIR)/w32shm.$(OBJ_SUFFIX) \ + md/windows/$(OBJDIR)/w32poll.$(OBJ_SUFFIX) +endif +endif + +else + +ifeq ($(OS_ARCH),OS2) OBJS += md/os2/$(OBJDIR)/os2io.$(OBJ_SUFFIX) \ md/os2/$(OBJDIR)/os2sock.$(OBJ_SUFFIX) \ md/os2/$(OBJDIR)/os2thred.$(OBJ_SUFFIX) \ @@ -339,24 +364,8 @@ OBJS += md/os2/$(OBJDIR)/os2io.$(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)/ntdllmn.$(OBJ_SUFFIX) \ - 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)/w32ipcsem.$(OBJ_SUFFIX) \ - md/windows/$(OBJDIR)/w32rng.$(OBJ_SUFFIX) \ - md/windows/$(OBJDIR)/w32shm.$(OBJ_SUFFIX) \ - md/windows/$(OBJDIR)/w32poll.$(OBJ_SUFFIX) -endif -endif -endif - + md/os2/$(OBJDIR)/os2poll.$(OBJ_SUFFIX) \ + md/os2/$(OBJDIR)/os2rng.$(OBJ_SUFFIX) else ifeq ($(OS_ARCH), BeOS) @@ -367,6 +376,7 @@ else include $(srcdir)/md/unix/objs.mk endif endif +endif endif # !USE_AUTOCONF LIBRARY_NAME = nspr @@ -387,17 +397,19 @@ endif ECHO = echo INCLUDES = -I$(DIST)/include -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private TINC = $(OBJDIR)/_pr_bld.h + +ifeq ($(OS_TARGET),OS2) +PROD = nspr$(MOD_VERSION).$(DLL_SUFFIX) +else PROD = $(notdir $(SHARED_LIBRARY)) +endif + NOW = $(MOD_DEPTH)/config/$(OBJDIR)/now SH_DATE = $(shell date) SH_NOW = $(shell $(NOW)) ifeq ($(OS_ARCH), WINNT) -ifeq ($(OS_TARGET),OS2) - SUF = -else SUF = i64 -endif else SUF = LL endif @@ -419,14 +431,14 @@ $(TINC): $(OBJDIR)/prvrsion.$(OBJ_SUFFIX): prvrsion.c $(TINC) ifeq ($(OS_ARCH), WINNT) -ifdef XP_OS2_EMX - $(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $< -else $(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) $< -endif +else +ifeq ($(MOZ_OS2_TOOLS), VACPP) + $(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) $< else $(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $< endif +endif # # Version information generation (end) # diff --git a/nsprpub/pr/src/cplus/tests/Makefile.in b/nsprpub/pr/src/cplus/tests/Makefile.in index aa651ea42fa..71e038d37b9 100644 --- a/nsprpub/pr/src/cplus/tests/Makefile.in +++ b/nsprpub/pr/src/cplus/tests/Makefile.in @@ -59,7 +59,7 @@ CXXSRCS = \ OBJS = $(addprefix $(OBJDIR)/,$(CXXSRCS:.cpp=.$(OBJ_SUFFIX))) -ifeq ($(OS_ARCH), WINNT) +ifeq (,$(filter-out WINNT OS2,$(OS_ARCH))) PROG_SUFFIX = .exe else PROG_SUFFIX = @@ -134,6 +134,16 @@ else endif endif +ifeq ($(OS_ARCH),OS2) + ifeq ($(MOZ_OS2_TOOLS),VACPP) + LDOPTS = -NOE -DEBUG -nologo -PMTYPE:VIO + LIBPR = $(DIST)/lib/nspr$(MOD_VERSION).lib + LIBPLC = $(DIST)/lib/plc$(MOD_VERSION).lib + else + LDOPTS += -Zomf -Zlinker /PM:VIO -lstdcpp + endif +endif + ifneq ($(OS_ARCH), WINNT) PWD = $(shell pwd) endif @@ -259,10 +269,13 @@ ifeq ($(OS_TARGET),WIN16) else link $(LDOPTS) $< $(LIBPR) $(LIBPL) wsock32.lib -out:$@ endif +else +ifeq ($(OS_ARCH),OS2) + $(LINK) $(LDOPTS) $< $(LIBGC) $(LIBPLC) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS) -o $@ else $(CCC) $(XCFLAGS) $< $(LDOPTS) $(LIBPR) $(LIBPL) $(EXTRA_LIBS) -o $@ endif - +endif endif export:: $(TARGETS) diff --git a/nsprpub/pr/src/md/Makefile.in b/nsprpub/pr/src/md/Makefile.in index 4551760f7ce..bfa8cf24fd5 100644 --- a/nsprpub/pr/src/md/Makefile.in +++ b/nsprpub/pr/src/md/Makefile.in @@ -45,17 +45,18 @@ include $(topsrcdir)/config/config.mk ifdef USE_AUTOCONF DIRS = $(PR_MD_ARCH_DIR) else + ifeq ($(OS_ARCH),WINNT) - ifeq ($(OS_TARGET),OS2) + DIRS = windows +else + ifeq ($(OS_ARCH),OS2) DIRS = os2 else - DIRS = windows - endif -else ifeq ($(OS_ARCH),BeOS) DIRS = beos else DIRS = unix + endif endif endif diff --git a/nsprpub/pr/src/md/os2/Makefile.in b/nsprpub/pr/src/md/os2/Makefile.in index 7a81c542265..e97b7ff64a4 100644 --- a/nsprpub/pr/src/md/os2/Makefile.in +++ b/nsprpub/pr/src/md/os2/Makefile.in @@ -54,6 +54,7 @@ CSRCS = \ os2sock.c \ os2_errors.c \ os2poll.c \ + os2rng.c \ $(NULL) endif diff --git a/nsprpub/pr/src/md/windows/Makefile.in b/nsprpub/pr/src/md/windows/Makefile.in index f7742ca9c51..5e43bd7a227 100644 --- a/nsprpub/pr/src/md/windows/Makefile.in +++ b/nsprpub/pr/src/md/windows/Makefile.in @@ -65,17 +65,18 @@ else ifeq ($(OS_TARGET), WIN95) CSRCS = \ ntmisc.c \ + ntsec.c \ ntsem.c \ ntinrval.c \ ntgc.c \ w95thred.c \ w95io.c \ w95cv.c \ + w32rng.c \ w95sock.c \ win32_errors.c \ w32ipcsem.c \ w32poll.c \ - w32rng.c \ w32shm.c \ w95dllmain.c \ $(NULL) @@ -83,6 +84,7 @@ else CSRCS = \ ntdllmn.c \ ntmisc.c \ + ntsec.c \ ntsem.c \ ntinrval.c \ ntgc.c \ diff --git a/nsprpub/pr/src/misc/Makefile.in b/nsprpub/pr/src/misc/Makefile.in index 0f1f8cbf4a8..a7bacc984b6 100644 --- a/nsprpub/pr/src/misc/Makefile.in +++ b/nsprpub/pr/src/misc/Makefile.in @@ -66,11 +66,12 @@ CSRCS = \ prlog2.c \ prlong.c \ prnetdb.c \ - prrng.c \ prolock.c \ + prrng.c \ prsystem.c \ prtime.c \ prthinfo.c \ + prtpool.c \ prtrace.c \ $(NULL) diff --git a/nsprpub/pr/tests/Makefile.in b/nsprpub/pr/tests/Makefile.in index c9fac877444..f310efcf74b 100644 --- a/nsprpub/pr/tests/Makefile.in +++ b/nsprpub/pr/tests/Makefile.in @@ -112,11 +112,11 @@ CSRCS = \ multiacc.c \ multiwait.c \ many_cv.c \ - nameshm1.c \ + nameshm1.c \ nbconn.c \ nblayer.c \ nonblock.c \ - ntioto.c \ + ntioto.c \ ntoh.c \ obsints.c \ op_2long.c \ @@ -147,7 +147,7 @@ CSRCS = \ prpoll.c \ prpollml.c \ ranfile.c \ - randseed.c \ + randseed.c \ rwlocktest.c \ sel_spd.c \ selct_er.c \ @@ -156,12 +156,12 @@ CSRCS = \ select2.c \ selintr.c \ sem.c \ - sema.c \ - semaerr.c \ - semaerr1.c \ - semaping.c \ - semapong.c \ - sendzlf.c \ + sema.c \ + semaerr.c \ + semaerr1.c \ + semaping.c \ + semapong.c \ + sendzlf.c \ server_test.c \ servr_kk.c \ servr_ku.c \ @@ -185,6 +185,8 @@ CSRCS = \ system.c \ testbit.c \ testfile.c \ + thrpool_server.c \ + thrpool_client.c \ threads.c \ thruput.c \ timemac.c \ @@ -198,7 +200,7 @@ CSRCS = \ writev.c \ xnotify.c \ y2k.c \ - y2ktmo.c \ + y2ktmo.c \ zerolen.c \ $(NULL) @@ -210,7 +212,7 @@ CSRCS += \ $(NULL) endif -ifeq ($(OS_ARCH), WINNT) +ifeq (,$(filter-out WINNT OS2,$(OS_ARCH))) PROG_SUFFIX = .exe else PROG_SUFFIX = @@ -234,15 +236,6 @@ 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) -ifdef XP_OS2_VACPP - LDOPTS = - LIBPR = $(DIST)/lib/nspr$(MOD_VERSION).lib - LIBPLC= $(DIST)/lib/plc$(MOD_VERSION).lib -else - LDOPTS = -Zlinker /PM:VIO -endif else LDOPTS = -NOLOGO -DEBUG -DEBUGTYPE:CV -INCREMENTAL:NO ifeq ($(OS_TARGET), WIN95) @@ -257,6 +250,17 @@ else endif # profile endif endif + +ifeq ($(OS_ARCH),OS2) +ifeq ($(MOZ_OS2_TOOLS),VACPP) + LDOPTS = -NOE -DEBUG -nologo -PMTYPE:VIO + LIBPR = $(DIST)/lib/nspr$(MOD_VERSION).lib + LIBPLC = $(DIST)/lib/plc$(MOD_VERSION).lib +else +ifeq ($(MOZ_OS2_EMX_OBJECTFORMAT),OMF) + LDOPTS = -Zlinker /PM:VIO +endif +endif endif ifneq ($(OS_ARCH), WINNT) @@ -311,8 +315,8 @@ endif ifeq ($(OS_ARCH), HP-UX) LDOPTS += -z -Wl,+s,+b,$(ABSOLUTE_LIB_DIR) ifeq ($(USE_64),1) - LDOPTS += +DA2.0W - EXTRA_LIBS = -lpthread + LDOPTS += +DA2.0W + EXTRA_LIBS = -lpthread endif endif @@ -427,6 +431,13 @@ ifeq ($(OS_ARCH), UNIXWARE) export LD_RUN_PATH = $(ABSOLUTE_LIB_DIR) endif +ifeq ($(OS_ARCH),FreeBSD) +ifeq ($(USE_PTHREADS),1) +LDOPTS += -pthread +endif +LDOPTS += -Xlinker -R $(ABSOLUTE_LIB_DIR) +endif + ifeq ($(OS_ARCH),OpenBSD) ifeq ($(USE_PTHREADS),1) LDOPTS += -pthread @@ -440,6 +451,12 @@ endif LDOPTS += -Xlinker -R $(ABSOLUTE_LIB_DIR) endif +ifeq ($(OS_ARCH),OpenBSD) +ifeq ($(USE_PTHREADS),1) +LDOPTS += -pthread +endif +endif + ifeq ($(OS_ARCH),BSD_OS) ifneq ($(OS_RELEASE),1.1) EXTRA_LIBS = -ldl @@ -522,17 +539,16 @@ ifeq ($(OS_TARGET),WIN16) echo $(LIBPLC), >>w16link echo winsock.lib >>w16link wlink @w16link. -else -ifeq ($(OS_TARGET),OS2) - $(LINK) $(EXEFLAGS) $(LDOPTS) $< $(LIBPLC) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS) else link $(LDOPTS) $(EXTRA_LDOPTS) $< $(LIBPLC) $(LIBPR) $(EXTRA_LIBS) wsock32.lib -out:$@ endif -endif +else +ifeq ($(OS_ARCH),OS2) + $(LINK) $(EXEFLAGS) $(LDOPTS) $< $(LIBPLC) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS) else $(PURE) $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) $(EXTRA_LIBS) -o $@ endif - +endif endif endif # !USE_AUTOCONF @@ -543,10 +559,14 @@ clean:: rm -f $(TARGETS) ifndef USE_AUTOCONF -# The prpoll test calls BSD socket functions, so it needs to link +# The following tests call BSD socket functions, so they need to link # with -lsocket on some platforms. ifeq ($(OS_ARCH),SunOS) ifneq ($(OS_RELEASE),4.1.3_U1) +ifeq ($(USE_IPV6),1) +$(OBJDIR)/gethost: $(OBJDIR)/gethost.o + $(PURE) $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) -lsocket $(EXTRA_LIBS) -o $@ +endif $(OBJDIR)/prpoll: $(OBJDIR)/prpoll.o $(PURE) $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) -lsocket $(EXTRA_LIBS) -o $@ endif @@ -578,7 +598,7 @@ PROGRAMS = $(notdir $(PROGS)) ifdef NSPR_TEST_LOGFILE LOGFILE = $(NSPR_TEST_LOGFILE) else -ifeq ($(OS_ARCH), WINNT) +ifeq (,$(filter-out WINNT OS2,$(OS_ARCH))) LOGFILE = nul else LOGFILE = /dev/null diff --git a/nsprpub/pr/tests/dll/Makefile.in b/nsprpub/pr/tests/dll/Makefile.in index 908c1f5b7d6..deb3b70acda 100644 --- a/nsprpub/pr/tests/dll/Makefile.in +++ b/nsprpub/pr/tests/dll/Makefile.in @@ -49,6 +49,8 @@ OPTIMIZER = endif endif +CSRCS = mygetval.c mysetval.c + INCLUDES = -I$(DIST)/include OBJS = $(OBJDIR)/mygetval.$(OBJ_SUFFIX) \ @@ -59,7 +61,7 @@ W16OBJS = $(subst $(space),$(comma)$(space),$(OBJS)) endif ifeq ($(OS_ARCH), WINNT) -ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET))) +ifeq ($(OS_TARGET), WIN16) # do nothing else DLLBASE=/BASE:0x30000000 @@ -68,10 +70,10 @@ RESNAME=../../../pr/src/nspr.rc endif endif -ifeq ($(OS_ARCH), WINNT) -IMPORT_LIBRARY = $(OBJDIR)/my.lib +ifeq (,$(filter-out WINNT OS2,$(OS_ARCH))) +IMPORT_LIBRARY = $(OBJDIR)/my.$(LIB_SUFFIX) SHARED_LIBRARY = $(OBJDIR)/my.dll -ifeq ($(OS_TARGET), OS2) +ifeq ($(OS_ARCH), OS2) LIBRARY = $(OBJDIR)/my_s.lib # XXX $(LIBRARY) probably doesn't need to be added to TARGETS. TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) diff --git a/nsprpub/tools/Makefile.in b/nsprpub/tools/Makefile.in index 528d3a5e1b8..d9bc3d61346 100644 --- a/nsprpub/tools/Makefile.in +++ b/nsprpub/tools/Makefile.in @@ -54,7 +54,7 @@ CSRCS = \ tail.c \ $(NULL) -ifeq ($(OS_ARCH), WINNT) +ifeq (,$(filter-out WINNT OS2,$(OS_ARCH))) PROG_SUFFIX = .exe else PROG_SUFFIX = @@ -85,6 +85,16 @@ LIBPLC= $(DIST)/lib/libplc$(NSPR_VERSION).$(LIB_SUFFIX) endif endif +ifeq ($(OS_ARCH),OS2) + ifeq ($(MOZ_OS2_TOOLS),VACPP) + LDOPTS = -NOE -DEBUG -nologo -PMTYPE:VIO + LIBPR = $(DIST)/lib/nspr$(NSPR_VERSION).lib + LIBPLC= $(DIST)/lib/plc$(NSPR_VERSION).lib + else + LDOPTS += -Zomf -Zlinker /PM:VIO + endif +endif + ifneq ($(OS_ARCH), WINNT) PWD = $(shell pwd) endif @@ -220,10 +230,13 @@ ifeq ($(OS_TARGET),WIN16) else link $(LDOPTS) $< $(LIBPR) $(LIBPLC) wsock32.lib -out:$@ endif +else +ifeq ($(OS_ARCH),OS2) + $(LINK) $(LDOPTS) $< $(LIBPR) $(LIBPLC) $(OS_LIBS) $(EXTRA_LIBS) -o $@ else $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPR) $(LIBPLC) $(EXTRA_LIBS) -o $@ endif - +endif endif export:: $(TARGETS)