Instructions for building Target Jr 2.6.0 on Linux with ivtools-0.5.8 or later

0. get lots of disk space freed up (~300Mb).  Acquire and unpack
iup_2.6.0.tar.gz (from http://www.balltown.cma.com/TargetJr) into some
directory (i.e. targetjr/iup_2.6.0).


1. setup these environment variables (adjust pathnames for your system):

    export BASEDIR=/proj
    export IVINSTALLED=$BASEDIR/ivtools-0.5
    export SYS_IUPACKAGES=$BASEDIR/targetjr/iup_2.6.0
    export IUPACKAGEHOME=$SYS_IUPACKAGES
    export COOLHOME=$SYS_IUPACKAGES/COOL
    export BITMAP_PATH=$SYS_IUPACKAGES/bitmaps
    export PATH=$SYS_IUPACKAGES/Scripts/Shell:$SYS_IUPACKAGES/Scripts/Perl:$PATH

1.b. set up a symbolic link to the X11 include directory if not present
under /usr/include on your machine:
    ln -s /usr/X11R6/include/X11 /usr/include/X11


2. copy over an iv-linux.cf from ivtools

    cp $IVINSTALLED/config/InterViews/iv-linux.cf $SYS_IUPACKAGES/config/InterViews/iv-linux.cf


3. do a "make install" on your copy of ivtools to install binaries and
libraries within the ivtools source tree


4. Add a line to the end of config/iuproject.defs to point to the
X11R6 libraries on Linux:

    EXTRA_CCLDLIBS += -L/usr/X11R6/lib


5. Add another line to the end of config/iuproject.defs to point to
the ACE libraries in your environment (if you are using an ACE-enabled
version of ivtools):

    EXTRA_CCLDLIBS += -L/proj/ACE_wrappers/ace -lACE

5.b. Comment out the line defining APP_CCDEPLIBS in config/iuproject.defs
like this:

/* APP_CCDEPLIBS   += $(DIR_Templates)/lib.$(ARCH)$(SLASH)*.a */


6. Add these lines to the front of Templates/Instances/Imakefile:

    #include <iuproject_all.defs>
    EXTRA_CCDEFINES += -DNOREPOS

6.b. Create a dummy initial iuproject_all.defs file (will be autogenerated
later):

    touch config/iuproject_all.defs


7. make the makefiles (the FREEVERSION of target jr will generate
"Dropping file" messages at this stage):

    cd $SYS_IUPACKAGES
    iumkmf
    make Makefiles


8. set up this symbolic link to avoid confusing ivtools' Topology library
with target jr's:

    mkdir lib.LINUX
    cd lib.LINUX
    ln -s ../SpatialObjects/Topology/LINUX/libTopology.so.1.0
    ln -s ../SpatialObjects/Topology/LINUX/libTopology.so.1.0 libTopology.so
    cd ..


9. do a make all:

    make all

Not everything will build during this stage; the Template libraries require
another cycle of "make Makefiles; make all" to build properly.

10. do it again to get everything compiled and linked:

    make Makefiles
    make all

Everything but Smallg++ should build now.  And some automated tests will
fail after successfully linking.  But the X window executables should
be ready to run (with possibly some adjustment of your LD_ELF_LIBRARY_PATH
environment variable).


See http://www.balltown.cma.com/TargetJr for more information on
obtaining and building Target Jr.


