# Alliance VLSI CAD System
# Copyright (C) 1990, 2002 ASIM/LIP6/UPMC
#
# Home page          : http://asim.lip6.fr/alliance/
# E-mail             : mailto:alliance-users@asim.lip6.fr
# ftp site           : ftp://asim.lip6.fr/pub/alliance/
#
# NOTE: You can find the latest revision of this document at:
# http://asim.lip6.fr/pub/alliance/latest-checkout/alliance/src
#
# $Id: README.IRIX,v 1.4 2002/10/17 10:04:09 czo Exp $

  This file discuss about installation of Alliance on IRIX machines.

 ===================================================================


                                  IRIX notes
                                  ==========


I Generalities
==============

Alliance is available for both 32-bit and 64-bit platforms:

Alliance-X.Y-IRIX-6.5-N32.tardist is a N32 ABI precompiled package
Alliance-X.Y-IRIX-6.5-N64.tardist is a N64 ABI precompiled package

where X.Y is the version number.

You can install the 64-bit version only on 64-bit machines, 32-bit
version is suitable to all machines (For more informations on the
Application Binary Interface, please see the techpubs page
at SGI: http://techpubs.sgi.com).

Sources are included but not installed by default. If you want the sources
to be installed, select the custom installation in the Software Manager
and check the box related to the sources.


II Downloading binary distribution
=================================

You can get Alliance via anonymous FTP from ftp.lip6.fr

       ftp://ftp-asim.lip6.fr/pub/alliance/contrib/ (IRIX)
       ftp://ftp-asim.lip6.fr/pub/alliance/         (Linux,Solaris)

If you are using a web browser, just click on the appropriate tardist file; the
Software Manager should be automatically launched.

Otherwise, download the file, untar it in a directory and run the Software Manager.


III Installation
===============

Depending on the package,
- The alliance software will be located in /usr/local/alliance/archi/IRIX with
the N32 interface
- The alliance software will be located in /usr/local/alliance/archi/IRIX64 with
the N64 interface

Note: you need to be root to run the Software Manager.

If you want the sources, then select the Customize option from the Software Manager
and check the box related to the sources.
The sources will be installed in /usr/local/alliance/archi/src.


IV Usage
========

Each user has to source alc_env.[c]sh to set Alliance environment
variables to be able to run the Alliance tools.

in sh  > . /usr/local/alliance/share/etc/alc_env.sh

in csh > source /usr/local/alliance/share/etc/alc_env.csh

This sets various default environment variables which could be changed by user
later (Like MBK_OUT_LO to set the netlist output file format).

If you are a SysAdmin, you should consider linking these scripts in 
the system's profile (e.g.: /etc/profile.d/ on Linux) so that configuration
would be done at user login.

If you encounter problems, check the value of these variables in alc_env.[c]sh

          $ALLIANCE_OS  : actually IRIX
                          or IRIX64

          $ALLIANCE_TOP : actually /usr/local/alliance/archi/IRIX
                          or /usr/local/alliance/archi/IRIX64


V Optional: compilation
=======================

Get the Alliance software package and install it with the sources (see the options
in the Software Manager).

We assume that the sources are located in /usr/local/alliance/src.
We also assume that you have a working C and a working C++ compiler.


V.a Choose the ABI
------------------

On IRIX systems you can choose to use the O32, N32 or N64 part of the Application
Binary Interface, depending on your computer (for more informations on the ABI please
see the techpubs page at SGI: http://techpubs.sgi.com):
* Type "uname -s" in the shell command. If you get back "IRIX", then use the N32 libraries.
If you get "IRIX64", then use the N64 libraries.
* Or on a 64-bit system you can force a specific compilation, N32 or N64.


For a N32 compilation, set up the following compilation environment:

| setenv CFLAGS   "-mabi=n32 -mips3 -gdwarf-2"
| setenv OFLAGS   "-mabi=n32 -mips3"
| setenv CXXFLAGS "-mabi=n32 -mips3"
| setenv SGI_ABI  n32
| setenv LDFLAGS  "-L/usr/freeware/lib32 -L/usr/freeware/lib32/X11" (optional)
| setenv CC       "/usr/freeware/bin/gcc $CFLAGS"
| setenv CXX      "/usr/freeware/bin/g++ $CXXFLAGS"


We assume that the library path is set thru the LD_LIBRAYN32_PATH variable, for
example:


| if ! $?LD_LIBRARYN32_PATH then
|         setenv LD_LIBRARYN32_PATH /usr/lib32
| else
|         setenv LD_LIBRARYN32_PATH "$LD_LIBRARYN32_PATH":/usr/lib32
| endif
| 
| setenv LD_LIBRARYN32_PATH "$LD_LIBRARYN32_PATH":/lib32
| setenv LD_LIBRARYN32_PATH "$LD_LIBRARYN32_PATH":/usr/lib32/X11
| setenv LD_LIBRARYN32_PATH "$LD_LIBRARYN32_PATH":/usr/Motif-2.1/lib32
| setenv LD_LIBRARYN32_PATH "$LD_LIBRARYN32_PATH":/usr/freeware/lib32
| setenv LD_LIBRARYN32_PATH "$LD_LIBRARYN32_PATH":/usr/freeware/lib32/X11



For a N64 compilation, set up the following compilation environment:

| setenv CFLAGS   "-mabi=64 -mips4 -gdwarf-2"
| setenv OFLAGS   "-mabi=64 -mips4"
| setenv CXXFLAGS "-mabi=64 -mips4"
| setenv SGI_ABI  64
| setenv LDFLAGS  "-L/usr/freeware/lib64 -L/usr/freeware/lib64/X11" (optional)
| setenv CC       "/usr/freeware/bin/gcc $CFLAGS"
| setenv CXX      "/usr/freeware/bin/g++ $CXXFLAGS"


We assume that the library path is set thru the LD_LIBRAY64_PATH variable, for
example:


| if ! $?LD_LIBRARY64_PATH then
|         setenv LD_LIBRARY64_PATH /usr/lib64
| else
|         setenv LD_LIBRARY64_PATH "$LD_LIBRARY64_PATH":/usr/lib64
| endif
| 
| setenv LD_LIBRARY64_PATH "$LD_LIBRARY64_PATH":/lib64
| setenv LD_LIBRARY64_PATH "$LD_LIBRARY64_PATH":/usr/lib64/X11
| setenv LD_LIBRARY64_PATH "$LD_LIBRARY64_PATH":/usr/Motif-2.1/lib64
| setenv LD_LIBRARY64_PATH "$LD_LIBRARY64_PATH":/usr/freeware/lib64
| setenv LD_LIBRARY64_PATH "$LD_LIBRARY64_PATH":/usr/freeware/lib64/X11



V.b Autoconf, automake
----------------------

Our advice is to create a separate directory for the compilation. For
example create a build directory in /usr/local/alliance:

| cd /usr/local/alliance/

then:

| mkdir build
| mkdir build/IRIX for a N32 compilation

or:

| mkdir build
| mkdir build/IRIX64 for a N64 compilation


Then go to /usr/local/alliance/src and run the autostuff script. It will run automatically
aclocal, autoconf and automake:

| cd /usr/local/alliance/
| ./autostuff


V.c Compilation
---------------

Go to the /usr/local/alliance/build/IRIX or /usr/local/alliance/build/IRIX64 directory and
run the configure script.

For the N32 interface:

| cd /usr/local/alliance/build/IRIX
| ../../src/configure --prefix=/usr/local/alliance/archi/IRIX --with-stabs --enable-shared --disable-static

For the N64 interface:

| cd /usr/local/alliance/build/IRIX64
| ../../src/configure --prefix=/usr/local/alliance/archi/IRIX64 --with-stabs --enable-system64 --enable-shared --disable-static


configure options:
 --prefix                          allows you to choose the installation directory.

 --with-stabs                      allows you to debug in dwarf format and g++ (default on SGI)

 --enable-system64                 for a 64-bit compilation (only to be used on a 64-bit system)

 --enable-shared --disable-static  for shared libraries only (Default is static libraries)

 --enable-shared                   for shared and static libraries (Default is static libraries)


For more options, type ./configure --help


Then run gmake :

| gmake install


Note: run "gmake install" instead of "gmake ; gmake install", or the libraries won't be found.

Note: if make fails, try gmake as I did...



V.d Enjoy !
-----------


VI Other informations
=====================

Alliance 5.0 for IRIX was compiled on the following system:

Octane
MIPS R10000 Processor 250 MHZ IP30
IRIX 6.5.15f
autoconf
automake
aclocal
configure options: --prefix, --with-stabs, --enable-system64, --enable-shared, --disable-static
gnu gcc and gnu c++ compiler
gcc option: -gdwarf-2
freeware installed
gmake

Note: gdb does not support debugging 64-bit executables or programs using pthreads on IRIX. Use dbx instead.
