950728 simpack/func/event/pkgs/Xsimcode/src/Readme
Robert Cubert

In preparing Xsimcode as part of SimPack3 (and within Sim++), some
changes were made and some apparent inconsistencies were resolved.
See "go.c".  There are 10 source modules which go into Xsimcode.
(Everything EXCEPT model.c).  model.c is provided as a pre-generated
Xsimcode output file, which you can keep or change as you please (see
below).

There are some examples of simulation models already built for you.
They are in simpack/func/event/pkgs/Xsimcode/examples/*.sim, and you
can copy them into this directory, then run Xsimcode, and you will
be able to access all these models.

When you Load a model in Xsimcode, you'll see a picture of the model.
Then you can translate the model from whatever.sim to whatever.c.
The default model name is model, so i have included model.sim and 
model.c in this directory.  You can actually recreate model.c by
running Xsimcode, Loading model.sim, and translating.

If you plan to use Xsimcode, you'll have to "make" whatever .c file
Xsimcode creates for you.  You can use the Makefile here as a
template, and see the part that pertains to "model" therein.  Just
substitute your filename for "model".  Even simpler, just develop your
model in Xsimcode and overwrite the original model.sim and
model.c and build your own model using the default name (which is
"model"), and then to make all you need do is type "make model".  No
changes needed to anything!  (You can always recover the original
model.sim and model.c from the examples directory, where there's
another copy).

The Makefile in this directory is actually an automatically-produced
file.  The automation is done by shell script xmkmf, located in this
directory.  xmkmf in turn uses a utility program known as "imake" to
generate the "Makefile".  So if you want to make any changes, it's
better to change the INPUT file (named "Imakefile") and run xmkmf to
create a new "Makefile".  If you change Makefile itself, you run the
risk that some future use of xmkmf will unmake your change.

Before changing the Makefile or Imakefile, see the "caveat" therein
which warns you to use cc and NOT gcc for translating your code.

Look also in the previously-mentioned examples directory, where you'll
find about half a dozen models (*.sim) already created by Xsimcode,
along with corresponding files (*.c) automatically generated by
Xsimcode.  The installation procedure for SimPack3 permits you to
create executables for all the examples.  See also the Readme in the
examples directory.  See also the older but also informative
simpack/func/event/pkgs/Xsimcode/README.
