home *** CD-ROM | disk | FTP | other *** search
- I'll now give a brief explanation on how to build the files in the directory
- :bin from their sources in :src. Compilation was originally done using Aztec C
- version 3.4a with integers of 16 bits, but there should to my opinion be no
- difficulties in using other compilers instead. Keep in mind that the
- instructions to create the executables may differ for other compilers!
-
- First of all, building Steal itself is done from the three source files
- Steal.c, Print.c and Basic.c:
-
- cc Steal.c
- cc Print.c
- cc Basic.c
- ln Steal.o Print.o Basic.o -lc
-
- We now have made an executable file "Steal" that behaves just like the one as
- it has been put in the :bin directory. Another utility delivered with Steal is
- Icon2Gadget:
-
- cc Icon2Gadget.c
- ln Icon2Gadget.o -lc
-
- Now we have also made an executable Icon2Gadget that is a copy of the one in
- the :bin directory.
-
- Let's assume we've stolen some Intuition element and now we want to build an
- executable from it. As an example, some sources as they are used in the demo
- are included allready (Screen.c, Window.c, Menu.c and Gadget.c).
-
- As a preparation, we should do the following once and for all:
-
- cc ShowScr.c
- cc ShowWin.c
- cc ShowGad.c
-
- These three files don't have to be built anymore. Unfortunately, ShowMenu.c has
- to be re-compiled for each new Menu. Sorry!
-
- Now, let's build "Screen":
-
- cc Screen.c
- ln Screen.o ShowScr.o -lc +cdb
-
- Followed by building of "Window":
-
- cc Window.c
- ln Window.o ShowWin.o -lc +cdb
-
- And by building "Gadget":
-
- cc Gadget.c
- ln Gadget.o ShowGad.o -lc +cdb
-
- Finally, we'll describe how to build "Menu". This is slightly more difficult.
- We have to inspect Steal's output, in this case Menu.c, to find out what's the
- last struct Menu defined in there. This struct is at the end of the file. For
- Menu.c we'll find that the last menu is men7, so we'll compile as follows:
-
- cc -Dmenu=men7 ShowMenu.c
- cc Menu.c
- ln Menu.o ShowMenu.o -lc +cdb
-
- And now we also have an executable file "Menu".
-
- Note that the linker option +cdb is realy important; It tells the linker to
- specify that (static as well as initialized) data is always loaded into chip
- memory. If this option is omitted, pictures can be loaded into fast memory,
- where the DMA chips can't reach it to copy it from onto the screen.
-
- Have lots of fun with it, and LEARN by stealing!!!
-
-
-
- Rick van Rein
-