#! /bin/sh

# This builds the WRspice.cxt and 64bit/WRspice.cxt WRspice context
# files.  If takes input from many of the Skill files in this directory:
#   advTool.il
#   analysis.il
#   classes.il
#   dataAccess.il
#   envOption.il
#   initialize.il
#   netlist.il
#   params.il
#   simControl.il
#   simInfo.il
#   simOption.il
#   startup.il
#   WRspiceBuild.il
#   WRspice.il

# Running requires an OASIS development license from Cadence.

# Usage:  ./mkcx

# First back up existing files.

if [ -f WRspice.cxt ]; then
    mv -f WRspice.cxt WRspice.cxt.bak
fi
if [ -f 64bit/WRspice.cxt ]; then
    mv -f 64bit/WRspice.cxt 64bit/WRspice.cxt.bak
fi

# Call Virtuoso to do the work.

CDS_AUTO_64BIT=ALL virtuoso -ilLoadIL WRspiceBuild.il -nograph
CDS_AUTO_64BIT=NONE virtuoso -ilLoadIL WRspiceBuild.il -nograph

