home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d541 / steal.lha / Steal / HowToBuild.doc next >
Text File  |  1991-09-17  |  2KB  |  74 lines

  1. I'll now give a brief explanation on how to build the files in the directory
  2. :bin from their sources in :src. Compilation was originally done using Aztec C
  3. version 3.4a with integers of 16 bits, but there should to my opinion be no
  4. difficulties in using other compilers instead. Keep in mind that the
  5. instructions to create the executables may differ for other compilers!
  6.  
  7. First of all, building Steal itself is done from the three source files
  8. Steal.c, Print.c and Basic.c:
  9.  
  10.     cc Steal.c
  11.     cc Print.c
  12.     cc Basic.c
  13.     ln Steal.o Print.o Basic.o -lc
  14.  
  15. We now have made an executable file "Steal" that behaves just like the one as
  16. it has been put in the :bin directory. Another utility delivered with Steal is
  17. Icon2Gadget:
  18.  
  19.     cc Icon2Gadget.c
  20.     ln Icon2Gadget.o -lc
  21.  
  22. Now we have also made an executable Icon2Gadget that is a copy of the one in
  23. the :bin directory.
  24.  
  25. Let's assume we've stolen some Intuition element and now we want to build an
  26. executable from it. As an example, some sources as they are used in the demo
  27. are included allready (Screen.c, Window.c, Menu.c and Gadget.c).
  28.  
  29. As a preparation, we should do the following once and for all:
  30.  
  31.     cc ShowScr.c
  32.     cc ShowWin.c
  33.     cc ShowGad.c
  34.  
  35. These three files don't have to be built anymore. Unfortunately, ShowMenu.c has
  36. to be re-compiled for each new Menu. Sorry!
  37.  
  38. Now, let's build "Screen":
  39.  
  40.     cc Screen.c
  41.     ln Screen.o ShowScr.o -lc +cdb
  42.  
  43. Followed by building of "Window":
  44.  
  45.     cc Window.c
  46.     ln Window.o ShowWin.o -lc +cdb
  47.  
  48. And by building "Gadget":
  49.  
  50.     cc Gadget.c
  51.     ln Gadget.o ShowGad.o -lc +cdb
  52.  
  53. Finally, we'll describe how to build "Menu". This is slightly more difficult.
  54. We have to inspect Steal's output, in this case Menu.c, to find out what's the
  55. last struct Menu defined in there. This struct is at the end of the file. For
  56. Menu.c we'll find that the last menu is men7, so we'll compile as follows:
  57.  
  58.     cc -Dmenu=men7 ShowMenu.c
  59.     cc Menu.c
  60.     ln Menu.o ShowMenu.o -lc +cdb
  61.  
  62. And now we also have an executable file "Menu".
  63.  
  64. Note that the linker option +cdb is realy important; It tells the linker to
  65. specify that (static as well as initialized) data is always loaded into chip
  66. memory. If this option is omitted, pictures can be loaded into fast memory,
  67. where the DMA chips can't reach it to copy it from onto the screen.
  68.  
  69. Have lots of fun with it, and LEARN by stealing!!!
  70.  
  71.  
  72.  
  73.                     Rick van Rein
  74.