1
0

Source code upload

This commit is contained in:
calmsacibis995
2022-09-29 17:59:04 +03:00
parent 72fa9da3d7
commit 8fc8fa8089
33399 changed files with 11964078 additions and 0 deletions

View File

@@ -0,0 +1,73 @@
#!smake
#
# Makefile to install include/make files
#
# $(ROOT)/usr/include/make/commondefs comes from here, so ...
include releasedefs
NO_RELEASEDEFS=yes
include commondefs
INST= $(INSTALL) -F /usr/include/make -m 444
LDIRT=so_locations.dev so_locations so_locations_64.dev so_locations_64 \
so_locations_N32 so_locations_N32.dev
#
# DEVSOL - versions for ROOT
#
DEVSOL=so_locations.dev so_locations_N32.dev so_locations_64.dev
default: $(DEVSOL)
include commonrules
headers:so_locations so_locations_N32 so_locations_64
RAWIDB= $(INSTALL) -F /usr/lib -m 644 so_locations
RAWIDB= $(INSTALL) -F /usr/lib64 -m 644 -src so_locations_64 so_locations
RAWIDB= $(INSTALL) -F /usr/lib32 -m 644 -src so_locations_N32 so_locations
RAWIDB= $(INST) startversion commondefs commonrules releasedefs \
cmdcommondefs cmdcommonrules \
libleafrules libleafdefs librootdefs \
librootrules ismcommonrules ismcommondefs \
cordrules corddefs odefs oodefs o256podefs
#
# Building the BUILD version consists of taking the master version and
# changing the start address from the application start to the SGI start.
# (for 32 bit there is no difference)
#
so_locations so_locations_N32:so_locations.master
cp so_locations.master $@
chmod 644 $@
so_locations_64:so_locations_64.master
sed -n '1,/# Non SGI libraries should be below 0x0000004000000000 (1\/4Tb)/p' so_locations_64.master > so_locations_64
echo '$$start_address=0x000000000d980000' >> $@
chmod 644 $@
#
# Building the ROOT version consists of taking the BUILD version and
# changing the mode.
#
$(DEVSOL):$$(@:.dev=)
cp $(@:.dev=) $@
chmod 0644 $@
install: default $(_FORCE)
$(INST) startversion commondefs commonrules releasedefs \
cmdcommondefs cmdcommonrules \
libleafrules libleafdefs librootdefs \
librootrules ismcommonrules ismcommondefs \
cordrules corddefs odefs oodefs o256podefs
$(INSTALL) -F /usr/lib -m 444 -src so_locations.master so_locations
$(INSTALL) -F /usr/lib -m 644 -src so_locations.dev so_locations
@#
@# so_locations for 64bit libs
@#
$(INSTALL) -F /usr/lib64 -m 444 -src so_locations_64.master so_locations
$(INSTALL) -F /usr/lib64 -m 644 -src so_locations_64.dev so_locations
@#
@# so_locations for N32bit libs
@#
$(INSTALL) -F /usr/lib32 -m 444 -src so_locations.master so_locations
$(INSTALL) -F /usr/lib32 -m 644 -src so_locations_N32.dev so_locations

View File

@@ -0,0 +1,136 @@
#
# $Revision: 1.8 $
#
# Commondefs for building multiple versions of commands with different
# compiler flags.
#
# One can either select from one of the 'popular' versions, as defined in
# commondefs, or invent a new version. If one picks from the list
# in commondefs, then all the compiler flags will be set automatically
# otherwise one must use VERSION_* flags to customize the compile.
# commondefs defines generic versions for each ABI -
# 32 - for the ucode/MIPS ABI
# 64 - for 64 bit
# N32 - for the new 32 bit ABI
# These are independent of ISA, which can be decided on a release by
# release basis. It is recommended that 1 or all of these be chosen
# rather than any of the others in commondefs or a private version.
#
# Before including cmdcommondefs the Makefile must define:
#
# BASEVERSION - a string identifying the build to take place in the current
# directory, such as '32bit'.
# ALTVERSIONS - a list of strings identifying other alternate build areas.
#
# Every version requires a `versiondefs' file that customize that make for that
# version. The BASEVERSION versiondefs file is simply 'versiondefs' in the
# current directory; other alternate versiondefs files are prepended with the
# version name. For example, if the ALTVERSIONS=64bit, a `64bitversiondefs'
# file is required.
# Note that the values for BASEVERSION/ALTVERSIONS affect ONLY the makefile
# targets/operations - they have nothing to do with options or objects produced.
#
# Each versiondefs file MUST define:
#
# VERSION - this must match either BASEVERSION or something in the ALTVERSIONS
# list.
#
# Each versiondefs file will probably want to define:
#
# OBJECT_STYLE - which ABI/ISA should this version be built as.
# If left blank, than either the one specified in the top makefile
# or the default specified in releasedefs will be used.
#
# COMMANDS - the list of targets to build - if the list of objects to make
# is the same for all versions, COMMANDS may be set once in the
# top makefile. It must be set EITHER in a versiondefs file OR
# in the top makefile.
#
# Options common to all versions should be specified in the top Makefile
# by setting LCOPTS, LCDEFS, etc..
# Additional options for a particular verion can be added using:
# LCOPTS+=-foo
# In the appropriate versiondefs file
# Note that one should either:
# a) include cmdcommondefs AFTER setting L* OR
# b) use the += construct in the top makefile also
#
# N.B. - a) assumes that the default rule in the makefile contains $(TARGETS)
# b) assumes that makefile doesn't redefine TARGETS
#
CMDCOMMONRULES=$(ROOT)/usr/include/make/cmdcommonrules
#
# include releasedefs - it defines compiler versions and default build modes
# versiondefs needs it. It will also be included later from commondefs
#
include $(ROOT)/usr/include/make/releasedefs
#
# include version specific definitions
# This most likely sets OBJECT_STYLE which commondefs needs
#
#include <versiondefs>
#
# include normal commondefs
#
include $(ROOT)/usr/include/make/commondefs
COMMONPREF=cmd
#
# NOTE - the quotes are important here to force a string comaprison - otherwise
# #if the variable value began with a number, it might match (e.g. 32bit and
# 32elf match)
#
#if $(VERSION) == "$(BASEVERSION)"
TARGETS = $(COMMANDS) $(ALTVERSIONS)
SUBDIRS=$(ALTVERSIONS)
#if defined(ALTVERSIONS)
ALTVERSIONS_MAKERULE=$(SUBDIRS_MAKERULE)
#else
ALTVERSIONS_MAKERULE=
#endif
#
# sigh - we really can't afford to be doing the ALTVERSIONS at the same
# time as the top level makefile - but this means that the top level doesn't
# get run in parallel. There are some solutions (using .ORDER) if we can
# redefine the default rule, but that doesn't seem like a good idea.
# So we offer a solution - if the makefile doesn't mind having a new 'default'
# target, they can get parallelism
#
#if defined(WANTPARALLEL)
cmddefault!cmdbase $(ALTVERSIONS)
#else
.NOTPARALLEL:
#endif
#else
TARGETS=$(COMMANDS)
ALTVERSIONS_MAKERULE=
#endif
#
# The ALTVERSIONS dirs are created by tlinking. We exclude the a.outs in
# the base version, all intermediate objects, the depend file and versiondefs.
# We also exclude ALTVERSIONS itself to prevent infinite recursion by tlink.
#
TLINKXARGS = $(COMMANDS:S/^/-x'^/g:S/$/\$'/g) -x '^.*\.[oai]$$' \
-x '^.*\.so$$' \
-x '$(MKDEPFILE)' -x 'versiondefs' \
-x 'y.output' -x 'y.tab.[ch]' \
$(ALTVERSIONS:S/^/-x'^/g:S/$/\$'/g)
#
# IDB tags for 32 and 64 bit versions
#
IDB_TAG32=-idb "mach(MODE=32bit)"
IDB_TAG64=-idb "mach(MODE=64bit)"

View File

@@ -0,0 +1,39 @@
#
# $Revision: 1.4 $
#
# Commonrules for building multiple versions of commands with different flags.
#
# Rules of use described in `cmdcommondefs'.
#
#
# Common targets. The basic idea is that a make in the current (base)
# directory will descend into subdirectories if necessary; in the leaf
# (alternate version) directories it will not.
#
rmtargets!$(COMMONPREF)$$@
clobber!$(COMMONPREF)$$@
clean!$(COMMONPREF)$$@
$(ALTVERSIONS_MAKERULE)
install!$(VERSION)install
$(ALTVERSIONS_MAKERULE)
cmdbase!$(COMMANDS)
.ORDER: cmdbase $(ALTVERSIONS)
include $(COMMONRULES)
#
# Create the alternate version directory with tlink, descend into there
# and make.
#
$(ALTVERSIONS)!
$(TLINK) -r $(TLINKXARGS) . $(.TARGET)
rm -f $(.TARGET)/versiondefs
ln -sf ../$(.TARGET)versiondefs $(.TARGET)/versiondefs;
cd $(.TARGET); $(MAKE)
.MAKE:$(ALTVERSIONS)

View File

