How to make your own personal pigiRpc
@(#)MakeYourOwn	1.4 12/3/92
Written by: Joseph T. Buck

pigi's ability to dynamically link in stars has limitations; while it
is now possible to dynamically link in large amounts of your own code,
it is slow and needs to happen every time.  For this reason, it sometimes
pays to build your own pigiRpc executable.  To use the executable, set the
environment variable PIGIRPC to the full path of your personal pigiRpc
executable, and then the pigi command will use your personal copy.

To build your own pigiRpc, you should create a working directory, and
copy the makefile, pigiMain.cc, and defpalettes.c from this directory
to your working directory.  Edit defpalettes.c to reflect the default
domain and list of palettes that you desire, and edit the makefile to
modify what stars and libraries are linked into the executable.  You
may also need (or want) to edit the variables ROOT, OBJDIR, and VERSION
in the makefile.  Then run "make" and you're in business.

Specifically, the variable ROOT should point to the ptolemy home directory,
and the variable OBJDIR to the root of the ptolemy object tree for the
current architecture.  For example:

ROOT          = /whereever/ptolemy/is/installed
OBJDIR        = $(ROOT)/obj.$(ARCH)
VPATH         = .

The latter value assumes you will run make in the source directory
and want the object files stored in the same directory.

To make a version of pigi that has debugging enabled, do "make pigiRpc.debug"
and start things up with "pigi -debug" instead of pigi.  (You must have
gdb, the Gnu debugger, installed for this to work).  Warning: if you
don't have a lot of memory on your workstation, this will be extremely
slow.

WARNING: make sure to modify the place where "make install" puts the
completed executable, or it will attempt to overwrite the official
pigiRpc, and people may be upset at you if you succeed in doing that.
Simplest thing to do is to replace the line:

install: makefile $(DESTBIN)

with:

install: makefile pigiRpc

This will leave the pigiRpc in whatever directory you make it.


