/modules/freetype2/docs/INSTALL.CROSS

http://github.com/zpao/v8monkey · Unknown · 135 lines · 90 code · 45 blank · 0 comment · 0 complexity · 58c883670a1b439818ea0d56f6d6dde4 MD5 · raw file

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