misc/libfreetype/docs/INSTALL.CROSS
author unc0rr
Wed, 18 Jul 2012 23:02:14 +0400
changeset 7398 2b7b939014b5
parent 5172 88f2e05288ba
permissions -rw-r--r--
Start TestCake
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     1
This document contains instructions on how to cross-build the FreeType
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     2
library on Unix systems, for example, building binaries for Linux/MIPS
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     3
on  FreeBSD/i386.   Before   reading  this  document,  please  consult
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     4
INSTALL.UNIX for required tools and the basic self-building procedure.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     5
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
  1. Required Tools
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
  -----------------
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    10
    For self-building the FreeType library  on a Unix system, GNU Make
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    11
    3.80 or  newer is required.   INSTALL.UNIX  contains  hints how to
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    12
    check the installed `make'.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    13
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    14
    The GNU C  compiler to cross-build the target  system is required.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    15
    At present, using non-GNU cross compiler is not tested.  The cross
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    16
    compiler is  expected to be  installed with a system  prefix.  For
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    17
    example, if  your building system  is FreeBSD/i386 and  the target
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    18
    system is Linux/MIPS, the  cross compiler should be installed with
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    19
    the name `mips-ip22-linuxelf-gcc'.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
    A C  compiler for a self-build  is required also, to  build a tool
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
    that  is executed  during  the building  procedure.  Non-GNU  self
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
    compilers are acceptable, but such a setup is not tested yet.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
  2. Configuration
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
  ----------------
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
    2.1. Building and target system
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
      To configure for  cross-build, the options `--host=<system>' and
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
      `--build=<system>' must be passed to configure.  For example, if
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
      your building  system is FreeBSD/i386  and the target  system is
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
      Linux/MIPS, say
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
        ./configure \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
          --build=i386-unknown-freebsd \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
          --host=mips-ip22-linuxelf \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
          [other options]
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
      It should  be noted that `--host=<system>'  specifies the system
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
      where the built binaries will  be executed, not the system where
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
      the build actually happens.   Older versions of GNU autoconf use
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
      the option  pair `--host=' and `--target='.  This  is broken and
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
      doesn't work.  Similarly, an explicit CC specification like
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
        env CC=mips-ip22-linux-gcc ./configure
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    49
      or
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    50
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
        env CC=/usr/local/mips-ip22-linux/bin/gcc ./configure
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
      doesn't   work  either;  such   a  configuration   confuses  the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
      `configure' script while  trying to find the cross  and native C
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
      compilers.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
    2.2. The prefix to install FreeType2
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
      Setting `--prefix=<prefix>'  properly is important.   The prefix
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
      to install FreeType2 is  written into the freetype-config script
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
      and freetype2.pc configuration file.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
      If  the built  FreeType  2 library  is  used as  a  part of  the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
      cross-building system,  the prefix  is expected to  be different
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
      from the self-building  system.  For example, configuration with
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
      `--prefix=/usr/local'  installs binaries  into  the system  wide
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
      `/usr/local'  directory  which  then  can't be  executed.   This
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
      causes confusion in configuration  of all applications which use
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
      FreeType2.   Instead,  use a  prefix to install  the cross-build
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
      into     a     separate     system    tree,     for     example,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
      `--prefix=/usr/local/mips-ip22-linux/'.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
      On the other  hand, if the built FreeType2 is used  as a part of
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
      the target system, the prefix to install should reflect the file
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
      system structure of the target system.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
  3. Building command
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
  -------------------
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
    If  the  configuration  finishes successfully,  invoking  GNU make
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
    builds FreeType2.  Just say
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
      make
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
    or
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
      gmake
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
    depending on the name the GNU make binary actually has.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
  4. Installation
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
  ---------------
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
    Saying
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
      make install
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
    as usual to install FreeType2 into the directory tree specified by
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
    the argument of the `--prefix' option.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
    As noted in section 2.2,  FreeType2  is sometimes configured to be
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
    installed  into the  system directory  of the  target  system, and
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
    should  not be installed  in the  cross-building system.   In such
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
    cases, the  make variable `DESTDIR'  is useful to change  the root
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
    directory in the installation.  For example, after
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
      make DESTDIR=/mnt/target_system_root/ install
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
    the built FreeType2 library files are installed into the directory
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
    `/mnt/target_system_root/<prefix_in_configure>/lib'.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
  5. TODO
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
  -------
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
    Cross building between Cygwin (or MSys) and Unix must be tested.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
----------------------------------------------------------------------
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
Copyright 2006, 2008 by suzuki toshiya
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
David Turner, Robert Wilhelm, and Werner Lemberg.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
This  file is  part of  the FreeType  project, and  may only  be used,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
modified,  and distributed  under the  terms of  the  FreeType project
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
license,  LICENSE.TXT.  By  continuing to  use, modify,  or distribute
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
this file you  indicate that you have read  the license and understand
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
and accept it fully.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
--- end of INSTALL.CROSS ---