Change for QNX 4 to work around their extremely limited compiler and linker, which aren't capable of creating an object from a lib as we're doing here with jsmath.o.

git-svn-id: svn://10.0.0.236/trunk@55708 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
briano%netscape.com
1999-12-08 04:03:24 +00:00
parent 19c5c7d1b9
commit 1c1c8ceac0

View File

@@ -182,17 +182,6 @@ GARBAGE += $(JSMATH_PRELINK) jscpucfg.o jsautocfg.h jsautocfg.tmp jscpucfg
TARGETS += jscpucfg
ifneq ($(findstring -L,$(NSPR_LIBS)),)
NSPR_STATIC_PATH = $(subst -L,,$(findstring -L,$(NSPR_LIBS)))
else
NSPR_STATIC_PATH = $(DIST)/lib
endif
LDFLAGS = $(pathsubst -l%,$(NSPR_STATIC_PATH)/%.a,$(NSPR_LIBS))
ifneq ($(OS_ARCH),BeOS)
LDFLAGS += -lm
endif
ifdef JS_SAFE_ARENA
DEFINES += -DJS_USE_SAFE_ARENA
endif
@@ -209,6 +198,18 @@ ifdef JS_VERSION
DEFINES += -DJS_VERSION=$(JS_VERSION)
endif
ifneq ($(findstring -L,$(NSPR_LIBS)),)
NSPR_STATIC_PATH = $(subst -L,,$(findstring -L,$(NSPR_LIBS)))
else
NSPR_STATIC_PATH = $(DIST)/lib
endif
LDFLAGS = $(pathsubst -l%,$(NSPR_STATIC_PATH)/%.a,$(NSPR_LIBS))
ifneq ($(OS_ARCH),BeOS)
LDFLAGS += -lm
endif
ifeq ($(OS_ARCH),FreeBSD)
LDFLAGS += -pthread
endif
@@ -224,13 +225,6 @@ endif
ifeq ($(OS_ARCH),OSF1)
LDFLAGS += -lc_r
endif
ifeq ($(OS_ARCH),QNX)
ifeq ($(OS_TARGET),NTO)
DASH_R = -r
else
DASH_R =
endif
endif
ifeq ($(OS_ARCH),SunOS)
ifeq ($(CPU_ARCH),sparc)
@@ -256,10 +250,25 @@ LDFLAGS += -lposix4 -ldl -lnsl -lsocket
endif
endif
ifeq ($(OS_ARCH),QNX)
ifneq ($(OS_TARGET),NTO)
# Don't use wildcard here, because we only want this resolved at link time.
OBJS += fdlibm/*.o
endif
endif
# special rule for jsmath.o since we want to incrementally link
# against fdlibm to pull in only what is needed
jsmath.o: $(FDLIBM_LIBRARY) $(JSMATH_PRELINK)
ifeq ($(OS_ARCH),QNX)
ifneq ($(OS_TARGET),NTO)
@cp $(JSMATH_PRELINK) $@
else
$(LD) $(DASH_R) -o $@ $(JSMATH_PRELINK) $(FDLIBM_LIBRARY)
endif
else
$(LD) $(DASH_R) -o $@ $(JSMATH_PRELINK) $(FDLIBM_LIBRARY)
endif
$(JSMATH_PRELINK): jsmath.c
ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))