michael@0: # michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: include $(CORE_DEPTH)/coreconf/UNIX.mk michael@0: michael@0: # michael@0: # The default implementation strategy for Irix is classic nspr. michael@0: # michael@0: ifeq ($(USE_PTHREADS),1) michael@0: ifeq ($(USE_N32),1) michael@0: IMPL_STRATEGY = _n32_PTH michael@0: else michael@0: IMPL_STRATEGY = _PTH michael@0: endif michael@0: endif michael@0: michael@0: DEFAULT_COMPILER = cc michael@0: michael@0: ifdef NS_USE_GCC michael@0: CC = gcc michael@0: AS = $(CC) -x assembler-with-cpp michael@0: ODD_CFLAGS = -Wall -Wno-format -Wno-switch michael@0: ifdef BUILD_OPT michael@0: OPTIMIZER = -O6 michael@0: endif michael@0: else michael@0: CC = cc michael@0: CCC = CC michael@0: ODD_CFLAGS = -fullwarn -xansi -woff 1209 michael@0: ifdef BUILD_OPT michael@0: ifeq ($(USE_N32),1) michael@0: OPTIMIZER = -O -OPT:Olimit=4000 michael@0: else michael@0: OPTIMIZER = -O -Olimit 4000 michael@0: endif michael@0: endif michael@0: michael@0: # For 6.x machines, include this flag michael@0: ifeq (6., $(findstring 6., $(OS_RELEASE))) michael@0: ifeq ($(USE_N32),1) michael@0: ODD_CFLAGS += -n32 -mips3 -exceptions michael@0: else michael@0: ODD_CFLAGS += -32 -multigot michael@0: endif michael@0: else michael@0: ODD_CFLAGS += -xgot michael@0: endif michael@0: ifeq ($(USE_N32),1) michael@0: OS_CFLAGS += -dollar michael@0: endif michael@0: endif michael@0: michael@0: ODD_CFLAGS += -DSVR4 -DIRIX michael@0: michael@0: CPU_ARCH = mips michael@0: michael@0: RANLIB = /bin/true michael@0: # For purify michael@0: # NOTE: should always define _SGI_MP_SOURCE michael@0: NOMD_OS_CFLAGS += $(ODD_CFLAGS) -D_SGI_MP_SOURCE michael@0: michael@0: OS_CFLAGS += $(NOMD_OS_CFLAGS) michael@0: ifdef USE_MDUPDATE michael@0: OS_CFLAGS += -MDupdate $(DEPENDENCIES) michael@0: endif michael@0: michael@0: ifeq ($(USE_N32),1) michael@0: SHLIB_LD_OPTS += -n32 -mips3 michael@0: endif michael@0: michael@0: MKSHLIB += $(LD) $(SHLIB_LD_OPTS) -shared -soname $(@:$(OBJDIR)/%.so=%.so) michael@0: ifdef MAPFILE michael@0: # Add LD options to restrict exported symbols to those in the map file michael@0: endif michael@0: # Change PROCESS to put the mapfile in the correct format for this platform michael@0: PROCESS_MAP_FILE = cp $< $@ michael@0: michael@0: DSO_LDOPTS = -elf -shared -all michael@0: michael@0: ifdef DSO_BACKEND michael@0: DSO_LDOPTS += -soname $(DSO_NAME) michael@0: endif michael@0: michael@0: # michael@0: # Revision notes: michael@0: # michael@0: # In the IRIX compilers prior to version 7.2, -n32 implied -mips3. michael@0: # Beginning in the 7.2 compilers, -n32 implies -mips4 when the compiler michael@0: # is running on a system with a mips4 CPU (e.g. R8K, R10K). michael@0: # We want our code to explicitly be mips3 code, so we now explicitly michael@0: # set -mips3 whenever we set -n32. michael@0: #