home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 344b.lha / plplot_v2.6 / lattice / make-all < prev    next >
Encoding:
AmigaDOS Script File  |  1990-01-27  |  3.1 KB  |  126 lines

  1. .key lib
  2. .def lib "FFP"
  3.  
  4. ; This script makes the entire plplot library.  It should be invoked via
  5. ; "execute make-all [FFP | IEEEF | IEEED]". If FFP (the default) is
  6. ; specified then PLFLT is typedef'd to float and the fast floating point
  7. ; math routines are to be used. If IEEEF then PLFLT is still typedef'd
  8. ; to float but the IEEE math routines are to be used.  Finally if IEEED
  9. ; is specified then PLFLT is double and the IEEE math routines are to be
  10. ; used.
  11.  
  12. if not "<lib>" eq "FFP"
  13.    if not "<lib>" eq "IEEEF"
  14.       if not "<lib>" eq "IEEED"
  15.             echo "usage: execute make-all [FFP | IEEEF | IEEED]"
  16.             skip end
  17.       endif
  18.    endif
  19. endif
  20.  
  21. ; Make the FFP library.
  22. if "<lib>" eq "FFP"
  23.    ask "Are you sure you want to (re)make the complete FFP library? (y or n)"
  24.    if not warn
  25.       skip end
  26.    endif
  27.  
  28.    if exists /pllibs/plpffp.lib
  29.       delete /pllibs/plpffp.lib
  30.    endif
  31.  
  32.    cd /src
  33.    lmk LFLG1=-ff
  34.    list >ofiles #?.o lformat="%s"
  35.    oml /pllibs/plpffp.lib r @ofiles
  36.    delete ofiles
  37.  
  38.    cd /drivers
  39.    lmk LFLG1=-ff
  40.    list >ofiles #?.o lformat="%s"
  41.    oml /pllibs/plpffp.lib r @ofiles
  42.    delete ofiles
  43.  
  44.    cd /Amiga
  45.    lmk LFLG1=-ff
  46.    list >ofiles #?.o lformat="%s"
  47.    oml /pllibs/plpffp.lib r @ofiles
  48.    delete ofiles
  49.  
  50.    cd /lattice
  51. endif
  52.  
  53. ; Create the IEEE library with "float" floating point variables.
  54. ; Unfortunately there is a bug involving prototypes and float's in Lattice 5.04.
  55. ; (The calling function promotes all float's to double's in spite of the
  56. ; prototype while the called function expects a float.) I get around this
  57. ; and still get prototyping by creating the library without prototyping in
  58. ; effect (so that the conventional C conversions occur). Prototypes can still
  59. ; be used when linking your driver to the library. This works but causes the
  60. ; library to be larger than it normally would be. (I have reported this
  61. ; bug to Lattice by the way.)
  62. if "<lib>" eq "IEEEF"
  63.    ask "Are you sure you want to (re)make the complete IEEEF library? (y or n)"
  64.    if not warn
  65.       skip end
  66.    endif
  67.  
  68.    if exists /pllibs/plplcmf.lib
  69.       delete /pllibs/plplcmf.lib
  70.    endif
  71.  
  72.    cd /src
  73.    lmk LFLG1=-dNOPROTS
  74.    list >ofiles #?.o lformat="%s"
  75.    oml /pllibs/plplcmf.lib r @ofiles
  76.    delete ofiles
  77.  
  78.    cd /drivers
  79.    lmk LFLG1=-dNOPROTS
  80.    list >ofiles #?.o lformat="%s"
  81.    oml /pllibs/plplcmf.lib r @ofiles
  82.    delete ofiles
  83.  
  84.    cd /Amiga
  85.    lmk LFLG1=-dNOPROTS
  86.    list >ofiles #?.o lformat="%s"
  87.    oml /pllibs/plplcmf.lib r @ofiles
  88.    delete ofiles
  89.  
  90.    cd /lattice
  91. endif
  92.  
  93. ; Make the IEEE library with "double" floating point variables.
  94. if "<lib>" eq "IEEED"
  95.    ask "Are you sure you want to (re)make the complete IEEED library? (y or n)"
  96.    if not warn
  97.       skip end
  98.    endif
  99.  
  100.    if exists /pllibs/plplcmd.lib
  101.       delete /pllibs/plplcmd.lib
  102.    endif
  103.  
  104.    cd /src
  105.    lmk LFLG1=-dPLDBL
  106.    list >ofiles #?.o lformat="%s"
  107.    oml /pllibs/plplcmd.lib r @ofiles
  108.    delete ofiles
  109.  
  110.    cd /drivers
  111.    lmk LFLG1=-dPLDBL
  112.    list >ofiles #?.o lformat="%s"
  113.    oml /pllibs/plplcmd.lib r @ofiles
  114.    delete ofiles
  115.  
  116.    cd /Amiga
  117.    lmk LFLG1=-dPLDBL
  118.    list >ofiles #?.o lformat="%s"
  119.    oml /pllibs/plplcmd.lib r @ofiles
  120.    delete ofiles
  121.  
  122.    cd /lattice
  123. endif
  124.  
  125. lab end
  126.