home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 480.lha / SmartField / Docs / Manx Instructions.pp / Manx Instructions
Encoding:
Text File  |  1991-02-11  |  9.1 KB  |  254 lines

  1. 1)  COMPLETE REGISTRATION CARD
  2.  
  3.     Does not apply.
  4.  
  5.  
  6. 2)  MAKE BACKUP COPY
  7.  
  8.     Before going any further, make a backup copy of your SmartFields
  9.     diskette.  Consult your Amiga manual if you are unfamiliar with the
  10.     procedure for copying diskettes.  Place your original SmartFields
  11.     diskette in a safe place and use your backup copy for all procedures
  12.     listed below.
  13.  
  14.  
  15. 3)  INSTALL CONSOLE INCLUDE FILES
  16.  
  17.     You need to install your SmartFields include files.  Include files are
  18.     the files that you read during compilation, for example
  19.  
  20.         #include <intuition/intuition.h>
  21.  
  22.     First, determine where your Amiga include files are located.  This is
  23.     where you will install your SmartFields include files.  One way to
  24.     determine where the Amiga include files are located is to execute the set
  25.     command.  To do this from the CLI, simply type
  26.  
  27.         set
  28.  
  29.     and press RETURN.  The set command will display a few lines of text in
  30.     the CLI window.  These lines contain the "environment variables" that
  31.     your Manx C system uses.  Look for the line that begins with
  32.  
  33.         INCLUDE=
  34.  
  35.     This is the INCLUDE environment variable, telling the compiler in what
  36.     directory your include files are stored.  Multiple directories are
  37.     separated with an exclamation mark (!).  As an example, imagine that the
  38.     set command produces the following output:
  39.  
  40.         INCLUDE=SYS1:include!SYS2:asm
  41.         CLIB=ram:!SYS1:lib!SYS2:lib
  42.         CCTEMP=ram:
  43.  
  44.     (By the way, this happens to be the default setup for v3.6 of the Manx C
  45.     compiler).  Right now we are only interested in the first line.  This
  46.     tells the compiler to search the include directory on the SYS1: diskette
  47.     for all include files.  If not found there, it will next search the asm
  48.     directory on the SYS2: diskette.
  49.  
  50.     Using the CLI dir command, search the directories listed on the INCLUDE=
  51.     line for the directory which contains numerous subdirectories, including:
  52.  
  53.         devices (dir)
  54.         exec (dir)
  55.         graphics (dir)
  56.         hardware (dir)
  57.         intuition (dir)
  58.         workbench (dir)
  59.         ...
  60.  
  61.     The Amiga include files are stored in subdirectories as listed above.
  62.     This is where you will install your SmartFields include files.
  63.  
  64.     SPECIAL NOTE: If you store your include files in ram: or on a sticky-RAM
  65.     disk, you will need to find the include directory on your startup
  66.     diskette and install the include files there as well.  Otherwise, any
  67.     files you install only on your RAM disk will be lost when you shut off
  68.     your Amiga.
  69.  
  70.     Change directories so you are now in the include directory containing all
  71.     of the subdirectories as listed above.  For example, if you found the
  72.     subdirectories in the SYS1:include directory, you would type in the CLI:
  73.  
  74.         cd SYS1:include
  75.  
  76.     Now make a new directory called console:
  77.  
  78.         makedir console
  79.  
  80.     Copy the three SmartFields include files provided on your SmartFields
  81.     diskette to the console directory you've just created:
  82.  
  83.         copy SmartFields:include/console/#? console/
  84.  
  85.     Now display the contents of the console directory:
  86.  
  87.         dir console
  88.  
  89.     If all went well, it should contain the following include files:
  90.  
  91.         console.h
  92.         fields.h
  93.         functions.h
  94.  
  95.  
  96. 4)  INSTALL TOOLKIT INCLUDE FILES
  97.  
  98.     WARNING!! If you are already using another Software Ingenuity product--
  99.     the C Toolkit--you will have already installed a toolkit.h include file.
  100.     If this is the case, do NOT execute this step (step 4)!
  101.  
  102.     Make a new directory called toolkit:
  103.  
  104.         makedir toolkit
  105.  
  106.     Copy the toolkit.h include file provided on your SmartFields diskette to
  107.     the toolkit directory you've just created:
  108.  
  109.         copy SmartFields:include/toolkit/toolkit.h toolkit/
  110.  
  111.     Now display the contents of the toolkit directory:
  112.  
  113.         dir toolkit
  114.  
  115.     If all went well, it should contain the following file:
  116.  
  117.         toolkit.h
  118.  
  119.  
  120. 5)  COMPILE SMARTFIELDS FUNCTIONS
  121.  
  122.     A batch file has been provided that will compile all 70 SmartFields
  123.     functions for you.  The file is named compile.manx and is located in the
  124.     Manx directory on your SmartFields diskette.  Load the compile.manx file
  125.     into your favorite text editor.  You will notice that there are three
  126.     command lines for each SmartFields function.  The first line outputs a
  127.     blank line to the CLI window, and the second line outputs the name of the
  128.     SmartFields function that is about to be compiled.
  129.  
  130.     The third line compiles the SmartFields function.  Every function is
  131.     compiled using the cc command WITHOUT any compiler flags.  This will
  132.     produce a small-data, small-code object module that uses 16-bit ints.
  133.  
  134.     If you wish to compile the functions under different conditions, you need
  135.     to add your own compiler flags.  As an example, let's say you want to
  136.     compile all of the functions using 32-bit ints.  Place the cursor at the
  137.     top of the compile.manx file and execute your text editor's search/
  138.     replace function.  When it asks you which text you want to search for,
  139.     type
  140.  
  141.         cc
  142.  
  143.     When it asks you which text you want to replace it with, type
  144.  
  145.         cc +l
  146.  
  147.     In essence, this will add the +l flag (for 32-bit ints) to all compiler
  148.     calls.
  149.  
  150.     If you made any changes, save the compile.manx file back to disk.  To
  151.     begin compilation, type at the CLI:
  152.  
  153.         execute SmartFields:manx/compile.manx
  154.  
  155.     This will compile all SmartFields functions, creating a ".o" object file
  156.     for each ".c" source file.  The batch file will stop executing if any of
  157.     the functions have a compiler error.  On the other hand, compiler
  158.     warnings will be displayed, but the batch file will NOT stop executing.
  159.  
  160.     All 70 SmartFields functions will compile successfully using both Manx
  161.     compiler versions 3.4a and 3.6a with the supplied compile.manx batch file.
  162.  
  163.  
  164. 6)  CREATE SMARTFIELDS LIBRARY
  165.  
  166.     Now that you've compiled all of the SmartFields functions, you need to
  167.     build them into a library to be linked with your C programs.  To do this,
  168.     type at the CLI:
  169.  
  170.         execute SmartFields:manx/library.manx
  171.  
  172.     This will create a library called sf.lib in the Manx directory of your
  173.     SmartFields diskette.
  174.  
  175.     You now need to copy this library into the directory which contains the
  176.     other link-time libraries such as c.lib and m.lib.  Using the set command
  177.     as demonstrated earlier, look for the line that begins with
  178.  
  179.         CLIB=
  180.  
  181.     This is the CLIB environment variable, telling the linker in what
  182.     directory your libraries are stored.  Multiple directories are separated
  183.     with an exclamation mark (!).  Again, imagine that the set command
  184.     produces the following output:
  185.  
  186.         INCLUDE=SYS1:include!SYS2:asm
  187.         CLIB=ram:!SYS1:lib!SYS2:lib
  188.         CCTEMP=ram:
  189.  
  190.     This time we are interested in the second line.  This tells the linker to
  191.     first search ram:, then the lib directory on the SYS1:  diskette, and
  192.     finally the lib directory on the SYS2: diskette for all libraries.  You
  193.     should copy the sf.lib library to any one of these directories.  Again,
  194.     if you store your libraries in ram: or on a sticky-RAM disk, you will
  195.     need to find the library directory on your startup diskette and copy the
  196.     sf.lib library there as well.  If you copy sf.lib only to your RAM disk,
  197.     it will be lost when you shut off your Amiga.
  198.  
  199.     NOTE: You can create multiple versions of the same library in the same
  200.     manner as Manx does with its c.lib library.  For example, you can create
  201.     a standard sf.lib AND a sf32.lib in which all functions are compiled with
  202.     the +l flag to produce 32-bit ints.
  203.  
  204.  
  205. 7)  CONGRATULATIONS!
  206.  
  207.     You are now ready to incorporate the SmartFields system in your own
  208.     programs!  An example program is supplied just to get you familiar with
  209.     how you would go about using the SmartFields library.  Using the sf.lib
  210.     library is as easy as using the standard c.lib library, but if you would
  211.     like a little practice, read on...
  212.  
  213.  
  214. 8)  REGULAR TEST PROGRAM
  215.  
  216.     Change the current directory to the example program directory:
  217.  
  218.         cd SmartFields:programs/example
  219.  
  220.     The program labeled e.c is the example program discussed in the "Creating
  221.     a SmartFields Program" section of the manual.  To compile the program,
  222.     type at the CLI:
  223.  
  224.         cc e.c
  225.  
  226.     NOTE: If you added any flags to the compiler commands in the compile.manx
  227.     batch file (such as +l), you will need to add them here as well!
  228.  
  229.     To link the program, type at the CLI:
  230.  
  231.         ln e.o -lsf -lc
  232.  
  233.     NOTE: If you added any flags to the compiler commands, you will most
  234.     likely have to link with a different c library.  For example, if you
  235.     added +l to get 32-bit ints, you will need to link with the c32.lib
  236.     library.  We suggest that you use the same convention when naming the
  237.     SmartFields library, such that your link statement might appear as:
  238.  
  239.         ln e.o -lsf32 -lc32
  240.  
  241.     To run the example program, type at the CLI:
  242.  
  243.         e
  244.  
  245.     See page 10 of the manual for more information on how to run the example
  246.     program.  To end the program, click on the window's close gadget.
  247.  
  248.  
  249. Manx Instructions  01/13/90
  250. © Copyright 1990 Timm Martin
  251. All Rights Reserved Worldwide
  252.  
  253. /*-- END --*/
  254.