%************************************************************************
%*									*
\section[mkworld-plat-mipsriscos]{Configuration stuff for MIPS machines running RISCos}
%*									*
%************************************************************************

Derived from the Paul DuBois's configuration stuff.

NOTES:

The MIPS RISC/os modifications are for MIPS machines running RISC/os 4.0
or later.

To make makefiles for RISC/os you MUST set your environment
variable JMAKEINCLUDE:
                setenv JMAKEINCLUDE "-I. -Dmipsriscos -DSYSTYPE_SYSV"
        (or)    setenv JMAKEINCLUDE "-I. -Dmipsriscos -DSYSTYPE_BSD"
as appropriate.  Cpp does not set these on RISC/os; cc does, but cc is not used
with jmake.

For RISC/os it is important that the compiler, linker, include files and
libraries be compatible with each other.  This can mostly be taken care of
by specifying the -systype {sysv,bsd43} option in the definition of CcCmd,
which will alert the compiler which versions of itself, the linker and
libraries are to be used, and for the most part, the proper include files.
This works whether your PATH setting causes /bin/cc or /usr/bsd43/bin/cc
to be found first.  (-systype cannot be specified in StandardCppDefines,
because those get passed to makedepend, and makedepend gets confused
because -systype takes a following argument.)

If installed versions of jmake or makedepend are used, it is important
that they have been compiled in the same environment as that used to
compile this project, or you will get sysv/bsd conflicts.  It may be
best to compile them for both environments and install in /usr/bin and
/bsd43/usr/bin as appropriate.

The compiled version of makedepend works properly subject to the above
caveat, and is much faster than the script version.  The script version
(define UseCCMakeDepend) always works and needs no special hacking to know
about compilation environment, but it's slower.  It also generates warnings
about "--" and -O which can be ignored.  util/makedepend/Jmakefile was hacked
from the X11R4 release to recognize how to set INCLUDEDIR properly for RISC/os.

The Jmakefiles contain commands to format the man pages and install them as
required; however since RISC/os does not include nroff this will typically
not be effective.  If you have the BSD or DWB packages installed, you may
be in better shape.

\begin{code}
/*
        SET VERSION NUMBERS BEFORE MAKING MAKEFILES
*/

#define OSMajorVersion    4
#define OSMinorVersion    51

#define CCompilerMajorVersion   2
#define CCompilerMinorVersion   11


#define BootstrapCFlags       -Dmipsriscos

/*
        For BSD environment, need -ltermcap for v?printf.  It's not in
        the BSD C library!  (Yet.)
*/

#define InstallCmd      /etc/mipsinstall
#define InstFileFlags   -f

#ifndef UsrLibDir
#if SystemV
#define UsrLibDir /usr/lib
#else
#define UsrLibDir /usr/bsd43/usr/lib
#endif
#endif

#ifndef IncludeRoot
#if SystemV
#define IncludeRoot /usr/include
#else
#define IncludeRoot /usr/include/bsd43
#endif
#endif

#define HasVarargs              YES
/*
        Make sure to use signal semantics that are consistent with
        the compilation environment.
*/
#if SystemV
#define HasVoidSignalReturn     YES
#else
#define HasVoidSignalReturn     NO
#endif

/* does this work?  or can it be done better?  ToDo */
BUILDPLATFORM=HostPlatform
\end{code}