NETGEN:  VERSION 1.1

NETGEN is a general-purpose netlist management system.  It can read
and write several netlist formats, including NTK (Caltech, CMU),
WOMBAT (Berkeley), SIM (Berkeley), ACTEL (Actel Inc., Sunnyvale), and
SPICE (Berkeley).  In addition, a C-language embedded interface exists
for specifying netlists directly.  Please see the documentation file
NETGEN.DOC

NETGEN was intended as an efficient specification language for
hierarchical systems.  Secondary features, such as testing isomorphism
between two netlists, have been added over time.  Many new features,
such as the various X-Windows interfaces, are very new, and likely
to be buggy.


BUILDING NETGEN:
----------------

NETGEN requires an ANSI-C compatible compiler (To my knowledge, nobody
has ever tried 'ansi2knr' on NETGEN.  I would be interested in hearing
of any attempts).  Several compilers have been successfully used:
   1) the GNU compiler (gcc-1.37) on various UNIX
      machines (Suns (680x0 and SPARCS), vaxes, HP300)
   2) version 2.0 of Turbo C, on IBM PCs
   3) ATT C++ on Suns
   4) Gnu g++ on HPUX

As distributed, NETGEN consists of 4 parts (in 4 directories):
   1) the NETGEN sources, governed by the GNU Public Licence
      (see the file "copying" in the "root" directory).
   2) a public-domain regular expression package (in the "regexp" directory).
   3) a public-domain run-time internal debugger (in the "dbug" directory).
   4) a set of regression tests for test purposes ("tests" directory).

To build NETGEN:

1) Copy the contents of the distribution disk to the "build" directory.
   Typically, this involves:
      a) getting the file netgen-1.xx.tar.Z via anonymous ftp from 
            hobiecat.cs.caltech.edu
      b) uncompressing that file, and placing it in the "build" directory
      c) extracting the archive by:  tar xvf netgen-1.xx.tar
      

2) Configure NETGEN for your system.  There is a generic makefile
   included in the distribution (makefile.raw), and a utility
   to generate a real makefile from it.  If you are building NETGEN
   on multiple platforms, you can share the source tree, and build
   executables in separate directories (See: Building in separate
   directories, below).

   a)  Type:

         makemake

   b) examine the set of options that are printed.  These are things
      like: hpux, sunos-4.0, xaw, etc.  Select as many of these as you
      think are applicable, and then type:

         makemake option1 option2 ...

      makemake is actually a very simple filter that transcribes the
      'makefile.raw' to 'makefile'.  It is possible (and sometimes necessary)
      to edit one or both of these by hand (see steps 6 and 7).


3) Type 'make', and stand back.  With gcc 1.37 under HPUX 7.0 and
        SunOS 3.0, 4.0 and 4.1, and VAX BSD4.3, 
        and TurboC 2.0 under MSDOS 3.2, 
        NETGEN compiles without any compilation errors or warnings.
        Your mileage may vary. In particular, the DBUG and REGEXP
        stuff can produce reams of warnings (particularly with ANSI compilers).
        Please send difficulties to: mass@csvax.cs.caltech.edu
   If any difficulties arise, go to steps 6 and 7 below.

4) Regression tests are available by typing 'make tests' in the 'tests'
        directory.  Expected output files are provided with the distribution.

5) Finally, 'make install' will copy the executables and libraries
        to the appropriate directories. You may want to edit the makefile
        if you don't like /usr/local/bin and /usr/local/lib... (see Step 6)


In case of difficulty, you may consider the following actions:

6) Edit the makefile directly to reflect the following:
        - BINDIR     -- the directory where the executables should wind up.
        - LIBDIR     -- the directory where the NETGEN library goes.
        - CC and OLDCC -- your favorite ANSI and K&R C compilers	
        - OBJ, EXE, LIB, SEPARATOR -- various file suffixes and slashes
        - CFLAGS -- various machine configurations:
              sun, HPUX, BSD, IBMPC, VMUNIX
        - CLIBS      -- any libraries to be linked in
        - REGEXP     -- where to obtain the regular expression library.
                        (also maybe REGOBJS, REGLIB, and REGEXPDEFS)
        - DBUG_OFF   -- whether to include the DBUG library.
                        (also maybe DBUGFLAGS, DBUGDEFS, DBUGOBJS

        - HAVE_X11   -- set this if you want to compile (rudimentary)
                        X-Windows support.  Also, you have to specify
                        which widget library you want to use.  Motif
                        widgets are recommended; failing that, Xhp widgets
                        work OK;  Xaw (R4) widgets can also be used,
                        but this configuration is the least developed.
                        (define ONE of: X11_HP_WIDGETS, X11_MOTIF_WIDGETS,
                        or X11_ATHENA_WIDGETS, and set XFLAGS and
                        XLIBS accordingly).

7) You may have to edit the configurations of the regexp and dbug 
        packages.  Look in those sub-directories for more info.
        In particular, you may not need either of these (if regexp 
        already exists on your system, and if you disable debugging
        in the makefile).  In general, try to limit your changes to
        modifying REGEXPDEFS and DBUGDEFS in the main makefile.


Building in Separate Directories:

If you have several machines with a shared file system, you need only
maintain a single set of NETGEN sources.  To do this, change the
above procedure slightly:

1) After obtaining and extracting the NETGEN sources, create a
        subdirectory in the source directory.  Let's say it is called
        hp-s300.  

2) cd hp-s300

3) ../makemake <usual list of hosttypes>
        This will copy ../makefile.raw into the hp-s300 directory,
        and will filter out all the flags as before.

4) 'make' as before.
        You need a make utility that understands VPATH, but most
        modern ones do...


Good luck!


When all else fails, get in touch with me:

Mass Sivilotti            (818)356-6973
Caltech 256-80            email: mass@csvax.cs.caltech.edu
Pasadena, CA 91125               mass@hobiecat.cs.caltech.edu

              