@@ -0,0 +1,948 @@
# Copyright 1990-1995 Silicon Graphics, Inc. All rights reserved.
#
#ident "$Revision: 1.195 $"
#
# Common makefile definitions.
#
# Notes:
# - Definitions with the same names only need to be passed on the
# command line of recursive makes if they would be redefined by
# the sub-makefile. Definitions passed on the command line are
# not reset by the environment or the definitions in the makefile.
# - C++ style macros are deprecated and will be removed when out of use.
# They must be interwoven in definitions to keep upward compatibility.
#
# - The contents of this header are changed based on some variables
# should be defined BEFORE including this file:
# OBJECT_STYLE - define basic ABI/ISA that should be used to create product.
# this also sets LD search paths, C/C++/Fortran/Pascal options.
# NO_OBJECT_STYLE - disable all this new OBJECT_STYLE business.
# Note that if one does this all the info in releasedefs about
# compiler versions, default compilation modes etc will be ignored.
# Only smake-files can do this.
# NO_LSRCH - do not set any library searching rules for LD options.
# ASTYLE - by default, the ABI/ISA for C is used for assembler -
# setting ASTYLE (to be assembler options) can override the OBJECT_STYLE
# to permit fine-tuning of asm code.
# NO_STARTOPT - don't set any of the DSO start option macros - this
# will keep the global so_locations files from being updated.
#
COMMONRULES= $(ROOT)/usr/include/make/commonrules
COMMONTARGS= clobber clean rmtargets fluff tags
PRODUCTDEFS= $(ROOT)/usr/include/make/$(PRODUCT)defs
RELEASEDEFS= $(ROOT)/usr/include/make/releasedefs
# include releasedefs by default
#if !defined(NO_RELEASEDEFS)
include $(RELEASEDEFS)
#endif
# Build tools, i.e., programs which are used as part of the build
# process. These must run on all supported build environments
# (currently IRIX 6.2 and up).
AR = $(TOOLROOT)/usr/bin/ar
AS = $(TOOLROOT)/usr/bin/as $(ENDIAN)
BISON = $(TOOLROOTSAFE) $(TOOLROOT)/usr/bin/bison
C++ = $(TOOLROOT)/usr/bin/CC
C++C = $(TOOLROOT)/usr/bin/CC
CC = $(TOOLROOT)/usr/bin/cc
CORD = $(TOOLROOT)/usr/bin/cord
CXX = $(C++)
F77 = $(TOOLROOT)/usr/bin/f77
FC = $(TOOLROOT)/usr/bin/f77
FLEX = $(TOOLROOTSAFE) $(TOOLROOT)/usr/bin/flex
GNUM4 = $(TOOLROOTSAFE) $(TOOLROOT)/usr/bin/gnum4
LEX = $(TOOLROOT)/usr/bin/lex -l $(ROOT)/usr/lib/lex/ncform
LD = $(TOOLROOT)/usr/bin/ld
LIBSPEC = $(TOOLROOT)/usr/sbin/libspec
LINT = $(TOOLROOT)/usr/bin/lint
LORDER = $(TOOLROOT)/usr/bin/lorder
MKF2C = $(TOOLROOT)/usr/bin/mkf2c
NM = $(TOOLROOT)/usr/bin/nm
PC = $(TOOLROOT)/usr/bin/pc
SETMAGIC= $(TOOLROOT)/usr/sbin/setmagic
SIZE = $(TOOLROOT)/usr/bin/size
STRIP = $(TOOLROOT)/usr/bin/strip
TAG = $(TOOLROOT)/usr/sbin/tag
TLINK = $(TOOLROOT)/usr/sbin/tlink
YACC = $(TOOLROOTSAFE) $(TOOLROOT)/usr/bin/yacc -P $(ROOT)/usr/lib/yaccpar
# A shell script which does whatever needs to be done to make toolroot
# binaries run on build machines (which may be running anything from
# IRIX 6.2 to 6.5).
#if defined(TOOLROOT) && $(TOOLROOT) != "/"
TOOLROOTSAFE = $(TOOLROOT)/usr/sbin/toolrootsafe
#endif
# XXX remove this as soon as we port libgl's makefiles to DSO
MKSHLIB = $(TOOLROOT)/usr/bin/mkshlib
# Old TOOLROOT-prefixed macros. References should be replaced with
# native 'echo', sh, etc. since special versions shouldn't really be
# needed
SHELL = /bin/sh
AWK = awk
NAWK = nawk
ECHO = echo
M4 = m4
#
# The native tools, which must be used when building programs that are
# run on the build host from a makefile. Use of these macros are
# deprecated, since we don't want to make assumptions about what's
# installed on the host. Instead, we rely on TOOLROOTSAFE to make sure
# that everything in the toolroot can run on all supported build
# environments.
HOST_CC = TOOLROOT= /usr/bin/cc
HOST_C++ = TOOLROOT= /usr/bin/CC
HOST_CXX = $(HOST_C++)
HOST_LD = TOOLROOT= /usr/bin/ld
HOST_YACC = _XPG= TOOLROOT= /usr/bin/yacc -p /usr/lib/yaccpar
HOST_LEX = TOOLROOT= /usr/bin/lex -l /usr/lib/lex/ncform
HOST_CFLAGS = $(CFLAGS:S/$(ROOT)//g)
HOST_C++FLAGS = $(C++FLAGS:S/$(ROOT)//g)
HOST_CXXFLAGS = $(HOST_C++FLAGS)
HOST_LDFLAGS = $(LDFLAGS:S/$(ROOT)//g)
HOST_CCF = $(HOST_CC) $(HOST_CFLAGS)
HOST_C++F = $(HOST_C++) $(HOST_C++FLAGS)
HOST_CXXF = $(HOST_C++F)
HOST_LDF = $(HOST_LD) $(HOST_LDFLAGS)
HOST_YACCF = $(HOST_YACC) $(YFLAGS)
HOST_LEXF = $(HOST_LEX) $(LFLAGS)
#
# Popular ABI/ISA combinations supported here:
#
# 32_M2 - MIPS/ABI; 32 bit; mips2
# 32_ABI - MIPS/ABI; 32 bit; mips1; ABI restrictions
# N32_M3 - new calling convention; 32 bit; mips3
# N32_M4 - new calling convention; 32 bit; mips4
# 64_M3 - new calling convention; 64 bit; mips3
# 64_M4 - new calling convention; 64 bit; mips4
# 64_ABI - MIPS/ABI; 64 bit; mips3/4; ABI restrictions
#
# The following are 'generic' these should be used unless fine control
# over ISA is required (releasedefs decides which ISA):
#
# 32 - MIPS/ABI; 32 bit;
# N32 - new calling convention; 32 bit;
# 64 - new calling convention; 64 bit;
#
ALLSTYLES=32 32_M2 32_ABI N32 N32_M3 N32_M4 64 64_M3 64_M4 64_ABI
#
# ENDIAN is defined only when cross-compiling
# it normally comes from the $(PRODUCT)defs file.
#
# The -nostdinc flag is defined to defeat searches of /usr/include in
# a cross development environment. Where it is placed on the command line
# does not matter. This replaces the nullary -I flag.
# Turn off some silly ansi warnings:
# The $(LWOFF) allows makefiles to set local warnings to ignore
# (note that a leading ',' with no whitespace is required).
#
# Criteria for adding a global woff:
# a) it in no way could indicate a potential bug in the software.
# This assumes that the software is required only to run on
# SGI equipment with SGI compilers.
# b) The infraction is ubiquitous. If only a few pieces of software
# suffer from a given warning - they should turn it off in
# their own Makefile (or fix it!).
#
# The ignored 3.XX compiler warnings are as followings:
#
# 515 - Constant is out of range and may be truncated
# 608 - Undefined the ANSI standard library defined macro <macro>
# 658 - bit-field <name> type required to be int, unsigned int,
# or signed int
# 799 - <keyword/type> is not standard ANSI
# 803 - Ignored invalid warning number(s) in -woff option
# 852 - can be const qualified (-wlint)
#
# The ignored 4.XX compiler warnings are as follows:
# 1048 - cast between pointer-to-object and pointer-to-function
# 1233 - explicit type is missing ("int" assumed)
# 1499 - -woff arguments must be in the range ...
# 1685 - The v6.02 compiler changes woff #1499 to 1685.
# The specific error is "invalid error number <warning number>"
WOFF=-woff 1685,515,608,658,799,803,852,1048,1233,1499$(LWOFF)
#
# Default C version, optimizer, common global options, and make-depend options.
#
CVERSION =
OPTIMIZER = -O
MKDEPOPT = -MDupdate $(MKDEPFILE)
COMMONGOPTS=$(OPTIMIZER) $(MKDEPOPT) $(ENDIAN)
#
# Pick appropriate STYLE - releasedefs defines the default
# Note that binaries that don't have absolute ISA requirements should use
# the generic OBJECT_STYLE={64, 32, N32}. This permits the default to be
# set by releasedefs
#
CSTYLE_32_M2 = -mips2 -o32
CSTYLE_32_ABI= -mips1 -o32 -D_MIPSABI_SOURCE=3
CSTYLE_N32_M3= -mips3 -n32
CSTYLE_N32_M4= -mips4 -n32
CSTYLE_R32 = -mips3 -r32
CSTYLE_64_M3 = -mips3 -64
CSTYLE_64_M4 = -mips4 -64
CSTYLE_64_ABI = -mips3 -64 -D_MIPSABI_SOURCE=3
# 'generic' styles - per ABI. releasedefs sets what it is.
# DEF_CSTYLE's are set in releasedefs
CSTYLE_32 = $(DEF_CSTYLE_32)
CSTYLE_N32 = $(DEF_CSTYLE_N32)
CSTYLE_64 = $(DEF_CSTYLE_64)
#
# Set OBJECT_STYLE if it hasn't already been set - note that std 'make'files
# will get this value. This is somewhat convoluted to be sure that
# 'make'-files will get the 'correct' value
#
#if defined(NO_OBJECT_STYLE)
OBJECT_STYLE=NONE
#endif
#if !defined(OBJECT_STYLE)
OBJECT_STYLE = $(DEF_OBJECT_STYLE)
#endif
#if $(OBJECT_STYLE) == "64"
CSTYLE=$(CSTYLE_64)
#elif $(OBJECT_STYLE) == "64_M3"
CSTYLE=$(CSTYLE_64_M3)
#elif $(OBJECT_STYLE) == "64_M4"
CSTYLE=$(CSTYLE_64_M4)
#elif $(OBJECT_STYLE) == "64_ABI"
CSTYLE=$(CSTYLE_64_ABI)
#elif $(OBJECT_STYLE) == "32_ABI"
CSTYLE=$(CSTYLE_32_ABI)
#elif $(OBJECT_STYLE) == "N32"
CSTYLE=$(CSTYLE_N32)
#elif $(OBJECT_STYLE) == "N32_M3"
CSTYLE=$(CSTYLE_N32_M3)
#elif $(OBJECT_STYLE) == "N32_M4"
CSTYLE=$(CSTYLE_N32_M4)
#elif $(OBJECT_STYLE) == "R32"
CSTYLE=$(CSTYLE_R32)
#elif $(OBJECT_STYLE) == "32"
CSTYLE=$(CSTYLE_32)
#elif $(OBJECT_STYLE) == "32_M2"
CSTYLE=$(CSTYLE_32_M2)
#elif $(OBJECT_STYLE) == "NONE"
CSTYLE=
#else
# set in releasedefs
# This is the one that 'make' sees
CSTYLE=$(DEF_CSTYLE)
#endif
GCOPTS = $(CSTYLE) $(OPTIMIZER) $(ENDIAN) $(MKDEPOPT) $(WOFF)
GCDEFS =
GCINCS = -nostdinc -I$(INCLDIR)
#
# Cc flags, composed of:
# variable (V*) (set on the command line),
# local (L*) (defined in the makefile),
# global (defined in this file),
# parts, in that order. This ordering has been used so that the variable or
# locally specified include directories are searched before the globally
# specified ones.
#
CFLAGS = $(CVERSION) $(VCFLAGS) $(LCFLAGS) $(GCFLAGS)
#
# Each of these three components is divided into defines (-D's and -U's),
# includes (-I's), and other options. By segregating the different
# classes of flag to cc, the defines (CDEFS) and includes (CINCS) can be
# easily given to other programs, e.g., lint.
#
# Notes:
# - The local assignments should be to LCOPTS, LCDEFS, and LCINCS, not to
# LCFLAGS, although CFLAGS will be correctly set if this is done.
# - If a program cannot be optimized, it should override the setting of
# OPTIMIZER with a line such as "OPTIMIZER=" in its make file.
# - If a program cannot be compiled with ANSI C, its makefile
# should set CVERSION=-cckr
#
VCFLAGS = $(VCDEFS) $(VCINCS) $(VCOPTS)
LCFLAGS = $(LCDEFS) $(LCINCS) $(LCOPTS)
GCFLAGS = $(GCDEFS) $(GCINCS) $(GCOPTS)
COPTS = $(VCOPTS) $(LCOPTS) $(GCOPTS)
CDEFS = $(VCDEFS) $(LCDEFS) $(GCDEFS)
CINCS = $(VCINCS) $(LCINCS) $(GCINCS)
#
# CXX flags are decomposed using the same hierarchy as C flags.
#
C++FLAGS = $(CVERSION) $(VCXXFLAGS) $(LCXXFLAGS) $(GCXXFLAGS)
CXXFLAGS = $(C++FLAGS)
VCXXFLAGS = $(VCXXDEFS) $(VCXXINCS) $(VCXXOPTS) $(VC++FLAGS)
LCXXFLAGS = $(LCXXDEFS) $(LCXXINCS) $(LCXXOPTS) $(LC++FLAGS)
GCXXFLAGS = $(GC++FLAGS)
CXXOPTS = $(VCXXOPTS) $(LCXXOPTS) $(GCXXOPTS) $(C++OPTS)
CXXDEFS = $(VCXXDEFS) $(LCXXDEFS) $(GCXXDEFS) $(C++DEFS)
CXXINCS = $(VCXXINCS) $(LCXXINCS) $(GCXXINCS) $(C++INCS)
VC++FLAGS = $(VC++DEFS) $(VC++INCS) $(VC++OPTS)
LC++FLAGS = $(LC++DEFS) $(LC++INCS) $(LC++OPTS)
GC++FLAGS = $(GC++DEFS) $(GC++INCS) $(GC++OPTS)
C++OPTS = $(VC++OPTS) $(LC++OPTS) $(GC++OPTS)
C++DEFS = $(VC++DEFS) $(LC++DEFS) $(GC++DEFS)
C++INCS = $(VC++INCS) $(LC++INCS) $(GC++INCS)
GC++OPTS = $(CSTYLE) $(OPTIMIZER) $(ENDIAN) $(MKDEPOPT)
GC++INCS = -nostdinc -I$(INCLDIR)/CC -I$(INCLDIR)
GC++DEFS =
#
# Loader flags, composed of library (-l's) and option parts, with
# the libraries appearing last. Both of these are divided into variable,
# local, and global parts. The composition of LDFLAGS is done in the
# other "direction" from CFLAGS so that all the -L's, which are part of
# LDOPTS, appear before any of the -l's, which are part of LDLIBS.
# Another benefit of segregating the libraries from the remaining of the
# loader options is that the libraries alone can easily be given to
# another program, e.g., lint.
#
# Notes:
# - -s belongs in GCOPTS or in the IDB program that does the actual
# installation.
#
# Note: To turn off -quickstart_info for specific Makefile add:
# LD_QUICKSTART_INFO=
LD_QUICKSTART_INFO=-quickstart_info
#
# locations to search for libs. We search the 'generic' locations such
# as usr/lib64 even though those are installed in a machine specific manner.
# This permits library writers that only want to have one 'least-common-
# denominator' version per ABI to install it directly in the generic location
# without having to create links. This should be OK in the build environment
# since we always search the specific directories first.
#
# Some user's may not want all this searching help - they can specify
# NO_LSRCH
#
#if !defined(NO_LSRCH)
LSRCH_32_M2 = -L$(ROOT)/lib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/internal
LSRCH_N32_M3 = -L$(ROOT)/usr/lib32/mips3 -L$(ROOT)/usr/lib32 -L$(ROOT)/usr/lib32/internal
LSRCH_N32_M4 = -L$(ROOT)/usr/lib32/mips4 -L$(ROOT)/usr/lib32 -L$(ROOT)/usr/lib32/internal
LSRCH_32_ABI = -L$(ROOT)/usr/lib/abi
LSRCH_R32 = -L$(ROOT)/libr32 -L$(ROOT)/usr/libr32
LSRCH_64_M3 = -L$(ROOT)/usr/lib64/mips3 -L$(ROOT)/usr/lib64 -L$(ROOT)/usr/lib64/internal
LSRCH_64_M4 = -L$(ROOT)/usr/lib64/mips4 -L$(ROOT)/usr/lib64 -L$(ROOT)/usr/lib64/internal
LSRCH_64_ABI = -L$(ROOT)/usr/lib64/abi
#endif
#
# each 'popular' combination of ABI and ISA gets its own set of
# GLDOPTS_*
# It is assumed that a command that needs to be built with more than
# one ABI uses cmdcommon* - thus the appropriate versiondefs file will
# contain any needed VERSION_LDOPTS.
#
# DSO's don't follow this rule - they typically create all versions at the
# top - thus, they need access to all possible LDOPTS_* values, and need
# a way to add additional options per object style. So, we add a set of LDOPTS_*
# this can also be used for makefiles that would rather not use cmdcommon*.
#
GLDOPTS_32_M2 = -mips2 -o32 $(LD_QUICKSTART_INFO) -nostdlib $(LSRCH_32_M2)
GLDOPTS_32_ABI= -o32 -abi -nostdlib $(LSRCH_32_ABI)
GLDOPTS_N32_M3= -mips3 -n32 $(LD_QUICKSTART_INFO) -nostdlib $(LSRCH_N32_M3)
GLDOPTS_N32_M4= -mips4 -n32 $(LD_QUICKSTART_INFO) -nostdlib $(LSRCH_N32_M4)
GLDOPTS_R32 = -r32 $(LD_QUICKSTART_INFO) -nostdlib $(LSRCH_R32)
GLDOPTS_64_M3 = -mips3 -64 $(LD_QUICKSTART_INFO) -nostdlib $(LSRCH_64_M3)
GLDOPTS_64_M4 = -mips4 -64 $(LD_QUICKSTART_INFO) -nostdlib $(LSRCH_64_M4)
GLDOPTS_64_ABI= -mips3 -64 -abi -nostdlib $(LSRCH_64_ABI)
# until new ld
GLDOPTS_64_ABI= -mips3 -64 -nostdlib $(LSRCH_64_ABI)
#
# Most objects don't have absolute requirements for ISA - use these
# to get the default for each ABI as set by the release gods.
#
GLDOPTS_32 =$(DEF_GLDOPTS_32)
GLDOPTS_N32 =$(DEF_GLDOPTS_N32)
GLDOPTS_64 =$(DEF_GLDOPTS_64)
GLDLIBS=
#
# LDFLAG layout
#
# Incompatibility from previous commondefs:
# a) setting of LDOPTS in a makefile is probably wrong
#
LDFLAGS = $(LDOPTS) $(LDLIBS) $(ENDIAN)
LDOPTS = $(VLDOPTS) $(LLDOPTS) $(GLDOPTS)
LDLIBS = $(VLDLIBS) $(LLDLIBS) $(GLDLIBS)
#
# Pick appropriate GLDOPTS - releasedefs defines the default
# Note that binaries that don't have absolute ISA requirements should use
# the generic OBJECT_STYLE={64, 32, N32}. This permits the default to be
# set by releasedefs
#
#if $(OBJECT_STYLE) == "64"
GLDOPTS=$(GLDOPTS_64)
#elif $(OBJECT_STYLE) == "64_M3"
GLDOPTS=$(GLDOPTS_64_M3)
#elif $(OBJECT_STYLE) == "64_M4"
GLDOPTS=$(GLDOPTS_64_M4)
#elif $(OBJECT_STYLE) == "64_ABI"
GLDOPTS=$(GLDOPTS_64_ABI)
#elif $(OBJECT_STYLE) == "32_ABI"
GLDOPTS=$(GLDOPTS_32_ABI)
#elif $(OBJECT_STYLE) == "N32"
GLDOPTS=$(GLDOPTS_N32)
#elif $(OBJECT_STYLE) == "N32_M3"
GLDOPTS=$(GLDOPTS_N32_M3)
#elif $(OBJECT_STYLE) == "N32_M4"
GLDOPTS=$(GLDOPTS_N32_M4)
#elif $(OBJECT_STYLE) == "R32"
GLDOPTS=$(GLDOPTS_R32)
#elif $(OBJECT_STYLE) == "32"
GLDOPTS=$(GLDOPTS_32)
#elif $(OBJECT_STYLE) == "32_M2"
GLDOPTS=$(GLDOPTS_32_M2)
#elif $(OBJECT_STYLE) == "NONE"
GLDOPTS=
#else
# set in releasedefs
# This is one that 'make' sees
GLDOPTS=$(DEF_GLDOPTS)
#endif
LDOPTS_32 =$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_32_M2) $(GLDOPTS_32_M2)
LDOPTS_32_M2 =$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_32_M2) $(GLDOPTS_32_M2)
LDOPTS_32_ABI=$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_32_ABI) $(GLDOPTS_32_ABI)
LDOPTS_N32 =$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_N32_M3) $(GLDOPTS_N32)
LDOPTS_N32_M3=$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_N32_M3) $(GLDOPTS_N32_M3)
LDOPTS_N32_M4=$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_N32_M4) $(GLDOPTS_N32_M4)
LDOPTS_R32 =$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_R32) $(GLDOPTS_R32)
LDOPTS_64 =$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_64_M3) $(GLDOPTS_64)
LDOPTS_64_M3 =$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_64_M3) $(GLDOPTS_64_M3)
LDOPTS_64_M4 =$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_64_M4) $(GLDOPTS_64_M4)
LDOPTS_64_ABI=$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_64_ABI) $(GLDOPTS_64_ABI)
#
# Loader options for making shared objects. By default, shared objects
# are all registered in a global location file.
# Redefine $(DSOSTARTOPT) to not update the registry file
#
# By default the DT_SONAME section is set to the name of the target shared
# object. Redefine $(DSONAMEOPT) to allow the DT_SONAME section to be
# something other than the targeted shared object name.
#
# DSOs are typically all made in one top level makefile, in place, rather
# than in subdirectories - therefore all the various flags must be
# present with no conditionals
#
#
# To build a DSO that doesn't use lib*rules:
#
# $(LD) $(LDDSOOPTS) $(LDOPTS) $(OBJECTS) $(LDLIBS) -o $@
#
# Note that LDOPTS must be before the OBJECTS and LDLIBS must be after.
# For local .so's make it easy to not update any registry files
#
#if !defined(NO_STARTOPT)
DSOREGFILE_32 = $(ROOT)/usr/lib/so_locations
DSOREGFILE = $(DSOREGFILE_32)
DSOREGFILE_R32 = $(ROOT)/usr/libr32/so_locations
DSOREGFILE_64 = $(ROOT)/usr/lib64/so_locations
DSOREGFILE_N32 = $(ROOT)/usr/lib32/so_locations
DSOSTARTOPT_32 = -update_registry $(DSOREGFILE_32)
DSOSTARTOPT = $(DSOSTARTOPT_32)
DSOSTARTOPT_R32 = -update_registry $(DSOREGFILE_R32)
DSOSTARTOPT_64 = -update_registry $(DSOREGFILE_64)
DSOSTARTOPT_N32 = -update_registry $(DSOREGFILE_N32)
#endif
DSONAMEOPT = -soname $@
#
# Note: To turn off -no_unresolved for a specific library Makefile, add:
# LD_NO_UNRESOLVED=
LD_NO_UNRESOLVED=-no_unresolved
#
# SGI specific versioning. Redefine $(DSOVERSION) to change version number.
# Redefine $(DSOVERSIONOPT) to skip versioning.
#
DSOVERSION = sgi1.0
DSOVERSIONOPT = -set_version $(DSOVERSION)
#
# Export files - each build can have up to 2 exports file - a common
# one (DSOEXPORTS) and a per-ABI version (DSOEXPORTS_XXX)
# Note that _ABI (MIPS ABI) ONLY uses the DSOEXPORTS_XX_ABI) exports file
# This feature not available for make ...
# Note that these macros must be set BEFORE including commondefs/librootdefs
#
#if defined(DSOEXPORTS)
DSOEXPORTSOPT=-exports_file $(DSOEXPORTS)
#else
# this is what make sees
DSOEXPORTSOPT=
#endif
# Permit per ABI exports file
#if defined(DSOEXPORTS_32)
DSOEXPORTSOPT_32=-exports_file $(DSOEXPORTS_32)
#else
# this is what make sees
DSOEXPORTSOPT_32=
#endif
#if defined(DSOEXPORTS_32_ABI)
DSOEXPORTSOPT_32_ABI=-exports_file $(DSOEXPORTS_32_ABI)
#else
# this is what make sees
DSOEXPORTSOPT_32_ABI=
#endif
#if defined(DSOEXPORTS_N32)
DSOEXPORTSOPT_N32=-exports_file $(DSOEXPORTS_N32)
#else
# this is what make sees
DSOEXPORTSOPT_N32=
#endif
#if defined(DSOEXPORTS_64)
DSOEXPORTSOPT_64=-exports_file $(DSOEXPORTS_64)
#else
# this is what make sees
DSOEXPORTSOPT_64=
#endif
#if defined(DSOEXPORTS_64_ABI)
DSOEXPORTSOPT_64_ABI=-exports_file $(DSOEXPORTS_64_ABI)
#else
# this is what make sees
DSOEXPORTSOPT_64_ABI=
#endif
#
# Each ABI gets the generic *LDDSOOPTS as well as a set of ABI specific ones
#
LDDSOOPTS_32 = $(VLDDSOOPTS) $(VLDDSOOPTS_32) \
$(LLDDSOOPTS) $(LLDDSOOPTS_32) \
$(GLDDSOOPTS) $(GLDDSOOPTS_32)
LDDSOOPTS_32_ABI= $(VLDDSOOPTS) $(VLDDSOOPTS_32_ABI) \
$(LLDDSOOPTS) $(LLDDSOOPTS_32_ABI) \
$(GLDDSOOPTS) $(GLDDSOOPTS_32_ABI)
LDDSOOPTS_R32 = $(VLDDSOOPTS) $(VLDDSOOPTS_R32) \
$(LLDDSOOPTS) $(LLDDSOOPTS_R32) \
$(GLDDSOOPTS) $(GLDDSOOPTS_R32)
LDDSOOPTS_N32 = $(VLDDSOOPTS) $(VLDDSOOPTS_N32) \
$(LLDDSOOPTS) $(LLDDSOOPTS_N32) \
$(GLDDSOOPTS) $(GLDDSOOPTS_N32)
LDDSOOPTS_64 = $(VLDDSOOPTS) $(VLDDSOOPTS_64) \
$(LLDDSOOPTS) $(LLDDSOOPTS_64) \
$(GLDDSOOPTS) $(GLDDSOOPTS_64)
LDDSOOPTS_64_ABI= $(VLDDSOOPTS) $(VLDDSOOPTS_64_ABI) \
$(LLDDSOOPTS) $(LLDDSOOPTS_64_ABI) \
$(GLDDSOOPTS) $(GLDDSOOPTS_64_ABI)
# Totally generic - common options for all ABIs
GLDDSOOPTS = -elf -shared -all $(MKDEPOPT) $(DSONAMEOPT)
GLDDSOOPTS_32 = $(LD_NO_UNRESOLVED) $(LD_QUICKSTART_INFO) \
$(DSOEXPORTSOPT) $(DSOEXPORTSOPT_32) \
$(DSOSTARTOPT_32) $(DSOVERSIONOPT)
GLDDSOOPTS_32_ABI = $(DSOEXPORTSOPT_32_ABI)
GLDDSOOPTS_R32 = $(LD_NO_UNRESOLVED) $(LD_QUICKSTART_INFO) \
$(DSOSTARTOPT_R32) $(DSOVERSIONOPT)
GLDDSOOPTS_N32 = $(LD_NO_UNRESOLVED) $(LD_QUICKSTART_INFO) \
$(DSOEXPORTSOPT) $(DSOEXPORTSOPT_N32) \
$(DSOSTARTOPT_N32) $(DSOVERSIONOPT)
GLDDSOOPTS_64 = $(LD_NO_UNRESOLVED) $(LD_QUICKSTART_INFO) \
$(DSOEXPORTSOPT) $(DSOEXPORTSOPT_64) \
$(DSOSTARTOPT_64) $(DSOVERSIONOPT)
GLDDSOOPTS_64_ABI = $(DSOEXPORTSOPT_64_ABI)
#
# set LDDSOOPTS based on OBJECT_STYLE - makes it easier to make .so's
# when one doesn't use lib*defs
#
#if $(OBJECT_STYLE) == "32_ABI"
LDDSOOPTS=$(LDDSOOPTS_32_ABI)
#elif $(OBJECT_STYLE) == "64_ABI"
LDDSOOPTS=$(LDDSOOPTS_64_ABI)
#elif $(OBJECT_STYLE:M64*) != ""
LDDSOOPTS=$(LDDSOOPTS_64)
#elif $(OBJECT_STYLE:MN32*) != ""
LDDSOOPTS=$(LDDSOOPTS_N32)
#elif $(OBJECT_STYLE:M32*) != ""
LDDSOOPTS=$(LDDSOOPTS_32)
#elif $(OBJECT_STYLE) == "NONE"
LDDSOOPTS=
#else
# this is what 'make' sees
LDDSOOPTS=$(LDDSOOPTS_32)
#endif
#
# F77 flags are just like cc flags.
#
FFLAGS= $(VFFLAGS) $(LFFLAGS) $(GFFLAGS)
VFFLAGS = $(VF77DEFS) $(VF77INCS) $(VF77OPTS)
LFFLAGS = $(LF77DEFS) $(LF77INCS) $(LF77OPTS)
GFFLAGS = $(GF77DEFS) $(GF77INCS) $(GF77OPTS)
F77OPTS = $(VF77OPTS) $(LF77OPTS) $(GF77OPTS)
F77DEFS = $(VF77DEFS) $(LF77DEFS) $(GF77DEFS)
F77INCS = $(VF77INCS) $(LF77INCS) $(GF77INCS)
GF77OPTS= $(CSTYLE) $(OPTIMIZER) $(ENDIAN) $(MKDEPOPT)
GF77DEFS= $(GCDEFS)
GF77INCS= $(GCINCS)
#
# Pc flags are just like cc flags.
#
PFLAGS = $(VPFLAGS) $(LPFLAGS) $(GPFLAGS)
VPFLAGS = $(VPDEFS) $(VPINCS) $(VPOPTS)
LPFLAGS = $(LPDEFS) $(LPINCS) $(LPOPTS)
GPFLAGS = $(GPDEFS) $(GPINCS) $(GPOPTS)
POPTS = $(VPOPTS) $(LPOPTS) $(GPOPTS)
PDEFS = $(VPDEFS) $(LPDEFS) $(GPDEFS)
PINCS = $(VPINCS) $(LPINCS) $(GPINCS)
GPOPTS = $(CSTYLE) $(OPTIMIZER) $(ENDIAN) $(MKDEPOPT)
GPDEFS = $(GCDEFS)
GPINCS = $(GCINCS)
#
# as flags are just like cc flags.
# By default, ASTYLE is the same as CSTYLE, but some may need to make
# the asm more aggressive than 'C' and can set ASTYLE. Users of 'make'
# always get ASTYLE == CSTYLE
#
#if !defined(ASTYLE)
ASTYLE=$(CSTYLE)
#endif
ASFLAGS = $(VASFLAGS) $(LASFLAGS) $(GASFLAGS)
VASFLAGS = $(VASDEFS) $(VASINCS) $(VASOPTS)
LASFLAGS = $(LASDEFS) $(LASINCS) $(LASOPTS)
GASFLAGS = $(GASDEFS) $(GASINCS) $(GASOPTS)
ASOPTS = $(VASOPTS) $(LASOPTS) $(GASOPTS)
ASDEFS = $(VASDEFS) $(LASDEFS) $(GASDEFS)
ASINCS = $(VASINCS) $(LASINCS) $(GASINCS)
GASOPTS = $(ASTYLE) $(OPTIMIZER) $(ENDIAN) $(MKDEPOPT)
GASDEFS = $(GCDEFS)
GASINCS = $(GCINCS)
#
# The install command to use.
#
INSTALL = $(TOOLROOT)/etc/install
#
# A not-so-common definition for graphics makefiles that want to install
# something on all machines.
# XXX can't we define "all" as a wildcard mach tag?
#
ALLGFXMACH = mach(GFXBOARD=LIGHT SUBGR=LIGHT \
GFXBOARD=LIGHT SUBGR=LG1MC \
GFXBOARD=EXPRESS SUBGR=EXPRESS \
GFXBOARD=EXPRESS SUBGR=IP19 \
GFXBOARD=EXPRESS SUBGR=IP21 \
GFXBOARD=EXPRESS SUBGR=IP25 \
GFXBOARD=EXPRESS SUBGR=I2_64 \
GFXBOARD=MGRAS SUBGR=MGRAS \
GFXBOARD=MGRAS SUBGR=IP27 \
GFXBOARD=MGRAS SUBGR=RACER \
GFXBOARD=VENICE SUBGR=IP19 \
GFXBOARD=VENICE SUBGR=IP21 \
GFXBOARD=VENICE SUBGR=IP25 \
GFXBOARD=KONA SUBGR=IP19 \
GFXBOARD=KONA SUBGR=IP25 \
GFXBOARD=KONA SUBGR=IP27 \
GFXBOARD=NEWPORT SUBGR=NG1 \
GFXBOARD=NEWPORT SUBGR=NEWTON \
GFXBOARD=NEWPRESS SUBGR=NEWPRESS \
GFXBOARD=CRIME SUBGR=CRM)
#
# For people who want to run etags on other types of files
#
CTAGFILES = \( -name '*.[cfhlpy]' -o -name '*.c++' \)
#
# MKDEPFILE is the name of the dependency database, included by commonrules.
#
MKDEPFILE = Makedepend
#
# Name of the location of various libs $(ROOT)/usr/$(LIB_LOCATION)/libfoo.[a,so]
# This is set in the releasedefs file.
#
LIB_LOCATION_O32=lib
LIB_LOCATION_N32=lib32
#
# Name of the runtime linker in /
#
# Note: this is used to set the PR_INTERP_NAME, but the DT_RPATH elf var must
# be set to the root of the $ROOTRLDNAME as well.
#
# To allow the changing of the default object style ... we now have
# two different ROOTRLDNAME's which then can be mapped to ROOTRLDNAME.
# The variable ROOTRLDNAME is set in the releasedefs file.
#
ROOTRLDNAME_O32=/lib/libc.so.1,-rpath,/lib
ROOTRLDNAME_N32=/lib32/libc.so.1,-rpath,/lib32
# libtoolroot.so allows executables which were linked against the
# current ROOT to be run on earlier versions of IRIX. TOOLROOTSAFE is
# defined in releasedefs.
TOOLROOTSAFE_O32 = _RLD_LIST=DEFAULT:$(TOOLROOT)/usr/lib/libtoolroot.so
TOOLROOTSAFE_64 = _RLD64_LIST=DEFAULT:$(TOOLROOT)/usr/lib64/libtoolroot.so
TOOLROOTSAFE_N32 = _RLDN32_LIST=DEFAULT:$(TOOLROOT)/usr/lib32/libtoolroot.so
#
# Flags to handle yacc and lex automatic dependency generation
# We also use this to place woff's that are specific to yacc and lex.
# These are all V4.X compiler warnings
# 1167 - pointer points outside of underlying object
# 1110 - statement is unreachable
# 1174 - label "XXX" was declared but never referenced
# 803,1685,1499 - ignore invalid woffs
#
YACCMKDEPFLAGS=-MDtarget $*.o -woff 1685,803,1499,1167,1110,1174
LEXMKDEPFLAGS=-MDtarget $*.o -woff 1685,803,1499,1167,1110,1174
#
# Include directory shorthands, used in CFLAGS and LDFLAGS components.
#
INCLDIR = $(ROOT)/usr/include
#
# Convenient command macros that include the flags macros.
#
# You should always invoke make in makefiles via $(MAKE), as make passes
# all command-line variables through the environment to sub-makes.
#
# Never use just $(CCF), etc. in rules that link executables; LDFLAGS
# needs to be included after your objects in the command line.
#
ASF = $(AS) $(ASFLAGS)
C++F = $(CXX) $(CXXFLAGS)
CXXF = $(C++F)
CCF = $(CC) $(CFLAGS)
F77F = $(F77) $(FFLAGS)
LDF = $(LD) $(LDFLAGS)
LEXF = $(LEX) $(LFLAGS)
PCF = $(PC) $(PFLAGS)
YACCF = $(YACC) $(YFLAGS)
#
# Releasedefs defines compiler tool versions on an ABI basis.
# We use that combined with OBJECT_STYLE to set some macros that can
# be used in multi-version makefiles
#
#if $(OBJECT_STYLE:M32*) != ""
VCC=$(VCC32)
VCXX=$(VCXX32)
VLD=$(VLD32)
#elif $(OBJECT_STYLE:M64*) != ""
VCC=$(VCC64)
VCXX=$(VCXX64)
VLD=$(VLD64)
#elif $(OBJECT_STYLE:MN32*) != ""
VCC=$(VCCN32)
VCXX=$(VCXXN32)
VLD=$(VLDN32)
#else
# This is of course what 'make' sets
VCC=
VCXX=
VLD=
#endif
#
# Rule macros for nonterminal makefiles that iterate over subdirectories,
# making the current target. Set *SUBDIRS to the relevant list of kids.
#
# Set NOSUBMESG to any value to suppress a warning that subdirectories
# are not present. This is useful with mandefs/rules
#
SUBDIR_MAKERULE= \
if test ! -d $$d; then \
if test "$(NOSUBMESG)" = "" ; then \
echo "SKIPPING $$d: No such directory."; \
fi \
else \
echo "\t(cd $$d; $(MAKE) $${RULE:=$@})"; \
(cd $$d; ${MAKE} $${RULE:=$@}); \
fi
SUBDIRS_MAKERULE= \
@for d in $(SUBDIRS); do $(SUBDIR_MAKERULE); done
HEADERS_SUBDIRS_MAKERULE= \
@for d in $(HEADERS_SUBDIRS); do $(SUBDIR_MAKERULE); done
EXPORTS_SUBDIRS_MAKERULE= \
@for d in $(EXPORTS_SUBDIRS); do $(SUBDIR_MAKERULE); done
#
# One problem with the above rules is that if a make fails, and -k is
# set, the entire for loop might stop. This is because make still can
# (and XPG requires it) exit with an error status if the -k option is set.
# This is an alternate rule for SUBDIRS when it is desired that -k keep
# working on the next SUBDIR if the previous one failed. Its not quite
# as compact a rule as the previous ones.
# A standard usage would be:
# default install $(COMMONTARGS): $(_FORCE)
# $(MAKE) __DORULE=$@ $(SUBDIRS)
# $(SUBDIRS): $(_FORCE)
# @$(NSUBDIR_MAKERULE)
NSUBDIR_MAKERULE= \
if test ! -d $@; then \
if test "$(NOSUBMESG)" = "" ; then \
echo "SKIPPING $@: No such directory."; \
fi \
else \
echo "\t(cd $@; $(MAKE) $(__DORULE))"; \
(cd $@; ${MAKE} $(__DORULE)); \
fi
#
# When CHECK_API is defined, have 7.2 compilers emit compressed
# function prototypes into the .MIPS.interfaces section of .o files
# destined for inclusion in libraries
#
#if defined(CHECK_API) && !defined(NO_CHECK_API)
LIBRARY_API_CHECK=-DEBUG:full_interface_check
#else
LIBRARY_API_CHECK=
#endif
#
# Library .c.o rule macros -- someday, cc -r will do the right thing and
# the G-number will be happily forgotten.
#
LIBRARY_AS_MAKERULE= \
$(ASF) $(LIBRARY_API_CHECK) -o $*.o $<
LIBRARY_CC_MAKERULE= \
$(CCF) $(LIBRARY_API_CHECK) -c $<
LIBRARY_CXX_MAKERULE= \
$(CXXF) $(LIBRARY_API_CHECK) -c $<
LIBRARY_C++_MAKERULE= \
$(C++F) $(LIBRARY_API_CHECK) -c $<
#
# The macro naming commonrules' always-unsatisfied target, which is useful
# in directory dependencies to guarantee that even directories having future
# mtimes due to timewarps will be "made".
#
_FORCE=$(COMMONPREF)_force
#
# Permit dependencies for Null-suffix targets
#
.MAKEOPTS: -N
#
# Convenience file list macros:
# - Commondefs defines the following lists: SOURCES, enumerating all
# source files; OBJECTS, the .o files derived from compilable source;
# and DIRT, which lists intermediates and temporary files to be
# removed by clean.
# - The including (parent) makefile may define source file lists for
# the standard suffixes: CFILES for .c, ASFILES for .s, YFILES for
# .y, etc. We combine all such lists into SOURCES. The including
# makefile need not define CFILES &c before including commondefs.
#
SOURCES=$(HFILES) $(ASFILES) $(C++FILES) $(CXXFILES) $(CFILES) $(EFILES) \
$(FFILES) $(LFILES) $(PFILES) $(RFILES) $(SHFILES) $(YFILES)
CXXO1=$(CXXFILES:.c++=.o) $(C++FILES:.c++=.o)
CXXO2=$(CXXO1:.cxx=.o)
CXXO3=$(CXXO2:.C=.o)
CXXOALL=$(CXXO3)
YO1=$(YFILES:.y=.o)
YO2=$(YO1:.yxx=.o)
YO3=$(YO2:.Y=.o)
YOALL=$(YO3)
LO1=$(LFILES:.l=.o)
LO2=$(LO1:.lxx=.o)
LO3=$(LO2:.L=.o)
LOALL=$(LO3)
OBJECTS=$(ASFILES:.s=.o) $(CXXOALL) $(CFILES:.c=.o) $(EFILES:.e=.o) \
$(FFILES:.f=.o) $(LOALL) $(PFILES:.p=.o) $(RFILES:.r=.o) \
$(YOALL)
#
# Makefiles should set LDIRT only
#
# Make include files that extend commondefs should set XDIRT for dirt
# generated by the extension. It should also provide an XfooDIRT macro for
# the benefit of any extensions to itself. The intent is that the user's
# Makefile will just worry about its own dirt.
#
DIRT=$(GDIRT) $(VDIRT) $(LDIRT) $(XDIRT)
GDIRT=*.[oue] a.out core lex.yy.[co] y.tab.[cho] $(_FORCE) ar.tmp.*
#
# This exitop should be used by those who are building the FTR database.
# The reason for this is that inst will sort a 'sort -u' on the exitops,
# so if all of them are identical, we only do the work once.
# A typical install line that uses the FTR_EXITOP_IDB should look similar
# to this:
#
# $(INSTALL) $(FTR_EXITOP_IDB) -idb $(IDB_TAG) -m 444 -F $(FTRDIR) sgidemos.ftr#
# IDB_TAG - is defined in the spec file for a given subsystem.
# FTRDIR - is the directory usr/lib/filetype/{install,system,default}
# sgidemos.ftr - is the ftr file that goes into FTRDIR.
#
FTR_EXITOP_IDB= -idb 'exitop( " \
if [ -r \$$rbase/usr/lib/filetype/Makefile ]; then \
chroot $$rbase /bin/sh -c \"cd /usr/lib/filetype; make > /dev/null\"; \
fi" )'
#
# Local definitions. These are used for debugging purposes. Make sure that
# the product builds properly without the local definitions, unless you check
# in the local definitions!
#
# To access a localdefs file outside the current directory, set LOCALDEFS on
# the command line, and likewise for localrules. Or you can have localdefs
# just sinclude the appropriate other include file.
#
LOCALDEFS = ./localdefs
LOCALRULES = ./localrules
sinclude $(LOCALDEFS)

