home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Otherware
/
Otherware_1_SB_Development.iso
/
amiga
/
programm
/
language
/
gcc222.lha
/
geninline
/
README.glue
< prev
next >
Wrap
Text File
|
1992-08-10
|
2KB
|
62 lines
To generate glue functions to build a small (but free;-)) version of
libamiga.a, two files are involved:
- template.c
- genglue.p
template.c really is my test file for inline headers, I just found it to
be useful for this purpose as well. If you look at it, you see that it
includes all available inline headers, along with their CBM proto headers
(which are not included in this distribution, because they are copyrighted
by CBM). You need the clib/ files only, if you want to test inline headers
(whether the automatically generated parameters match the declarations in
the official headers). If you only want to regenerate libamy.a, just remove
them.
Since all headers are included at once, you might get memory problems if
you don't have enough real (or virtual;-)) memory. In that case just split
the file into multiple, smaller parts. Isolating inclusion of large inline
headers might be a good idea, so you might consider isolating dos.h,
graphics.h. Just keep in mind to add
#define static
#define __inline
all your own templates, so that the functions really are compiled;-)
Here's, step by step, what I did to generate the two libraries, blib/libamy.a
and lib/libamy.a:
MakeDir normal-s
MakeDir baserel-s
gcc -O2 -S template.c ; this leaves a template.s file
gcc -O2 -S -fbaserel template.c -o template.bs ; leaves template.bs
cd normal-s
perl ../genglue.p < /template.s ; may take a LONG time!
gcc -c *.s ; ""
ar q libamy.a *.o ; ""
cd /baserel-s
perl ../genglue.p < /template.bs ; ""
gcc -c *.s ; ""
ar q libamy.a *.o ; ""
cd /
You now have normal-s/libamy.a which is a small, not a4-relative libamiga.a,
and baserel-s/libamy.a, which is base (ie. a4) relative.
The above warnings, that those commands may take a LONG time, are for real.
All of them have to deal with roughly 800 assembler rsp. object files, just
the time to create those files (thus not counted the time needed to process
them) is quite noticeable... But as long as you see your harddisk working,
everything should procede as expected ;-)
Good luck!
-Markus
BTW: oh, and don't forget that you don't *have* to do this step yourself,
both libamy.a are included in this distribution. You'll only need to walk
thru these steps if you get a newer AmigaOS release some day ;-)