From: castalia@gaea.lpl.arizona.edu (Bradford Castalia)
Newsgroups: comp.soft-sys.khoros
Subject: Re:  C++ xvroutines
Date: 4 Sep 92 02:15:16 GMT


> From khoros-mailer@chama.eece.unm.edu Thu Sep  3 07:40:22 1992
> Posted-Date: Thu, 3 Sep 92 07:19:15 PDT
> Received-Date: Thu, 3 Sep 92 08:19:45 MDT
> Date: Thu, 3 Sep 92 07:19:15 PDT
> From: janin@espresso.boeing.com (Adam Janin 5-3545)
> To: khoros@chama.eece.unm.edu, troberts@zia.aoc.nrao.edu
> Subject: Re:  C++ xvroutines
> 
> If you need to change the way a khoros routine is compiled (i.e. add -I/include,
> add -l/library, change to CC, etc.), it is much easier to edit the Imakefile
> rather than the Makefile.  The Makefile is generated automatically from the
> Imakefile using makemake and some standard Imake templates in $KHOROS_HOME/
> repos/config.
> 
> All this means is that instead of having to read the Khoros manual cover
> to cover, you have to read  the Imake manual :-)
> 
> Actually, it's fairly easy to figure out.  The default Imakefile that
> ghostwriter produces uses fairly obvious macros and includes a couple of
> comments.
> 
> 	Hope this helps,
> 
> 	Adam Janin
> 
While your suggestion makes sense, and will work correctly, it has the
unfortunate effect of undermining the Khoros software configuration
mechanisms. Initially I was rather daunted by these mechanisms (they do
not feel very intuitive to me) and used the procedure you have
suggested, but after a little familiarity had accumulated I discovered
that it really isn't very difficult (but still not very intuitive :-|)
to use the mechanisms as they had been intended.

Let's assume that a new toolbox is being created and that the
documentation in Volume II is being used. There are basically two
levels of configuration: general system configuration, and specific
application configuration. In the Site.def and Library.def files
(under $KHOROS_HOME/repos/config/imake_conf) you can specify site-wide
general libraries that should always be referenced. However, for
specific cases, modify the {toolbox}.def file (under
$TOOLBOX/repos/config/imake_conf). Edit the lines containing the
definitions of TOOLBOXINCLUDE and TOOLBOX_LIBRARIES, and you may also
want to edit the line defining TOOLBOX_DEP_LIBRARIES to be consistent
with the definition of TOOLBOX_LIBRARIES. For example, I have a toolbox
for applications that access our digital filmwriter which requires
access to a few special include files and libraries, so I have modified
filmwriter.def thus:
 
TOOLBOXINCLUDE = -I$(TB_NAME)/include \
                    -I/usr/local/QCR/include \
                    -I/usr/local/image/include \
                    -I/usr/local/PIRL
 
TOOLBOX_LIBRARIES = -lfilmwriter \
                    -lQCR \
                    -lImage \
                    -lPIRL
 
TOOLBOX_DEP_LIBRARIES = $(LIBDIR)/libfilmwriter.a \
                        /usr/local/lib/libQCR.a \
                        /usr/local/lib/libImage.a \
                        /usr/local/lib/libPIRL.a
 
There are also capabilities in kinstall to do some of this as well.

Now your toolbox is configured so that when Imakefile and Makefile files
are created they will contain the desired specific references.

Bradford Castalia                      castalia@pirl.lpl.arizona.edu
Systems Manager                        (602) 621-6946
Planetary Image Research Laboratory    (602) 621-4824
Space Sciences Building, 429           LPL FAX: (602) 621-4933
University of Arizona
Tucson, Arizona  85721
Newsgroups: comp.soft-sys.khoros