View File

@@ -0,0 +1,106 @@
# Copyright 1990 Silicon Graphics, Inc. All rights reserved.
#
#ident "$Revision: 1.52 $"
#
# Common makefile rules.
#
# Notes:
# - After including $(ROOT)/usr/include/make/commondefs, a makefile may
# say ``include $(COMMONRULES)'' to get this file.
# - It is up to the including makefile to define a default rule before
# including $(COMMONRULES).
# - The parent makefile must define TARGETS in order for clobber to work.
# - If the parent makefile must overload the common targets with special
# rules (e.g. to perform recursive or subdirectory makes), then set
# COMMONPREF to some unique prefix before including $(COMMONRULES),
# and make sure that each common target depends on its prefixed name.
# For example, a makefile which passes common targets and install on
# to makes in subdirectories listed in DIRS might say
#
# COMMONPREF=xxx
# include $(COMMONRULES)
#
# $(COMMONTARGS) install: $(COMMONPREF)$$@
# @for d in $(DIRS); do \
# $(ECHO) "\tcd $$d; $(MAKE) $@"; \
# cd $$d; $(MAKE) $@; cd ..; \
# done
#
# Thus, all of the common rules plus install are passed to sub-makes
# *and* executed in the current makefile (as xxxclean, xxxclobber,
# xxxinstall, etc). SUBDIRS_MAKERULE in commondefs is a convenience
# macro that expands to the above loop.
#
#
# An always-unsatisfied target. The name is unlikely to occur in a file tree,
# but if _force existed in a make's current directory, this target would be
# always-satisfied and targets that depended on it would not be made.
#
$(_FORCE):
#
# File removal rules: there are three.
# - clean removes dirt
# - clobber removes targets, dirt, and Makedepend
# - rmtargets removes targets only
# One might 'make clean' in a large tree to reclaim disk space after targets
# are built, but before they are archived into distribution images on disk.
# One might 'make rmtargets' to remove badly-linked executables, and then
# run a 'make' to re-link the good objects.
#
$(COMMONPREF)clobber: $(COMMONPREF)clean $(COMMONPREF)rmtargets $(_FORCE)
rm -rf $(MKDEPFILE)
$(COMMONPREF)clean: $(_FORCE)
rm -rf $(DIRT)
$(COMMONPREF)rmtargets: $(_FORCE)
rm -rf $(TARGETS)
#
# Lint and C tags support.
#
$(COMMONPREF)fluff: $(_FORCE)
$(LINT) $(LINTFLAGS) $(CDEFS) $(CINCS) $(CFILES) $(LDLIBS)
CTAGS=ctags
$(COMMONPREF)tags: $(_FORCE)
rm -f tags
find . $(CTAGFILES) \
! -name '.*' ! -name 'llib-*' ! -name '*,v' \
$(CTAGFINDARGS) -print | \
sed 's:^\./::' | \
xargs $(CTAGS) -a $(CTAGOPTS)
if test -f tags; then \
sort -u +0 -1 -o tags tags; \
fi
ETAGS=etags
$(COMMONPREF)TAGS: $(_FORCE)
rm -f TAGS
find . $(CTAGFILES) \
! -name '.*' ! -name 'llib-*' ! -name '*,v' \
$(CTAGFINDARGS) -print | \
sed 's:^\./::' | \
xargs $(ETAGS) -a $(ETAGOPTS)
#
# A better version of smake's makelib.mk rule.
# XXX fix makelib.mk in next release and remove this rule.
#
MAKELIB: .USE .PRECIOUS
$(AR) c$(ARFLAGS) $(.TARGET) $(.OODATE)
rm -f $(.OODATE)
#
# Include the make dependency file if it exists.
#
sinclude $(MKDEPFILE)
#
# Local make rules
#
sinclude $(LOCALRULES)

