.key lib
;.def lib "FFP"

; This script makes the entire plplot library.  It should be invoked via
; "execute make-all [FFP | IEEEF | IEEED]". If FFP is specified then the 
; fast floating point math routines are used. If IEEEF or IEEED is 
; specified then the IEEE routines are used. For IEEEF a single precision
; version of the library is created while for IEEED a double precision
; version is created.

; Making lc, lc1, lc2, and oml resident speeds things up but may require
; extra memory.

if not "<lib>" eq "FFP"
   if not "<lib>" eq "IEEEF"
      if not "<lib>" eq "IEEED"
         echo "usage: execute make-all [FFP | IEEEF | IEEED]"
         skip end
      endif
   endif
endif

; Make the FFP library.
if "<lib>" eq "FFP"
   echo "Updating FFP version of PLPLOT library"

   if not exists lib:plpffp.lib
     delete > nil: //src/LIBAFF.DATE quiet
     delete > nil: //drivers/LIBAFF.DATE quiet
     delete > nil: /src/LIBAFF.DATE quiet
   endif

   cd //src
   lmk -f Makefile.lattice LIB=lib:plpffp.lib LFLG1=-ff FLOAT=float LIBDATE=LIBAFF.DATE
   cd /amiga/lattice

   cd //drivers
   lmk -f Makefile.lattice LIB=lib:plpffp.lib LFLG1=-ff FLOAT=float LIBDATE=LIBAFF.DATE
   cd /amiga/lattice

   cd /src
   lmk -f Makefile.lattice LIB=lib:plpffp.lib LFLG1=-ff FLOAT=float LIBDATE=LIBAFF.DATE
   cd /lattice

endif

; Create the IEEE library with arrays and matrices of type float
if "<lib>" eq "IEEEF"
   echo "Updating IEEE single precision version of PLPLOT library"

   if not exists lib:plplcmf.lib
     delete > nil: //src/LIBAIS.DATE quiet
     delete > nil: //drivers/LIBAIS.DATE quiet
     delete > nil: /src/LIBAIS.DATE quiet
   endif

   cd //src
   lmk -f Makefile.lattice LIB=lib:plplcmf.lib FLOAT=float LIBDATE=LIBAIS.DATE
   cd /amiga/lattice

   cd //drivers
   lmk -f Makefile.lattice LIB=lib:plplcmf.lib FLOAT=float LIBDATE=LIBAIS.DATE
   cd /amiga/lattice

   cd /src
   lmk -f Makefile.lattice LIB=lib:plplcmf.lib FLOAT=float LIBDATE=LIBAIS.DATE
   cd /lattice

endif

; Make the IEEE library with "double" arrays and matrices
if "<lib>" eq "IEEED"
   echo "Updating IEEE double precision version of PLPLOT library"

   if not exists lib:plplcmd.lib
     delete > nil: //src/LIBAID.DATE quiet
     delete > nil: //drivers/LIBAID.DATE quiet
     delete > nil: /src/LIBAID.DATE quiet
   endif

   cd //src
   lmk -f Makefile.lattice LIB=lib:plplcmd.lib FLOAT=double LIBDATE=LIBAID.DATE
   cd /amiga/lattice

   cd //drivers
   lmk -f Makefile.lattice LIB=lib:plplcmd.lib FLOAT=double LIBDATE=LIBAID.DATE
   cd /amiga/lattice

   cd /src
   lmk -f Makefile.lattice LIB=lib:plplcmd.lib FLOAT=double LIBDATE=LIBAID.DATE
   cd /lattice

endif

echo "Don't forget to create the font files!"

lab end
