update for HEAD-2003050101
[reactos.git] / lib / freetype / builds / amiga / README
1 The makefile is  for ppc-morphos-gcc-2.95.3-bin.tgz (gcc 2.95.3 hosted
2 on       68k-Amiga      producing       MorphOS-PPC-binaries      from
3 http://www.morphos.de).  To  use it, type "make  assign", then "make";
4 it produces a link library libft2_ppc.a.
5
6 The smakefile is a makefile for Amiga SAS/C 6.58 (no longer available,
7 latest sold version was 6.50, updates  can be found in Aminet).  It is
8 based on the version found  in the sourcecode of ttf.library 0.83b for
9 FreeType   1.3.1    from   Richard   Griffith   (ragriffi@sprynet.com,
10 http://ragriffi.home.sprynet.com).
11
12 You will  also need  the latest include  files and amiga.lib  from the
13 Amiga  web   site  (http://www.amiga.com/3.9/download/NDK3.9.lha)  for
14 AmigaOS 3.9; the generated code should work under AmigaOS 2.04 and up.
15
16 To use it, call "smake  assign" and then "smake" from the builds/amiga
17 directory.  The results are:
18
19 - A link  library "ft2_680x0.lib" (where  x depends on the  setting of
20   the  CPU entry  in  the smakefile)  containing  all FreeType2  parts
21   except of  the init code,  debugging code, and the  system interface
22   code.
23
24 - ftsystem.o, an object module  containing the standard version of the
25   system interface  code which  uses fopen() fclose()  fread() fseek()
26   ftell() malloc() realloc() and free() from lib:sc.lib (not pure).
27
28 - ftsystempure.o, an object module  containing the pure version of the
29   system  interface  code  which  uses Open()  Close()  Read()  Seek()
30   ExamineFH() AsmAllocPooled() AsmFreePooled()  etc.  This version can
31   be used in both normal  programs and in Amiga run-time shared system
32   librarys (can be  linked with lib:libinit.o, no copying  of DATA and
33   BSS  hunks for  each OpenLibrary()  necessary).  Source  code  is in
34   src/base/ftsystem.c.
35
36 - ftdebug.o, an  object module containing the standard  version of the
37   debugging  code   which  uses  vprintf()  and   exit()  (not  pure).
38   Debugging can be  turned on in FT:include/freetype/config/ftoption.h
39   and with FT_SetTraceLevel().
40
41 - ftdebugpure.o, an  object module containing the pure  version of the
42   debugging  code  which uses  KVPrintf()  from  lib:debug.lib and  no
43   exit().  For  debugging of  Amiga run-time shared  system libraries.
44   Source code is in src/base/ftdebug.c.
45
46 - NO ftinit.o.   Since linking  with a link  library should  result in
47   linking  only  the  needed   object  modules  in  it,  but  standard
48   ftsystem.o would  force ALL FreeType2  modules to be linked  to your
49   program,  I decided  to use  a different  scheme: You  must #include
50   FT:src/base/ftinit.c  in your  sourcecode and  specify  with #define
51   statements       which       modules       you      need.        See
52   include/freetype/config/ftmodule.h.
53
54
55 To use in your own programs:
56
57 - Insert   the   #define  and   #include   statements   from  top   of
58   include/freetype/config/ftmodule.h in your source code and uncomment
59   the #define statements for the FreeType2 modules you need.
60
61 - You  can  use  either  PARAMETERS=REGISTER or  PARAMETERS=STACK  for
62   calling  the FreeType2  functions, since  the link  library  and the
63   object files are compiled with PARAMETERS=BOTH.
64
65 - "smake assign" (assign "FT:" to the FreeType2 main directory).
66
67 - Compile your program.
68
69 - Link with either ftsystem.o  or ftsystempure.o, if debugging enabled
70   with either ftdebug.o or (ftdebugpure.o and lib:debug.lib), and with
71   ft2_680x0.lib as link library.
72
73
74 To adapt to other compilers:
75
76 - The standard ANSI  C maximum length of 31  significant characters in
77   identifiers is not enough for FreeType2.  Check if your compiler has
78   a minimum length of 40  significant characters or can be switched to
79   it.   "idlen=40"   is  the   option  for  SAS/C.    Setting  #define
80   HAVE_LIMIT_ON_IDENTS in an include file may also work (not tested).
81
82 - Make  sure that the  include directory  in builds/amiga  is searched
83   before the  normal FreeType2 include  directory, so you are  able to
84   replace problematic include files with your own version (same may be
85   useful for the src directory).
86
87 - An example  of how to replace/workaround a  problematic include file
88   is  include/config/ftconfig.h;  it  changes  a  #define  that  would
89   prevent SAS/C  from generating  XDEF's where it  should do  that and
90   then includes the standard FreeType2 include file.