View File

@@ -0,0 +1,19 @@
# Copyright 1998 Silicon Graphics, Inc. All rights reserved.
#
#ident "$Revision: 1.1 $"
#
# Common cording definitions.
# Rules file for cording. See notes in that file for more information.
CORDRULES=$(ROOT)/usr/include/make/cordrules
# There can be any number of cord feedback files, and they should be
# alphabetically arranged in order of importance, with the most important
# file first: libfoo.1.fb, libfoo.2.fb, ...
CORDFILES=$(BASELIBNAME)*.fb
# Allow cleanup of pre-cord libraries
LDIRT+=*.precord

View File

@@ -0,0 +1,33 @@
# Copyright 1998 Silicon Graphics, Inc. All rights reserved.
#
#ident "$Revision: 1.1 $"
#
# Cording rules for generating corded shared libraries.
#
# Notes:
# - After including $(ROOT)/usr/include/make/corddefs, a makefile may
# say ``include $(CORDRULES)'' to get this file.
# - This must be placed as the very last included rules file in the
# Makefile prior to the target definitions to allow it to override
# the standard .a.so rule.
# Rule to override normal .so creation to allow a cording stage
.a.so:
$(LD) \
$(.IMPSRC:M?*_32.a:S/$(.IMPSRC)/$(LDOPTS_32) $(LDDSOOPTS_32)/) \
$(.IMPSRC:M?*_32_M2.a:S/$(.IMPSRC)/$(LDOPTS_32_M2) $(LDDSOOPTS_32)/) \
$(.IMPSRC:M?*_32_abi.a:S/$(.IMPSRC)/$(LDOPTS_32_ABI) $(LDDSOOPTS_32_ABI)/) \
$(.IMPSRC:M?*_r32.a:S/$(.IMPSRC)/$(LDOPTS_R32) $(LDDSOOPTS_R32)/) \
$(.IMPSRC:M?*_n32.a:S/$(.IMPSRC)/$(LDOPTS_N32) $(LDDSOOPTS_N32)/) \
$(.IMPSRC:M?*_n32_M3.a:S/$(.IMPSRC)/$(LDOPTS_N32_M3) $(LDDSOOPTS_N32)/)\
$(.IMPSRC:M?*_n32_M4.a:S/$(.IMPSRC)/$(LDOPTS_N32_M4) $(LDDSOOPTS_N32)/)\
$(.IMPSRC:M?*_64.a:S/$(.IMPSRC)/$(LDOPTS_64) $(LDDSOOPTS_64)/) \
$(.IMPSRC:M?*_64_M3.a:S/$(.IMPSRC)/$(LDOPTS_64_M3) $(LDDSOOPTS_64)/) \
$(.IMPSRC:M?*_64_M4.a:S/$(.IMPSRC)/$(LDOPTS_64_M4) $(LDDSOOPTS_64)/) \
$(.IMPSRC:M?*_64_abi.a:S/$(.IMPSRC)/$(LDOPTS_64_ABI) $(LDDSOOPTS_64_ABI)/) \
$(.IMPSRC:M?*.a:N?*_64?*:N?*_32?*:N?*_n32?*:N?*_abi?*:N?*_r32?*:S/$(.IMPSRC)/$(LDOPTS_32) $(LDDSOOPTS_32)/) \
$(.IMPSRC) \
$(.IMPSRC:N?*_abi.a:S/$(.IMPSRC)/$(LDLIBS)/) \
-o $(.TARGET).precord
$(CORD) -o $(.TARGET) $(.TARGET).precord $(CORDFILES)

View File

@@ -0,0 +1,36 @@
#
# Common definitions for building ism idb's and images
#
#ident "$Revision: 1.12 $"
GENDIST= $(TOOLROOTSAFE) $(TOOLROOT)/usr/sbin/gendist
IDBJOIN= $(TOOLROOT)/usr/sbin/idbjoin
OFINALIDB= $(TOOLROOT)/usr/sbin/ofinalidb
OSPEC= $(TOOLROOT)/usr/sbin/ospec
IDBPROTO=$(TOOLROOTSAFE) $(TOOLROOT)/usr/sbin/idbproto
IDBINST= $(TOOLROOTSAFE) $(TOOLROOT)/usr/sbin/idbinst
GGENDISTFLAGS=-verbose
GENDISTFLAGS=$(VGENDISTFLAGS) $(LGENDISTFLAGS) $(GGENDISTFLAGS)
GIDBJOINFLAGS=
IDBJOINFLAGS=$(VIDBJOINFLAGS) $(LIDBJOINFLAGS) $(GIDBJOINFLAGS)
ISMCOMMONRULES=$(ROOT)/usr/include/make/ismcommonrules
# permit use of ismcommonrules even if user doesn't specify ALLIMAGES or SPEC
# If ALLIMAGES is reset from this default value then it is only possible to
# build the products that are enumerated in the ALLIMAGES list instead of
# all the products defined by the spec file.
# It only needs to be set during the period you need to build a proper subset
# of the set of products defined by the spec file.
ALLIMAGES=no_images_supplied
#
# Given the images names contruct appropriate wildcard versions for
# shell
#
SHELLIMAGES=$(ALLIMAGES:=.*)
# provide dirt macro (XISMDIRT) to any enclosing set of definitions
XDIRT = *.version *.sorted extra missing finalidb $(RAWIDB) $(ALLIMAGES) \
$(SHELLIMAGES) joinedidb dryrun $(XISMDIRT) words ofinalidb
include $(ROOT)/usr/include/make/commondefs
include $(ROOT)/usr/include/make/$(OVERLAYIMAGES)odefs

View File

