home *** CD-ROM | disk | FTP | other *** search
- 1) COMPLETE REGISTRATION CARD
-
- Does not apply.
-
-
- 2) MAKE BACKUP COPY
-
- Before going any further, make a backup copy of your SmartFields
- diskette. Consult your Amiga manual if you are unfamiliar with the
- procedure for copying diskettes. Place your original SmartFields
- diskette in a safe place and use your backup copy for all procedures
- listed below.
-
-
- 3) INSTALL CONSOLE INCLUDE FILES
-
- You need to install your SmartFields include files. Include files are
- the files that you read during compilation, for example
-
- #include <intuition/intuition.h>
-
- First, determine where your Amiga include files are located. This is
- where you will install your SmartFields include files. One way to
- determine where the Amiga include files are located is to execute the set
- command. To do this from the CLI, simply type
-
- set
-
- and press RETURN. The set command will display a few lines of text in
- the CLI window. These lines contain the "environment variables" that
- your Manx C system uses. Look for the line that begins with
-
- INCLUDE=
-
- This is the INCLUDE environment variable, telling the compiler in what
- directory your include files are stored. Multiple directories are
- separated with an exclamation mark (!). As an example, imagine that the
- set command produces the following output:
-
- INCLUDE=SYS1:include!SYS2:asm
- CLIB=ram:!SYS1:lib!SYS2:lib
- CCTEMP=ram:
-
- (By the way, this happens to be the default setup for v3.6 of the Manx C
- compiler). Right now we are only interested in the first line. This
- tells the compiler to search the include directory on the SYS1: diskette
- for all include files. If not found there, it will next search the asm
- directory on the SYS2: diskette.
-
- Using the CLI dir command, search the directories listed on the INCLUDE=
- line for the directory which contains numerous subdirectories, including:
-
- devices (dir)
- exec (dir)
- graphics (dir)
- hardware (dir)
- intuition (dir)
- workbench (dir)
- ...
-
- The Amiga include files are stored in subdirectories as listed above.
- This is where you will install your SmartFields include files.
-
- SPECIAL NOTE: If you store your include files in ram: or on a sticky-RAM
- disk, you will need to find the include directory on your startup
- diskette and install the include files there as well. Otherwise, any
- files you install only on your RAM disk will be lost when you shut off
- your Amiga.
-
- Change directories so you are now in the include directory containing all
- of the subdirectories as listed above. For example, if you found the
- subdirectories in the SYS1:include directory, you would type in the CLI:
-
- cd SYS1:include
-
- Now make a new directory called console:
-
- makedir console
-
- Copy the three SmartFields include files provided on your SmartFields
- diskette to the console directory you've just created:
-
- copy SmartFields:include/console/#? console/
-
- Now display the contents of the console directory:
-
- dir console
-
- If all went well, it should contain the following include files:
-
- console.h
- fields.h
- functions.h
-
-
- 4) INSTALL TOOLKIT INCLUDE FILES
-
- WARNING!! If you are already using another Software Ingenuity product--
- the C Toolkit--you will have already installed a toolkit.h include file.
- If this is the case, do NOT execute this step (step 4)!
-
- Make a new directory called toolkit:
-
- makedir toolkit
-
- Copy the toolkit.h include file provided on your SmartFields diskette to
- the toolkit directory you've just created:
-
- copy SmartFields:include/toolkit/toolkit.h toolkit/
-
- Now display the contents of the toolkit directory:
-
- dir toolkit
-
- If all went well, it should contain the following file:
-
- toolkit.h
-
-
- 5) COMPILE SMARTFIELDS FUNCTIONS
-
- A batch file has been provided that will compile all 70 SmartFields
- functions for you. The file is named compile.manx and is located in the
- Manx directory on your SmartFields diskette. Load the compile.manx file
- into your favorite text editor. You will notice that there are three
- command lines for each SmartFields function. The first line outputs a
- blank line to the CLI window, and the second line outputs the name of the
- SmartFields function that is about to be compiled.
-
- The third line compiles the SmartFields function. Every function is
- compiled using the cc command WITHOUT any compiler flags. This will
- produce a small-data, small-code object module that uses 16-bit ints.
-
- If you wish to compile the functions under different conditions, you need
- to add your own compiler flags. As an example, let's say you want to
- compile all of the functions using 32-bit ints. Place the cursor at the
- top of the compile.manx file and execute your text editor's search/
- replace function. When it asks you which text you want to search for,
- type
-
- cc
-
- When it asks you which text you want to replace it with, type
-
- cc +l
-
- In essence, this will add the +l flag (for 32-bit ints) to all compiler
- calls.
-
- If you made any changes, save the compile.manx file back to disk. To
- begin compilation, type at the CLI:
-
- execute SmartFields:manx/compile.manx
-
- This will compile all SmartFields functions, creating a ".o" object file
- for each ".c" source file. The batch file will stop executing if any of
- the functions have a compiler error. On the other hand, compiler
- warnings will be displayed, but the batch file will NOT stop executing.
-
- All 70 SmartFields functions will compile successfully using both Manx
- compiler versions 3.4a and 3.6a with the supplied compile.manx batch file.
-
-
- 6) CREATE SMARTFIELDS LIBRARY
-
- Now that you've compiled all of the SmartFields functions, you need to
- build them into a library to be linked with your C programs. To do this,
- type at the CLI:
-
- execute SmartFields:manx/library.manx
-
- This will create a library called sf.lib in the Manx directory of your
- SmartFields diskette.
-
- You now need to copy this library into the directory which contains the
- other link-time libraries such as c.lib and m.lib. Using the set command
- as demonstrated earlier, look for the line that begins with
-
- CLIB=
-
- This is the CLIB environment variable, telling the linker in what
- directory your libraries are stored. Multiple directories are separated
- with an exclamation mark (!). Again, imagine that the set command
- produces the following output:
-
- INCLUDE=SYS1:include!SYS2:asm
- CLIB=ram:!SYS1:lib!SYS2:lib
- CCTEMP=ram:
-
- This time we are interested in the second line. This tells the linker to
- first search ram:, then the lib directory on the SYS1: diskette, and
- finally the lib directory on the SYS2: diskette for all libraries. You
- should copy the sf.lib library to any one of these directories. Again,
- if you store your libraries in ram: or on a sticky-RAM disk, you will
- need to find the library directory on your startup diskette and copy the
- sf.lib library there as well. If you copy sf.lib only to your RAM disk,
- it will be lost when you shut off your Amiga.
-
- NOTE: You can create multiple versions of the same library in the same
- manner as Manx does with its c.lib library. For example, you can create
- a standard sf.lib AND a sf32.lib in which all functions are compiled with
- the +l flag to produce 32-bit ints.
-
-
- 7) CONGRATULATIONS!
-
- You are now ready to incorporate the SmartFields system in your own
- programs! An example program is supplied just to get you familiar with
- how you would go about using the SmartFields library. Using the sf.lib
- library is as easy as using the standard c.lib library, but if you would
- like a little practice, read on...
-
-
- 8) REGULAR TEST PROGRAM
-
- Change the current directory to the example program directory:
-
- cd SmartFields:programs/example
-
- The program labeled e.c is the example program discussed in the "Creating
- a SmartFields Program" section of the manual. To compile the program,
- type at the CLI:
-
- cc e.c
-
- NOTE: If you added any flags to the compiler commands in the compile.manx
- batch file (such as +l), you will need to add them here as well!
-
- To link the program, type at the CLI:
-
- ln e.o -lsf -lc
-
- NOTE: If you added any flags to the compiler commands, you will most
- likely have to link with a different c library. For example, if you
- added +l to get 32-bit ints, you will need to link with the c32.lib
- library. We suggest that you use the same convention when naming the
- SmartFields library, such that your link statement might appear as:
-
- ln e.o -lsf32 -lc32
-
- To run the example program, type at the CLI:
-
- e
-
- See page 10 of the manual for more information on how to run the example
- program. To end the program, click on the window's close gadget.
-
-
- Manx Instructions 01/13/90
- © Copyright 1990 Timm Martin
- All Rights Reserved Worldwide
-
- /*-- END --*/
-