PageRenderTime 20ms CodeModel.GetById 15ms app.highlight 1ms RepoModel.GetById 3ms app.codeStats 0ms

/modules/freetype2/builds/amiga/README

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