@@ -0,0 +1,192 @@
#
# Commonrules to build idb's and images for an ism
#
#
# For an ism that doesn't have a rawidb idb
# set LIDBJOINFLAGS to -m
# In this case a zero length RAWIDB is required
#
#
# Targets:
# buildimages - make real images (an individual image can also be made)
# buildidbs - makes an external idb
# these idb(s) are the exported ones - the image names
# must correspond to the public exported names that the
# ism has published (and are used in the product
# defining spec files).
# The idb also must have full path names to the location
# of the objects
# buildism - old name for buildidbs
# version - create a version file
# startversion - create a version number in $(WORKAREA)/.version_number
# (and alpha number in $(WORKAREA)/.alpha_number
#
# Before including this file the following should be set:
# ALLIMAGES - names of images to be made - must correspond to
# product name(s) in spec file
# SPEC - spec file name
# RAWIDB - rawidb file name
# SRCIDB - src/checked in idb file name
#
# Macros you may wish to set
# BUILDER - (to 1 if project build, to 2 if build group build)
# TREE_ID - to an integer 1-9 to distinguish parallel OS efforts
# targeted to new hardware.
# It will default to the value of TREE_ID found in
# $(ROOT)/usr/include/make/releasedefs.
# PATCH_RELEASE - if creating a patch release (will default to first eight
# digits of $(WORKAREA)/.version_number)
# PATCH_NUM - patch number (sequences patch releases)
#
# Note that macros ALLIMAGES, SPEC, RAWIDB, and SRCIDB need only be set
# in the build/Makefile. Typically, one just uses the settings as
# provided via the ism template for the build/Makefile.
#
#
#ident "$Revision: 1.39 $"
.NOTPARALLEL:
include $(RELEASEDEFS)
include $(COMMONRULES)
IDBSAREA=../$(OVERLAYIMAGES)idbs
IMAGESAREA=../$(OVERLAYIMAGES)images
# this is old and shouldn't be used
ISMAREA=$(IDBSAREA)
SPECDFLT=$(TOOLROOT)/usr/sbin/specdflt
SPECPRODS=$(TOOLROOT)/usr/sbin/specprods
SPECEXTERN=awk -f $(TOOLROOT)/usr/lib/specextern.awk
# get the definition of the startversion target
include $(ROOT)/usr/include/make/startversion
$(BUILDIMGPREF)ospec:: $(_FORCE)
@VERSION=`cat $(VNUM)`; \
if [ "xx$(OVERLAYIMAGES)" != "xx" ]; then \
if [ `p_list -a|fgrep -x $(OVERLAYIMAGES)$(SPEC)|wc -l` = 0 ];then\
echo "Creating overlays spec file $(OVERLAYIMAGES)$(SPEC)";\
rm -f $(OVERLAYIMAGES)$(SPEC); \
$(OSPEC) $(SPEC) > $(OVERLAYIMAGES)$(SPEC); \
fi; \
fi
$(BUILDIMGPREF)buildimages: checkversion ofinalidb ospec $(FINALIDB) $(SPEC)
@if [ ! -d $(IMAGESAREA) ]; then mkdir $(IMAGESAREA); fi; \
(cd $(IMAGESAREA); for i in $(ALLIMAGES); do \
rm -f $${i}.* $${i}; done)
# next 14 lines replicated below
@if [ -r $(SPEC) ]; then \
USESPEC=$(SPEC); \
if [ "$(ALLIMAGES)" = "no_images_supplied" ]; then \
echo "\nderiving names of products to generate from file $(SPEC)\n"; \
USEALLIMAGES=`$(SPECPRODS) $$USESPEC`; \
else \
USEALLIMAGES='$(ALLIMAGES)'; \
fi; \
else \
echo "\nderiving file $(SPEC).dflt from file finalidb\n"; \
$(SPECDFLT) > $(SPEC).dflt;\
USESPEC=$(SPEC).dflt; \
USEALLIMAGES=`$(SPECPRODS) $$USESPEC`; \
fi; \
echo "$(GENDIST) $(GENDISTFLAGS) -all -root /"; \
echo "\t-source $(SRC) -idb $(OVERLAYIMAGES)finalidb"; \
echo "\t-spec $(OVERLAYIMAGES)$$USESPEC -dist $(IMAGESAREA) \
$$USEALLIMAGES";\
VERSION=`cat $(VNUM)` \
$(GENDIST) $(GENDISTFLAGS) -all -root / -source $(SRC) -idb \
$(OVERLAYIMAGES)finalidb -spec $(OVERLAYIMAGES)$$USESPEC \
-dist $(IMAGESAREA) $$USEALLIMAGES
#
# Generate an external idb - this is the internal idb (finalidb)
# run through gendist to convert the internal subsystem names to
# the external subsystem names (those specified in the spec file and
# published to the product build group).
# NOTE: buildism is old target - buildidb is prefered.
#
$(BUILDISMPREF)buildism:buildidbs
$(BUILDIDBPREF)buildidbs:$(SPEC) $(FINALIDB)
@if [ ! -d $(IDBSAREA) ]; then mkdir $(IDBSAREA); fi; \
(cd $(IDBSAREA); for i in $(ALLIMAGES); do \
rm -f $${i}.* $${i}; done)
# next 14 lines replicated above
@if [ -r $(SPEC) ]; then \
USESPEC=$(SPEC); \
if [ "$(ALLIMAGES)" = "no_images_supplied" ]; then \
echo "\nderiving names of products to generate from file $(SPEC)\n"; \
USEALLIMAGES=`$(SPECPRODS) $$USESPEC`; \
else \
USEALLIMAGES='$(ALLIMAGES)'; \
fi; \
else \
echo "\nderiving file $(SPEC).dflt from file $(RAWIDB)\n"; \
$(SPECDFLT) > $(SPEC).dflt;\
USESPEC=$(SPEC).dflt; \
USEALLIMAGES=`$(SPECPRODS) $$USESPEC`; \
fi;\
$(GENDIST) $(GENDISTFLAGS) -externidb -root / -source $(SRC) \
-idb $(FINALIDB) -spec $$USESPEC -dist \
$(IDBSAREA) $$USEALLIMAGES >dryrun 2>&1;\
$(SPECEXTERN) < $$USESPEC > $(IDBSAREA)/spec;\
ISMROOT=`pwd`;\
ISMROOT=`echo "$$ISMROOT/.." | sed -e 's/\/[^/]*\/\.\.//'`; \
cd $(IDBSAREA); for i in $$USEALLIMAGES; do \
[ ! -r $$i.idb ] && continue; \
nawk '{$$6=head"/"$$6;print}' head=$$ISMROOT < $$i.idb > $$i.$$$$;\
mv $$i.$$$$ $$i.idb; done
$(ALLIMAGES):
$(MAKE) ALLIMAGES=$@ buildimages
$(FINALPREF)$(FINALIDB): $(SRCIDB)
-rm -f joinedidb extra missing
@echo "\tSRCIDB = $(SRCIDB)"
@echo "\tRAWIDB = $(RAWIDB)"
@#gendist still likes things sorted on dstpath
@# use -o so makefile is restartable
@if [ -r $(SRCIDB) ]; then \
SIDBS=`echo $(SRCIDB) | tr ' ' ' ' | tr -s '' ' ' | \
sed -e 's/^/-s/' -e 's/ / -s/g'` ;\
$(IDBJOIN) $(IDBJOINFLAGS) $$SIDBS $(RAWIDB) joinedidb extra missing; \
LANG=C sort +4 -5 joinedidb -o $(FINALIDB); \
else \
echo "\nderiving file finalidb from file $(RAWIDB)\n"; \
LANG=C sort +4 -5 $(RAWIDB) -o $(FINALIDB); \
fi; \
if [ -r $(FINALIDB) -a "xx$(OVERLAYIMAGES)" != "xx" ]; then \
echo "Creating overlay $(OVERLAYIMAGES)finalidb file"; \
$(OFINALIDB) $(FINALIDB) > $(OVERLAYIMAGES)finalidb; \
fi
$(FINALPREF)ofinalidb::$(_FORCE) $(FINALIDB)
@if [ -r $(FINALIDB) -a "xx$(OVERLAYIMAGES)" != "xx" ]; then \
echo "Creating overlay $(OVERLAYIMAGES)finalidb file"; \
$(OFINALIDB) $(FINALIDB) > $(OVERLAYIMAGES)finalidb; \
fi
checkversion:$(_FORCE)
@if [ ! -r $(VNUM) ]; then \
echo "Use the startversion target to set your version number.";\
exit 1 ;\
else \
VERSION=`cat $(VNUM)` ;\
fi
# old target provided so that build doesn't break
checkalpha:$(_FORCE)
@echo "This target is no longer used."
@echo "Please modify your Makefile to remove it."
version:checkversion $(_FORCE)
@VERSION=`cat $(VNUM)` \
$(TOOLROOT)/usr/sbin/makeversion $(ISM_NAME).version
# ok if these not present, but do need their modification dates if they are
fake_target_so_not_empty $(SRCIDB) $(SPEC):
:

View File

@@ -0,0 +1,101 @@
#ident "$Revision: 1.8 $"
#
# commondefs for leaf makefiles in libraries
# Options etc particular to a version of the library are found in versiondefs
# The versiondefs file for the baseline source is in the baseline source
# directory, the versiondefs files for all other versions of the library
# are kept at the top level - the name is prefixed with the name of
# alternate version of the library minus the '.a' suffix
#
# DEPTH must be set to the top of version source before including this file
# TOP is set to the top of the entire library source.
#
# NOTE: definitions on versiondefs CANNOT override commondef definitions
# since versiondefs is included first. This is a change from 5.[0123]
#
# A subset of these definitions apply to single level/single version libs
#if defined(INCLUDEDATROOT)
TOP=
DEPTH=
# Since there is only 1 library - fill in LIBRARY variable
LIBRARY=$(BASELIB)
#else
TOP=$(DEPTH)/../
#
# pick up releasedefs to get compiler versions and default build parameters
#
# pick up version definitions - needs to be before commondefs to pick up
# OBJECT_STYLE
#
# finally pick up commondefs
#
include $(ROOT)/usr/include/make/releasedefs
#include <$(DEPTH)/versiondefs>
include $(ROOT)/usr/include/make/commondefs
#endif
# Ignored warnings list - override commondefs version which is too liberal
# The $(LWOFF) allows makefiles to set local warnings to ignore
# (note that a leading ',' with no whitespace is required).
#
# The ignored 3.XX compiler warnings are as followings:
#
# 803 - Ignored invalid warning number(s) in -woff option
# 826 - width of hex constant is smaller than size of type (int)
# 852 - can be const qualified (-wlint)
#
# The ignored 4.XX compiler warnings are as follows:
# 1048 - cast between pointer-to-object and pointer-to-function
# 1068 - integer conversion resulted in a change of sign
# 1499 - -woff arguments must be in the range ...
# 1508 - Missing (extern) declaration for weak name
# 1509 - Missing (extern) declaration for weak name XXX; xxx
# 1685 - invalid error number XXX
# 1692 - prototyped function redeclared without prototype
WOFF= -woff 1685,803,826,852,1048,1499,1508,1509,1692$(LWOFF)
#
# Options are split into 3 parts:
# global library $(LIBRARY_*) (set in $(TOP)/librarydefs)
# version specific $(VERSION_*) (set in versiondefs)
# subdir specific $(SUBDIR_*) (set in leaf Makefile)
#
# pick up global library definitions
# Use "<" so that we don't look in directory this file was found in
# ($(ROOT)/usr/include/make) we want to only look in the source dirs
#
#include <$(TOP)librarydefs>
LCDEFS=$(LIBRARY_CDEFS) $(VERSION_CDEFS) $(SUBDIR_CDEFS)
LCOPTS=$(LIBRARY_COPTS) $(VERSION_COPTS) $(SUBDIR_COPTS)
LCINCS=$(LIBRARY_CINCS) $(VERSION_CINCS) $(SUBDIR_CINCS)
LCXXDEFS=$(LIBRARY_CXXDEFS) $(VERSION_CXXDEFS) $(SUBDIR_CXXDEFS)
LCXXOPTS=$(LIBRARY_CXXOPTS) $(VERSION_CXXOPTS) $(SUBDIR_CXXOPTS)
LCXXINCS=$(LIBRARY_CXXINCS) $(VERSION_CXXINCS) $(SUBDIR_CXXINCS)
LC++DEFS=$(LIBRARY_C++DEFS) $(VERSION_C++DEFS) $(SUBDIR_C++DEFS)
LC++OPTS=$(LIBRARY_C++OPTS) $(VERSION_C++OPTS) $(SUBDIR_C++OPTS)
LC++INCS=$(LIBRARY_C++INCS) $(VERSION_C++INCS) $(SUBDIR_C++INCS)
LF77DEFS=$(LIBRARY_F77DEFS) $(VERSION_F77DEFS) $(SUBDIR_F77DEFS)
LF77OPTS=$(LIBRARY_F77OPTS) $(VERSION_F77OPTS) $(SUBDIR_F77OPTS)
LF77INCS=$(LIBRARY_F77INCS) $(VERSION_F77INCS) $(SUBDIR_F77INCS)
LPDEFS=$(LIBRARY_PDEFS) $(VERSION_PDEFS) $(SUBDIR_PDEFS)
LPOPTS=$(LIBRARY_POPTS) $(VERSION_POPTS) $(SUBDIR_POPTS)
LPINCS=$(LIBRARY_PINCS) $(VERSION_PINCS) $(SUBDIR_PINCS)
LASDEFS=$(LIBRARY_ASDEFS) $(VERSION_ASDEFS) $(SUBDIR_ASDEFS)
LASOPTS=$(LIBRARY_ASOPTS) $(VERSION_ASOPTS) $(SUBDIR_ASOPTS)
LASINCS=$(LIBRARY_ASINCS) $(VERSION_ASINCS) $(SUBDIR_ASINCS)
LLDOPTS=$(LIBRARY_LDOPTS) $(VERSION_LDOPTS) $(SUBDIR_LDOPTS)
LLDLIBS=$(LIBRARY_LDLIBS) $(VERSION_LDLIBS) $(SUBDIR_LDLIBS)
LIBLEAFRULES=$(ROOT)/usr/include/make/libleafrules
# get top level developer override options (these should set V* variables)
#sinclude <$(TOP)localdefs>

View File

@@ -0,0 +1,29 @@
#ident "$Revision: 1.5 $"
#
# library commonrules
# This is only included in leaf directories (those with source only)
# TOP must have been set to the relative path from the invoking
# directory to the top of the library source tree
#if !defined(INCLUDEDATROOT)
default!$(TOP)$(LIBRARY)
include $(COMMONRULES)
#endif
$(TOP)$(LIBRARY):$(TOP)$(LIBRARY)($(OBJECTS)) MAKELIB
.c.o:; $(LIBRARY_CC_MAKERULE)
.s.o:; $(LIBRARY_AS_MAKERULE)
#if defined(OBJECT_STYLE) && \
$(ALLSTYLES:S/$(OBJECT_STYLE)/GOT_ONE/:MGOT_ONE) == ""
.BEGIN:
@echo "OBJECT_STYLE variable (=$(OBJECT_STYLE)) set to unknown style"
@echo "Must be one of $(ALLSTYLES)"
exit 1
#endif
showlib!
@echo "$$(LIBRARY) = $(LIBRARY) $$(CFILES) = $(CFILES) $$(OBJECTS) = $(OBJECTS) $$(OBJECT_STYLE) = $(OBJECT_STYLE)"

View File

@@ -0,0 +1,278 @@
#
# $Revision: 1.18 $
#
# Commondefs for top level libraries
# libroot{defs,rules} suppport a general way to build single and multi-directory
# libraries with multiple versions
#
# Before including librootdefs the top level makefile must define:
#
# BASELIB - the name of the base archive (with the .a suffix)
# Where the source must live depends on the setting of ALTLIBS
# and MULTIDIR. If either are set, the source must live in
# a directory 'src'
# ALTLIBS - the names of any alternate versions of the library
# (with the .a suffix)
# The source for these will be created by tlinking from BASELIB
# to ALTLIBS (with the '.a' removed)
# MULTIDIR - set this ONLY if the library has multiple directories
# but NOT multiple versions
# PRIVATEFILES - set to a tlink -x option(s) to exclude certain files
# (if any) from being linked from BASELIB to ALTLIBS
#
# By default TARGETS is set here to be all the libraries and the shared version
# of all non-non_shared and non-abi libraries (this is based on
# looking at the trailing _ns.a or _abi.a). In addition any library
# name that has the string _noso_ in it won't have a shared verion made.
# To request that the ABI
# version of a library be added as a shared object, set the ABISO macro.
# To request that NO .so's get built - set the macro NOSO
#
# TARGETS can be added to:
# TARGETS+=lib.ln
# OR can be overridden if necessary:
# TARGETS=$(LIBS)
#
# Then define the default rule:
# default:$(TARGETS)
# And include the other needed rules:
# include ${LIBROOTRULES}
#
# Library Version Naming
# Consistent naming is necessary to obtain all that these rules can offer.
#
# Names should be some prefix followed by an underscore followed by one of
# the names in commondefs (e.g. _64_M3) followed '.a'
# Example: a library built for default 64 bit: libx_64.a
# Example: a library built for mips4 64 bit: libx_64_M4.a
# Example: a library built for mips3 n32 bit: libx_n32_M4.a
#
# Names of non-shared versions should end in _ns.a
# Example: a library built for 64 bit mips4, non-shared: libx_64_M4_ns.a
#
# Names of speciality libaries that shouldn't have .so's built for them
# should have the string _noso_ imbedded somewhere in them.
# Names of MIPS ABI libs should end in _32_abi.a. By default the .so version
# of these won't get built. Set ABISO macro to have the .so version
# added to TARGETS
BASELIBSRCDIR=src
LIBS=$(BASELIB) $(ALTLIBS)
LIBROOTRULES=$(ROOT)/usr/include/make/librootrules
# Common install locations. These can be overridden in the library Makefiles
# after including librootdefs
INSTINC=/usr/include
INSTDIR=/usr/lib
INSTDIR_NS=/usr/lib/nonshared
INSTDIR_32_ABI=/usr/lib/abi
INSTDIR_32=/usr/lib
INSTDIR_32_M2=/usr/lib
INSTDIR_32_NS=/usr/lib/nonshared
INSTDIR_32_M2_NS=/usr/lib/nonshared
INSTDIR_32_DEBUG =$(INSTDIR_32)/debug
INSTDIR_32_INTERNAL =$(INSTDIR_32)/internal
INSTDIR_64=/usr/lib64
INSTDIR_64_M3=/usr/lib64/mips3
INSTDIR_64_M4=/usr/lib64/mips4
INSTDIR_64_NS=/usr/lib64/nonshared
INSTDIR_64_M3_NS=/usr/lib64/mips3/nonshared
INSTDIR_64_M4_NS=/usr/lib64/mips4/nonshared
INSTDIR_64_ABI=/usr/lib64/abi
INSTDIR_64_DEBUG=$(INSTDIR_64)/debug
INSTDIR_64_M3_DEBUG=$(INSTDIR_64_M3)/debug
INSTDIR_64_M4_DEBUG=$(INSTDIR_64_M4)/debug
INSTDIR_64_INTERNAL=$(INSTDIR_64)/internal
INSTDIR_64_M3_INTERNAL=$(INSTDIR_64_M3)/internal
INSTDIR_64_M4_INTERNAL=$(INSTDIR_64_M4)/internal
INSTDIR_N32=/usr/lib32
INSTDIR_N32_M3=/usr/lib32/mips3
INSTDIR_N32_M4=/usr/lib32/mips4
INSTDIR_N32_NS=/usr/lib32/nonshared
INSTDIR_N32_M3_NS=/usr/lib32/mips3/nonshared
INSTDIR_N32_M4_NS=/usr/lib32/mips4/nonshared
INSTDIR_N32_DEBUG=$(INSTDIR_N32)/debug
INSTDIR_N32_M3_DEBUG=$(INSTDIR_N32_M3)/debug
INSTDIR_N32_M4_DEBUG=$(INSTDIR_N32_M4)/debug
INSTDIR_N32_INTERNAL=$(INSTDIR_N32)/internal
INSTDIR_N32_M3_INTERNAL=$(INSTDIR_N32_M3)/internal
INSTDIR_N32_M4_INTERNAL=$(INSTDIR_N32_M4)/internal
# obsolete
INSTABIDIR=$(INSTDIR_32_ABI)
INSTDSO=$(INSTDIR)
INSTNSDIR=$(INSTDIR_NS)
#
# Full install partial rules - including usage of the I_* macros to
# suppress installation
#
INST_32_ABI=$(I_32_ABI) $(INSTALL) -F $(INSTDIR_32_ABI)
INST_32=$(I_32) $(INSTALL) -F $(INSTDIR_32)
INST_32_M2=$(I_32_M2) $(INSTALL) -F $(INSTDIR_32_M2)
INST_32_NS=$(I_32) $(INSTALL) -F $(INSTDIR_32_NS)
INST_32_M2_NS=$(I_32_M2) $(INSTALL) -F $(INSTDIR_32_M2_NS)
INST_32_DEBUG=$(I_32) $(INSTALL) -F $(INSTDIR_32_DEBUG)
INST_32_INTERNAL=$(I_32) $(INSTALL) -F $(INSTDIR_32_INTERNAL)
INST_64=$(I_64) $(INSTALL) -F $(INSTDIR_64)
INST_64_M3=$(I_64_M3) $(INSTALL) -F $(INSTDIR_64_M3)
INST_64_M4=$(I_64_M4) $(INSTALL) -F $(INSTDIR_64_M4)
INST_64_NS=$(I_64) $(INSTALL) -F $(INSTDIR_64_NS)
INST_64_M3_NS=$(I_64_M3) $(INSTALL) -F $(INSTDIR_64_M3_NS)
INST_64_M4_NS=$(I_64_M4) $(INSTALL) -F $(INSTDIR_64_M4_NS)
INST_64_ABI=$(I_64_ABI) $(INSTALL) -F $(INSTDIR_64_ABI)
INST_64_DEBUG=$(I_64) $(INSTALL) -F $(INSTDIR_64_DEBUG)
INST_64_M3_DEBUG=$(I_64_M3) $(INSTALL) -F $(INSTDIR_64_M3_DEBUG)
INST_64_M4_DEBUG=$(I_64_M4) $(INSTALL) -F $(INSTDIR_64_M4_DEBUG)
INST_64_INTERNAL=$(I_64) $(INSTALL) -F $(INSTDIR_64_INTERNAL)
INST_64_M3_INTERNAL=$(I_64_M3) $(INSTALL) -F $(INSTDIR_64_M3_INTERNAL)
INST_64_M4_INTERNAL=$(I_64_M4) $(INSTALL) -F $(INSTDIR_64_M4_INTERNAL)
INST_N32=$(I_N32) $(INSTALL) -F $(INSTDIR_N32)
INST_N32_M3=$(I_N32_M3) $(INSTALL) -F $(INSTDIR_N32_M3)
INST_N32_M4=$(I_N32_M4) $(INSTALL) -F $(INSTDIR_N32_M4)
INST_N32_NS=$(I_N32) $(INSTALL) -F $(INSTDIR_N32_NS)
INST_N32_M3_NS=$(I_N32_M3) $(INSTALL) -F $(INSTDIR_N32_M3_NS)
INST_N32_M4_NS=$(I_N32_M4) $(INSTALL) -F $(INSTDIR_N32_M4_NS)
INST_N32_DEBUG=$(I_N32) $(INSTALL) -F $(INSTDIR_N32_DEBUG)
INST_N32_M3_DEBUG=$(I_N32_M3) $(INSTALL) -F $(INSTDIR_N32_M3_DEBUG)
INST_N32_M4_DEBUG=$(I_N32_M4) $(INSTALL) -F $(INSTDIR_N32_M4_DEBUG)
INST_N32_INTERNAL=$(I_N32) $(INSTALL) -F $(INSTDIR_N32_INTERNAL)
INST_N32_M3_INTERNAL=$(I_N32_M3) $(INSTALL) -F $(INSTDIR_N32_M3_INTERNAL)
INST_N32_M4_INTERNAL=$(I_N32_M4) $(INSTALL) -F $(INSTDIR_N32_M4_INTERNAL)
# include releasedefs && normal commondefs
include $(ROOT)/usr/include/make/releasedefs
include $(ROOT)/usr/include/make/commondefs
#
# The following macros can be used to turn on and off command lines
# based on target style
# Set PTARGETS to be an appropriate set of TARGETS based on the STYLES_TO_BUILD
# macro.
#
I_32_M2=\#
I_32=\#
I_32_ABI=\#
I_N32_M3=\#
I_N32_M4=\#
I_N32=\#
I_64_M3=\#
I_64_M4=\#
I_64=\#
I_64_ABI=\#
#
# for backward compatibility/sanity permit anything that doesn't match our
# naming conventions (gets libx.a)
#
PTARGETS+=$(LIBS:M?*.a:N?*_64?*:N?*_32?*:N?*_n32?*:N?*_abi?*:N?*_ns.a)
#if $(STYLES_TO_BUILD:M32) == "32"
I_32=
PTARGETS+=$(LIBS:M?*_32.a) $(LIBS:M?*_32_ns.a)
# for backward compatibility we really want to permit libx_ns.a
PTARGETS+=$(LIBS:M?*_ns.a:N?*_64?*:N?*_32?*:N?*_n32?*)
#endif
#if $(STYLES_TO_BUILD:M32_M2) == "32_M2"
I_32_M2=
PTARGETS+=$(LIBS:M?*_32_M2.a) $(LIBS:M?*_32_M2_ns.a)
#endif
#if $(STYLES_TO_BUILD:M32_ABI) == "32_ABI"
I_32_ABI=
PTARGETS+=$(LIBS:M?*_32_abi.a)
# for backward compatibility we really want to permit libx_abi.a
PTARGETS+=$(LIBS:M?*_abi.a:N?*_64?*:N?*_32?*:N?*_n32?*)
#endif
#if $(STYLES_TO_BUILD:MN32_M3) == "N32_M3"
I_N32_M3=
PTARGETS+=$(LIBS:M?*_n32_M3.a) $(LIBS:M?*_n32_M3_ns.a)
#endif
#if $(STYLES_TO_BUILD:MN32_M4) == "N32_M4"
I_N32_M4=
PTARGETS+=$(LIBS:M?*_n32_M4.a) $(LIBS:M?*_n32_M4_ns.a)
#endif
#if $(STYLES_TO_BUILD:MN32) == "N32"
I_N32=
PTARGETS+=$(LIBS:M?*_n32.a) $(LIBS:M?*_n32_ns.a)
#endif
#if $(STYLES_TO_BUILD:M64_M3) == "64_M3"
I_64_M3=
PTARGETS+=$(LIBS:M?*_64_M3.a) $(LIBS:M?*_64_M3_ns.a)
#endif
#if $(STYLES_TO_BUILD:M64_M4) == "64_M4"
I_64_M4=
PTARGETS+=$(LIBS:M?*_64_M4.a) $(LIBS:M?*_64_M4_ns.a)
#endif
#if $(STYLES_TO_BUILD:M64) == "64"
I_64=
# permit _64ns.a for backward compatibility...
PTARGETS+=$(LIBS:M?*_64.a) $(LIBS:M?*_64_ns.a) $(LIBS:M?*_64ns.a)
#endif
#if $(STYLES_TO_BUILD:M64_ABI) == "64_ABI"
I_64_ABI=
PTARGETS+=$(LIBS:M?*_64_abi.a)
#endif
TARGETS=$(PTARGETS)
# whatever targets there are - add all shared versions as DSOs
#if !defined(NOSO)
TARGETS+=$(PTARGETS:N?*_ns.a:N?*_64ns.a:N?*_abi.a:N?*_noso_?*:.a=.so)
#endif
# add .so's for abi libs if requested
#if defined(ABISO)
TARGETS+=$(PTARGETS:M?*_abi.a:.a=.so)
#endif
#if (defined(MULTIDIR) || (defined(ALTLIBS) && !empty(ALTLIBS)))
.NOTPARALLEL:
COMMONPREF=lib
SUBDIRS=$(BASELIBSRCDIR) $(ALTLIBS:.a=)
# DESCENDERS are subdirectories that will be descended into using a .EXEC
# rule so that their targets are not deemed out of date
DESCENDERS=$(BASELIBSRCDIR)DESCEND $(ALTLIBS:S/.a/DESCEND/g)
# base dir needs no special setup
NOSETUPDIRS=$(BASELIBSRCDIR)SETUPDIR
#endif
#
# If there are multiple versions, we set up macros to help duplicate
# (via tlink) the base library source
#
#if defined(ALTLIBS) && !empty(ALTLIBS)
.NOTPARALLEL:
# The alternate libraries need to be 'setup' (via tlink)
# never copy Makedepend!
LINKSOURCES=$(TLINK) -r -x '^.*\.[oai]$$' -x '^.*\.so$$' -x 'versiondefs' -x $(MKDEPFILE) $(PRIVATEFILES)
RMSOURCES=rm -fr $(ALTLIBS:.a=)
SETUPDIRS=$(ALTLIBS:S/.a/SETUPDIR/g)
#endif
#
# If we're a single level single version library, include libleaf{defs,rules}
#
#if !(defined(MULTIDIR) || (defined(ALTLIBS) && !empty(ALTLIBS)))
INCLUDEDATROOT=yes
include $(ROOT)/usr/include/make/libleafdefs
#endif

View File

@@ -0,0 +1,114 @@
#
# $Revision: 1.12 $
#
# Commonrules for library top level makefiles
# Handle:
# MULTIDIR - library has no source at top level, all source
# is under BASELIBSRCDIR (without the .a)
# ALTLIBS - library has alternate compilation forms
# this REQUIRES a multiple directory setup for source
#
.PRECIOUS:$(TARGETS)
#if (defined(MULTIDIR) || (defined(ALTLIBS) && !empty(ALTLIBS)))
$(BASELIB):$(BASELIBSRCDIR)DESCEND
$(ALTLIBS):$(.TARGET:S/.a/DESCEND/)
#
# By using a .EXEC target the fact that we descend doesn't automatically
# force the libraries logical mod time to change (thus causing things like
# .so libs that depend on the .a to rebuild)
#
$(DESCENDERS)!$(.TARGET:S/DESCEND/SETUPDIR/) .EXEC
cd $(.TARGET:S/DESCEND//); $(MAKE)
#
# get -n to work a bit - this will cause the tlinks to link even if -n
# is specified
#
.MAKE:$(DESCENDERS) $(SETUPDIRS)
# The base lib needs no setup
$(NOSETUPDIRS)!
# there are only targets at the top level
rmtargets!$(COMMONPREF)$$@
clobber!$(COMMONPREF)$$@
$(RMSOURCES)
$(SUBDIRS_MAKERULE)
clean!$(COMMONPREF)$$@
$(SUBDIRS_MAKERULE)
#
# handy rule to simply rebuild .a's that have .so's
#
dsos! $(LIBS:N?*ns.a:.a=.so)
#endif
#if defined(ALTLIBS) && !empty(ALTLIBS)
#
# We really want to tlink every time just to be sure, by using a .EXEC
# target we don't get penalized for this
#
$(SETUPDIRS)!.EXEC
$(LINKSOURCES) $(BASELIBSRCDIR) $(.TARGET:S/SETUPDIR//)
rm -f $(.TARGET:S/SETUPDIR//)/versiondefs
ln -sf ../$(.TARGET:S/SETUPDIR/versiondefs/) $(.TARGET:S/SETUPDIR//)/versiondefs
$(SUBDIRS_LINKRULE)
#endif
include ${COMMONRULES}
# add dependency on export files - this isn't quite correct since
# it means that ALL .a's and all so's depend on every export file ..
$(TARGETS):$(DSOEXPORTS) \
$(DSOEXPORTS_32) \
$(DSOEXPORTS_32_ABI) \
$(DSOEXPORTS_N32) \
$(DSOEXPORTS_64) \
$(DSOEXPORTS_64_ABI)
#
# Inference rule for creating a share object from a library.
#
.SUFFIXES: .a .so
#
# The real messy rule at the end is a backward compat rule
# Note that when building .so versions of ABI libs, we don't link
# against any other libraries - this is mainly because we can't
# link against libc.so (the abi version).
# At some point it might be necessary to permit linking against
# some DSO's while not linking against libc ...
#
.a.so:
$(LD) \
$(.IMPSRC:M?*_32.a:S/$(.IMPSRC)/$(LDOPTS_32) $(LDDSOOPTS_32)/) \
$(.IMPSRC:M?*_32_M2.a:S/$(.IMPSRC)/$(LDOPTS_32_M2) $(LDDSOOPTS_32)/) \
$(.IMPSRC:M?*_32_abi.a:S/$(.IMPSRC)/$(LDOPTS_32_ABI) $(LDDSOOPTS_32_ABI)/) \
$(.IMPSRC:M?*_r32.a:S/$(.IMPSRC)/$(LDOPTS_R32) $(LDDSOOPTS_R32)/) \
$(.IMPSRC:M?*_n32.a:S/$(.IMPSRC)/$(LDOPTS_N32) $(LDDSOOPTS_N32)/) \
$(.IMPSRC:M?*_n32_M3.a:S/$(.IMPSRC)/$(LDOPTS_N32_M3) $(LDDSOOPTS_N32)/)\
$(.IMPSRC:M?*_n32_M4.a:S/$(.IMPSRC)/$(LDOPTS_N32_M4) $(LDDSOOPTS_N32)/)\
$(.IMPSRC:M?*_64.a:S/$(.IMPSRC)/$(LDOPTS_64) $(LDDSOOPTS_64)/) \
$(.IMPSRC:M?*_64_M3.a:S/$(.IMPSRC)/$(LDOPTS_64_M3) $(LDDSOOPTS_64)/) \
$(.IMPSRC:M?*_64_M4.a:S/$(.IMPSRC)/$(LDOPTS_64_M4) $(LDDSOOPTS_64)/) \
$(.IMPSRC:M?*_64_abi.a:S/$(.IMPSRC)/$(LDOPTS_64_ABI) $(LDDSOOPTS_64_ABI)/) \
$(.IMPSRC:M?*.a:N?*_64?*:N?*_32?*:N?*_n32?*:N?*_abi?*:N?*_r32?*:S/$(.IMPSRC)/$(LDOPTS_32) $(LDDSOOPTS_32)/) \
$(.IMPSRC) \
$(.IMPSRC:N?*_abi.a:S/$(.IMPSRC)/$(LDLIBS)/) \
-o $(.TARGET)
#
# If we're a single level single version library,
# include libleaf{defs,rules}
#
#if !(defined(MULTIDIR) || (defined(ALTLIBS) && !empty(ALTLIBS)))
INCLUDEDATROOT=yes
include $(LIBLEAFRULES)
#endif

View File

@@ -0,0 +1 @@
FINALIDB=256pfinalidb

View File

@@ -0,0 +1 @@
FINALIDB=finalidb

View File

@@ -0,0 +1 @@
FINALIDB=finalidb

View File

@@ -0,0 +1,138 @@
# Every time we clone a new tree, i.e. every time you need to change
# the RELEASE macro, you will need to consider each of the macro's in this
# group. RELEASE_NUM must be < 214 and preserves the monotonicity of the
# inst version numbers. See man page for mkversionnum for more details.
# RELEASE_NAME is the human readable product name string for hardware
# specific releases. it must be empty (no spaces or anything) for the
# base release. It should match reasonably well the label printed on the CD
RELEASE=6.5
RELEASE_MAJOR=6
RELEASE_MINOR=5
RELEASE_MAINT=0
RELEASE_NUM=127
RELEASE_NAME=6.5.7m
#
# Default STYLE for binaries - this sets what the base level (i.e. no
# explicit makefile flags) binaries will be made up of. This defines
# both the ABI and ISA defaults.
#
# Note that 'make'-files (as opposed to 'smake'-files) will use
# DEF_CSTYLE and DEF_GLDOPTS - and OBJECT_STYLE will be set to
# DEF_OBJECT_STYLE - thus ALL 3 must agree for both make/smake-files
# to produce the same results.
# The 'DEF_GLDOPTS/DEF_CSTYLE' is for makefiles that have no specific
# ABI/ISA requirements
#
# If DEF_CSTYLE should change then LIB_LOCATION and ROOTRLDNAME should also
# reflect the change to the DEF_CSTYLE.
#
DEF_CSTYLE=$(CSTYLE_N32_M3)
DEF_GLDOPTS=$(GLDOPTS_N32_M3)
#
# LIB_LOCATION is for Makefile's who have hardcoded pathnames
# to a lib. For example,
# LLDLIBS=$(ROOT)/usr/lib/libw.a
# should be changed to ...
# LLDLIBS=$(ROOT)/usr/$(LIB_LOCATION)/libw.a
#
# This way when the default object style changes we only
# need to change it here.
#
LIB_LOCATION=lib32
#
# Set ROOTRLDNAME for the correct default object style.
#
ROOTRLDNAME=$(ROOTRLDNAME_N32)
#
# Define default OBJECT_STYLE - this can be changed to 'N32' to
# change ALL makefiles that don't explicitly set OBJECT_STYLE
# The '32_' and '64_' defines can be used in makefiles that need to
# compile both 32 and 64 bit versions but just want 1 of each and to
# pick up the current favorite.
# setting OBJECT_STYLE=$(DEF_32_OBJECT_STYLE) in a versiondefs file
# would permit it to be easily changed to compile N32.
#
DEF_OBJECT_STYLE=N32_M3
DEF_32_OBJECT_STYLE=N32_M3
DEF_64_OBJECT_STYLE=64
#
# default ISA's for 32, N32, and 64 bit programs
# If a makefile specifies OBJECT_STYLE={32, N32, 64} this is what they'll get
#
DEF_CSTYLE_32 = $(CSTYLE_32_M2)
DEF_CSTYLE_N32 = $(CSTYLE_N32_M3)
DEF_CSTYLE_64 = $(CSTYLE_64_M3)
DEF_GLDOPTS_32 = $(GLDOPTS_32_M2)
DEF_GLDOPTS_N32 = $(GLDOPTS_N32_M3)
DEF_GLDOPTS_64 = $(GLDOPTS_64_M3)
#
# For this release - which styles should be built? Built from the list in
# commondefs
#
STYLES_TO_BUILD=32 32_M2 32_ABI N32 N32_M3 N32_M4 64 64_M3 64_M4 64_ABI
#
# Turn on generation of api information for libraries built using the
# libcommondefs/libcommonrules conventions. To override this setting
# for a given library, add "NO_CHECK_API=1" to the appropriate
# versiondefs files
#
# (temporarily undefining CHECK_API pending 7.2+ linker fixes)
# CHECK_API=1
# this only needs to be changed when doing a hardware specific OS release.
# See man page for mkversionnum for more details.
TREE_ID=0
#
# Since different compiler suites have different options, makefiles
# can use the following to differentiate between them so a single source
# makefile can build for many ABIs using different toolroots
#
# C - possible values are:
# CFE - which is in the compiler 3.xx ucode release
# RAGNAROK - which is in the compiler 4.xx release
# MONGOOSE - compiler in 7.xx release
#
# C++ -
# CFRONT - in the 3.xx release uses ATT cfront translator
# NCC - in the 3.19 compiler release with irix 5.2+ - uses new
# Edison front end
# RAGNAROK - in the compiler 4.x release - uses same front end as
# the C compiler
# MONGOOSE - compiler in 7.xx release
# LD -
# RAGNAROK - in the compiler 4.x release (same for MONGOOSE)
# UCODE - in the 3.xx release
#
# We differentiate between different ABIs since that is often where
# one set of compilers gets ahead of the other(s)
#
# For smake builds only, we can specify an environment variable
# to enable MONGOOSE compilers
# This test is first so everything still defaults to RAGNAROK for make.
# Compiler values :
# VCC* == C compiler, VCXX* == C++ compiler
# -o32
VCC32=CFE
VCXX32=NCC
# -N32
VCCN32=MONGOOSE
VCXXN32=MONGOOSE
# -N64/64
VCC64=MONGOOSE
VCXX64=MONGOOSE
# LD - see above for comments
VLD32=RAGNAROK
VLDN32=RAGNAROK
VLD64=RAGNAROK

View File

@@ -0,0 +1,488 @@
# Rationales for an official so_locations file:
# 1) to save kernel space reserved for page table -- each active
# 4Meg of user virtual space requires 4K of kernel page table space;
# 2) to save kernel virtual space (tlb) required to map each page of
# page tables.
# 3) to give rqsall information to help it place all the libraries so
# that they quickstart.
#
# 1) Put all libraries that you think are likely to be linked by the same
# program in the same 4Meg segment. This saves kernel page table space
# and can potentially speed up the program.
#
# 2) Allow adequate space between 4Meg segments of non-related libraries
# so that redistribution of one ISM type does not mess up other ISMs.
#
# 3) All libraries should be listed. If packing isn't an issue
# then use the 'catch-all' range at the end.
# 4) There are 2 ways to pack - take a 4Mb chunk and have each .so
# specify the entire 4Mb range. ld(1) will do the packing.
# This has the advantage of dealing well with one or more
# libraries changing size - each build will straighten things out
# unless the total size gets too large. It has a few disadvantages:
# a) if you have more than one version of the library with the same
# soname (this file matches on soname), and one is alot
# large than the other, you can run into trouble if
# the smaller one is built first, then another library in the
# range is built, followed by the larger version. The larger
# version won't fit.
# b) if the libraries come from different isms and something goes
# wrong with the build, its more likely that libraries
# will collide.
# The second way is to create a separate range for each .so. This
# will guarentee no overlaps, but of course if the library grows
# too large ...
# 5) Don't put libs in here that aren't shipped - we'll run out of space!
#
# This file is used for both o32 and n32
#
# The range 0x0f800000-0x0fc00000 is reserved for system related libraries.
# rld heap (128K max) at 0x0fbe0000 (rld heap can grow beyond 0x0fc00000).
rld.heap \
:st = $range 0x0fbe0000, 0x00020000:\
:st = .data 0x0fbe0000, 0x00020000:\
# rld text (384 K max) at 0x0fb60000, data (128 K max) at 0x0fbc0000
# this is so that we can reserve this slot for rld.
rld \
:st = $range 0x0fb60000, 0x000080000:\
:st = .text 0x0fb60000, 0x00060000:\
:st = .data 0x0fbc0000, 0x00020000:\
#
# we explicitly set the text and data since all h*ll breaks out if
# we ever have data below text
#
libc.so.1 \
:st = $range 0x0fa00000, 0x000160000:\
:st = .text 0x0fa00000, 0x00140000:\
:st = .data 0x0fb40000, 0x00020000:\
libcurses.so \
:st = $range 0x0f9b0000, 0x000050000:
libadm.so \
:st = $range 0x0f980000, 0x000030000:
libcrypt.so \
:st = $range 0x0f960000, 0x000020000:
libdl.so \
:st = $range 0x0f940000, 0x000020000:
libgen.so \
:st = $range 0x0f920000, 0x000020000:
libmalloc.so \
:st = $range 0x0f900000, 0x000020000:
librpcsvc.so \
:st = $range 0x0f8e0000, 0x000020000:
libw.so \
:st = $range 0x0f8c0000, 0x000020000:
libC.so \
:st = $range 0x0f890000, 0x000030000:
libC.so.2 \
:st = $range 0x0ac00000, 0x00400000:\
libm.so \
:st = $range 0x0f830000, 0x000060000:
libmutex.so \
:st = $range 0x0f810000, 0x000020000:
# The range 0x0f400000-0x0f800000 is reserved for X libraries
libX11.so.1 \
:st = $range 0x0f400000, 0x400000:
libXt.so \
:st = $range 0x0f400000, 0x400000:
libXaw.so.2 \
:st = $range 0x0f400000, 0x400000:
libXmu.so \
:st = $range 0x0f400000, 0x400000:
libXext.so \
:st = $range 0x0f400000, 0x400000:
libXi.so \
:st = $range 0x0f400000, 0x400000:
libXpm.so.1 \
:st = $range 0x0f400000, 0x400000:
# The range 0x0e800000-0x0ec00000 is currently reserved for future expansion
# of the above X libraries.
reserv1 \
:st = $range 0x0e800000, 0x400000:
# The range 0x0f000000-0x0f400000 is reserved for libgl,libfm,libgltrace
# we give libgl its own space since it generates potentially lots of versions
libfm.so \
:st = $range 0x0f200000, 0x200000:
libgltrace.so \
:st = $range 0x0f160000, 0x0a0000:
libgl.so \
:st = $range 0x0f000000, 0x160000:
# The range 0x0ec00000-0x0f000000 is currently reserved for future expansion
# of the above gl and font manager libraries.
reserve2 \
:st = $range 0x0ec00000, 0x400000:
# The range 0x0e400000 - 0x0e800000 is reserved for libraires used by toto
libCadmin.so \
:st = $range 0x0e400000, 0x400000:
# The range 0x0dc00000 - 0x0e400000 is reserved for image libraries (IFL/IL)
libifl.so \
:st = $range 0x0dc00000, 0x800000:
libil.so \
:st = $range 0x0dc00000, 0x800000:
libilVk.so \
:st = $range 0x0dc00000, 0x800000:
libiflJFIF.so \
:st = $range 0x0dc00000, 0x800000:
libiflTIFF.so \
:st = $range 0x0dc00000, 0x800000:
libiflFIT.so \
:st = $range 0x0dc00000, 0x800000:
libiflGIF.so \
:st = $range 0x0dc00000, 0x800000:
libiflPNG.so \
:st = $range 0x0dc00000, 0x800000:
libiflSGI.so \
:st = $range 0x0dc00000, 0x800000:
libiflPPM.so \
:st = $range 0x0dc00000, 0x800000:
libiflPhotoCD.so \
:st = $range 0x0dc00000, 0x800000:
libiflRaw.so \
:st = $range 0x0dc00000, 0x800000:
libcifl.so \
:st = $range 0x0dc00000, 0x800000:
libcil.so \
:st = $range 0x0dc00000, 0x800000:
libiflAlias.so \
:st = $range 0x0dc00000, 0x800000:
libiflSOFTIMAGE.so \
:st = $range 0x0dc00000, 0x800000:
libilTCL.so \
:st = $range 0x0dc00000, 0x800000:
libiflYUV.so \
:st = $range 0x0dc00000, 0x800000:
libilMon.so \
:st = $range 0x0dc00000, 0x800000:
# The range 0x0d800000 - 0x0dc00000 is reserved for opengl/gl libraires
# see also 0x0a800000
# In order to prevent libGLcore from getting crowded out, we break the
# bottom 4MB into two 2MB pieces and give one to libGLcore.
libGL.so \
:st = $range 0x0d800000, 0x200000:
libGLcore.so \
:st = $range 0x0da00000, 0x200000:
# The range 0x0d400000 - 0x0d800000 is reserved for libraries used by toto
libvkSGI.so.1 \
:st = $range 0x0d400000, 0x400000:
libvkhelp.so.1 \
:st = $range 0x0d400000, 0x400000:
libvk.so.1 \
:st = $range 0x0d400000, 0x400000:
libvkmsg.so.1 \
:st = $range 0x0d400000, 0x400000:
libdesktopUtil.so \
:st = $range 0x0d400000, 0x400000:
libdesktopIcon.so \
:st = $range 0x0d400000, 0x400000:
libdesktopFileicon.so \
:st = $range 0x0d400000, 0x400000:
libvkwebhelp.so.1 \
:st = $range 0x0d400000, 0x400000:
libhelpmsg.so \
:st = $range 0x0d400000, 0x400000:
libdesktopGallery.so \
:st = $range 0x0d400000, 0x400000:
# tooltalk
libtt.so \
:st = $range 0x0d400000, 0x400000:
# The range 0x0d000000 - 0x0d400000 is reserved for dmedia libraries
libaudiofile.so \
:st = $range 0x0d000000, 0x400000:
libaudioutil.so \
:st = $range 0x0d000000, 0x400000:
libmidi.so \
:st = $range 0x0d000000, 0x400000:
libawareaudio.so \
:st = $range 0x0d000000, 0x400000:
libdmedia.so \
:st = $range 0x0d000000, 0x400000:
libmediaclient.so \
:st = $range 0x0d000000, 0x400000:
libaudio.so \
:st = $range 0x0d000000, 0x400000:
libvice.so \
:st = $range 0x0d000000, 0x400000:
libVkCapture.so \
:st = $range 0x0d000000, 0x400000:
# The range 0x0cc00000 - 0x0d000000 is reserved for il8n libraries
libwnn.so \
:st = $range 0x0cc00000, 0x400000:
libjgl.so \
:st = $range 0x0cc00000, 0x400000:
libXawI18n.so \
:st = $range 0x0cc00000, 0x400000:
# The double range 0x0c400000-0x0cc00000 is reserved for Inventor libraries.
# Note: n32 inventor is bigger than 1 block, but o32 fits.
libInventor.so.3 \
:st = $range 0x0c670000, 0x00590000:
libInventorXt.so.3 \
:st = $range 0x0c400000, 0x00270000:
# The range 0x0c000000 - 0x0c400000 is reserved for lesser used system libs
libpthread.so \
:st = $range 0x0c000000, 0x400000:
libudma.so \
:st = $range 0x0c000000, 0x400000:
libl.so \
:st = $range 0x0c000000, 0x400000:
libmediad.so \
:st = $range 0x0c000000, 0x400000:
libpkg.so \
:st = $range 0x0c000000, 0x400000:
libnls.so \
:st = $range 0x0c000000, 0x400000:
libmx.so \
:st = $range 0x0c000000, 0x400000:
libgrio.so \
:st = $range 0x0c000000, 0x400000:
libdm.so \
:st = $range 0x0c000000, 0x400000:
libirixpmda.so \
:st = $range 0x0c000000, 0x400000:
libabi.so \
:st = $range 0x0c000000, 0x400000:
libarray.so \
:st = $range 0x0c000000, 0x400000:
libdisk.so \
:st = $range 0x0c000000, 0x400000:
libdpipe.so \
:st = $range 0x0c000000, 0x400000:
libnanothread.so \
:st = $range 0x0c000000, 0x400000:
librsvp.so \
:st = $range 0x0c000000, 0x400000:
libAS.so \
:st = $range 0x0c000000, 0x400000:
libprio.so \
:st = $range 0x0c000000, 0x400000:
libperfex.so \
:st = $range 0x0c000000, 0x400000:
libdprof.so \
:st = $range 0x0c000000, 0x400000:
libdplace.so \
:st = $range 0x0c000000, 0x400000:
libfetchop.so \
:st = $range 0x0c000000, 0x400000:
# The range 0x0bc00000 - 0x0c000000 is reserved for video libraries
libvl.so \
:st = $range 0x0bc00000, 0x400000:
Sirius.so \
:st = $range 0x0bc00000, 0x400000:
SiriusVL.so \
:st = $range 0x0bc00000, 0x400000:
vino.so \
:st = $range 0x0bc00000, 0x400000:
ev1.so \
:st = $range 0x0bc00000, 0x400000:
sv1.so \
:st = $range 0x0bc00000, 0x400000:
cl_cosmo.so \
:st = $range 0x0bc00000, 0x400000:
cosmo.so \
:st = $range 0x0bc00000, 0x400000:
# The range 0x0b800000 - 0x0bc00000 is reserved for less-used Motif librairies
libMrm.so.1 \
:st = $range 0x0b800000, 0x400000:
libUil.so.1 \
:st = $range 0x0b800000, 0x400000:
# The range 0x0b400000 - 0x0b800000 is reserved for SVR4 net libraries
libnsl.so \
:st = $range 0x0b400000, 0x400000:
libsocket.so \
:st = $range 0x0b400000, 0x400000:
nis.so \
:st = $range 0x0b400000, 0x400000:
resolv.so \
:st = $range 0x0b400000, 0x400000:
straddr.so \
:st = $range 0x0b400000, 0x400000:
tcpip.so \
:st = $range 0x0b400000, 0x400000:
# The range 0x0b000000 - 0x0b400000 is reserved for motif libraries
libXm.so.1 \
:st = $range 0x0b000000, 0x400000:
libSgm.so.1 \
:st = $range 0x0b000000, 0x400000:
# The range 0x0ac00000 - 0x0b000000 is reserved for other compiler libs
libexc.so \
:st = $range 0x0ac00000, 0x400000:
libftn.so \
:st = $range 0x0ac00000, 0x400000:
libfpe.so \
:st = $range 0x0ac00000, 0x400000:
libfastm.so \
:st = $range 0x0ac00000, 0x400000:
libmp.so \
:st = $range 0x0ac00000, 0x400000:
libcomplex.so \
:st = $range 0x0ac00000, 0x400000:
libm43.so \
:st = $range 0x0ac00000, 0x400000:
libCsup.so \
:st = $range 0x0ac00000, 0x400000:
# The range 0x0a800000 - 0x0ac00000 is reserved for other OpenGL libraries
libGLS.so \
:st = $range 0x0a800000, 0x400000:
libGLC.so \
:st = $range 0x0a800000, 0x400000:
libGLU.so \
:st = $range 0x0a800000, 0x400000:
libFL.so \
:st = $range 0x0a800000, 0x400000:
# The range 0x0a000000 - 0x0a800000 is reserved for cmplrs
libftn90.so \
:st = $range 0x0a000000, 0x800000:
libfortran.so \
:st = $range 0x0a000000, 0x800000:
libffio.so \
:st = $range 0x0a000000, 0x800000:
# Catch-all range
# If a .so is shipped, and its not in one of the above ranges - place it
# here. This is also where we place $start_address (for SGI build)
# so that any non-spec'd .so's will be placed somewhere in here.
# This range is from 0x02000000 -> 0x0a000000 - 128Mb.
libmd.so \
:st = $range 0x02000000, 0x08000000:
libmalloc_cv.so \
:st = $range 0x02000000, 0x08000000:
libMMmalloc.so \
:st = $range 0x02000000, 0x08000000:
libogldebug.so \
:st = $range 0x02000000, 0x08000000:
liblim.so \
:st = $range 0x02000000, 0x08000000:
libgd.so \
:st = $range 0x02000000, 0x08000000:
libwebviewer.so.1 \
:st = $range 0x02000000, 0x08000000:
libwio.so.1 \
:st = $range 0x02000000, 0x08000000:
libwioutil.so.1 \
:st = $range 0x02000000, 0x08000000:
libcwio.so.1 \
:st = $range 0x02000000, 0x08000000:
libwwwhelp.so \
:st = $range 0x02000000, 0x08000000:
libsgihelp.so \
:st = $range 0x02000000, 0x08000000:
libshowcaseui.so \
:st = $range 0x02000000, 0x08000000:
libshowcase_shareext.so \
:st = $range 0x02000000, 0x08000000:
libshowcase3d.so \
:st = $range 0x02000000, 0x08000000:
libcl.so \
:st = $range 0x02000000, 0x08000000:
libdmc.so \
:st = $range 0x02000000, 0x08000000:
libdn.so \
:st = $range 0x02000000, 0x08000000:
libsnmp.so \
:st = $range 0x02000000, 0x08000000:
libX11.so.2 \
:st = $range 0x02000000, 0x08000000:
libblas.so \
:st = $range 0x02000000, 0x08000000:
libblas_mp.so \
:st = $range 0x02000000, 0x08000000:
libufm.so \
:st = $range 0x02000000, 0x08000000:
libMediaViewer.so \
:st = $range 0x02000000, 0x08000000:
libfxplugmgr.so \
:st = $range 0x02000000, 0x08000000:
libfxplugutils.so \
:st = $range 0x02000000, 0x08000000:
libmpi.so \
:st = $range 0x02000000, 0x08000000:
libsma.so \
:st = $range 0x02000000, 0x08000000:
libpvm3.so \
:st = $range 0x02000000, 0x08000000:
libpvm3-i8.so \
:st = $range 0x02000000, 0x08000000:
libst.so \
:st = $range 0x02000000, 0x08000000:
# tcl libs
libOratcl.so \
:st = $range 0x02000000, 0x08000000:
libSybtcl.so \
:st = $range 0x02000000, 0x08000000:
libitcl.so \
:st = $range 0x02000000, 0x08000000:
libtclObjSrv.so \
:st = $range 0x02000000, 0x08000000:
libtkGLXAux.so \
:st = $range 0x02000000, 0x08000000:
libtkGLX.so \
:st = $range 0x02000000, 0x08000000:
libexpectk.so \
:st = $range 0x02000000, 0x08000000:
libtclMotif.so \
:st = $range 0x02000000, 0x08000000:
libexpect.so \
:st = $range 0x02000000, 0x08000000:
libtkX.so \
:st = $range 0x02000000, 0x08000000:
libtclX.so \
:st = $range 0x02000000, 0x08000000:
libtcl.so \
:st = $range 0x02000000, 0x08000000:
libpvtcl.so \
:st = $range 0x02000000, 0x08000000:
# Performance Co-Pilot libraries and PMDAs
libpcp.so.1 \
:st = $range 0x02000000, 0x08000000:
libpcp_lite.so.1 \
:st = $range 0x02000000, 0x08000000:
libpcp_pmda.so \
:st = $range 0x02000000, 0x08000000:
libpcp_wio.so \
:st = $range 0x02000000, 0x08000000:
libpcp_wioutil.so \
:st = $range 0x02000000, 0x08000000:
libpcp_socks.so \
:st = $range 0x02000000, 0x08000000:
pmda_pmcd.so \
:st = $range 0x02000000, 0x08000000:
pmda_proc.so \
:st = $range 0x02000000, 0x08000000:
pmda_environ.so \
:st = $range 0x02000000, 0x08000000:
libvkpcp.so \
:st = $range 0x02000000, 0x08000000:
# All DSO's need to be below 0x10000000 (start of data/heap). This is so
# that we don't use up valuable heap/stack space by fragmenting
# the address space. So we pile them all in below 0x0a000000.
$start_address=0x0a000000

View File

@@ -0,0 +1,272 @@
# Rationales for an official so_locations file:
#
# See the /usr/lib/so_locations file for a complete rundown. For 64 bits
# the packing issue really isn't important since each 'segment' maps 64Mb.
# So, to make this all easier, we define rld/libc and simply carve out a large
# segment for everyone else...
#
# rld heap (128K max) at 0x000000000fbe0000 (rld heap can grow beyond 0x000000000fc00000).
rld.heap \
:st = $range 0x000000000fbe0000, 0x0000000000020000:\
:st = .data 0x00000000fbe0000, 0x0000000000020000:\
# this reserves space for rld
rld \
:st = $range 0x000000000fb50000, 0x0000000000080000:\
:st = .text 0x000000000fb50000, 0x0000000000070000:\
:st = .data 0x000000000fbc0000, 0x0000000000020000:\
#
# we explicitly set the text and data since all h*ll breaks out if
# we ever have data below text
#
libc.so.1 \
:st = $range 0x000000000d980000, 0x00000000001d0000:\
:st = .text 0x000000000d980000, 0x00000000001a0000:\
:st = .data 0x000000000fb20000, 0x0000000000030000:\
#
# Catch-all range. All other libraries go in this 217Mb range
#
# 0x0000000002000000->0x000000000d980000
#
# IRIX libraries
#
libcurses.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libnsl.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libsocket.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
librpcsvc.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libgen.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libmalloc.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libw.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libm.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libmutex.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libpthread.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libC.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libarray.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
liblim.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libl.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libcrypt.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libgrio.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libudma.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libabi.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libtt.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libirixpmda.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libdm.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libfetchop.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libdisk.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libdpipe.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libnanothread.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
librsvp.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libAS.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libprio.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libperfex.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libdplace.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libdprof.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libmpi.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libsma.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libpvm3.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libpvm3-i8.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libst.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
#
# X libraries
#
libX11.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libXt.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libXaw.so.2 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libXmu.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libXext.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libXi.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libXpm.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
#
# Motif
#
libXm.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libMrm.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libUil.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
#
# Open GL
#
libGL.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libGLcore.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libGLU.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libGLS.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libGLC.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libFL.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libogldebug.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libufm.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
#
# Desktop
#
libCadmin.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libSgm.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libdesktopFileicon.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libvk.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libvkhelp.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libvk.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libvkhelp.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libvkmsg.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libvkSGI.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libvkwebhelp.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libhelpmsg.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
#
# Compilers
#
libMMmalloc.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libcomplex.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libexc.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libfastm.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libfpe.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libm43.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libmp.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libftn90.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libftn.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libmx.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libC.so.2 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libCsup.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libblas.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libblas_mp.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libfortran.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libffio.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
#
# Etc.
#
libInventor.so.3 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libInventorXt.so.3 \
:st = $range 0x0000000002000000, 0x000000000b980000:
#
# Performance Co-Pilot libraries and PMDAs
#
libpcp.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libpcp_lite.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libpcp_wio.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libpcp_wioutil.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libpcp_socks.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
pmda_pmcd.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
pmda_proc.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
pmda_environ.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
#
# Digital Media libraries
#
libaudiofile.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libaudioutil.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libmidi.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libawareaudio.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libdmedia.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libaudio.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libmediaclient.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
# Other libraries to follow
# We pick the following number since that is the default starting
# point for mmap() - which will allocate upwards, and ld will allocate
# downwards.
# Do not change the following line
# Non SGI libraries should be below 0x0000004000000000 (1/4Tb)
$start_address=0x0000004000000000

View File

@@ -0,0 +1,146 @@
#
# Startversion target - generate version number (and alpha number) in a
# standard fashion
# Input
# - TOOLROOT macro is set to point to tools to use for this build.
# - mkversionnum and showversionnum available in $(TOOLROOT). These
# are part of the buildtools ism
# - include $(ROOT)/usr/include/make/releasedefs at the same level you
# include this file. This provides the definition of the
# TREE_ID and RELEASE_NUM macros
# - The WORKAREA environment variable pointing to a writable directory.
# Typically, this is a ptools workarea containing one or more
# ISMs. The version number generated applies to all of these
# ISMs.
# - set the following macros as needed
# BUILDER - (to 1 if project build, to 2 if build group build)
# defaults to 0 (developer build).
# TREE_ID - to an integer 1-9 to distinguish parallel OS efforts
# targeted to new hardware.
# It will default to the value of TREE_ID found in
# $(ROOT)/usr/include/make/releasedefs.
# PATCH_RELEASE - if creating a patch release (will default to first eight
# digits of $(WORKAREA)/.version_number)
# PATCH_NUM - patch number (sequences patch releases)
# VNUM_OVERRIDE - a ten digit version number to be directly used.
# This option is provided as a hook and should rarely if ever be
# used.
# Output
# - $(WORKAREA)/.version_number - the ten digit version number
# - $(WORKAREA)/.alpha_number - the alpha number portion of the
# version number
# Algorithm
#
# If PATCH_NUM is set then a patch release version number is generated.
# Else if VNUM_OVERRIDE is set then it will be used as the version number.
# Else a regular version number is generated.
#
# Patch version number
#
# first eight digit are PATCH_RELEASE if it is set.
# Else first eight digits of $(WORKAREA)/.version_number.
# It is and error for both PATCH_RELEASE and
# $(WORKAREA)/.version_number to be unset.
#
# last two digits are 30 + (PATCH_NUM mod 70).
# first eight digits generated above are (potentially)
# modified by adding PATCH_NUM/70 (this should rarely happen).
#
# Regular version number
#
# first three digits are RELEASE_NUM.
#
# next five digits are the number of hours since
# January 1, 1993 and are generated by the mkversionnum
# command.
#
# next digit is BUILDER.
#
# last digit is TREE_ID.
#
# Alpha number
# is the fourth thru eighth digits from the version number
# generated by the above steps. These five digits are the alpha
# number portion of the version number and are the number of
# hours since Jan 1, 1993.
#
#ident "$Revision: 1.8 $"
VNUM=$(WORKAREA)/.version_number
ANUM=$(WORKAREA)/.alpha_number
MKVERSIONNUM=$(TOOLROOT)/usr/sbin/mkversionnum
SHOWVERSIONNUM=$(TOOLROOT)/usr/sbin/showversionnum
# The file where the .o file with the ident string lives.
# Build this into all files, by building with RLS_ID_OBJECT=${V_IDENTFILE}
# in the environment. The cc driver automatically passes this to ld
## if set, as the last item on the ld line. No problem for standalone
# because all standalone (coff) programs use ld rather than the driver.
# variable constructed so the 3.18 (late alpha) ld recognizes the file
# as "PIC-neutral", so it can be used with shared and -non_shared
# binaries. Written so both ident and what show a meaningful string on
# all resulting binaries.
# This one definitely uses the TOOLROOT compiler; do not use $(CCF)
# because this may be included in Makefiles that do not define it.
V_IDENTFILE=${WORKAREA}/.identfile.o
V_IDENTFILE_64=${WORKAREA}/.ident_64.o
V_IDENTFILE_N32=${WORKAREA}/.ident_n32.o
# want this for the basic system release number for V_IDENTFILE
sinclude $(ROOT)/usr/include/make/releasedefs
startversion:
@if [ "$(WORKAREA)" = "" ]; then \
echo "You must set the WORKAREA environment variable"; \
exit 1; \
fi
@if [ "$(PATCH_NUM)" ]; then \
if [ "$(PATCH_RELEASE)" ]; then \
newvnum=`$(MKVERSIONNUM) -P "$(PATCH_RELEASE)" \
-p "$(PATCH_NUM)"` ; \
else \
patrel=`cat $(VNUM)`; \
newvnum=`$(MKVERSIONNUM) -P "$$patrel" -p "$(PATCH_NUM)"`;\
fi; \
else \
newvnum=`$(MKVERSIONNUM) -r "$(RELEASE_NUM)" -b "$(BUILDER)" \
-t "$(TREE_ID)" -f "$(VNUM_OVERRIDE)"` ; \
fi; \
echo "$$newvnum" > $(VNUM); \
echo "$$newvnum" | sed -e "s/...\(.....\)../\1/" > $(ANUM); \
$(SHOWVERSIONNUM) $$newvnum
#
#
@rm -f ${V_IDENTFILE}*
@echo 'const char __Release_ID[] = "@(#)\$$'Header: IRIX ${RELEASE}:`cat ${VNUM}` built `date +%D` at `hostname`:$$ROOT $$'";' > ${V_IDENTFILE}.c
@${TOOLROOT}/usr/bin/cc -mips1 -c ${V_IDENTFILE}.c -o ${V_IDENTFILE}
@echo Revision information that will go into all binaries is:
@ident ${V_IDENTFILE} 2>&1 | sed '/:$$/d'
@if [ "$$RLS_ID_OBJECT" != ${V_IDENTFILE} ]; then \
echo Warning: You do not have \$$RLS_ID_OBJECT set to ${V_IDENTFILE} in your environment ;\
echo If you do not do so, you will not get the o32bit ident string in the build;\
fi
#
#
@rm -f ${V_IDENTFILE_64}*
@echo 'const char __Release_ID[] = "@(#)$$'Header: IRIX ${RELEASE}:`cat ${VNUM}` built `date +%D` at `hostname`:$$ROOT $$'";' > ${V_IDENTFILE_64}.c
@echo 'static const char *p = __Release_ID;' >> ${V_IDENTFILE_64}.c
@${TOOLROOT}/usr/bin/cc -64 -mips3 -cckr -c ${V_IDENTFILE_64}.c -o ${V_IDENTFILE_64}
@if [ "$$RLS_ID_OBJECT64" != ${V_IDENTFILE_64} ]; then \
echo Warning: You do not have \$$RLS_ID_OBJECT64 set to ${V_IDENTFILE_64} in your environment ;\
echo If you do not do so, you will not get the 64bit ident string in the build;\
fi
#
#
@rm -f ${V_IDENTFILE_N32}*
@echo 'const char __Release_ID[] = "@(#)$$'Header: IRIX ${RELEASE}:`cat ${VNUM}` built `date +%D` at `hostname`:$$ROOT $$'";' > ${V_IDENTFILE_N32}.c
@echo 'static const char *p = __Release_ID;' >> ${V_IDENTFILE_N32}.c
@${TOOLROOT}/usr/bin/cc -n32 -mips3 -cckr -c ${V_IDENTFILE_N32}.c -o ${V_IDENTFILE_N32}
@if [ "$$RLS_ID_OBJECTN32" != ${V_IDENTFILE_N32} ]; then \
echo Warning: You do not have \$$RLS_ID_OBJECTN32 set to ${V_IDENTFILE_N32} in your environment ;\
echo If you do not do so, you will not get the n32bit ident string in the build;\
fi