Compare commits
6 commits
Author | SHA1 | Date | |
---|---|---|---|
|
8e514f4ada | ||
|
23ba1aa0dd | ||
|
d5e6fde704 | ||
|
73766c6fff | ||
|
b8753b44fc | ||
|
291c90597f |
744 changed files with 936 additions and 346952 deletions
|
@ -1,16 +0,0 @@
|
|||
BasedOnStyle: Chromium
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: true
|
||||
AlignConsecutiveDeclarations: true
|
||||
AlignConsecutiveMacros: true
|
||||
AlignEscapedNewlines: true
|
||||
# AlignOperands: Align
|
||||
AlignTrailingComments: true
|
||||
AlwaysBreakAfterReturnType: AllDefinitions
|
||||
BreakBeforeBraces: Allman
|
||||
ColumnLimit: 80
|
||||
DerivePointerAlignment: false
|
||||
IndentCaseLabels: false
|
||||
PointerAlignment: Left
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpacesInParentheses: true
|
9
.gitignore
vendored
9
.gitignore
vendored
|
@ -1,7 +1,2 @@
|
|||
/build/
|
||||
/config.mk
|
||||
include/dlg/
|
||||
src/dlg/dlg.c
|
||||
subprojects/*
|
||||
!subprojects/*.wrap
|
||||
/tests/data/*
|
||||
config.mk
|
||||
objs/vc2010/
|
||||
|
|
241
.gitlab-ci.yml
241
.gitlab-ci.yml
|
@ -1,241 +0,0 @@
|
|||
# CI setup for FreeType.
|
||||
|
||||
# https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/540
|
||||
workflow:
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
- if: $CI_PIPELINE_SOURCE == 'push'
|
||||
|
||||
stages:
|
||||
- build
|
||||
|
||||
# FIXME: Use --werror once warnings are fixed.
|
||||
variables:
|
||||
MESON_ARGS: --fatal-meson-warnings --default-library=both
|
||||
MESON_ARGS_WINDOWS: ${MESON_ARGS} --force-fallback-for=zlib
|
||||
|
||||
.build windows common:
|
||||
# TODO: should probably get its own image at some point instead of reusing the GStreamer one
|
||||
# See https://gitlab.freedesktop.org/gstreamer/gstreamer/container_registry/18035 for latest
|
||||
image: "registry.freedesktop.org/gstreamer/gstreamer/amd64/windows:2022-07-29.3-main"
|
||||
stage: 'build'
|
||||
tags:
|
||||
- 'docker'
|
||||
- 'windows'
|
||||
- '2022'
|
||||
- 'gstreamer-windows'
|
||||
|
||||
.build linux common:
|
||||
# See
|
||||
# https://gitlab.freedesktop.org/freetype/docker-images/container_registry/20896
|
||||
image: 'registry.freedesktop.org/freetype/docker-images/debian:latest'
|
||||
stage: 'build'
|
||||
|
||||
.build macos common:
|
||||
stage: 'build'
|
||||
tags:
|
||||
- 'gst-macos-11.1'
|
||||
|
||||
.build windows meson:
|
||||
extends: '.build windows common'
|
||||
variables:
|
||||
# Make sure any failure in PowerShell scripts is fatal.
|
||||
ErrorActionPreference: 'Stop'
|
||||
WarningPreference: 'Stop'
|
||||
# Uncomment the following key if you need to pass custom args, as well
|
||||
# with the `$env:MESON_ARGS` line in the `script:` blocks.
|
||||
# MESON_ARGS: >-
|
||||
# -Dfoo=enabled
|
||||
# -Dbar=disabled
|
||||
before_script:
|
||||
# Update RootCAs in order to access to some sites.
|
||||
- certutil -generateSSTFromWU "C:\roots.sst"
|
||||
- Import-Certificate -CertStoreLocation "Cert:\LocalMachine\Root" "C:\roots.sst"
|
||||
# Make sure meson is up to date so we don't need to rebuild the image
|
||||
# with each release.
|
||||
- pip3 install -U 'meson==0.59.*'
|
||||
- pip3 install -U ninja
|
||||
script:
|
||||
# For some reason, options are separated by newlines instead of spaces,
|
||||
# so we have to replace them first.
|
||||
#
|
||||
# - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
|
||||
#
|
||||
# Gitlab executes PowerShell in docker, but `VsDevCmd.bat` is a batch
|
||||
# script. Environment variables substitutions is done by PowerShell
|
||||
# before calling `cmd.exe`, that's why we use `$env:FOO` instead of
|
||||
# `%FOO%`.
|
||||
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
|
||||
meson setup build $env:MESON_ARGS_WINDOWS &&
|
||||
meson compile --verbose -C build &&
|
||||
meson test -C build &&
|
||||
meson test -C build --benchmark"
|
||||
|
||||
|
||||
.build windows msbuild:
|
||||
extends: '.build windows common'
|
||||
variables:
|
||||
# Make sure any failure in PowerShell scripts is fatal.
|
||||
ErrorActionPreference: 'Stop'
|
||||
WarningPreference: 'Stop'
|
||||
script:
|
||||
- git submodule update --init --recursive
|
||||
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
|
||||
MSBuild.exe -clp:ForceConsoleColor -t:Rebuild
|
||||
-p:Configuration=Debug
|
||||
-p:Platform=$env:PLATFORM
|
||||
-p:UserDefines=FT_DEBUG_LOGGING
|
||||
MSBuild.sln"
|
||||
|
||||
|
||||
# Format of job names:
|
||||
# <OS> <Build-Tool> <Build-Params> <Architecture>:
|
||||
|
||||
|
||||
# Windows jobs.
|
||||
|
||||
windows meson vs2019 amd64:
|
||||
extends: '.build windows meson'
|
||||
variables:
|
||||
ARCH: 'amd64'
|
||||
|
||||
windows meson vs2019 x86:
|
||||
extends: '.build windows meson'
|
||||
variables:
|
||||
ARCH: 'x86'
|
||||
|
||||
windows msbuild vs2019 amd64:
|
||||
extends: '.build windows msbuild'
|
||||
variables:
|
||||
ARCH: 'amd64'
|
||||
PLATFORM: 'x64'
|
||||
|
||||
|
||||
# Linux Jobs.
|
||||
#
|
||||
# Jobs with "libs" in the name force-enable libraries.
|
||||
# They are disabled for the remaining jobs.
|
||||
|
||||
linux autotools:
|
||||
extends: '.build linux common'
|
||||
script: |
|
||||
./autogen.sh
|
||||
./configure --with-brotli=no \
|
||||
--with-bzip2=no \
|
||||
--with-harfbuzz=no \
|
||||
--with-png=no \
|
||||
--with-zlib=no \
|
||||
CC=gcc
|
||||
|
||||
make -j$(nproc) && make install
|
||||
|
||||
linux autotools libs:
|
||||
extends: '.build linux common'
|
||||
script: |
|
||||
./autogen.sh
|
||||
./configure --with-brotli=yes \
|
||||
--with-bzip2=yes \
|
||||
--with-harfbuzz=yes \
|
||||
--with-png=yes \
|
||||
--with-zlib=yes \
|
||||
CC=gcc
|
||||
|
||||
make -j$(nproc) && make install
|
||||
|
||||
linux autotools libs clang:
|
||||
extends: '.build linux common'
|
||||
script: |
|
||||
./autogen.sh
|
||||
./configure --with-brotli=yes \
|
||||
--with-bzip2=yes \
|
||||
--with-harfbuzz=yes \
|
||||
--with-png=yes \
|
||||
--with-zlib=yes \
|
||||
CC=clang
|
||||
|
||||
make -j$(nproc) && make install
|
||||
|
||||
linux meson:
|
||||
extends: '.build linux common'
|
||||
script: |
|
||||
meson setup build ${MESON_ARGS} \
|
||||
-Dbrotli=disabled \
|
||||
-Dbzip2=disabled \
|
||||
-Dharfbuzz=disabled \
|
||||
-Dpng=disabled \
|
||||
-Dzlib=disabled
|
||||
|
||||
meson compile --verbose -C build
|
||||
meson install -C build
|
||||
|
||||
linux meson libs:
|
||||
extends: '.build linux common'
|
||||
script: |
|
||||
meson setup build ${MESON_ARGS} \
|
||||
-Dbrotli=enabled \
|
||||
-Dbzip2=enabled \
|
||||
-Dharfbuzz=disabled \
|
||||
-Dpng=disabled \
|
||||
-Dzlib=disabled
|
||||
|
||||
meson compile --verbose -C build
|
||||
meson install -C build
|
||||
|
||||
linux cmake:
|
||||
extends: '.build linux common'
|
||||
script: |
|
||||
cmake -B build -D FT_DISABLE_BROTLI=TRUE \
|
||||
-D FT_DISABLE_BZIP2=TRUE \
|
||||
-D FT_DISABLE_HARFBUZZ=TRUE \
|
||||
-D FT_DISABLE_PNG=TRUE \
|
||||
-D FT_DISABLE_ZLIB=TRUE
|
||||
|
||||
cmake --build build --target install
|
||||
|
||||
linux cmake libs:
|
||||
extends: '.build linux common'
|
||||
script: |
|
||||
cmake -B build -D FT_REQUIRE_BROTLI=TRUE \
|
||||
-D FT_REQUIRE_BZIP2=TRUE \
|
||||
-D FT_REQUIRE_HARFBUZZ=TRUE \
|
||||
-D FT_REQUIRE_PNG=TRUE \
|
||||
-D FT_REQUIRE_ZLIB=TRUE
|
||||
|
||||
cmake --build build --target install
|
||||
|
||||
|
||||
# MacOS jobs.
|
||||
|
||||
macos autotools:
|
||||
extends: '.build macos common'
|
||||
before_script:
|
||||
- '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"'
|
||||
script:
|
||||
- brew install autoconf automake libtool
|
||||
- ./autogen.sh
|
||||
- ./configure
|
||||
- 'make -j$(sysctl -n hw.logicalcpu)'
|
||||
- make install
|
||||
|
||||
macos autotools clang:
|
||||
extends: '.build macos common'
|
||||
before_script:
|
||||
- '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"'
|
||||
script:
|
||||
- brew install autoconf automake libtool
|
||||
- ./autogen.sh
|
||||
- './configure CC=clang'
|
||||
- 'make -j$(sysctl -n hw.logicalcpu)'
|
||||
- make install
|
||||
|
||||
macos meson:
|
||||
extends: '.build macos common'
|
||||
script:
|
||||
- pip3 install --upgrade pip
|
||||
- pip3 install -U meson
|
||||
- pip3 install --upgrade certifi
|
||||
- pip3 install -U ninja
|
||||
|
||||
- meson setup build ${MESON_ARGS}
|
||||
- meson compile --verbose -C build
|
||||
- sudo meson install -C build
|
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
|||
[submodule "dlg"]
|
||||
path = subprojects/dlg
|
||||
url = https://github.com/nyorain/dlg.git
|
27
.mailmap
27
.mailmap
|
@ -1,25 +1,8 @@
|
|||
Alexander Borsuk <me@alex.bio> <alexander.borsuk@qnective.com>
|
||||
Behdad Esfahbod (بهداد اسفهبد) <behdad@behdad.org> <behdad.esfahbod@gmail.com>
|
||||
Behdad Esfahbod (بهداد اسفهبد) <behdad@behdad.org> <behdad@google.com>
|
||||
Behdad Esfahbod (بهداد اسفهبد) <behdad@behdad.org>
|
||||
Ewald Hew (Hew Yih Shiuan 丘毅宣) <ewaldhew@gmail.com>
|
||||
Moazin Khatti (موؤذن کھٹی) <moazinkhatri@gmail.com>
|
||||
Priyesh Kumar (प्रियेश कुमार) <priyeshkkumar@gmail.com>
|
||||
Alexei Podtelezhnikov (Алексей Подтележников) <apodtele@gmail.com>
|
||||
Nikhil Ramakrishnan (निखिल रामकृष्णन) <ramakrishnan.nikhil@gmail.com>
|
||||
Dominik Röttsches <drott@chromium.org> <drott@google.com>
|
||||
Kostya Serebryany <kcc@google.com> <konstantin.s.serebryany@gmail.com>
|
||||
Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp> <sssa@flavor1.ipc.hiroshima-u.ac.jp>
|
||||
Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp> sssa <sssa@IPA2004-mps.local>
|
||||
Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp> sssa <sssa@sssas-powerbook-g4-12.local>
|
||||
Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp> suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
||||
Behdad Esfahbod <behdad@behdad.org> <behdad.esfahbod@gmail.com>
|
||||
Bram Tassyns <bramt@enfocus.be> bram tassyns <BramT@enfocus.be>
|
||||
Bram Tassyns <bramt@enfocus.be> <BramT@enfocus.com>
|
||||
Anurag Thakur (अनुराग ठाकुर) <anuthadev@gmail.com>
|
||||
David Turner <david@freetype.org> <david.turner.dev@gmail.com>
|
||||
David Turner <david@freetype.org> <digit@google.com>
|
||||
Anuj Verma (अनुज वर्मा) <anujv@iitbhilai.ac.in>
|
||||
Ben Wagner <bungeman@gmail.com>
|
||||
Ben Wagner <bungeman@gmail.com> <bungeman@google.com>
|
||||
Ben Wagner <bungeman@gmail.com> <bungeman@chromium.org>
|
||||
Nikolaus Waxweiler <madigens@gmail.com> <nikolaus.waxweiler@daltonmaag.com>
|
||||
Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp> <sssa@flavor1.ipc.hiroshima-u.ac.jp>
|
||||
Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp> sssa <sssa@IPA2004-mps.local>
|
||||
Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp> suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
||||
Ben Wagner <bungeman@gmail.com> Bungeman <bungeman@gmail.com>
|
||||
|
|
683
CMakeLists.txt
683
CMakeLists.txt
|
@ -1,683 +0,0 @@
|
|||
# CMakeLists.txt
|
||||
#
|
||||
# Copyright (C) 2013-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# Written originally by John Cary <cary@txcorp.com>
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
#
|
||||
#
|
||||
# The following will (1) create a build directory, and (2) change into it and
|
||||
# call cmake to configure the build with default parameters as a static
|
||||
# library. See
|
||||
#
|
||||
# https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html
|
||||
#
|
||||
# for information about debug or release builds, for example
|
||||
#
|
||||
# cmake -B build -D CMAKE_BUILD_TYPE=Release
|
||||
#
|
||||
#
|
||||
# For a dynamic library, use
|
||||
#
|
||||
# cmake -B build -D BUILD_SHARED_LIBS=true -D CMAKE_BUILD_TYPE=Release
|
||||
#
|
||||
# For a framework on OS X, use
|
||||
#
|
||||
# cmake -E chdir build cmake -G Xcode -D BUILD_FRAMEWORK:BOOL=true ..
|
||||
#
|
||||
# For an iOS static library, use
|
||||
#
|
||||
# cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=OS ..
|
||||
#
|
||||
# or
|
||||
#
|
||||
# cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=SIMULATOR ..
|
||||
#
|
||||
# or
|
||||
#
|
||||
# cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=SIMULATOR64 ..
|
||||
#
|
||||
#
|
||||
# Finally, build the project with
|
||||
#
|
||||
# cmake --build build
|
||||
#
|
||||
# Install it with
|
||||
#
|
||||
# (sudo) cmake --build build --target install
|
||||
#
|
||||
# A binary distribution can be made with
|
||||
#
|
||||
# cmake --build build --config Release --target package
|
||||
#
|
||||
# Please refer to the cmake manual for further options, in particular, how
|
||||
# to modify compilation and linking parameters.
|
||||
#
|
||||
# Some notes.
|
||||
#
|
||||
# - Say `cmake -LAH` to see all configuration options.
|
||||
#
|
||||
# - `cmake' creates configuration files in
|
||||
#
|
||||
# <build-directory>/include/freetype/config
|
||||
#
|
||||
# which should be further modified if necessary.
|
||||
#
|
||||
# - You can use `cmake' directly on a freshly cloned FreeType git
|
||||
# repository.
|
||||
#
|
||||
# - `CMakeLists.txt' is provided as-is since it is normally not used by the
|
||||
# developer team.
|
||||
#
|
||||
# - Set the `FT_REQUIRE_ZLIB', `FT_REQUIRE_BZIP2', `FT_REQUIRE_PNG',
|
||||
# `FT_REQUIRE_HARFBUZZ', and `FT_REQUIRE_BROTLI' CMake variables to `ON'
|
||||
# or `TRUE' to force using a dependency. Leave a variable undefined
|
||||
# (which is the default) to use the dependency only if it is available.
|
||||
# Example:
|
||||
#
|
||||
# cmake -B build -D FT_REQUIRE_ZLIB=TRUE \
|
||||
# -D FT_REQUIRE_BZIP2=TRUE \
|
||||
# -D FT_REQUIRE_PNG=TRUE \
|
||||
# -D FT_REQUIRE_HARFBUZZ=TRUE \
|
||||
# -D FT_REQUIRE_BROTLI=TRUE [...]
|
||||
#
|
||||
# - Set `FT_DISABLE_XXX=TRUE' to disable a dependency completely (where
|
||||
# `XXX' is a CMake package name like `BZip2'). Example for disabling all
|
||||
# dependencies:
|
||||
#
|
||||
# cmake -B build -D FT_DISABLE_ZLIB=TRUE \
|
||||
# -D FT_DISABLE_BZIP2=TRUE \
|
||||
# -D FT_DISABLE_PNG=TRUE \
|
||||
# -D FT_DISABLE_HARFBUZZ=TRUE \
|
||||
# -D FT_DISABLE_BROTLI=TRUE [...]
|
||||
#
|
||||
# - NOTE: If a package is set as DISABLED, it cannot be set as REQUIRED
|
||||
# without unsetting the DISABLED value first. For example, if
|
||||
# `FT_DISABLE_HARFBUZZ=TRUE' has been set (Cache is present), you need to
|
||||
# call `FT_DISABLE_HARFBUZZ=FALSE' before calling
|
||||
# `FT_REQUIRE_HARFBUZZ=TRUE'.
|
||||
#
|
||||
# - Installation of FreeType can be controlled with the CMake variables
|
||||
# `SKIP_INSTALL_HEADERS', `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL'
|
||||
# (this is compatible with the same CMake variables in zlib's CMake
|
||||
# support).
|
||||
|
||||
# To minimize the number of cmake_policy() workarounds,
|
||||
# CMake >= 3 is requested.
|
||||
cmake_minimum_required(VERSION 3.0...3.5)
|
||||
|
||||
if (NOT CMAKE_VERSION VERSION_LESS 3.3)
|
||||
# Allow symbol visibility settings also on static libraries. CMake < 3.3
|
||||
# only sets the property on a shared library build.
|
||||
cmake_policy(SET CMP0063 NEW)
|
||||
|
||||
# Support new IN_LIST if() operator.
|
||||
cmake_policy(SET CMP0057 NEW)
|
||||
endif ()
|
||||
|
||||
include(CheckIncludeFile)
|
||||
include(CMakeDependentOption)
|
||||
|
||||
# CMAKE_TOOLCHAIN_FILE must be set before `project' is called, which
|
||||
# configures the base build environment and references the toolchain file
|
||||
if (APPLE)
|
||||
if (DEFINED IOS_PLATFORM)
|
||||
if (NOT "${IOS_PLATFORM}" STREQUAL "OS"
|
||||
AND NOT "${IOS_PLATFORM}" STREQUAL "SIMULATOR"
|
||||
AND NOT "${IOS_PLATFORM}" STREQUAL "SIMULATOR64")
|
||||
message(FATAL_ERROR
|
||||
"IOS_PLATFORM must be set to either OS, SIMULATOR, or SIMULATOR64")
|
||||
endif ()
|
||||
if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode")
|
||||
message(AUTHOR_WARNING
|
||||
"You should use Xcode generator with IOS_PLATFORM enabled to get Universal builds.")
|
||||
endif ()
|
||||
if (BUILD_SHARED_LIBS)
|
||||
message(FATAL_ERROR
|
||||
"BUILD_SHARED_LIBS can not be on with IOS_PLATFORM enabled")
|
||||
endif ()
|
||||
if (BUILD_FRAMEWORK)
|
||||
message(FATAL_ERROR
|
||||
"BUILD_FRAMEWORK can not be on with IOS_PLATFORM enabled")
|
||||
endif ()
|
||||
|
||||
# iOS only uses static libraries
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE
|
||||
${CMAKE_SOURCE_DIR}/builds/cmake/iOS.cmake)
|
||||
endif ()
|
||||
else ()
|
||||
if (DEFINED IOS_PLATFORM)
|
||||
message(FATAL_ERROR "IOS_PLATFORM is not supported on this platform")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
project(freetype C)
|
||||
|
||||
set(VERSION_MAJOR "2")
|
||||
set(VERSION_MINOR "13")
|
||||
set(VERSION_PATCH "2")
|
||||
|
||||
# Generate LIBRARY_VERSION and LIBRARY_SOVERSION.
|
||||
set(LIBTOOL_REGEX "version_info='([0-9]+):([0-9]+):([0-9]+)'")
|
||||
file(STRINGS "${PROJECT_SOURCE_DIR}/builds/unix/configure.raw"
|
||||
VERSION_INFO
|
||||
REGEX ${LIBTOOL_REGEX})
|
||||
string(REGEX REPLACE
|
||||
${LIBTOOL_REGEX} "\\1"
|
||||
LIBTOOL_CURRENT "${VERSION_INFO}")
|
||||
string(REGEX REPLACE
|
||||
${LIBTOOL_REGEX} "\\2"
|
||||
LIBTOOL_REVISION "${VERSION_INFO}")
|
||||
string(REGEX REPLACE
|
||||
${LIBTOOL_REGEX} "\\3"
|
||||
LIBTOOL_AGE "${VERSION_INFO}")
|
||||
|
||||
# This is what libtool does internally on Unix platforms.
|
||||
math(EXPR LIBRARY_SOVERSION "${LIBTOOL_CURRENT} - ${LIBTOOL_AGE}")
|
||||
set(LIBRARY_VERSION "${LIBRARY_SOVERSION}.${LIBTOOL_AGE}.${LIBTOOL_REVISION}")
|
||||
|
||||
# External dependency library detection is automatic. See the notes at the
|
||||
# top of this file, for how to force or disable dependencies completely.
|
||||
option(FT_DISABLE_ZLIB
|
||||
"Disable use of system zlib and use internal zlib library instead." OFF)
|
||||
cmake_dependent_option(FT_REQUIRE_ZLIB
|
||||
"Require system zlib instead of internal zlib library." OFF
|
||||
"NOT FT_DISABLE_ZLIB" OFF)
|
||||
|
||||
option(FT_DISABLE_BZIP2
|
||||
"Disable support of bzip2 compressed fonts." OFF)
|
||||
cmake_dependent_option(FT_REQUIRE_BZIP2
|
||||
"Require support of bzip2 compressed fonts." OFF
|
||||
"NOT FT_DISABLE_BZIP2" OFF)
|
||||
|
||||
option(FT_DISABLE_PNG
|
||||
"Disable support of PNG compressed OpenType embedded bitmaps." OFF)
|
||||
cmake_dependent_option(FT_REQUIRE_PNG
|
||||
"Require support of PNG compressed OpenType embedded bitmaps." OFF
|
||||
"NOT FT_DISABLE_PNG" OFF)
|
||||
|
||||
option(FT_DISABLE_HARFBUZZ
|
||||
"Disable HarfBuzz (used for improving auto-hinting of OpenType fonts)." OFF)
|
||||
cmake_dependent_option(FT_REQUIRE_HARFBUZZ
|
||||
"Require HarfBuzz for improving auto-hinting of OpenType fonts." OFF
|
||||
"NOT FT_DISABLE_HARFBUZZ" OFF)
|
||||
|
||||
option(FT_DISABLE_BROTLI
|
||||
"Disable support of compressed WOFF2 fonts." OFF)
|
||||
cmake_dependent_option(FT_REQUIRE_BROTLI
|
||||
"Require support of compressed WOFF2 fonts." OFF
|
||||
"NOT FT_DISABLE_BROTLI" OFF)
|
||||
|
||||
option(FT_ENABLE_ERROR_STRINGS
|
||||
"Enable support for meaningful error descriptions." OFF)
|
||||
|
||||
# Disallow in-source builds
|
||||
if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
|
||||
message(FATAL_ERROR
|
||||
"In-source builds are not permitted! Make a separate folder for"
|
||||
" building, e.g.,\n"
|
||||
" cmake -E make_directory build\n"
|
||||
" cmake -E chdir build cmake ..\n"
|
||||
"Before that, remove the files created by this failed run with\n"
|
||||
" cmake -E remove CMakeCache.txt\n"
|
||||
" cmake -E remove_directory CMakeFiles")
|
||||
endif ()
|
||||
|
||||
|
||||
# Add local cmake modules
|
||||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/builds/cmake)
|
||||
|
||||
|
||||
if (BUILD_FRAMEWORK)
|
||||
if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode")
|
||||
message(FATAL_ERROR
|
||||
"You should use Xcode generator with BUILD_FRAMEWORK enabled")
|
||||
endif ()
|
||||
set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD)")
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif ()
|
||||
|
||||
|
||||
# Find dependencies
|
||||
include(FindPkgConfig)
|
||||
|
||||
if (NOT FT_DISABLE_HARFBUZZ)
|
||||
set(HARFBUZZ_MIN_VERSION "2.0.0")
|
||||
if (FT_REQUIRE_HARFBUZZ)
|
||||
find_package(HarfBuzz ${HARFBUZZ_MIN_VERSION} REQUIRED)
|
||||
else ()
|
||||
find_package(HarfBuzz ${HARFBUZZ_MIN_VERSION})
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT FT_DISABLE_PNG)
|
||||
if (FT_REQUIRE_PNG)
|
||||
find_package(PNG REQUIRED)
|
||||
else ()
|
||||
find_package(PNG)
|
||||
endif ()
|
||||
# FreePNG calls FindZLIB so unset ZLIB_FOUND to respect FT_DISABLE_ZLIB
|
||||
unset(ZLIB_FOUND)
|
||||
endif ()
|
||||
|
||||
if (NOT FT_DISABLE_ZLIB)
|
||||
if (FT_REQUIRE_ZLIB)
|
||||
find_package(ZLIB REQUIRED)
|
||||
else ()
|
||||
find_package(ZLIB)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT FT_DISABLE_BZIP2)
|
||||
# Genuine BZip2 does not provide bzip2.pc, but some platforms have it.
|
||||
# For better dependency in freetype2.pc, bzip2.pc is searched
|
||||
# regardless of the availability of libbz2. If bzip2.pc is found,
|
||||
# Requires.private is used instead of Libs.private.
|
||||
if (FT_REQUIRE_BZIP2)
|
||||
find_package(BZip2 REQUIRED)
|
||||
else ()
|
||||
find_package(BZip2)
|
||||
endif ()
|
||||
pkg_check_modules(PC_BZIP2 bzip2)
|
||||
endif ()
|
||||
|
||||
if (NOT FT_DISABLE_BROTLI)
|
||||
if (FT_REQUIRE_BROTLI)
|
||||
find_package(BrotliDec REQUIRED)
|
||||
else ()
|
||||
find_package(BrotliDec)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Create the configuration file
|
||||
if (UNIX AND NOT WIN32)
|
||||
check_include_file("unistd.h" HAVE_UNISTD_H)
|
||||
check_include_file("fcntl.h" HAVE_FCNTL_H)
|
||||
|
||||
file(READ "${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.h.in"
|
||||
FTCONFIG_H)
|
||||
if (HAVE_UNISTD_H)
|
||||
string(REGEX REPLACE
|
||||
"#undef +(HAVE_UNISTD_H)" "#define \\1 1"
|
||||
FTCONFIG_H "${FTCONFIG_H}")
|
||||
endif ()
|
||||
if (HAVE_FCNTL_H)
|
||||
string(REGEX REPLACE
|
||||
"#undef +(HAVE_FCNTL_H)" "#define \\1 1"
|
||||
FTCONFIG_H "${FTCONFIG_H}")
|
||||
endif ()
|
||||
else ()
|
||||
file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftconfig.h"
|
||||
FTCONFIG_H)
|
||||
endif ()
|
||||
|
||||
set(FTCONFIG_H_NAME "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h")
|
||||
if (EXISTS "${FTCONFIG_H_NAME}")
|
||||
file(READ "${FTCONFIG_H_NAME}" ORIGINAL_FTCONFIG_H)
|
||||
else ()
|
||||
set(ORIGINAL_FTCONFIG_H "")
|
||||
endif ()
|
||||
if (NOT (ORIGINAL_FTCONFIG_H STREQUAL FTCONFIG_H))
|
||||
file(WRITE "${FTCONFIG_H_NAME}" "${FTCONFIG_H}")
|
||||
endif ()
|
||||
|
||||
|
||||
# Create the options file
|
||||
file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftoption.h"
|
||||
FTOPTION_H)
|
||||
if (ZLIB_FOUND)
|
||||
string(REGEX REPLACE
|
||||
"/\\* +(#define +FT_CONFIG_OPTION_SYSTEM_ZLIB) +\\*/" "\\1"
|
||||
FTOPTION_H "${FTOPTION_H}")
|
||||
endif ()
|
||||
if (BZIP2_FOUND)
|
||||
string(REGEX REPLACE
|
||||
"/\\* +(#define +FT_CONFIG_OPTION_USE_BZIP2) +\\*/" "\\1"
|
||||
FTOPTION_H "${FTOPTION_H}")
|
||||
endif ()
|
||||
if (PNG_FOUND)
|
||||
string(REGEX REPLACE
|
||||
"/\\* +(#define +FT_CONFIG_OPTION_USE_PNG) +\\*/" "\\1"
|
||||
FTOPTION_H "${FTOPTION_H}")
|
||||
endif ()
|
||||
if (HARFBUZZ_FOUND)
|
||||
string(REGEX REPLACE
|
||||
"/\\* +(#define +FT_CONFIG_OPTION_USE_HARFBUZZ) +\\*/" "\\1"
|
||||
FTOPTION_H "${FTOPTION_H}")
|
||||
endif ()
|
||||
if (BROTLIDEC_FOUND)
|
||||
string(REGEX REPLACE
|
||||
"/\\* +(#define +FT_CONFIG_OPTION_USE_BROTLI) +\\*/" "\\1"
|
||||
FTOPTION_H "${FTOPTION_H}")
|
||||
endif ()
|
||||
|
||||
if (FT_ENABLE_ERROR_STRINGS)
|
||||
string(REGEX REPLACE
|
||||
"/\\* +(#define +FT_CONFIG_OPTION_ERROR_STRINGS) +\\*/" "\\1"
|
||||
FTOPTION_H "${FTOPTION_H}")
|
||||
endif ()
|
||||
|
||||
set(FTOPTION_H_NAME "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h")
|
||||
if (EXISTS "${FTOPTION_H_NAME}")
|
||||
file(READ "${FTOPTION_H_NAME}" ORIGINAL_FTOPTION_H)
|
||||
else ()
|
||||
set(ORIGINAL_FTOPTION_H "")
|
||||
endif ()
|
||||
if (NOT (ORIGINAL_FTOPTION_H STREQUAL FTOPTION_H))
|
||||
file(WRITE "${FTOPTION_H_NAME}" "${FTOPTION_H}")
|
||||
endif ()
|
||||
|
||||
|
||||
file(GLOB PUBLIC_HEADERS "include/ft2build.h" "include/freetype/*.h")
|
||||
file(GLOB PUBLIC_CONFIG_HEADERS "include/freetype/config/*.h")
|
||||
file(GLOB PRIVATE_HEADERS "include/freetype/internal/*.h")
|
||||
|
||||
|
||||
set(BASE_SRCS
|
||||
src/autofit/autofit.c
|
||||
src/base/ftbase.c
|
||||
src/base/ftbbox.c
|
||||
src/base/ftbdf.c
|
||||
src/base/ftbitmap.c
|
||||
src/base/ftcid.c
|
||||
src/base/ftfstype.c
|
||||
src/base/ftgasp.c
|
||||
src/base/ftglyph.c
|
||||
src/base/ftgxval.c
|
||||
src/base/ftinit.c
|
||||
src/base/ftmm.c
|
||||
src/base/ftotval.c
|
||||
src/base/ftpatent.c
|
||||
src/base/ftpfr.c
|
||||
src/base/ftstroke.c
|
||||
src/base/ftsynth.c
|
||||
src/base/fttype1.c
|
||||
src/base/ftwinfnt.c
|
||||
src/bdf/bdf.c
|
||||
src/bzip2/ftbzip2.c
|
||||
src/cache/ftcache.c
|
||||
src/cff/cff.c
|
||||
src/cid/type1cid.c
|
||||
src/gzip/ftgzip.c
|
||||
src/lzw/ftlzw.c
|
||||
src/pcf/pcf.c
|
||||
src/pfr/pfr.c
|
||||
src/psaux/psaux.c
|
||||
src/pshinter/pshinter.c
|
||||
src/psnames/psnames.c
|
||||
src/raster/raster.c
|
||||
src/sdf/sdf.c
|
||||
src/sfnt/sfnt.c
|
||||
src/smooth/smooth.c
|
||||
src/svg/svg.c
|
||||
src/truetype/truetype.c
|
||||
src/type1/type1.c
|
||||
src/type42/type42.c
|
||||
src/winfonts/winfnt.c
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
list(APPEND BASE_SRCS "builds/windows/ftsystem.c")
|
||||
elseif (UNIX)
|
||||
list(APPEND BASE_SRCS "builds/unix/ftsystem.c")
|
||||
else ()
|
||||
list(APPEND BASE_SRCS "src/base/ftsystem.c")
|
||||
endif ()
|
||||
|
||||
if (WIN32)
|
||||
enable_language(RC)
|
||||
list(APPEND BASE_SRCS builds/windows/ftdebug.c
|
||||
src/base/ftver.rc)
|
||||
elseif (WINCE)
|
||||
list(APPEND BASE_SRCS builds/wince/ftdebug.c)
|
||||
else ()
|
||||
list(APPEND BASE_SRCS src/base/ftdebug.c)
|
||||
endif ()
|
||||
|
||||
if (BUILD_FRAMEWORK)
|
||||
list(APPEND BASE_SRCS builds/mac/freetype-Info.plist)
|
||||
endif ()
|
||||
|
||||
|
||||
if (NOT DISABLE_FORCE_DEBUG_POSTFIX)
|
||||
set(CMAKE_DEBUG_POSTFIX d)
|
||||
endif ()
|
||||
|
||||
|
||||
add_library(freetype
|
||||
${PUBLIC_HEADERS}
|
||||
${PUBLIC_CONFIG_HEADERS}
|
||||
${PRIVATE_HEADERS}
|
||||
${BASE_SRCS}
|
||||
)
|
||||
|
||||
set_target_properties(
|
||||
freetype PROPERTIES
|
||||
C_VISIBILITY_PRESET hidden)
|
||||
|
||||
target_compile_definitions(
|
||||
freetype PRIVATE FT2_BUILD_LIBRARY)
|
||||
|
||||
if (WIN32)
|
||||
target_compile_definitions(
|
||||
freetype PRIVATE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(
|
||||
freetype PRIVATE DLL_EXPORT)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set_target_properties(freetype PROPERTIES
|
||||
VERSION ${LIBRARY_VERSION}
|
||||
SOVERSION ${LIBRARY_SOVERSION})
|
||||
endif ()
|
||||
|
||||
# Pick up ftconfig.h and ftoption.h generated above, first.
|
||||
target_include_directories(
|
||||
freetype
|
||||
PUBLIC
|
||||
$<INSTALL_INTERFACE:include/freetype2>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
|
||||
# Make <ftconfig.h> available for builds/unix/ftsystem.c.
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include/freetype/config
|
||||
)
|
||||
|
||||
|
||||
if (BUILD_FRAMEWORK)
|
||||
set_property(SOURCE ${PUBLIC_CONFIG_HEADERS}
|
||||
PROPERTY MACOSX_PACKAGE_LOCATION Headers/config
|
||||
)
|
||||
set_target_properties(freetype PROPERTIES
|
||||
FRAMEWORK TRUE
|
||||
MACOSX_FRAMEWORK_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/builds/mac/freetype-Info.plist
|
||||
PUBLIC_HEADER "${PUBLIC_HEADERS}"
|
||||
XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
|
||||
)
|
||||
endif ()
|
||||
|
||||
# 'freetype-interface' is an interface library, to be accessed with
|
||||
# `EXPORT_NAME Freetype::Freetype`. This is the target name provided by
|
||||
# CMake's `FindFreetype.cmake`, so we provide it for compatibility.
|
||||
add_library(freetype-interface INTERFACE)
|
||||
set_target_properties(freetype-interface PROPERTIES
|
||||
EXPORT_NAME Freetype::Freetype
|
||||
INTERFACE_LINK_LIBRARIES freetype)
|
||||
|
||||
set(PKGCONFIG_REQUIRES "")
|
||||
set(PKGCONFIG_REQUIRES_PRIVATE "")
|
||||
set(PKGCONFIG_LIBS "-L\${libdir} -lfreetype")
|
||||
set(PKGCONFIG_LIBS_PRIVATE "")
|
||||
|
||||
if (ZLIB_FOUND)
|
||||
target_link_libraries(freetype PRIVATE ${ZLIB_LIBRARIES})
|
||||
target_include_directories(freetype PRIVATE ${ZLIB_INCLUDE_DIRS})
|
||||
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "zlib")
|
||||
endif ()
|
||||
if (BZIP2_FOUND)
|
||||
target_link_libraries(freetype PRIVATE ${BZIP2_LIBRARIES})
|
||||
target_include_directories(freetype PRIVATE ${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS
|
||||
if (PC_BZIP2_FOUND)
|
||||
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "bzip2")
|
||||
else ()
|
||||
list(APPEND PKGCONFIG_LIBS_PRIVATE "-lbz2")
|
||||
endif ()
|
||||
endif ()
|
||||
if (PNG_FOUND)
|
||||
target_link_libraries(freetype PRIVATE ${PNG_LIBRARIES})
|
||||
target_compile_definitions(freetype PRIVATE ${PNG_DEFINITIONS})
|
||||
target_include_directories(freetype PRIVATE ${PNG_INCLUDE_DIRS})
|
||||
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libpng")
|
||||
endif ()
|
||||
if (HarfBuzz_FOUND)
|
||||
target_link_libraries(freetype PRIVATE ${HarfBuzz_LIBRARY})
|
||||
target_include_directories(freetype PRIVATE ${HarfBuzz_INCLUDE_DIRS})
|
||||
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "harfbuzz >= ${HARFBUZZ_MIN_VERSION}")
|
||||
endif ()
|
||||
if (BROTLIDEC_FOUND)
|
||||
target_link_libraries(freetype PRIVATE ${BROTLIDEC_LIBRARIES})
|
||||
target_compile_definitions(freetype PRIVATE ${BROTLIDEC_DEFINITIONS})
|
||||
target_include_directories(freetype PRIVATE ${BROTLIDEC_INCLUDE_DIRS})
|
||||
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libbrotlidec")
|
||||
endif ()
|
||||
|
||||
|
||||
# Installation
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
|
||||
install(
|
||||
# Note the trailing slash in the argument to `DIRECTORY'!
|
||||
DIRECTORY ${PROJECT_SOURCE_DIR}/include/
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2
|
||||
COMPONENT headers
|
||||
PATTERN "internal" EXCLUDE
|
||||
PATTERN "ftconfig.h" EXCLUDE
|
||||
PATTERN "ftoption.h" EXCLUDE)
|
||||
install(
|
||||
FILES ${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h
|
||||
${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2/freetype/config
|
||||
COMPONENT headers)
|
||||
endif ()
|
||||
|
||||
if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
||||
# Generate the pkg-config file
|
||||
file(READ "${PROJECT_SOURCE_DIR}/builds/unix/freetype2.in" FREETYPE2_PC_IN)
|
||||
|
||||
string(REPLACE ";" ", " PKGCONFIG_REQUIRES_PRIVATE "${PKGCONFIG_REQUIRES_PRIVATE}")
|
||||
|
||||
string(REPLACE "%prefix%" ${CMAKE_INSTALL_PREFIX}
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%exec_prefix%" "\${prefix}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%libdir%" "\${prefix}/${CMAKE_INSTALL_LIBDIR}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%includedir%" "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%ft_version%" "${LIBTOOL_CURRENT}.${LIBTOOL_REVISION}.${LIBTOOL_AGE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" "${PKGCONFIG_REQUIRES_PRIVATE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" "${PKGCONFIG_LIBS_PRIVATE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
else ()
|
||||
string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES} ${PKGCONFIG_REQUIRES_PRIVATE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" ""
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS} ${PKGCONFIG_LIBS_PRIVATE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" ""
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
endif ()
|
||||
|
||||
set(FREETYPE2_PC_IN_NAME "${PROJECT_BINARY_DIR}/freetype2.pc")
|
||||
if (EXISTS "${FREETYPE2_PC_IN_NAME}")
|
||||
file(READ "${FREETYPE2_PC_IN_NAME}" ORIGINAL_FREETYPE2_PC_IN)
|
||||
else ()
|
||||
set(ORIGINAL_FREETYPE2_PC_IN "")
|
||||
endif ()
|
||||
if (NOT (ORIGINAL_FREETYPE2_PC_IN STREQUAL FREETYPE2_PC_IN))
|
||||
file(WRITE "${FREETYPE2_PC_IN_NAME}" ${FREETYPE2_PC_IN})
|
||||
endif ()
|
||||
|
||||
install(
|
||||
FILES ${PROJECT_BINARY_DIR}/freetype2.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
||||
COMPONENT pkgconfig)
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
write_basic_package_version_file(
|
||||
${PROJECT_BINARY_DIR}/freetype-config-version.cmake
|
||||
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
|
||||
COMPATIBILITY SameMajorVersion)
|
||||
|
||||
install(
|
||||
TARGETS freetype freetype-interface
|
||||
EXPORT freetype-targets
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
FRAMEWORK DESTINATION Library/Frameworks
|
||||
COMPONENT libraries)
|
||||
install(
|
||||
EXPORT freetype-targets
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
|
||||
FILE freetype-config.cmake
|
||||
COMPONENT headers)
|
||||
install(
|
||||
FILES ${PROJECT_BINARY_DIR}/freetype-config-version.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
|
||||
COMPONENT headers)
|
||||
endif ()
|
||||
|
||||
|
||||
# Packaging
|
||||
set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The FreeType font rendering library.")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.TXT")
|
||||
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
|
||||
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
|
||||
|
||||
if (WIN32)
|
||||
set(CPACK_GENERATOR ZIP)
|
||||
else ()
|
||||
set(CPACK_GENERATOR TGZ)
|
||||
endif ()
|
||||
|
||||
set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
|
||||
set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C/C++ Headers")
|
||||
set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION
|
||||
"Library used to build programs which use FreeType")
|
||||
set(CPACK_COMPONENT_HEADERS_DESCRIPTION
|
||||
"C/C++ header files for use with FreeType")
|
||||
set(CPACK_COMPONENT_HEADERS_DEPENDS libraries)
|
||||
set(CPACK_COMPONENT_LIBRARIES_GROUP "Development")
|
||||
set(CPACK_COMPONENT_HEADERS_GROUP "Development")
|
||||
|
||||
include(CPack)
|
46
LICENSE.TXT
46
LICENSE.TXT
|
@ -1,46 +0,0 @@
|
|||
FREETYPE LICENSES
|
||||
-----------------
|
||||
|
||||
The FreeType 2 font engine is copyrighted work and cannot be used
|
||||
legally without a software license. In order to make this project
|
||||
usable to a vast majority of developers, we distribute it under two
|
||||
mutually exclusive open-source licenses.
|
||||
|
||||
This means that *you* must choose *one* of the two licenses described
|
||||
below, then obey all its terms and conditions when using FreeType 2 in
|
||||
any of your projects or products.
|
||||
|
||||
- The FreeType License, found in the file `docs/FTL.TXT`, which is
|
||||
similar to the original BSD license *with* an advertising clause
|
||||
that forces you to explicitly cite the FreeType project in your
|
||||
product's documentation. All details are in the license file.
|
||||
This license is suited to products which don't use the GNU General
|
||||
Public License.
|
||||
|
||||
Note that this license is compatible to the GNU General Public
|
||||
License version 3, but not version 2.
|
||||
|
||||
- The GNU General Public License version 2, found in
|
||||
`docs/GPLv2.TXT` (any later version can be used also), for
|
||||
programs which already use the GPL. Note that the FTL is
|
||||
incompatible with GPLv2 due to its advertisement clause.
|
||||
|
||||
The contributed BDF and PCF drivers come with a license similar to
|
||||
that of the X Window System. It is compatible to the above two
|
||||
licenses (see files `src/bdf/README` and `src/pcf/README`). The same
|
||||
holds for the source code files `src/base/fthash.c` and
|
||||
`include/freetype/internal/fthash.h`; they were part of the BDF driver
|
||||
in earlier FreeType versions.
|
||||
|
||||
The gzip module uses the zlib license (see `src/gzip/zlib.h`) which
|
||||
too is compatible to the above two licenses.
|
||||
|
||||
The files `src/autofit/ft-hb.c` and `src/autofit/ft-hb.h` contain code
|
||||
taken almost verbatim from the HarfBuzz file `hb-ft.cc`, which uses
|
||||
the 'Old MIT' license, compatible to the above two licenses.
|
||||
|
||||
The MD5 checksum support (only used for debugging in development
|
||||
builds) is in the public domain.
|
||||
|
||||
|
||||
--- end of LICENSE.TXT ---
|
|
@ -1,2 +0,0 @@
|
|||
#/p:WindowsTargetPlatformVersion=10.0.16299.0
|
||||
/p:Configuration="Release"
|
66
MSBuild.sln
66
MSBuild.sln
|
@ -1,66 +0,0 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio Express 2012 for Windows Desktop
|
||||
#
|
||||
# You can build FreeType with MSBuild as follows
|
||||
#
|
||||
# MSBuild.exe -t:Rebuild
|
||||
# -p:Configuration=Debug
|
||||
# -p:Platform=x64
|
||||
# -p:UserDefines=FT_DEBUG_LOGGING
|
||||
# MSBuild.sln
|
||||
#
|
||||
# or with different appropriate switches. The library file
|
||||
# freetype.dll and/or freetype.lib should appear in the objs/
|
||||
# folder. A copy should be sent to ../freetype-demos/bin/
|
||||
# to be used with the demo programs.
|
||||
#
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "builds\windows\vc2010\freetype.vcxproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug Static|x64 = Debug Static|x64
|
||||
Debug Static|ARM64 = Debug Static|ARM64
|
||||
Debug Static|Win32 = Debug Static|Win32
|
||||
Release|x64 = Release|x64
|
||||
Release|ARM64 = Release|ARM64
|
||||
Release|Win32 = Release|Win32
|
||||
Release Static|x64 = Release Static|x64
|
||||
Release Static|ARM64 = Release Static|ARM64
|
||||
Release Static|Win32 = Release Static|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.Build.0 = Debug|x64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|x64.ActiveCfg = Debug Static|x64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|x64.Build.0 = Debug Static|x64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|ARM64.ActiveCfg = Debug Static|ARM64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|ARM64.Build.0 = Debug Static|ARM64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|Win32.ActiveCfg = Debug Static|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|Win32.Build.0 = Debug Static|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.ActiveCfg = Release|x64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.Build.0 = Release|x64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.Build.0 = Release|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|x64.ActiveCfg = Release Static|x64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|x64.Build.0 = Release Static|x64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|ARM64.ActiveCfg = Release Static|ARM64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|ARM64.Build.0 = Release Static|ARM64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|Win32.ActiveCfg = Release Static|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|Win32.Build.0 = Release Static|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {90811697-0889-4381-80BC-C3FE8FA4931F}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
34
Makefile
34
Makefile
|
@ -1,34 +0,0 @@
|
|||
#
|
||||
# FreeType 2 build system -- top-level Makefile
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Project names
|
||||
#
|
||||
PROJECT := freetype
|
||||
PROJECT_TITLE := FreeType
|
||||
|
||||
# The variable TOP_DIR holds the path to the topmost directory in the project
|
||||
# engine source hierarchy. If it is not defined, default it to `.'.
|
||||
#
|
||||
TOP_DIR ?= .
|
||||
|
||||
# The variable OBJ_DIR gives the location where object files and the
|
||||
# FreeType library are built.
|
||||
#
|
||||
OBJ_DIR ?= $(TOP_DIR)/objs
|
||||
|
||||
|
||||
include $(TOP_DIR)/builds/toplevel.mk
|
||||
|
||||
# EOF
|
107
README
107
README
|
@ -1,107 +0,0 @@
|
|||
FreeType 2.13.2
|
||||
===============
|
||||
|
||||
Homepage: https://www.freetype.org
|
||||
|
||||
FreeType is a freely available software library to render fonts.
|
||||
|
||||
It is written in C, designed to be small, efficient, highly
|
||||
customizable, and portable while capable of producing high-quality
|
||||
output (glyph images) of most vector and bitmap font formats.
|
||||
|
||||
Please read the `docs/CHANGES` file, it contains IMPORTANT
|
||||
INFORMATION.
|
||||
|
||||
Read the files `docs/INSTALL*` for installation instructions; see the
|
||||
file `docs/LICENSE.TXT` for the available licenses.
|
||||
|
||||
For using FreeType's git repository instead of a distribution bundle,
|
||||
please read file `README.git`. Note that you have to actually clone
|
||||
the repository; using a snapshot will not work (in other words, don't
|
||||
use gitlab's 'Download' button).
|
||||
|
||||
The FreeType 2 API reference is located in directory `docs/reference`;
|
||||
use the file `index.html` as the top entry point. [Please note that
|
||||
currently the search function for locally installed documentation
|
||||
doesn't work due to cross-site scripting issues.]
|
||||
|
||||
Additional documentation is available as a separate package from our
|
||||
sites. Go to
|
||||
|
||||
https://download.savannah.gnu.org/releases/freetype/
|
||||
|
||||
and download one of the following files.
|
||||
|
||||
freetype-doc-2.13.2.tar.xz
|
||||
freetype-doc-2.13.2.tar.gz
|
||||
ftdoc2132.zip
|
||||
|
||||
To view the documentation online, go to
|
||||
|
||||
https://www.freetype.org/freetype2/docs/
|
||||
|
||||
|
||||
Mailing Lists
|
||||
-------------
|
||||
|
||||
The preferred way of communication with the FreeType team is using
|
||||
e-mail lists.
|
||||
|
||||
general use and discussion: freetype@nongnu.org
|
||||
engine internals, porting, etc.: freetype-devel@nongnu.org
|
||||
announcements: freetype-announce@nongnu.org
|
||||
git repository tracker: freetype-commit@nongnu.org
|
||||
|
||||
The lists are moderated; see
|
||||
|
||||
https://www.freetype.org/contact.html
|
||||
|
||||
how to subscribe.
|
||||
|
||||
|
||||
Bugs
|
||||
----
|
||||
|
||||
Please submit bug reports at
|
||||
|
||||
https://gitlab.freedesktop.org/freetype/freetype/-/issues
|
||||
|
||||
Alternatively, you might report bugs by e-mail to
|
||||
`freetype-devel@nongnu.org`. Don't forget to send a detailed
|
||||
explanation of the problem -- there is nothing worse than receiving a
|
||||
terse message that only says 'it doesn't work'.
|
||||
|
||||
|
||||
Patches
|
||||
-------
|
||||
|
||||
For larger changes please provide merge requests at
|
||||
|
||||
https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests
|
||||
|
||||
Alternatively, you can send patches to the `freetype-devel@nongnu.org`
|
||||
mailing list -- and thank you in advance for your work on improving
|
||||
FreeType!
|
||||
|
||||
Details on the process can be found here:
|
||||
|
||||
https://www.freetype.org/developer.html#patches
|
||||
|
||||
|
||||
Enjoy!
|
||||
|
||||
The FreeType Team
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 2006-2024 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
This file is part of the FreeType project, and may only be used,
|
||||
modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
this file you indicate that you have read the license and understand
|
||||
and accept it fully.
|
||||
|
||||
|
||||
--- end of README ---
|
102
README.git
102
README.git
|
@ -1,102 +0,0 @@
|
|||
README.git
|
||||
==========
|
||||
|
||||
|
||||
repository issues
|
||||
-----------------
|
||||
|
||||
FreeType's official repository site is
|
||||
|
||||
https://gitlab.freedesktop.org/freetype ,
|
||||
|
||||
from which the 'freetype.git' and 'freetype-demos.git' repositories
|
||||
can be cloned in the usual way.
|
||||
|
||||
git clone https://gitlab.freedesktop.org/freetype/freetype.git
|
||||
git clone https://gitlab.freedesktop.org/freetype/freetype-demos.git
|
||||
|
||||
If you want to use the Savannah mirror instead, you have to do a
|
||||
slightly different incantation because the repository names contain
|
||||
digit '2' for historical reasons.
|
||||
|
||||
git clone \
|
||||
https://git.savannah.nongnu.org/git/freetype/freetype2.git \
|
||||
freetype
|
||||
git clone \
|
||||
https://git.savannah.nongnu.org/git/freetype/freetype2-demos.git \
|
||||
freetype-demos
|
||||
|
||||
|
||||
standard builds with `configure`
|
||||
--------------------------------
|
||||
|
||||
The git repository doesn't contain pre-built configuration scripts for
|
||||
UNIXish platforms. To generate them say
|
||||
|
||||
sh autogen.sh
|
||||
|
||||
which in turn depends on the following packages:
|
||||
|
||||
automake (1.10.1)
|
||||
libtool (2.2.4)
|
||||
autoconf (2.62)
|
||||
|
||||
The versions given in parentheses are known to work. Newer versions
|
||||
should work too, of course. Note that `autogen.sh` also sets up
|
||||
proper file permissions for the `configure` and auxiliary scripts.
|
||||
|
||||
The `autogen.sh` script checks whether the versions of the above three
|
||||
tools match the numbers above. Otherwise it will complain and suggest
|
||||
either upgrading or using environment variables to point to more
|
||||
recent versions of the required tools.
|
||||
|
||||
Note that `aclocal` is provided by the 'automake' package on Linux,
|
||||
and that `libtoolize` is called `glibtoolize` on Darwin (OS X).
|
||||
|
||||
|
||||
alternative build methods
|
||||
-------------------------
|
||||
|
||||
For static builds that don't use platform-specific optimizations, no
|
||||
configure script is necessary at all; saying
|
||||
|
||||
make setup ansi
|
||||
make
|
||||
|
||||
should work on all platforms that have GNU `make` (or `makepp`).
|
||||
|
||||
A build with `cmake` or `meson` can be done directly from the git
|
||||
repository. However, if you want to use the `FT_DEBUG_LOGGING` macro
|
||||
(see file `docs/DEBUG` for more information) it is currently mandatory
|
||||
to execute `autogen.sh` in advance; this script clones the 'dlg' git
|
||||
submodule and copies some files into FreeType's source tree.
|
||||
|
||||
|
||||
Code of Conduct
|
||||
---------------
|
||||
|
||||
Please note that this project is released with a Contributor Code of
|
||||
Conduct (CoC). By participating in this project you agree to abide by
|
||||
its terms, which you can find in the following link:
|
||||
|
||||
https://www.freedesktop.org/wiki/CodeOfConduct
|
||||
|
||||
CoC issues may be raised to the project maintainers at the following
|
||||
address:
|
||||
|
||||
wl@gnu.org
|
||||
apodtele@gmail.com
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 2005-2024 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
This file is part of the FreeType project, and may only be used,
|
||||
modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
this file you indicate that you have read the license and understand
|
||||
and accept it fully.
|
||||
|
||||
|
||||
--- end of README.git ---
|
199
autogen.sh
199
autogen.sh
|
@ -1,199 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright (C) 2005-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
run ()
|
||||
{
|
||||
echo "running \`$*'"
|
||||
eval $*
|
||||
|
||||
if test $? != 0 ; then
|
||||
echo "error while running \`$*'"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
get_major_version ()
|
||||
{
|
||||
echo $1 | sed -e 's/\([0-9][0-9]*\)\..*/\1/g'
|
||||
}
|
||||
|
||||
get_minor_version ()
|
||||
{
|
||||
echo $1 | sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/g'
|
||||
}
|
||||
|
||||
get_patch_version ()
|
||||
{
|
||||
# tricky: some version numbers don't include a patch
|
||||
# separated with a point, but something like 1.4-p6
|
||||
patch=`echo $1 | sed -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/g'`
|
||||
if test "$patch" = "$1"; then
|
||||
patch=`echo $1 | sed -e 's/[0-9][0-9]*\.[0-9][0-9]*\-p\([0-9][0-9]*\).*/\1/g'`
|
||||
# if there isn't any patch number, default to 0
|
||||
if test "$patch" = "$1"; then
|
||||
patch=0
|
||||
fi
|
||||
fi
|
||||
echo $patch
|
||||
}
|
||||
|
||||
# $1: version to check
|
||||
# $2: minimum version
|
||||
|
||||
compare_to_minimum_version ()
|
||||
{
|
||||
MAJOR1=`get_major_version $1`
|
||||
MAJOR2=`get_major_version $2`
|
||||
if test $MAJOR1 -lt $MAJOR2; then
|
||||
echo 0
|
||||
return
|
||||
else
|
||||
if test $MAJOR1 -gt $MAJOR2; then
|
||||
echo 1
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
MINOR1=`get_minor_version $1`
|
||||
MINOR2=`get_minor_version $2`
|
||||
if test $MINOR1 -lt $MINOR2; then
|
||||
echo 0
|
||||
return
|
||||
else
|
||||
if test $MINOR1 -gt $MINOR2; then
|
||||
echo 1
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
PATCH1=`get_patch_version $1`
|
||||
PATCH2=`get_patch_version $2`
|
||||
if test $PATCH1 -lt $PATCH2; then
|
||||
echo 0
|
||||
else
|
||||
echo 1
|
||||
fi
|
||||
}
|
||||
|
||||
# check the version of a given tool against a minimum version number
|
||||
#
|
||||
# $1: tool path
|
||||
# $2: tool usual name (e.g. `aclocal')
|
||||
# $3: tool variable (e.g. `ACLOCAL')
|
||||
# $4: minimum version to check against
|
||||
# $5: option field index used to extract the tool version from the
|
||||
# output of --version
|
||||
|
||||
check_tool_version ()
|
||||
{
|
||||
field=$5
|
||||
# assume the output of "[TOOL] --version" is "toolname (GNU toolname foo bar) version"
|
||||
if test "$field"x = x; then
|
||||
field=3 # default to 3 for all GNU autotools, after filtering enclosed string
|
||||
fi
|
||||
version=`$1 --version | head -1 | sed 's/([^)]*)/()/g' | cut -d ' ' -f $field`
|
||||
version_check=`compare_to_minimum_version $version $4`
|
||||
if test "$version_check"x = 0x; then
|
||||
echo "ERROR: Your version of the \`$2' tool is too old."
|
||||
echo " Minimum version $4 is required (yours is version $version)."
|
||||
echo " Please upgrade or use the $3 variable to point to a more recent one."
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Solaris 10's shell doesn't like the `!` operator to negate the exit status.
|
||||
if test -f ./builds/unix/configure.raw; then
|
||||
:
|
||||
else
|
||||
echo "You must be in the same directory as \`autogen.sh'."
|
||||
echo "Bootstrapping doesn't work if srcdir != builddir."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# On MacOS X, the GNU libtool is named `glibtool'.
|
||||
HOSTOS=`uname`
|
||||
if test "$LIBTOOLIZE"x != x; then
|
||||
:
|
||||
elif test "$HOSTOS"x = Darwinx; then
|
||||
LIBTOOLIZE=glibtoolize
|
||||
else
|
||||
LIBTOOLIZE=libtoolize
|
||||
fi
|
||||
|
||||
if test "$ACLOCAL"x = x; then
|
||||
ACLOCAL=aclocal
|
||||
fi
|
||||
|
||||
if test "$AUTOCONF"x = x; then
|
||||
AUTOCONF=autoconf
|
||||
fi
|
||||
|
||||
check_tool_version $ACLOCAL aclocal ACLOCAL 1.10.1
|
||||
check_tool_version $LIBTOOLIZE libtoolize LIBTOOLIZE 2.2.4
|
||||
check_tool_version $AUTOCONF autoconf AUTOCONF 2.62
|
||||
|
||||
# This sets FREETYPE version.
|
||||
eval `sed -n \
|
||||
-e 's/^#define *\(FREETYPE_MAJOR\) *\([0-9][0-9]*\).*/\1=\2/p' \
|
||||
-e 's/^#define *\(FREETYPE_MINOR\) *\([0-9][0-9]*\).*/\1=\2/p' \
|
||||
-e 's/^#define *\(FREETYPE_PATCH\) *\([0-9][0-9]*\).*/\1=\2/p' \
|
||||
include/freetype/freetype.h`
|
||||
|
||||
if test "$FREETYPE_PATCH" = "0"; then
|
||||
FREETYPE=$FREETYPE_MAJOR.$FREETYPE_MINOR
|
||||
else
|
||||
FREETYPE=$FREETYPE_MAJOR.$FREETYPE_MINOR.$FREETYPE_PATCH
|
||||
fi
|
||||
|
||||
echo "FreeType $FREETYPE:"
|
||||
|
||||
cd builds/unix
|
||||
|
||||
echo "generating \`configure.ac'"
|
||||
sed -e "s;@VERSION@;$FREETYPE;" \
|
||||
< configure.raw > configure.ac
|
||||
|
||||
run aclocal -I . --force
|
||||
run $LIBTOOLIZE --force --copy --install
|
||||
run autoconf --force
|
||||
|
||||
chmod +x install-sh
|
||||
|
||||
cd ../..
|
||||
|
||||
chmod +x ./configure
|
||||
|
||||
# Copy all necessary 'dlg' files.
|
||||
copy_submodule_files ()
|
||||
{
|
||||
echo "Copying files from \`subprojects/dlg' to \`src/dlg' and \`include/dlg'"
|
||||
mkdir include/dlg 2> /dev/null
|
||||
cp $DLG_INC_DIR/output.h include/dlg
|
||||
cp $DLG_INC_DIR/dlg.h include/dlg
|
||||
cp $DLG_SRC_DIR/* src/dlg
|
||||
}
|
||||
|
||||
if test -e ".git"; then
|
||||
DLG_INC_DIR=subprojects/dlg/include/dlg
|
||||
DLG_SRC_DIR=subprojects/dlg/src/dlg
|
||||
|
||||
if test -d "$DLG_INC_DIR"; then
|
||||
:
|
||||
else
|
||||
echo "Checking out submodule in \`subprojects/dlg':"
|
||||
git submodule update --init
|
||||
fi
|
||||
|
||||
copy_submodule_files
|
||||
fi
|
||||
|
||||
# EOF
|
269
bitmap.c
Normal file
269
bitmap.c
Normal file
|
@ -0,0 +1,269 @@
|
|||
#include "bitmap.h"
|
||||
|
||||
HASH_128 * Generate_Hash_x64_128(FT_Bitmap * bitmap, HASH_128 * murmur)
|
||||
{
|
||||
int seed = 99; // Dont change
|
||||
|
||||
MurmurHash3_x64_128(bitmap->buffer, (bitmap->pitch * bitmap->rows), seed, murmur->hash);
|
||||
|
||||
return murmur;
|
||||
}
|
||||
|
||||
HASH_128 * Generate_Hash_x86_128(FT_Bitmap * bitmap, HASH_128 * murmur)
|
||||
{
|
||||
int seed = 99; // Dont change
|
||||
|
||||
MurmurHash3_x86_128(bitmap->buffer, (bitmap->pitch * bitmap->rows), seed, murmur->hash);
|
||||
|
||||
return murmur;
|
||||
}
|
||||
|
||||
HASH_32 * Generate_Hash_x86_32(FT_Bitmap * bitmap, HASH_32 * murmur)
|
||||
{
|
||||
int seed = 99; // Dont change
|
||||
|
||||
MurmurHash3_x86_32(bitmap->buffer, (bitmap->pitch * bitmap->rows), seed, murmur->hash);
|
||||
|
||||
return murmur;
|
||||
}
|
||||
|
||||
int Get_Padding( FT_Bitmap* bitmap ){
|
||||
|
||||
int rem;
|
||||
if (bitmap->pixel_mode == 6)
|
||||
{
|
||||
rem = ( 3 * bitmap->width ) % 4;
|
||||
}else{
|
||||
rem = ( bitmap->width ) % 4;
|
||||
}
|
||||
|
||||
if (!rem )
|
||||
{
|
||||
return rem;
|
||||
}
|
||||
return (4 - rem);
|
||||
}
|
||||
|
||||
int Get_Bits_Per_Pixel ( unsigned char PIXEL_MODE) {
|
||||
if (PIXEL_MODE < 5)
|
||||
{
|
||||
return BITS_PER_PIXEL_GRAY;
|
||||
}else{
|
||||
return BITS_PER_PIXEL_LCD;
|
||||
}
|
||||
}
|
||||
|
||||
void Write_Bitmap_Header (FT_Bitmap * bitmap, char * fname ) {
|
||||
|
||||
FILE *fp = fopen(fname,"w"); // Bitmap File
|
||||
HEADER *header = ( HEADER* ) calloc( 1 , sizeof( HEADER ));
|
||||
|
||||
unsigned char pixel_mode = ( bitmap->pixel_mode );
|
||||
FT_UInt image_width;
|
||||
FT_UInt image_rows;
|
||||
FT_UInt color_table_size = 0;
|
||||
|
||||
switch(pixel_mode){
|
||||
|
||||
case 5 : image_width = bitmap->width / 3; // LCD
|
||||
image_rows = bitmap->rows;
|
||||
break;
|
||||
|
||||
case 6 : image_width = bitmap->width; // LCD_V
|
||||
image_rows = bitmap->rows / 3;
|
||||
break;
|
||||
|
||||
default : image_width = bitmap->width; // MONO and GRAY
|
||||
image_rows = bitmap->rows;
|
||||
color_table_size = 4* 256;
|
||||
break;
|
||||
}
|
||||
|
||||
FT_Int image_size;
|
||||
image_size = (image_rows * image_width );
|
||||
|
||||
header->file_header.type = 0x4D42;
|
||||
header->file_header.file_size = sizeof(HEADER) + color_table_size + image_size;
|
||||
header->file_header.file_offset = sizeof(HEADER) + color_table_size;
|
||||
|
||||
header->info_header.info_header_size = sizeof(BMP_INFO_HEADER);
|
||||
header->info_header.width = image_width ;
|
||||
header->info_header.height = - image_rows;
|
||||
header->info_header.planes = PLANES;
|
||||
header->info_header.bits_per_pixel = Get_Bits_Per_Pixel( bitmap->pixel_mode );
|
||||
header->info_header.compression = COMPRESSION;
|
||||
header->info_header.image_size = image_size;
|
||||
header->info_header.y_pixels_per_meter = Y_PIXELS_PER_METER ;
|
||||
header->info_header.x_pixels_per_meter = X_PIXELS_PER_METER ;
|
||||
header->info_header.used_colors = USED_COLORS;
|
||||
header->info_header.important_colors = IMPORTANT_COLORS;
|
||||
|
||||
fwrite (header, 1, sizeof(HEADER),fp);
|
||||
free(header);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
void Write_Bitmap_Data_LCD_RGB( FT_Bitmap * bitmap, char * fname ){
|
||||
|
||||
char value;
|
||||
int i,j,k;
|
||||
|
||||
FILE *fp = fopen(fname,"a");
|
||||
|
||||
for (i = 0; i < bitmap->rows ; ++i)
|
||||
{
|
||||
for ( j = 2; j < bitmap->width; j = j+3)
|
||||
{
|
||||
for ( k = 0; k < 3; ++k)
|
||||
{
|
||||
value = 0xff - bitmap->buffer[( i * bitmap->pitch) + j - k];
|
||||
fwrite (&value, 1, 1,fp);
|
||||
}
|
||||
}
|
||||
for ( k = 0; k < Get_Padding(bitmap); ++k)
|
||||
{
|
||||
value = 0xff;
|
||||
fwrite (&value, 1, 1,fp);
|
||||
}
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
void Write_Bitmap_Data_LCD_BGR( FT_Bitmap * bitmap, char * fname ){
|
||||
|
||||
char value;
|
||||
int i,j,k;
|
||||
|
||||
FILE *fp = fopen(fname,"a");
|
||||
|
||||
for ( i = 0; i < bitmap->rows ; ++i)
|
||||
{
|
||||
for ( j = 0; j < bitmap->width; j++)
|
||||
{
|
||||
value = 0xff - bitmap->buffer[( i * bitmap->pitch) + j];
|
||||
fwrite (&value, 1, 1,fp);
|
||||
}
|
||||
for ( k = 0; k < Get_Padding(bitmap); ++k)
|
||||
{
|
||||
value = 0xff;
|
||||
fwrite (&value, 1, 1,fp);
|
||||
}
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
void Write_Bitmap_Data_LCD_V_BGR (FT_Bitmap * bitmap, char * fname) {
|
||||
|
||||
FILE *fp = fopen(fname,"a");
|
||||
|
||||
int i,j,k,step;
|
||||
char value;
|
||||
step = 0;
|
||||
|
||||
while ( step < bitmap->rows ){
|
||||
|
||||
for (i = 0; i < bitmap->width; i++)
|
||||
{
|
||||
for (j = step ; j < step + 3; ++j)
|
||||
{
|
||||
value = 0xff - bitmap->buffer[(j * bitmap->pitch) + i];
|
||||
fwrite (&value, 1, 1,fp);
|
||||
}
|
||||
}
|
||||
for (k = 0; k < Get_Padding(bitmap); ++k)
|
||||
{
|
||||
value = 0xff;
|
||||
fwrite (&value, 1, 1,fp);
|
||||
}
|
||||
step = step + 3; // Jumping 3 rows up
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
void Write_Bitmap_Data_LCD_V_RGB (FT_Bitmap * bitmap, char * fname) {
|
||||
|
||||
FILE *fp = fopen(fname,"a");
|
||||
|
||||
int i,j,k,step;
|
||||
char value;
|
||||
step = 0;
|
||||
|
||||
while ( step < bitmap->rows ){
|
||||
|
||||
for (i = 0; i < bitmap->width; i++)
|
||||
{
|
||||
for (j = step + 2 ; j >= step; --j)
|
||||
{
|
||||
value = 0xff - bitmap->buffer[(j * bitmap->pitch) + i];
|
||||
fwrite (&value, 1, 1,fp);
|
||||
}
|
||||
}
|
||||
for (k = 0; k < Get_Padding(bitmap); ++k)
|
||||
{
|
||||
value = 0xff;
|
||||
fwrite (&value, 1, 1,fp);
|
||||
}
|
||||
step = step + 3; // Jumping 3 rows up
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
void Write_Bitmap_Data_MONO (FT_Bitmap * bitmap, char * fname) {
|
||||
|
||||
FILE *fp = fopen(fname,"a");
|
||||
|
||||
int i;
|
||||
unsigned char value;
|
||||
for ( i = 0; i < 256; ++i)
|
||||
{
|
||||
value = i;
|
||||
fwrite (&value,1,1,fp);
|
||||
fwrite (&value,1,1,fp);
|
||||
fwrite (&value,1,1,fp);
|
||||
value = 0;
|
||||
fwrite (&value,1,1,fp);
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < bitmap->pitch * bitmap->rows; ++i)
|
||||
{
|
||||
if ( bitmap->buffer[i] != 0x00 ){
|
||||
value = 0x00; // remember taking reverse
|
||||
fwrite (&value, 1, 1,fp);
|
||||
}else{
|
||||
value = 0xff;
|
||||
fwrite (&value, 1, 1,fp);
|
||||
}
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
void Write_Bitmap_Data_GRAY(FT_Bitmap * bitmap, char * fname) {
|
||||
|
||||
FILE *fp = fopen(fname,"a");
|
||||
int i;
|
||||
|
||||
unsigned char value;
|
||||
for ( i = 0; i < 256; ++i)
|
||||
{
|
||||
value = i;
|
||||
fwrite (&value,1,1,fp);
|
||||
fwrite (&value,1,1,fp);
|
||||
fwrite (&value,1,1,fp);
|
||||
value = 0;
|
||||
fwrite (&value,1,1,fp);
|
||||
}
|
||||
|
||||
for (int i = 0; i < bitmap->pitch * bitmap->rows; ++i)
|
||||
{
|
||||
value = 255 - bitmap->buffer[i];
|
||||
fwrite(&value,1,1,fp);
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
86
bitmap.h
Normal file
86
bitmap.h
Normal file
|
@ -0,0 +1,86 @@
|
|||
#include <stdio.h>
|
||||
#include <ft2build.h>
|
||||
#include <string.h>
|
||||
#include "murmur3.h" // MurmurHash3_x64_128 header file
|
||||
|
||||
#include FT_FREETYPE_H
|
||||
#include FT_MODULE_H
|
||||
#include FT_LCD_FILTER_H
|
||||
#include FT_BITMAP_H
|
||||
|
||||
#define BITS_PER_PIXEL_MONO 1 // Constants for the Bitmap Header
|
||||
#define BITS_PER_PIXEL_GRAY 8
|
||||
#define BITS_PER_PIXEL_LCD 24
|
||||
|
||||
#define PLANES 1 // Constants for the Bitmap Header
|
||||
#define COMPRESSION 0
|
||||
#define X_PIXELS_PER_METER 0
|
||||
#define Y_PIXELS_PER_METER 0
|
||||
#define USED_COLORS 0
|
||||
#define IMPORTANT_COLORS 0
|
||||
//-------------------------------------------------------------------------------
|
||||
#pragma pack(push,1)
|
||||
|
||||
typedef struct{ // Bitmap FILE Header
|
||||
|
||||
FT_UInt16 type;
|
||||
FT_UInt32 file_size;
|
||||
FT_UInt32 reserved;
|
||||
FT_UInt32 file_offset;
|
||||
|
||||
} BMP_FILE_HEADER;
|
||||
|
||||
typedef struct{ // Bitmap INFO Header
|
||||
|
||||
FT_UInt32 info_header_size;
|
||||
FT_UInt32 width;
|
||||
FT_Int height;
|
||||
FT_UInt16 planes;
|
||||
FT_UInt16 bits_per_pixel;
|
||||
FT_UInt32 compression;
|
||||
FT_UInt32 image_size;
|
||||
FT_UInt32 y_pixels_per_meter;
|
||||
FT_UInt32 x_pixels_per_meter;
|
||||
FT_UInt32 used_colors;
|
||||
FT_UInt32 important_colors;
|
||||
|
||||
} BMP_INFO_HEADER;
|
||||
|
||||
typedef struct { // Bitmap Header
|
||||
|
||||
BMP_FILE_HEADER file_header;
|
||||
BMP_INFO_HEADER info_header;
|
||||
|
||||
} HEADER;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
typedef struct { // To store 32bit Hash
|
||||
FT_UInt32 hash[1];
|
||||
}HASH_32;
|
||||
|
||||
typedef struct { // To store 128bit Hash
|
||||
FT_UInt32 hash[4];
|
||||
}HASH_128;
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
|
||||
HASH_32 * Generate_Hash_x86_32(FT_Bitmap * bitmap, HASH_32 * murmur);
|
||||
HASH_128 * Generate_Hash_x86_128(FT_Bitmap * bitmap, HASH_128 * murmur);
|
||||
HASH_128 * Generate_Hash_x64_128(FT_Bitmap * bitmap, HASH_128 * murmur);
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
|
||||
int Get_Padding (FT_Bitmap * bitmap);
|
||||
|
||||
int Get_Bits_Per_Pixel ( unsigned char PIXEL_MODE );
|
||||
|
||||
void Write_Bitmap_Header (FT_Bitmap * bitmap, char * fname);
|
||||
|
||||
void Write_Bitmap_Data_MONO (FT_Bitmap * bitmap, char * fname);
|
||||
void Write_Bitmap_Data_GRAY (FT_Bitmap * bitmap, char * fname);
|
||||
void Write_Bitmap_Data_LCD_BGR (FT_Bitmap * bitmap, char * fname);
|
||||
void Write_Bitmap_Data_LCD_RGB (FT_Bitmap * bitmap, char * fname);
|
||||
void Write_Bitmap_Data_LCD_V_RGB (FT_Bitmap * bitmap, char * fname);
|
||||
void Write_Bitmap_Data_LCD_V_BGR (FT_Bitmap * bitmap, char * fname);
|
|
@ -1,110 +0,0 @@
|
|||
|
||||
README for the builds/amiga subdirectory.
|
||||
|
||||
Copyright (C) 2005-2024 by
|
||||
Werner Lemberg and Detlef Würkner.
|
||||
|
||||
This file is part of the FreeType project, and may only be used, modified,
|
||||
and distributed under the terms of the FreeType project license,
|
||||
LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
indicate that you have read the license and understand and accept it
|
||||
fully.
|
||||
|
||||
|
||||
The makefile.os4 is for the AmigaOS4 SDK. To use it, type
|
||||
"make -f makefile.os4", it produces a link library libft2_ppc.a.
|
||||
|
||||
The makefile is for ppc-morphos-gcc-2.95.3-bin.tgz (gcc 2.95.3 hosted on
|
||||
68k-Amiga producing MorphOS-PPC-binaries from http://www.morphos.de).
|
||||
To use it, type "make assign", then "make"; it produces a link library
|
||||
libft2_ppc.a.
|
||||
|
||||
The smakefile is a makefile for Amiga SAS/C 6.58 (no longer available,
|
||||
latest sold version was 6.50, updates can be found in Aminet). It is
|
||||
based on the version found in the sourcecode of ttf.library 0.83b for
|
||||
FreeType 1.3.1 from Richard Griffith (ragriffi@sprynet.com,
|
||||
http://ragriffi.home.sprynet.com).
|
||||
|
||||
You will also need the latest include files and amiga.lib from the
|
||||
Amiga web site (https://os.amigaworld.de/download.php?id=3) for
|
||||
AmigaOS 3.9; the generated code should work under AmigaOS 2.04 and up.
|
||||
|
||||
To use it, call "smake assign" and then "smake" from the builds/amiga
|
||||
directory. The results are:
|
||||
|
||||
- A link library "ft2_680x0.lib" (where x depends on the setting of
|
||||
the CPU entry in the smakefile) containing all FreeType2 parts
|
||||
except of the init code, debugging code, and the system interface
|
||||
code.
|
||||
|
||||
- ftsystem.o, an object module containing the standard version of the
|
||||
system interface code which uses fopen() fclose() fread() fseek()
|
||||
ftell() malloc() realloc() and free() from lib:sc.lib (not pure).
|
||||
|
||||
- ftsystempure.o, an object module containing the pure version of the
|
||||
system interface code which uses Open() Close() Read() Seek()
|
||||
ExamineFH() AsmAllocPooled() AsmFreePooled() etc. This version can
|
||||
be used in both normal programs and in Amiga run-time shared system
|
||||
librarys (can be linked with lib:libinit.o, no copying of DATA and
|
||||
BSS hunks for each OpenLibrary() necessary). Source code is in
|
||||
src/base/ftsystem.c.
|
||||
|
||||
- ftdebug.o, an object module containing the standard version of the
|
||||
debugging code which uses vprintf() and exit() (not pure).
|
||||
Debugging can be turned on in FT:include/freetype/config/ftoption.h
|
||||
and with FT_SetTraceLevel().
|
||||
|
||||
- ftdebugpure.o, an object module containing the pure version of the
|
||||
debugging code which uses KVPrintf() from lib:debug.lib and no
|
||||
exit(). For debugging of Amiga run-time shared system libraries.
|
||||
Source code is in src/base/ftdebug.c.
|
||||
|
||||
- NO ftinit.o. Because linking with a link library should result in
|
||||
linking only the needed object modules in it, but standard
|
||||
ftsystem.o would force ALL FreeType2 modules to be linked to your
|
||||
program, I decided to use a different scheme: You must #include
|
||||
FT:src/base/ftinit.c in your sourcecode and specify with #define
|
||||
statements which modules you need. See
|
||||
include/freetype/config/ftmodule.h.
|
||||
|
||||
|
||||
To use in your own programs:
|
||||
|
||||
- Insert the #define and #include statements from top of
|
||||
include/freetype/config/ftmodule.h in your source code and
|
||||
uncomment the #define statements for the FreeType2 modules you need.
|
||||
|
||||
- You can use either PARAMETERS=REGISTER or PARAMETERS=STACK for
|
||||
calling the FreeType2 functions, because the link library and the
|
||||
object files are compiled with PARAMETERS=BOTH.
|
||||
|
||||
- "smake assign" (assign "FT:" to the FreeType2 main directory).
|
||||
|
||||
- Compile your program.
|
||||
|
||||
- Link with either ftsystem.o or ftsystempure.o, if debugging enabled
|
||||
with either ftdebug.o or (ftdebugpure.o and lib:debug.lib), and with
|
||||
ft2_680x0.lib as link library.
|
||||
|
||||
|
||||
To adapt to other compilers:
|
||||
|
||||
- The standard ANSI C maximum length of 31 significant characters in
|
||||
identifiers is not enough for FreeType2. Check if your compiler has
|
||||
a minimum length of 40 significant characters or can be switched to
|
||||
it. "idlen=40" is the option for SAS/C. Setting #define
|
||||
HAVE_LIMIT_ON_IDENTS in an include file may also work (not tested).
|
||||
|
||||
- Make sure that the include directory in builds/amiga is searched
|
||||
before the normal FreeType2 include directory, so you are able to
|
||||
replace problematic include files with your own version (same may be
|
||||
useful for the src directory).
|
||||
|
||||
- An example of how to replace/workaround a problematic include file
|
||||
is include/freetype/config/ftconfig.h; it changes a #define that
|
||||
would prevent SAS/C from generating XDEF's where it should do that and
|
||||
then includes the standard FreeType2 include file.
|
||||
|
||||
Local Variables:
|
||||
coding: latin-1
|
||||
End:
|
|
@ -1,55 +0,0 @@
|
|||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftconfig.h */
|
||||
/* */
|
||||
/* Amiga-specific configuration file (specification only). */
|
||||
/* */
|
||||
/* Copyright (C) 2005-2024 by */
|
||||
/* Werner Lemberg and Detlef Würkner. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
/*
|
||||
* This is an example how to override the default FreeType2 header files
|
||||
* with Amiga-specific changes. When the compiler searches this directory
|
||||
* before the default directory, we can do some modifications.
|
||||
*
|
||||
* Here we must change FT_EXPORT_DEF so that SAS/C does
|
||||
* generate the needed XDEFs.
|
||||
*/
|
||||
|
||||
#if 0
|
||||
#define FT_EXPORT_DEF( x ) extern x
|
||||
#endif
|
||||
|
||||
#undef FT_EXPORT_DEF
|
||||
#define FT_EXPORT_DEF( x ) x
|
||||
|
||||
/* Now include the original file */
|
||||
#ifndef __MORPHOS__
|
||||
#ifdef __SASC
|
||||
#include "FT:include/freetype/config/ftconfig.h"
|
||||
#else
|
||||
#include "/FT/include/freetype/config/ftconfig.h"
|
||||
#endif
|
||||
#else
|
||||
/* We must define that, it seems that
|
||||
* lib/gcc-lib/ppc-morphos/2.95.3/include/syslimits.h is missing in
|
||||
* ppc-morphos-gcc-2.95.3-bin.tgz (gcc for 68k producing MorphOS PPC elf
|
||||
* binaries from http://www.morphos.de)
|
||||
*/
|
||||
#define _LIBC_LIMITS_H_
|
||||
#include "/FT/include/freetype/config/ftconfig.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
Local Variables:
|
||||
coding: latin-1
|
||||
End:
|
||||
*/
|
|
@ -1,158 +0,0 @@
|
|||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftmodule.h */
|
||||
/* */
|
||||
/* Amiga-specific FreeType module selection. */
|
||||
/* */
|
||||
/* Copyright (C) 2005-2024 by */
|
||||
/* Werner Lemberg and Detlef Würkner. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
/*
|
||||
* To avoid that all your programs include all FreeType modules,
|
||||
* you copy the following piece of source code into your own
|
||||
* source file and specify which modules you really need in your
|
||||
* application by uncommenting the appropriate lines.
|
||||
*/
|
||||
/*
|
||||
//#define FT_USE_AUTOFIT // autofitter
|
||||
//#define FT_USE_RASTER // monochrome rasterizer
|
||||
//#define FT_USE_SMOOTH // anti-aliasing rasterizer
|
||||
//#define FT_USE_TT // truetype font driver
|
||||
//#define FT_USE_T1 // type1 font driver
|
||||
//#define FT_USE_T42 // type42 font driver
|
||||
//#define FT_USE_T1CID // cid-keyed type1 font driver // no cmap support
|
||||
//#define FT_USE_CFF // opentype font driver
|
||||
//#define FT_USE_BDF // bdf bitmap font driver
|
||||
//#define FT_USE_PCF // pcf bitmap font driver
|
||||
//#define FT_USE_PFR // pfr font driver
|
||||
//#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
|
||||
//#define FT_USE_OTV // opentype validator
|
||||
//#define FT_USE_GXV // truetype gx validator
|
||||
#include "FT:src/base/ftinit.c"
|
||||
*/
|
||||
|
||||
/* Make sure that the needed support modules are built in.
|
||||
* Dependencies can be found by searching for FT_Get_Module.
|
||||
*/
|
||||
|
||||
#ifdef FT_USE_T42
|
||||
#define FT_USE_TT
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_TT
|
||||
#define FT_USE_SFNT
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_CFF
|
||||
#define FT_USE_SFNT
|
||||
#define FT_USE_PSHINT
|
||||
#define FT_USE_PSNAMES
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_T1
|
||||
#define FT_USE_PSAUX
|
||||
#define FT_USE_PSHINT
|
||||
#define FT_USE_PSNAMES
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_T1CID
|
||||
#define FT_USE_PSAUX
|
||||
#define FT_USE_PSHINT
|
||||
#define FT_USE_PSNAMES
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_PSAUX
|
||||
#define FT_USE_PSNAMES
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_SFNT
|
||||
#define FT_USE_PSNAMES
|
||||
#endif
|
||||
|
||||
/* Now include the modules */
|
||||
|
||||
#ifdef FT_USE_AUTOFIT
|
||||
FT_USE_MODULE( FT_Module_Class, autofit_module_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_TT
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_T1
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_CFF
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_T1CID
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_PFR
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_T42
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_WINFNT
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_PCF
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_PSAUX
|
||||
FT_USE_MODULE( FT_Module_Class, psaux_module_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_PSNAMES
|
||||
FT_USE_MODULE( FT_Module_Class, psnames_module_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_PSHINT
|
||||
FT_USE_MODULE( FT_Module_Class, pshinter_module_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_RASTER
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_SFNT
|
||||
FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_SMOOTH
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_OTV
|
||||
FT_USE_MODULE( FT_Module_Class, otv_module_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_BDF
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_GXV
|
||||
FT_USE_MODULE( FT_Module_Class, gxv_module_class )
|
||||
#endif
|
||||
|
||||
/*
|
||||
Local Variables:
|
||||
coding: latin-1
|
||||
End:
|
||||
*/
|
|
@ -1,293 +0,0 @@
|
|||
#
|
||||
# Makefile for FreeType2 link library using ppc-morphos-gcc-2.95.3-bin.tgz
|
||||
# (gcc 2.95.3 hosted on 68k-Amiga producing MorphOS-PPC-binaries from
|
||||
# http://www.morphos.de)
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 2005-2024 by
|
||||
# Werner Lemberg and Detlef Würkner.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
#
|
||||
# to build from the builds/amiga directory call
|
||||
#
|
||||
# make assign
|
||||
# make
|
||||
#
|
||||
# Your programs source code should start with this
|
||||
# (uncomment the parts you do not need to keep the program small):
|
||||
# ---8<---
|
||||
#define FT_USE_AUTOFIT // autofitter
|
||||
#define FT_USE_RASTER // monochrome rasterizer
|
||||
#define FT_USE_SMOOTH // anti-aliasing rasterizer
|
||||
#define FT_USE_TT // truetype font driver
|
||||
#define FT_USE_T1 // type1 font driver
|
||||
#define FT_USE_T42 // type42 font driver
|
||||
#define FT_USE_T1CID // cid-keyed type1 font driver
|
||||
#define FT_USE_CFF // opentype font driver
|
||||
#define FT_USE_BDF // bdf bitmap font driver
|
||||
#define FT_USE_PCF // pcf bitmap font driver
|
||||
#define FT_USE_PFR // pfr font driver
|
||||
#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
|
||||
#define FT_USE_OTV // opentype validator
|
||||
#define FT_USE_GXV // truetype gx validator
|
||||
#include "FT:src/base/ftinit.c"
|
||||
# ---8<---
|
||||
#
|
||||
# link your programs with libft2_ppc.a and either ftsystem.ppc.o or ftsystempure.ppc.o
|
||||
# (and either ftdebug.ppc.o or ftdebugpure.ppc.o if you enabled FT_DEBUG_LEVEL_ERROR or
|
||||
# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
|
||||
|
||||
all: libft2_ppc.a ftsystem.ppc.o ftsystempure.ppc.o
|
||||
|
||||
assign:
|
||||
assign FT: //
|
||||
|
||||
FTSRC = /FT/src
|
||||
|
||||
CC = ppc-morphos-gcc
|
||||
AR = ppc-morphos-ar rc
|
||||
RANLIB = ppc-morphos-ranlib
|
||||
LD = ppc-morphos-ld
|
||||
CFLAGS = -DFT2_BUILD_LIBRARY -O2 -I/emu/emulinclude/includegcc -I/emu/include -Iinclude -I$(FTSRC) -I/FT/include
|
||||
|
||||
#
|
||||
# FreeType2 library base
|
||||
#
|
||||
ftbase.ppc.o: $(FTSRC)/base/ftbase.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftinit.ppc.o: $(FTSRC)/base/ftinit.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftsystem.ppc.o: $(FTSRC)/base/ftsystem.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
# pure version for use in run-time library etc
|
||||
ftsystempure.ppc.o: src/base/ftsystem.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftdebug.ppc.o: $(FTSRC)/base/ftdebug.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
# pure version for use in run-time library etc
|
||||
ftdebugpure.ppc.o: src/base/ftdebug.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library base extensions
|
||||
#
|
||||
ftbbox.ppc.o: $(FTSRC)/base/ftbbox.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftbdf.ppc.o: $(FTSRC)/base/ftbdf.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftbitmap.ppc.o: $(FTSRC)/base/ftbitmap.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftcid.ppc.o: $(FTSRC)/base/ftcid.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftfstype.ppc.o: $(FTSRC)/base/ftfstype.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftgasp.ppc.o: $(FTSRC)/base/ftgasp.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftglyph.ppc.o: $(FTSRC)/base/ftglyph.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftgxval.ppc.o: $(FTSRC)/base/ftgxval.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftmm.ppc.o: $(FTSRC)/base/ftmm.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftotval.ppc.o: $(FTSRC)/base/ftotval.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftpatent.ppc.o: $(FTSRC)/base/ftpatent.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftpfr.ppc.o: $(FTSRC)/base/ftpfr.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftstroke.ppc.o: $(FTSRC)/base/ftstroke.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftsynth.ppc.o: $(FTSRC)/base/ftsynth.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
fttype1.ppc.o: $(FTSRC)/base/fttype1.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftwinfnt.ppc.o: $(FTSRC)/base/ftwinfnt.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library autofitting module
|
||||
#
|
||||
autofit.ppc.o: $(FTSRC)/autofit/autofit.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library postscript hinting module
|
||||
#
|
||||
pshinter.ppc.o: $(FTSRC)/pshinter/pshinter.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library PS support module
|
||||
#
|
||||
psaux.ppc.o: $(FTSRC)/psaux/psaux.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library PS glyph names module
|
||||
#
|
||||
psnames.ppc.o: $(FTSRC)/psnames/psnames.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library monochrome raster module
|
||||
#
|
||||
raster.ppc.o: $(FTSRC)/raster/raster.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library anti-aliasing raster module
|
||||
#
|
||||
smooth.ppc.o: $(FTSRC)/smooth/smooth.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library 'sfnt' module
|
||||
#
|
||||
sfnt.ppc.o: $(FTSRC)/sfnt/sfnt.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library glyph and image caching system
|
||||
#
|
||||
ftcache.ppc.o: $(FTSRC)/cache/ftcache.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library OpenType font driver
|
||||
#
|
||||
cff.ppc.o: $(FTSRC)/cff/cff.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library TrueType font driver
|
||||
#
|
||||
truetype.ppc.o: $(FTSRC)/truetype/truetype.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library Type1 font driver
|
||||
#
|
||||
type1.ppc.o: $(FTSRC)/type1/type1.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library Type42 font driver
|
||||
#
|
||||
type42.ppc.o: $(FTSRC)/type42/type42.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library CID-keyed Type1 font driver
|
||||
#
|
||||
type1cid.ppc.o: $(FTSRC)/cid/type1cid.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library BDF bitmap font driver
|
||||
#
|
||||
bdf.ppc.o: $(FTSRC)/bdf/bdf.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library PCF bitmap font driver
|
||||
#
|
||||
pcf.ppc.o: $(FTSRC)/pcf/pcf.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library gzip support for compressed PCF bitmap fonts
|
||||
#
|
||||
gzip.ppc.o: $(FTSRC)/gzip/ftgzip.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
# FreeType2 library bzip2 support for compressed PCF bitmap fonts
|
||||
#
|
||||
bzip2.ppc.o: $(FTSRC)/bzip2/ftbzip2.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library compress support for compressed PCF bitmap fonts
|
||||
#
|
||||
lzw.ppc.o: $(FTSRC)/lzw/ftlzw.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library PFR font driver
|
||||
#
|
||||
pfr.ppc.o: $(FTSRC)/pfr/pfr.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library Windows FNT/FON bitmap font driver
|
||||
#
|
||||
winfnt.ppc.o: $(FTSRC)/winfonts/winfnt.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library TrueTypeGX Validator
|
||||
#
|
||||
gxvalid.ppc.o: $(FTSRC)/gxvalid/gxvalid.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library OpenType validator
|
||||
#
|
||||
otvalid.ppc.o: $(FTSRC)/otvalid/otvalid.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
BASEPPC = ftbase.ppc.o ftbbox.ppc.o ftbdf.ppc.o ftbitmap.ppc.o ftcid.ppc.o \
|
||||
oftfstype.ppc.o ftgasp.ppc.o ftglyph.ppc.o \
|
||||
ftgxval.ppc.o ftmm.ppc.o ftotval.ppc.o \
|
||||
ftpatent.ppc.o ftpfr.ppc.o ftstroke.ppc.o ftsynth.ppc.o \
|
||||
fttype1.ppc.o ftwinfnt.ppc.o
|
||||
|
||||
DEBUGPPC = ftdebug.ppc.o ftdebugpure.ppc.o
|
||||
|
||||
AFITPPC = autofit.ppc.o
|
||||
|
||||
GXVPPC = gxvalid.ppc.o
|
||||
|
||||
OTVPPC = otvalid.ppc.o
|
||||
|
||||
PSPPC = psaux.ppc.o psnames.ppc.o pshinter.ppc.o
|
||||
|
||||
RASTERPPC = raster.ppc.o smooth.ppc.o
|
||||
|
||||
FONTDPPC = cff.ppc.o type1.ppc.o type42.ppc.o type1cid.ppc.o truetype.ppc.o\
|
||||
bdf.ppc.o pcf.ppc.o pfr.ppc.o winfnt.ppc.o
|
||||
|
||||
libft2_ppc.a: $(BASEPPC) $(AFITPPC) $(GXVPPC) $(OTVPPC) $(PSPPC) $(RASTERPPC) sfnt.ppc.o ftcache.ppc.o $(FONTDPPC) gzip.ppc.o bzip2.ppc.o lzw.ppc.o
|
||||
$(AR) $@ $(BASEPPC) $(AFITPPC) $(GXVPPC) $(OTVPPC) $(PSPPC) $(RASTERPPC) sfnt.ppc.o ftcache.ppc.o $(FONTDPPC) gzip.ppc.o bzip2.ppc.o lzw.ppc.o
|
||||
-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
|
||||
|
||||
#Local Variables:
|
||||
#coding: latin-1
|
||||
#End:
|
|
@ -1,297 +0,0 @@
|
|||
#
|
||||
# Makefile for FreeType2 link library using gcc 4.0.3 from the
|
||||
# AmigaOS4 SDK
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 2005-2024 by
|
||||
# Werner Lemberg and Detlef Würkner.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# to build from the builds/amiga directory call
|
||||
#
|
||||
# make -f makefile.os4
|
||||
#
|
||||
# Your programs source code should start with this
|
||||
# (uncomment the parts you do not need to keep the program small):
|
||||
# ---8<---
|
||||
#define FT_USE_AUTOFIT // autofitter
|
||||
#define FT_USE_RASTER // monochrome rasterizer
|
||||
#define FT_USE_SMOOTH // anti-aliasing rasterizer
|
||||
#define FT_USE_TT // truetype font driver
|
||||
#define FT_USE_T1 // type1 font driver
|
||||
#define FT_USE_T42 // type42 font driver
|
||||
#define FT_USE_T1CID // cid-keyed type1 font driver
|
||||
#define FT_USE_CFF // opentype font driver
|
||||
#define FT_USE_BDF // bdf bitmap font driver
|
||||
#define FT_USE_PCF // pcf bitmap font driver
|
||||
#define FT_USE_PFR // pfr font driver
|
||||
#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
|
||||
#define FT_USE_OTV // opentype validator
|
||||
#define FT_USE_GXV // truetype gx validator
|
||||
#include "FT:src/base/ftinit.c"
|
||||
# ---8<---
|
||||
#
|
||||
# link your programs with libft2_ppc.a and either ftsystem.ppc.o or ftsystempure.ppc.o
|
||||
# (and either ftdebug.ppc.o or ftdebugpure.ppc.o if you enabled FT_DEBUG_LEVEL_ERROR or
|
||||
# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
|
||||
|
||||
all: assign libft2_ppc.a ftsystem.ppc.o ftsystempure.ppc.o
|
||||
|
||||
assign:
|
||||
assign FT: //
|
||||
|
||||
CC = ppc-amigaos-gcc
|
||||
AR = ppc-amigaos-ar
|
||||
RANLIB = ppc-amigaos-ranlib
|
||||
|
||||
DIRFLAGS = -Iinclude -I/FT/src -I/FT/include -I/SDK/include
|
||||
|
||||
WARNINGS = -Wall -W -Wundef -Wpointer-arith -Wbad-function-cast \
|
||||
-Waggregate-return -Wwrite-strings -Wshadow
|
||||
|
||||
OPTIONS = -DFT2_BUILD_LIBRARY -DNDEBUG -fno-builtin
|
||||
OPTIMIZE = -O2 -fomit-frame-pointer -fstrength-reduce -finline-functions
|
||||
|
||||
CFLAGS = -mcrt=clib2 $(DIRFLAGS) $(WARNINGS) $(FT2FLAGS) $(OPTIONS) $(OPTIMIZE)
|
||||
|
||||
#
|
||||
# FreeType2 library base
|
||||
#
|
||||
ftbase.ppc.o: FT:src/base/ftbase.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftbase.c
|
||||
|
||||
ftinit.ppc.o: FT:src/base/ftinit.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftinit.c
|
||||
|
||||
ftsystem.ppc.o: FT:src/base/ftsystem.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftsystem.c
|
||||
|
||||
# pure version for use in run-time library etc
|
||||
ftsystempure.ppc.o: src/base/ftsystem.c
|
||||
$(CC) -c $(CFLAGS) -o $@ src/base/ftsystem.c
|
||||
|
||||
#
|
||||
# FreeType2 library base extensions
|
||||
#
|
||||
ftbbox.ppc.o: FT:src/base/ftbbox.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftbbox.c
|
||||
|
||||
ftbdf.ppc.o: FT:src/base/ftbdf.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftbdf.c
|
||||
|
||||
ftbitmap.ppc.o: FT:src/base/ftbitmap.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftbitmap.c
|
||||
|
||||
ftcid.ppc.o: FT:src/base/ftcid.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftcid.c
|
||||
|
||||
ftdebug.ppc.o: FT:src/base/ftdebug.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftdebug.c
|
||||
|
||||
# pure version for use in run-time library etc
|
||||
ftdebugpure.ppc.o: src/base/ftdebug.c
|
||||
$(CC) -c $(CFLAGS) -o $@ src/base/ftdebug.c
|
||||
|
||||
ftfstype.ppc.o: FT:src/base/ftfstype.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftfstype.c
|
||||
|
||||
ftgasp.ppc.o: FT:src/base/ftgasp.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftgasp.c
|
||||
|
||||
ftglyph.ppc.o: FT:src/base/ftglyph.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftglyph.c
|
||||
|
||||
ftgxval.ppc.o: FT:src/base/ftgxval.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftgxval.c
|
||||
|
||||
ftmm.ppc.o: FT:src/base/ftmm.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftmm.c
|
||||
|
||||
ftotval.ppc.o: FT:src/base/ftotval.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftotval.c
|
||||
|
||||
ftpatent.ppc.o: FT:src/base/ftpatent.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftpatent.c
|
||||
|
||||
ftpfr.ppc.o: FT:src/base/ftpfr.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftpfr.c
|
||||
|
||||
ftstroke.ppc.o: FT:src/base/ftstroke.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftstroke.c
|
||||
|
||||
ftsynth.ppc.o: FT:src/base/ftsynth.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftsynth.c
|
||||
|
||||
fttype1.ppc.o: FT:src/base/fttype1.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/fttype1.c
|
||||
|
||||
ftwinfnt.ppc.o: FT:src/base/ftwinfnt.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftwinfnt.c
|
||||
|
||||
#
|
||||
# FreeType2 library autofitting module
|
||||
#
|
||||
autofit.ppc.o: FT:src/autofit/autofit.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/autofit/autofit.c
|
||||
|
||||
#
|
||||
# FreeType2 library postscript hinting module
|
||||
#
|
||||
pshinter.ppc.o: FT:src/pshinter/pshinter.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/pshinter/pshinter.c
|
||||
|
||||
#
|
||||
# FreeType2 library PS support module
|
||||
#
|
||||
psaux.ppc.o: FT:src/psaux/psaux.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/psaux/psaux.c
|
||||
|
||||
#
|
||||
# FreeType2 library PS glyph names module
|
||||
#
|
||||
psnames.ppc.o: FT:src/psnames/psnames.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/psnames/psnames.c
|
||||
|
||||
#
|
||||
# FreeType2 library monochrome raster module
|
||||
#
|
||||
raster.ppc.o: FT:src/raster/raster.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/raster/raster.c
|
||||
|
||||
#
|
||||
# FreeType2 library anti-aliasing raster module
|
||||
#
|
||||
smooth.ppc.o: FT:src/smooth/smooth.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/smooth/smooth.c
|
||||
|
||||
#
|
||||
# FreeType2 library 'sfnt' module
|
||||
#
|
||||
sfnt.ppc.o: FT:src/sfnt/sfnt.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/sfnt/sfnt.c
|
||||
|
||||
#
|
||||
# FreeType2 library glyph and image caching system
|
||||
#
|
||||
ftcache.ppc.o: FT:src/cache/ftcache.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/cache/ftcache.c
|
||||
|
||||
#
|
||||
# FreeType2 library OpenType font driver
|
||||
#
|
||||
cff.ppc.o: FT:src/cff/cff.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/cff/cff.c
|
||||
|
||||
#
|
||||
# FreeType2 library TrueType font driver
|
||||
#
|
||||
truetype.ppc.o: FT:src/truetype/truetype.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/truetype/truetype.c
|
||||
|
||||
#
|
||||
# FreeType2 library Type1 font driver
|
||||
#
|
||||
type1.ppc.o: FT:src/type1/type1.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/type1/type1.c
|
||||
|
||||
#
|
||||
# FreeType2 library Type42 font driver
|
||||
#
|
||||
type42.ppc.o: FT:src/type42/type42.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/type42/type42.c
|
||||
|
||||
#
|
||||
# FreeType2 library CID-keyed Type1 font driver
|
||||
#
|
||||
type1cid.ppc.o: FT:src/cid/type1cid.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/cid/type1cid.c
|
||||
|
||||
#
|
||||
# FreeType2 library BDF bitmap font driver
|
||||
#
|
||||
bdf.ppc.o: FT:src/bdf/bdf.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/bdf/bdf.c
|
||||
|
||||
#
|
||||
# FreeType2 library PCF bitmap font driver
|
||||
#
|
||||
pcf.ppc.o: FT:src/pcf/pcf.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/pcf/pcf.c
|
||||
|
||||
#
|
||||
# FreeType2 library gzip support for compressed PCF bitmap fonts
|
||||
#
|
||||
gzip.ppc.o: FT:src/gzip/ftgzip.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/gzip/ftgzip.c
|
||||
|
||||
#
|
||||
# FreeType2 library bzip2 support for compressed PCF bitmap fonts
|
||||
#
|
||||
bzip2.ppc.o: FT:src/bzip2/ftbzip2.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/bzip2/ftbzip2.c
|
||||
|
||||
#
|
||||
# FreeType2 library compress support for compressed PCF bitmap fonts
|
||||
#
|
||||
lzw.ppc.o: FT:src/lzw/ftlzw.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/lzw/ftlzw.c
|
||||
|
||||
#
|
||||
# FreeType2 library PFR font driver
|
||||
#
|
||||
pfr.ppc.o: FT:src/pfr/pfr.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/pfr/pfr.c
|
||||
|
||||
#
|
||||
# FreeType2 library Windows FNT/FON bitmap font driver
|
||||
#
|
||||
winfnt.ppc.o: FT:src/winfonts/winfnt.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/winfonts/winfnt.c
|
||||
|
||||
#
|
||||
# FreeType2 library TrueTypeGX Validator
|
||||
#
|
||||
gxvalid.ppc.o: FT:src/gxvalid/gxvalid.c
|
||||
$(CC) -c $(CFLAGS) -Wno-aggregate-return -o $@ /FT/src/gxvalid/gxvalid.c
|
||||
|
||||
#
|
||||
# FreeType2 library OpenType validator
|
||||
#
|
||||
otvalid.ppc.o: FT:src/otvalid/otvalid.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/otvalid/otvalid.c
|
||||
|
||||
BASE = ftbase.ppc.o ftbbox.ppc.o ftbdf.ppc.o ftbitmap.ppc.o ftcid.ppc.o \
|
||||
ftfstype.ppc.o ftgasp.ppc.o ftglyph.ppc.o \
|
||||
ftgxval.ppc.o ftmm.ppc.o ftotval.ppc.o \
|
||||
ftpatent.ppc.o ftpfr.ppc.o ftstroke.ppc.o ftsynth.ppc.o \
|
||||
fttype1.ppc.o ftwinfnt.ppc.o
|
||||
|
||||
DEBUG = ftdebug.ppc.o ftdebugpure.ppc.o
|
||||
|
||||
AFIT = autofit.ppc.o
|
||||
|
||||
GXV = gxvalid.ppc.o
|
||||
|
||||
OTV = otvalid.ppc.o
|
||||
|
||||
PS = psaux.ppc.o psnames.ppc.o pshinter.ppc.o
|
||||
|
||||
RASTER = raster.ppc.o smooth.ppc.o
|
||||
|
||||
FONTD = cff.ppc.o type1.ppc.o type42.ppc.o type1cid.ppc.o truetype.ppc.o\
|
||||
bdf.ppc.o pcf.ppc.o pfr.ppc.o winfnt.ppc.o
|
||||
|
||||
libft2_ppc.a: $(BASE) $(AFIT) $(GXV) $(OTV) $(PS) $(RASTER) sfnt.ppc.o ftcache.ppc.o $(FONTD) gzip.ppc.o lzw.ppc.o
|
||||
$(AR) r $@ $(BASE) $(AFIT) $(GXV) $(OTV) $(PS) $(RASTER) sfnt.ppc.o ftcache.ppc.o $(FONTD) gzip.ppc.o lzw.ppc.o
|
||||
$(RANLIB) $@
|
||||
|
||||
#Local Variables:
|
||||
#coding: latin-1
|
||||
#End:
|
|
@ -1,299 +0,0 @@
|
|||
#
|
||||
# Makefile for FreeType2 link library using Amiga SAS/C 6.58
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 2005-2024 by
|
||||
# Werner Lemberg and Detlef Würkner.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# to build from the builds/amiga directory call
|
||||
#
|
||||
# smake assign
|
||||
# smake
|
||||
#
|
||||
# Your programs source code should start with this
|
||||
# (uncomment the parts you do not need to keep the program small):
|
||||
# ---8<---
|
||||
#define FT_USE_AUTOFIT // autofitter
|
||||
#define FT_USE_RASTER // monochrome rasterizer
|
||||
#define FT_USE_SMOOTH // anti-aliasing rasterizer
|
||||
#define FT_USE_TT // truetype font driver
|
||||
#define FT_USE_T1 // type1 font driver
|
||||
#define FT_USE_T42 // type42 font driver
|
||||
#define FT_USE_T1CID // cid-keyed type1 font driver
|
||||
#define FT_USE_CFF // opentype font driver
|
||||
#define FT_USE_BDF // bdf bitmap font driver
|
||||
#define FT_USE_PCF // pcf bitmap font driver
|
||||
#define FT_USE_PFR // pfr font driver
|
||||
#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
|
||||
#define FT_USE_OTV // opentype validator
|
||||
#define FT_USE_GXV // truetype gx validator
|
||||
#include "FT:src/base/ftinit.c"
|
||||
# ---8<---
|
||||
#
|
||||
# link your programs with ft2_680x0.lib and either ftsystem.o or ftsystempure.o
|
||||
# (and either ftdebug.o or ftdebugpure.o if you enabled FT_DEBUG_LEVEL_ERROR or
|
||||
# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
|
||||
|
||||
OBJBASE = ftbase.o ftbbox.o ftbdf.o ftbitmap.o ftcid.o ftfstype.o \
|
||||
ftgasp.o ftglyph.o ftgxval.o ftmm.o ftotval.o \
|
||||
ftpatent.o ftpfr.o ftstroke.o ftsynth.o fttype1.o ftwinfnt.o
|
||||
|
||||
OBJSYSTEM = ftsystem.o ftsystempure.o
|
||||
|
||||
OBJDEBUG = ftdebug.o ftdebugpure.o
|
||||
|
||||
OBJAFIT = autofit.o
|
||||
|
||||
OBJGXV = gxvalid.o
|
||||
|
||||
OBJOTV = otvalid.o
|
||||
|
||||
OBJPS = psaux.o psnames.o pshinter.o
|
||||
|
||||
OBJRASTER = raster.o smooth.o
|
||||
|
||||
OBJSFNT = sfnt.o
|
||||
|
||||
OBJCACHE = ftcache.o
|
||||
|
||||
OBJFONTD = cff.o type1.o type42.o type1cid.o\
|
||||
truetype.o winfnt.o bdf.o pcf.o pfr.o
|
||||
|
||||
CORE = FT:src/
|
||||
|
||||
CPU = 68000
|
||||
#CPU = 68020
|
||||
#CPU = 68030
|
||||
#CPU = 68040
|
||||
#CPU = 68060
|
||||
|
||||
OPTIMIZER = optinlocal
|
||||
|
||||
SCFLAGS = optimize opttime optsched strmerge data=faronly idlen=50 cpu=$(CPU)\
|
||||
idir=include/ idir=$(CORE) idir=FT:include/ nostackcheck nochkabort\
|
||||
noicons ignore=79,85,110,306 parameters=both define=FT2_BUILD_LIBRARY
|
||||
|
||||
LIB = ft2_$(CPU).lib
|
||||
|
||||
# sample linker options
|
||||
OPTS = link lib=$(LIB),lib:sc.lib,lib:amiga.lib,lib:debug.lib\
|
||||
smallcode smalldata noicons utillib
|
||||
|
||||
# sample program entry
|
||||
#myprog: myprog.c ftsystem.o $(LIB)
|
||||
# sc $< programname=$@ ftsystem.o $(SCFLAGS) $(OPTS)
|
||||
|
||||
all: $(LIB) $(OBJSYSTEM) $(OBJDEBUG)
|
||||
|
||||
assign:
|
||||
assign FT: //
|
||||
|
||||
# uses separate object modules in lib to make for easier debugging
|
||||
# also, can make smaller programs if entire engine is not used
|
||||
ft2_$(CPU).lib: $(OBJBASE) $(OBJAFIT) $(OBJOTV) $(OBJPS) $(OBJRASTER) $(OBJSFNT) $(OBJCACHE) $(OBJFONTD) lzw.o gzip.o bzip2.o
|
||||
oml $@ r $(OBJBASE) $(OBJAFIT) $(OBJOTV) $(OBJPS) $(OBJRASTER) $(OBJSFNT) $(OBJCACHE) $(OBJFONTD) lzw.o gzip.o bzip2.o
|
||||
|
||||
clean:
|
||||
-delete \#?.o
|
||||
|
||||
realclean: clean
|
||||
-delete ft2$(CPU).lib
|
||||
|
||||
#
|
||||
# freetype library base
|
||||
#
|
||||
ftbase.o: $(CORE)base/ftbase.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftinit.o: $(CORE)base/ftinit.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftsystem.o: $(CORE)base/ftsystem.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftsystempure.o: src/base/ftsystem.c ## pure version for use in run-time library etc
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftdebug.o: $(CORE)base/ftdebug.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftdebugpure.o: src/base/ftdebug.c ## pure version for use in run-time library etc
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
#
|
||||
# freetype library base extensions
|
||||
#
|
||||
ftbbox.o: $(CORE)base/ftbbox.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftbdf.o: $(CORE)base/ftbdf.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftbitmap.o: $(CORE)base/ftbitmap.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftcid.o: $(CORE)base/ftcid.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftfstype.o: $(CORE)base/ftfstype.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftgasp.o: $(CORE)base/ftgasp.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftglyph.o: $(CORE)base/ftglyph.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftgxval.o: $(CORE)base/ftgxval.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftmm.o: $(CORE)base/ftmm.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftotval.o: $(CORE)base/ftotval.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftpatent.o: $(CORE)base/ftpatent.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftpfr.o: $(CORE)base/ftpfr.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftstroke.o: $(CORE)base/ftstroke.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftsynth.o: $(CORE)base/ftsynth.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
fttype1.o: $(CORE)base/fttype1.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftwinfnt.o: $(CORE)base/ftwinfnt.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library autofitter module
|
||||
#
|
||||
autofit.o: $(CORE)autofit/autofit.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library PS hinting module
|
||||
#
|
||||
pshinter.o: $(CORE)pshinter/pshinter.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
#
|
||||
# freetype library PS support module
|
||||
#
|
||||
psaux.o: $(CORE)psaux/psaux.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library PS glyph names module
|
||||
#
|
||||
psnames.o: $(CORE)psnames/psnames.c
|
||||
sc $(SCFLAGS) code=far objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library monochrome raster module
|
||||
#
|
||||
raster.o: $(CORE)raster/raster.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library anti-aliasing raster module
|
||||
#
|
||||
smooth.o: $(CORE)smooth/smooth.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library 'sfnt' module
|
||||
#
|
||||
sfnt.o: $(CORE)sfnt/sfnt.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library glyph and image caching system (still experimental)
|
||||
#
|
||||
ftcache.o: $(CORE)cache/ftcache.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library OpenType font driver
|
||||
#
|
||||
cff.o: $(CORE)cff/cff.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library TrueType font driver
|
||||
#
|
||||
truetype.o: $(CORE)truetype/truetype.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library Type1 font driver
|
||||
#
|
||||
type1.o: $(CORE)type1/type1.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library Type42 font driver
|
||||
#
|
||||
type42.o: $(CORE)type42/type42.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library CID-keyed Type1 font driver
|
||||
#
|
||||
type1cid.o: $(CORE)cid/type1cid.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
#
|
||||
# freetype library CID-keyed Type1 font driver extensions
|
||||
#
|
||||
#cidafm.o: $(CORE)cid/cidafm.c
|
||||
# sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library BDF bitmap font driver
|
||||
#
|
||||
bdf.o: $(CORE)bdf/bdf.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library PCF bitmap font driver
|
||||
#
|
||||
pcf.o: $(CORE)pcf/pcf.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library gzip support for compressed PCF bitmap fonts
|
||||
#
|
||||
gzip.o: $(CORE)gzip/ftgzip.c
|
||||
sc $(SCFLAGS) define FAR objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library bzip2 support for compressed PCF bitmap fonts
|
||||
#
|
||||
bzip2.o: $(CORE)bzip2/ftbzip2.c
|
||||
sc $(SCFLAGS) define FAR objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library compress support for compressed PCF bitmap fonts
|
||||
#
|
||||
lzw.o: $(CORE)lzw/ftlzw.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library PFR font driver
|
||||
#
|
||||
pfr.o: $(CORE)pfr/pfr.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library Windows FNT/FON bitmap font driver
|
||||
#
|
||||
winfnt.o: $(CORE)winfonts/winfnt.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library TrueTypeGX validator
|
||||
#
|
||||
gxvalid.o: $(CORE)gxvalid/gxvalid.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library OpenType validator
|
||||
#
|
||||
otvalid.o: $(CORE)otvalid/otvalid.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#Local Variables:
|
||||
#coding: latin-1
|
||||
#End:
|
|
@ -1,348 +0,0 @@
|
|||
/****************************************************************************
|
||||
*
|
||||
* ftdebug.c
|
||||
*
|
||||
* Debugging and logging component for amiga (body).
|
||||
*
|
||||
* Copyright (C) 1996-2024 by
|
||||
* David Turner, Robert Wilhelm, Werner Lemberg, and Detlef Wuerkner.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
* modified, and distributed under the terms of the FreeType project
|
||||
* license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
* this file you indicate that you have read the license and
|
||||
* understand and accept it fully.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* This component contains various macros and functions used to ease the
|
||||
* debugging of the FreeType engine. Its main purpose is in assertion
|
||||
* checking, tracing, and error detection.
|
||||
*
|
||||
* There are now three debugging modes:
|
||||
*
|
||||
* - trace mode
|
||||
*
|
||||
* Error and trace messages are sent to the log file (which can be the
|
||||
* standard error output).
|
||||
*
|
||||
* - error mode
|
||||
*
|
||||
* Only error messages are generated.
|
||||
*
|
||||
* - release mode:
|
||||
*
|
||||
* No error message is sent or generated. The code is free from any
|
||||
* debugging parts.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Based on the default `ftdebug.c' file,
|
||||
* replaced `vprintf' with `KVPrintF',
|
||||
* commented out `exit',
|
||||
* replaced `getenv' with `GetVar'.
|
||||
*/
|
||||
|
||||
#include <exec/types.h>
|
||||
#include <utility/tagitem.h>
|
||||
#include <dos/exall.h>
|
||||
#include <dos/var.h>
|
||||
|
||||
#define __NOLIBBASE__
|
||||
#define __NOLOBALIFACE__
|
||||
#define __USE_INLINE__
|
||||
|
||||
#include <proto/dos.h>
|
||||
#include <clib/debug_protos.h>
|
||||
|
||||
#ifndef __amigaos4__
|
||||
extern struct Library* DOSBase;
|
||||
#else
|
||||
extern struct DOSIFace* IDOS;
|
||||
#endif
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
#include <freetype/freetype.h>
|
||||
#include <freetype/internal/ftdebug.h>
|
||||
|
||||
|
||||
#ifdef FT_DEBUG_LEVEL_ERROR
|
||||
|
||||
/* documentation is in ftdebug.h */
|
||||
|
||||
FT_BASE_DEF( void )
|
||||
FT_Message( const char* fmt,
|
||||
... )
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
|
||||
va_start( ap, fmt );
|
||||
KVPrintF( fmt, ap );
|
||||
va_end( ap );
|
||||
}
|
||||
|
||||
|
||||
/* documentation is in ftdebug.h */
|
||||
|
||||
FT_BASE_DEF( void )
|
||||
FT_Panic( const char* fmt,
|
||||
... )
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
|
||||
va_start( ap, fmt );
|
||||
KVPrintF( fmt, ap );
|
||||
va_end( ap );
|
||||
|
||||
/* exit( EXIT_FAILURE ); */
|
||||
}
|
||||
|
||||
|
||||
/* documentation is in ftdebug.h */
|
||||
|
||||
FT_BASE_DEF( int )
|
||||
FT_Throw( FT_Error error,
|
||||
int line,
|
||||
const char* file )
|
||||
{
|
||||
#if 0
|
||||
/* activating the code in this block makes FreeType very chatty */
|
||||
fprintf( stderr,
|
||||
"%s:%d: error 0x%02x: %s\n",
|
||||
file,
|
||||
line,
|
||||
error,
|
||||
FT_Error_String( error ) );
|
||||
#else
|
||||
FT_UNUSED( error );
|
||||
FT_UNUSED( line );
|
||||
FT_UNUSED( file );
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* FT_DEBUG_LEVEL_ERROR */
|
||||
|
||||
|
||||
|
||||
#ifdef FT_DEBUG_LEVEL_TRACE
|
||||
|
||||
/* array of trace levels, initialized to 0; */
|
||||
/* this gets adjusted at run-time */
|
||||
static int ft_trace_levels_enabled[trace_count];
|
||||
|
||||
/* array of trace levels, always initialized to 0 */
|
||||
static int ft_trace_levels_disabled[trace_count];
|
||||
|
||||
/* a pointer to either `ft_trace_levels_enabled' */
|
||||
/* or `ft_trace_levels_disabled' */
|
||||
int* ft_trace_levels;
|
||||
|
||||
/* define array of trace toggle names */
|
||||
#define FT_TRACE_DEF( x ) #x ,
|
||||
|
||||
static const char* ft_trace_toggles[trace_count + 1] =
|
||||
{
|
||||
#include <freetype/internal/fttrace.h>
|
||||
NULL
|
||||
};
|
||||
|
||||
#undef FT_TRACE_DEF
|
||||
|
||||
|
||||
/* documentation is in ftdebug.h */
|
||||
|
||||
FT_BASE_DEF( FT_Int )
|
||||
FT_Trace_Get_Count( void )
|
||||
{
|
||||
return trace_count;
|
||||
}
|
||||
|
||||
|
||||
/* documentation is in ftdebug.h */
|
||||
|
||||
FT_BASE_DEF( const char * )
|
||||
FT_Trace_Get_Name( FT_Int idx )
|
||||
{
|
||||
int max = FT_Trace_Get_Count();
|
||||
|
||||
|
||||
if ( idx < max )
|
||||
return ft_trace_toggles[idx];
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* documentation is in ftdebug.h */
|
||||
|
||||
FT_BASE_DEF( void )
|
||||
FT_Trace_Disable( void )
|
||||
{
|
||||
ft_trace_levels = ft_trace_levels_disabled;
|
||||
}
|
||||
|
||||
|
||||
/* documentation is in ftdebug.h */
|
||||
|
||||
FT_BASE_DEF( void )
|
||||
FT_Trace_Enable( void )
|
||||
{
|
||||
ft_trace_levels = ft_trace_levels_enabled;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Initialize the tracing sub-system. This is done by retrieving the
|
||||
* value of the `FT2_DEBUG' environment variable. It must be a list of
|
||||
* toggles, separated by spaces, `;', or `,'. Example:
|
||||
*
|
||||
* export FT2_DEBUG="any:3 memory:7 stream:5"
|
||||
*
|
||||
* This requests that all levels be set to 3, except the trace level for
|
||||
* the memory and stream components which are set to 7 and 5,
|
||||
* respectively.
|
||||
*
|
||||
* See the file `include/freetype/internal/fttrace.h' for details of
|
||||
* the available toggle names.
|
||||
*
|
||||
* The level must be between 0 and 7; 0 means quiet (except for serious
|
||||
* runtime errors), and 7 means _very_ verbose.
|
||||
*/
|
||||
FT_BASE_DEF( void )
|
||||
ft_debug_init( void )
|
||||
{
|
||||
/* const char* ft2_debug = ft_getenv( "FT2_DEBUG" ); */
|
||||
char buf[256];
|
||||
const char* ft2_debug = &buf[0];
|
||||
|
||||
|
||||
/* if ( ft2_debug ) */
|
||||
if ( GetVar( "FT2_DEBUG", (STRPTR)ft2_debug, 256, LV_VAR ) > 0 )
|
||||
{
|
||||
const char* p = ft2_debug;
|
||||
const char* q;
|
||||
|
||||
|
||||
for ( ; *p; p++ )
|
||||
{
|
||||
/* skip leading whitespace and separators */
|
||||
if ( *p == ' ' || *p == '\t' || *p == ',' || *p == ';' || *p == '=' )
|
||||
continue;
|
||||
|
||||
/* read toggle name, followed by ':' */
|
||||
q = p;
|
||||
while ( *p && *p != ':' )
|
||||
p++;
|
||||
|
||||
if ( !*p )
|
||||
break;
|
||||
|
||||
if ( *p == ':' && p > q )
|
||||
{
|
||||
FT_Int n, i, len = (FT_Int)( p - q );
|
||||
FT_Int level = -1, found = -1;
|
||||
|
||||
|
||||
for ( n = 0; n < trace_count; n++ )
|
||||
{
|
||||
const char* toggle = ft_trace_toggles[n];
|
||||
|
||||
|
||||
for ( i = 0; i < len; i++ )
|
||||
{
|
||||
if ( toggle[i] != q[i] )
|
||||
break;
|
||||
}
|
||||
|
||||
if ( i == len && toggle[i] == 0 )
|
||||
{
|
||||
found = n;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* read level */
|
||||
p++;
|
||||
if ( *p )
|
||||
{
|
||||
level = *p - '0';
|
||||
if ( level < 0 || level > 7 )
|
||||
level = -1;
|
||||
}
|
||||
|
||||
if ( found >= 0 && level >= 0 )
|
||||
{
|
||||
if ( found == trace_any )
|
||||
{
|
||||
/* special case for `any' */
|
||||
for ( n = 0; n < trace_count; n++ )
|
||||
ft_trace_levels_enabled[n] = level;
|
||||
}
|
||||
else
|
||||
ft_trace_levels_enabled[found] = level;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ft_trace_levels = ft_trace_levels_enabled;
|
||||
}
|
||||
|
||||
|
||||
#else /* !FT_DEBUG_LEVEL_TRACE */
|
||||
|
||||
|
||||
FT_BASE_DEF( void )
|
||||
ft_debug_init( void )
|
||||
{
|
||||
/* nothing */
|
||||
}
|
||||
|
||||
|
||||
FT_BASE_DEF( FT_Int )
|
||||
FT_Trace_Get_Count( void )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
FT_BASE_DEF( const char * )
|
||||
FT_Trace_Get_Name( FT_Int idx )
|
||||
{
|
||||
FT_UNUSED( idx );
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
FT_BASE_DEF( void )
|
||||
FT_Trace_Disable( void )
|
||||
{
|
||||
/* nothing */
|
||||
}
|
||||
|
||||
|
||||
/* documentation is in ftdebug.h */
|
||||
|
||||
FT_BASE_DEF( void )
|
||||
FT_Trace_Enable( void )
|
||||
{
|
||||
/* nothing */
|
||||
}
|
||||
|
||||
|
||||
#endif /* !FT_DEBUG_LEVEL_TRACE */
|
||||
|
||||
|
||||
/* END */
|
|
@ -1,530 +0,0 @@
|
|||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftsystem.c */
|
||||
/* */
|
||||
/* Amiga-specific FreeType low-level system interface (body). */
|
||||
/* */
|
||||
/* Copyright (C) 1996-2024 by */
|
||||
/* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* This file contains the Amiga interface used by FreeType to access */
|
||||
/* low-level, i.e. memory management, i/o access as well as thread */
|
||||
/* synchronisation. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Maintained by Detlef Würkner <TetiSoft@apg.lahn.de> */
|
||||
/* */
|
||||
/* Based on the original ftsystem.c, */
|
||||
/* modified to avoid fopen(), fclose(), fread(), fseek(), ftell(), */
|
||||
/* malloc(), realloc(), and free(). */
|
||||
/* */
|
||||
/* Those C library functions are often not thread-safe or cant be */
|
||||
/* used in a shared Amiga library. If that's not a problem for you, */
|
||||
/* you can of course use the default ftsystem.c with C library calls */
|
||||
/* instead. */
|
||||
/* */
|
||||
/* This implementation needs exec V39+ because it uses AllocPooled() etc */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
#define __NOLIBBASE__
|
||||
#define __NOGLOBALIFACE__
|
||||
#define __USE_INLINE__
|
||||
#include <proto/exec.h>
|
||||
#include <dos/stdio.h>
|
||||
#include <proto/dos.h>
|
||||
#ifdef __amigaos4__
|
||||
extern struct ExecIFace *IExec;
|
||||
extern struct DOSIFace *IDOS;
|
||||
#else
|
||||
extern struct Library *SysBase;
|
||||
extern struct Library *DOSBase;
|
||||
#endif
|
||||
|
||||
#define IOBUF_SIZE 512
|
||||
|
||||
/* structure that helps us to avoid
|
||||
* useless calls of Seek() and Read()
|
||||
*/
|
||||
struct SysFile
|
||||
{
|
||||
BPTR file;
|
||||
ULONG iobuf_start;
|
||||
ULONG iobuf_end;
|
||||
UBYTE iobuf[IOBUF_SIZE];
|
||||
};
|
||||
|
||||
#ifndef __amigaos4__
|
||||
/* C implementation of AllocVecPooled (see autodoc exec/AllocPooled) */
|
||||
APTR
|
||||
Alloc_VecPooled( APTR poolHeader,
|
||||
ULONG memSize )
|
||||
{
|
||||
ULONG newSize = memSize + sizeof ( ULONG );
|
||||
ULONG *mem = AllocPooled( poolHeader, newSize );
|
||||
|
||||
if ( !mem )
|
||||
return NULL;
|
||||
*mem = newSize;
|
||||
return mem + 1;
|
||||
}
|
||||
|
||||
/* C implementation of FreeVecPooled (see autodoc exec/AllocPooled) */
|
||||
void
|
||||
Free_VecPooled( APTR poolHeader,
|
||||
APTR memory )
|
||||
{
|
||||
ULONG *realmem = (ULONG *)memory - 1;
|
||||
|
||||
FreePooled( poolHeader, realmem, *realmem );
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_CONFIG_CONFIG_H
|
||||
#include <freetype/internal/ftdebug.h>
|
||||
#include <freetype/ftsystem.h>
|
||||
#include <freetype/fterrors.h>
|
||||
#include <freetype/fttypes.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* MEMORY MANAGEMENT INTERFACE */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* It is not necessary to do any error checking for the */
|
||||
/* allocation-related functions. This is done by the higher level */
|
||||
/* routines like ft_mem_alloc() or ft_mem_realloc(). */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* ft_alloc */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The memory allocation function. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* memory :: A pointer to the memory object. */
|
||||
/* */
|
||||
/* size :: The requested size in bytes. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* The address of newly allocated block. */
|
||||
/* */
|
||||
FT_CALLBACK_DEF( void* )
|
||||
ft_alloc( FT_Memory memory,
|
||||
long size )
|
||||
{
|
||||
#ifdef __amigaos4__
|
||||
return AllocVecPooled( memory->user, size );
|
||||
#else
|
||||
return Alloc_VecPooled( memory->user, size );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* ft_realloc */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The memory reallocation function. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* memory :: A pointer to the memory object. */
|
||||
/* */
|
||||
/* cur_size :: The current size of the allocated memory block. */
|
||||
/* */
|
||||
/* new_size :: The newly requested size in bytes. */
|
||||
/* */
|
||||
/* block :: The current address of the block in memory. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* The address of the reallocated memory block. */
|
||||
/* */
|
||||
FT_CALLBACK_DEF( void* )
|
||||
ft_realloc( FT_Memory memory,
|
||||
long cur_size,
|
||||
long new_size,
|
||||
void* block )
|
||||
{
|
||||
void* new_block;
|
||||
|
||||
#ifdef __amigaos4__
|
||||
new_block = AllocVecPooled ( memory->user, new_size );
|
||||
#else
|
||||
new_block = Alloc_VecPooled ( memory->user, new_size );
|
||||
#endif
|
||||
if ( new_block != NULL )
|
||||
{
|
||||
CopyMem ( block, new_block,
|
||||
( new_size > cur_size ) ? cur_size : new_size );
|
||||
#ifdef __amigaos4__
|
||||
FreeVecPooled ( memory->user, block );
|
||||
#else
|
||||
Free_VecPooled ( memory->user, block );
|
||||
#endif
|
||||
}
|
||||
return new_block;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* ft_free */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The memory release function. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* memory :: A pointer to the memory object. */
|
||||
/* */
|
||||
/* block :: The address of block in memory to be freed. */
|
||||
/* */
|
||||
FT_CALLBACK_DEF( void )
|
||||
ft_free( FT_Memory memory,
|
||||
void* block )
|
||||
{
|
||||
#ifdef __amigaos4__
|
||||
FreeVecPooled( memory->user, block );
|
||||
#else
|
||||
Free_VecPooled( memory->user, block );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* RESOURCE MANAGEMENT INTERFACE */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
|
||||
/* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
|
||||
/* messages during execution. */
|
||||
/* */
|
||||
#undef FT_COMPONENT
|
||||
#define FT_COMPONENT io
|
||||
|
||||
/* We use the macro STREAM_FILE for convenience to extract the */
|
||||
/* system-specific stream handle from a given FreeType stream object */
|
||||
#define STREAM_FILE( stream ) ( (struct SysFile *)stream->descriptor.pointer )
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* ft_amiga_stream_close */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The function to close a stream. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* stream :: A pointer to the stream object. */
|
||||
/* */
|
||||
FT_CALLBACK_DEF( void )
|
||||
ft_amiga_stream_close( FT_Stream stream )
|
||||
{
|
||||
struct SysFile* sysfile;
|
||||
|
||||
sysfile = STREAM_FILE( stream );
|
||||
Close ( sysfile->file );
|
||||
FreeMem ( sysfile, sizeof ( struct SysFile ));
|
||||
|
||||
stream->descriptor.pointer = NULL;
|
||||
stream->size = 0;
|
||||
stream->base = NULL;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* ft_amiga_stream_io */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The function to open a stream. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* stream :: A pointer to the stream object. */
|
||||
/* */
|
||||
/* offset :: The position in the data stream to start reading. */
|
||||
/* */
|
||||
/* buffer :: The address of buffer to store the read data. */
|
||||
/* */
|
||||
/* count :: The number of bytes to read from the stream. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* The number of bytes actually read. */
|
||||
/* */
|
||||
FT_CALLBACK_DEF( unsigned long )
|
||||
ft_amiga_stream_io( FT_Stream stream,
|
||||
unsigned long offset,
|
||||
unsigned char* buffer,
|
||||
unsigned long count )
|
||||
{
|
||||
struct SysFile* sysfile;
|
||||
unsigned long read_bytes;
|
||||
|
||||
if ( count != 0 )
|
||||
{
|
||||
sysfile = STREAM_FILE( stream );
|
||||
|
||||
/* handle the seek */
|
||||
if ( (offset < sysfile->iobuf_start) || (offset + count > sysfile->iobuf_end) )
|
||||
{
|
||||
/* requested offset implies we need a buffer refill */
|
||||
if ( !sysfile->iobuf_end || offset != sysfile->iobuf_end )
|
||||
{
|
||||
/* a physical seek is necessary */
|
||||
Seek( sysfile->file, offset, OFFSET_BEGINNING );
|
||||
}
|
||||
sysfile->iobuf_start = offset;
|
||||
sysfile->iobuf_end = 0; /* trigger a buffer refill */
|
||||
}
|
||||
|
||||
/* handle the read */
|
||||
if ( offset + count <= sysfile->iobuf_end )
|
||||
{
|
||||
/* we have buffer and requested bytes are all inside our buffer */
|
||||
CopyMem( &sysfile->iobuf[offset - sysfile->iobuf_start], buffer, count );
|
||||
read_bytes = count;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* (re)fill buffer */
|
||||
if ( count <= IOBUF_SIZE )
|
||||
{
|
||||
/* requested bytes is a subset of the buffer */
|
||||
read_bytes = Read( sysfile->file, sysfile->iobuf, IOBUF_SIZE );
|
||||
if ( read_bytes == -1UL )
|
||||
{
|
||||
/* error */
|
||||
read_bytes = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
sysfile->iobuf_end = offset + read_bytes;
|
||||
CopyMem( sysfile->iobuf, buffer, count );
|
||||
if ( read_bytes > count )
|
||||
{
|
||||
read_bytes = count;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* we actually need more than our buffer can hold, so we decide
|
||||
** to do a single big read, and then copy the last IOBUF_SIZE
|
||||
** bytes of that to our internal buffer for later use */
|
||||
read_bytes = Read( sysfile->file, buffer, count );
|
||||
if ( read_bytes == -1UL )
|
||||
{
|
||||
/* error */
|
||||
read_bytes = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ULONG bufsize;
|
||||
|
||||
bufsize = ( read_bytes > IOBUF_SIZE ) ? IOBUF_SIZE : read_bytes;
|
||||
sysfile->iobuf_end = offset + read_bytes;
|
||||
sysfile->iobuf_start = sysfile->iobuf_end - bufsize;
|
||||
CopyMem( &buffer[read_bytes - bufsize] , sysfile->iobuf, bufsize );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
read_bytes = 0;
|
||||
}
|
||||
|
||||
return read_bytes;
|
||||
}
|
||||
|
||||
|
||||
/* documentation is in ftobjs.h */
|
||||
|
||||
FT_BASE_DEF( FT_Error )
|
||||
FT_Stream_Open( FT_Stream stream,
|
||||
const char* filepathname )
|
||||
{
|
||||
struct FileInfoBlock* fib;
|
||||
struct SysFile* sysfile;
|
||||
|
||||
|
||||
if ( !stream )
|
||||
return FT_THROW( Invalid_Stream_Handle );
|
||||
|
||||
#ifdef __amigaos4__
|
||||
sysfile = AllocMem ( sizeof (struct SysFile ), MEMF_SHARED );
|
||||
#else
|
||||
sysfile = AllocMem ( sizeof (struct SysFile ), MEMF_PUBLIC );
|
||||
#endif
|
||||
if ( !sysfile )
|
||||
{
|
||||
FT_ERROR(( "FT_Stream_Open:" ));
|
||||
FT_ERROR(( " could not open `%s'\n", filepathname ));
|
||||
|
||||
return FT_THROW( Cannot_Open_Resource );
|
||||
}
|
||||
sysfile->file = Open( (STRPTR)filepathname, MODE_OLDFILE );
|
||||
if ( !sysfile->file )
|
||||
{
|
||||
FreeMem ( sysfile, sizeof ( struct SysFile ));
|
||||
FT_ERROR(( "FT_Stream_Open:" ));
|
||||
FT_ERROR(( " could not open `%s'\n", filepathname ));
|
||||
|
||||
return FT_THROW( Cannot_Open_Resource );
|
||||
}
|
||||
|
||||
fib = AllocDosObject( DOS_FIB, NULL );
|
||||
if ( !fib )
|
||||
{
|
||||
Close ( sysfile->file );
|
||||
FreeMem ( sysfile, sizeof ( struct SysFile ));
|
||||
FT_ERROR(( "FT_Stream_Open:" ));
|
||||
FT_ERROR(( " could not open `%s'\n", filepathname ));
|
||||
|
||||
return FT_THROW( Cannot_Open_Resource );
|
||||
}
|
||||
if ( !( ExamineFH( sysfile->file, fib ) ) )
|
||||
{
|
||||
FreeDosObject( DOS_FIB, fib );
|
||||
Close ( sysfile->file );
|
||||
FreeMem ( sysfile, sizeof ( struct SysFile ));
|
||||
FT_ERROR(( "FT_Stream_Open:" ));
|
||||
FT_ERROR(( " could not open `%s'\n", filepathname ));
|
||||
|
||||
return FT_THROW( Cannot_Open_Resource );
|
||||
}
|
||||
stream->size = fib->fib_Size;
|
||||
FreeDosObject( DOS_FIB, fib );
|
||||
|
||||
stream->descriptor.pointer = (void *)sysfile;
|
||||
stream->pathname.pointer = (char*)filepathname;
|
||||
sysfile->iobuf_start = 0;
|
||||
sysfile->iobuf_end = 0;
|
||||
stream->pos = 0;
|
||||
|
||||
stream->read = ft_amiga_stream_io;
|
||||
stream->close = ft_amiga_stream_close;
|
||||
|
||||
if ( !stream->size )
|
||||
{
|
||||
ft_amiga_stream_close( stream );
|
||||
FT_ERROR(( "FT_Stream_Open:" ));
|
||||
FT_ERROR(( " opened `%s' but zero-sized\n", filepathname ));
|
||||
return FT_THROW( Cannot_Open_Stream );
|
||||
}
|
||||
|
||||
FT_TRACE1(( "FT_Stream_Open:" ));
|
||||
FT_TRACE1(( " opened `%s' (%ld bytes) successfully\n",
|
||||
filepathname, stream->size ));
|
||||
|
||||
return FT_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
#ifdef FT_DEBUG_MEMORY
|
||||
|
||||
extern FT_Int
|
||||
ft_mem_debug_init( FT_Memory memory );
|
||||
|
||||
extern void
|
||||
ft_mem_debug_done( FT_Memory memory );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* documentation is in ftobjs.h */
|
||||
|
||||
FT_BASE_DEF( FT_Memory )
|
||||
FT_New_Memory( void )
|
||||
{
|
||||
FT_Memory memory;
|
||||
|
||||
|
||||
#ifdef __amigaos4__
|
||||
memory = (FT_Memory)AllocVec( sizeof ( *memory ), MEMF_SHARED );
|
||||
#else
|
||||
memory = (FT_Memory)AllocVec( sizeof ( *memory ), MEMF_PUBLIC );
|
||||
#endif
|
||||
if ( memory )
|
||||
{
|
||||
#ifdef __amigaos4__
|
||||
memory->user = CreatePool( MEMF_SHARED, 16384, 16384 );
|
||||
#else
|
||||
memory->user = CreatePool( MEMF_PUBLIC, 16384, 16384 );
|
||||
#endif
|
||||
if ( memory->user == NULL )
|
||||
{
|
||||
FreeVec( memory );
|
||||
memory = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
memory->alloc = ft_alloc;
|
||||
memory->realloc = ft_realloc;
|
||||
memory->free = ft_free;
|
||||
#ifdef FT_DEBUG_MEMORY
|
||||
ft_mem_debug_init( memory );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
return memory;
|
||||
}
|
||||
|
||||
|
||||
/* documentation is in ftobjs.h */
|
||||
|
||||
FT_BASE_DEF( void )
|
||||
FT_Done_Memory( FT_Memory memory )
|
||||
{
|
||||
#ifdef FT_DEBUG_MEMORY
|
||||
ft_mem_debug_done( memory );
|
||||
#endif
|
||||
|
||||
DeletePool( memory->user );
|
||||
FreeVec( memory );
|
||||
}
|
||||
|
||||
/*
|
||||
Local Variables:
|
||||
coding: latin-1
|
||||
End:
|
||||
*/
|
||||
/* END */
|
|
@ -1,77 +0,0 @@
|
|||
#
|
||||
# FreeType 2 configuration rules for a `normal' ANSI system
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
DELETE := rm -f
|
||||
CAT := cat
|
||||
SEP := /
|
||||
PLATFORM_DIR := $(TOP_DIR)/builds/ansi
|
||||
PLATFORM := ansi
|
||||
|
||||
# This is used for `make refdoc' and `make refdoc-venv'
|
||||
#
|
||||
BIN := bin
|
||||
|
||||
# The directory where all library files are placed.
|
||||
#
|
||||
# By default, this is the same as $(OBJ_DIR); however, this can be changed
|
||||
# to suit particular needs.
|
||||
#
|
||||
LIB_DIR := $(OBJ_DIR)
|
||||
|
||||
|
||||
# The name of the final library file. Note that the DOS-specific Makefile
|
||||
# uses a shorter (8.3) name.
|
||||
#
|
||||
LIBRARY := lib$(PROJECT)
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -l
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -o$(space)
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -c
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS ?=
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,21 +0,0 @@
|
|||
#
|
||||
# FreeType 2 configuration rules for a `normal' pseudo ANSI compiler/system
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
include $(TOP_DIR)/builds/ansi/ansi-def.mk
|
||||
include $(TOP_DIR)/builds/compiler/ansi-cc.mk
|
||||
include $(TOP_DIR)/builds/link_std.mk
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,20 +0,0 @@
|
|||
#if defined( GXVALID_H_ )
|
||||
#pragma warn -aus /* too many unevaluated variables in gxvalid */
|
||||
#endif
|
||||
|
||||
#ifndef ATARI_H
|
||||
#define ATARI_H
|
||||
|
||||
#pragma warn -stu
|
||||
|
||||
/* PureC doesn't like 32bit enumerations */
|
||||
|
||||
#ifndef FT_IMAGE_TAG
|
||||
#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value
|
||||
#endif /* FT_IMAGE_TAG */
|
||||
|
||||
#ifndef FT_ENC_TAG
|
||||
#define FT_ENC_TAG( value, a, b, c, d ) value
|
||||
#endif /* FT_ENC_TAG */
|
||||
|
||||
#endif /* ATARI_H */
|
|
@ -1,37 +0,0 @@
|
|||
/* the following changes file names for PureC projects */
|
||||
|
||||
if (argc > 0)
|
||||
{
|
||||
ordner = argv[0];
|
||||
if (basename(ordner) == "") /* ist Ordner */
|
||||
{
|
||||
ChangeFilenames(ordner);
|
||||
}
|
||||
}
|
||||
|
||||
proc ChangeFilenames(folder)
|
||||
local i,entries,directory,file;
|
||||
{
|
||||
entries = filelist(directory,folder);
|
||||
for (i = 0; i < entries; ++i)
|
||||
{
|
||||
file = directory[i,0];
|
||||
if ((directory[i,3]&16) > 0) /* subdirectory */
|
||||
{
|
||||
ChangeFilenames(folder+file+"\\");
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((stricmp(suffix(file),".h")==0)|(stricmp(suffix(file),".c")==0))
|
||||
ChangeFilename(folder,file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
proc ChangeFilename(path,datei)
|
||||
local newfile,err;
|
||||
{
|
||||
newfile=datei;
|
||||
newfile[0]=(newfile[0] | 32) ^ 32;
|
||||
err=files.rename("-q",path+datei,newfile);
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
;FreeType project file
|
||||
|
||||
FREETYPE.LIB
|
||||
|
||||
.C [-K -P -R -A]
|
||||
.L [-J -V]
|
||||
.S
|
||||
|
||||
=
|
||||
|
||||
..\..\src\base\ftsystem.c
|
||||
..\..\src\base\ftdebug.c
|
||||
|
||||
..\..\src\base\ftinit.c
|
||||
..\..\src\base\ftglyph.c
|
||||
..\..\src\base\ftmm
|
||||
..\..\src\base\ftbbox
|
||||
|
||||
..\..\src\base\ftbase.c
|
||||
..\..\src\autohint\autohint.c
|
||||
;..\..\src\cache\ftcache.c
|
||||
..\..\src\cff\cff.c
|
||||
..\..\src\cid\type1cid.c
|
||||
..\..\src\psaux\psaux.c
|
||||
..\..\src\pshinter\pshinter.c
|
||||
..\..\src\psnames\psnames.c
|
||||
..\..\src\raster\raster.c
|
||||
..\..\src\sfnt\sfnt.c
|
||||
..\..\src\smooth\smooth.c
|
||||
..\..\src\truetype\truetype.c
|
||||
..\..\src\type1\type1.c
|
||||
..\..\src\type42\type42.c
|
|
@ -1,51 +0,0 @@
|
|||
Compiling FreeType 2 with PureC compiler
|
||||
========================================
|
||||
|
||||
[See below for a German version.]
|
||||
|
||||
To compile FreeType 2 as a library the following changes must be applied:
|
||||
|
||||
- All *.c files must start with an uppercase letter.
|
||||
(In case GEMSCRIPT is available:
|
||||
Simply drag the whole FreeType 2 directory to the file `FNames.SIC'.)
|
||||
|
||||
- You have to change the INCLUDE directory in PureC's compiler options
|
||||
to contain both the `INCLUDE' and `freetype2\include' directory.
|
||||
Example:
|
||||
|
||||
INCLUDE;E:\freetype2\include
|
||||
|
||||
- The file `freetype/include/Ft2build.h' must be patched as follows to
|
||||
include ATARI.H:
|
||||
|
||||
#ifndef FT2_BUILD_GENERIC_H_
|
||||
#define FT2_BUILD_GENERIC_H_
|
||||
|
||||
#include "ATARI.H"
|
||||
|
||||
|
||||
|
||||
Compilieren von FreeType 2 mit PureC
|
||||
====================================
|
||||
|
||||
Um FreeType 2 als eine Bibliothek (library) zu compilieren, muss folgendes
|
||||
ge„ndert werden:
|
||||
|
||||
- Alle *.c-files m<>ssen mit einem GROSSBUCHSTABEN beginnen.
|
||||
(Falls GEMSCRIPT zur Verf<72>gung steht:
|
||||
Den kompletten Ordner freetype2 auf die Datei `FNames.SIC' draggen.)
|
||||
|
||||
- In den Compiler-Optionen von PureC muss das INCLUDE directory auf INCLUDE
|
||||
und freetype2\include verweisen. Z.B.:
|
||||
|
||||
INCLUDE;E:\freetype2\include
|
||||
|
||||
- In der Datei freetype/include/Ft2build.h muss zu Beginn
|
||||
ein #include "ATARI.H" wie folgt eingef<65>gt werden:
|
||||
|
||||
#ifndef FT2_BUILD_GENERIC_H_
|
||||
#define FT2_BUILD_GENERIC_H_
|
||||
|
||||
#include "ATARI.H"
|
||||
|
||||
--- end of README.TXT ---
|
|
@ -1,181 +0,0 @@
|
|||
#!/usr/bin/env awk
|
||||
|
||||
|
||||
function shift( array, \
|
||||
junk, elm0, l )
|
||||
{
|
||||
elm0 = array[0]
|
||||
for ( l = 0; l < asorti( array, junk ) - 1; l++ )
|
||||
array[l] = array[l+1];
|
||||
delete array[l]
|
||||
return elm0
|
||||
}
|
||||
|
||||
|
||||
function init_cpp_src_line()
|
||||
{
|
||||
logical_line = ""
|
||||
delete break_pos
|
||||
}
|
||||
|
||||
|
||||
function shift_valid_bp( array, \
|
||||
junk, elm )
|
||||
{
|
||||
elm = -1
|
||||
|
||||
if ( 0 < asorti( array, junk ) )
|
||||
do {
|
||||
elm = shift( array )
|
||||
} while ( 0 > elm );
|
||||
|
||||
return elm
|
||||
}
|
||||
|
||||
|
||||
function check_cpp_src_line_break_pos( \
|
||||
i, junk )
|
||||
{
|
||||
printf( "break_pos:" )
|
||||
for ( i = 0; i < asorti( break_pos, junk ); i++ )
|
||||
printf( " %d", break_pos[i] );
|
||||
printf( "\n" )
|
||||
}
|
||||
|
||||
|
||||
function check_cpp_src_line()
|
||||
{
|
||||
printf( "logical_line[%s]\n", logical_line )
|
||||
check_cpp_src_line_break_pos()
|
||||
}
|
||||
|
||||
|
||||
function append_line( phys_line, \
|
||||
filt_line, bp_len )
|
||||
{
|
||||
filt_line = phys_line
|
||||
sub( /\\$/, " ", filt_line )
|
||||
logical_line = logical_line filt_line
|
||||
bp_len = asorti( break_pos, junk )
|
||||
break_pos[bp_len] = length( logical_line ) - 1
|
||||
}
|
||||
|
||||
|
||||
function print_line( \
|
||||
c0, c1, i, junk, part_str )
|
||||
{
|
||||
c0 = 0
|
||||
|
||||
while( asorti( break_pos, junk ) > 1 )
|
||||
{
|
||||
if ( ( c1 = shift_valid_bp( break_pos ) ) < 1 )
|
||||
{
|
||||
part_str = substr( logical_line, c0 + 1 )
|
||||
printf( "%s\n", part_str )
|
||||
return
|
||||
}
|
||||
|
||||
part_str = substr( logical_line, c0 + 1, c1 - c0 + 1 )
|
||||
gsub( / $/, "\\", part_str )
|
||||
printf( "%s\n", part_str )
|
||||
c0 = c1 + 1
|
||||
}
|
||||
|
||||
part_str = substr( logical_line, c0 + 1 )
|
||||
printf( "%s\n", part_str )
|
||||
}
|
||||
|
||||
|
||||
function shrink_spaces( pos, \
|
||||
tail, removed_length, k )
|
||||
{
|
||||
tail = substr( logical_line, pos )
|
||||
sub( /^[ \t]+/, " ", tail )
|
||||
removed_length = length( logical_line ) - pos - length( tail ) + 1
|
||||
logical_line = substr( logical_line, 0, pos - 1 ) tail
|
||||
|
||||
|
||||
for ( k = 0; k < asorti( break_pos, junk ); k++ )
|
||||
if ( ( pos + removed_length ) <= break_pos[k] )
|
||||
break_pos[k] = break_pos[k] - removed_length;
|
||||
else if ( pos <= break_pos[k] )
|
||||
break_pos[k] = -1;
|
||||
|
||||
return removed_length
|
||||
}
|
||||
|
||||
|
||||
function shrink_spaces_to_linebreak( pos, \
|
||||
junk, part_str, removed_length, i )
|
||||
{
|
||||
for ( i = 0; i < asorti( break_pos, junk ) && break_pos[i] < pos ; i++ )
|
||||
;
|
||||
|
||||
if ( break_pos[i] < 1 )
|
||||
return;
|
||||
|
||||
part_str = substr( logical_line, pos, break_pos[i] - pos + 1 )
|
||||
sub( /^[ \t]+/, " ", part_str )
|
||||
removed_length = ( break_pos[i] - pos + 1 ) - length( part_str )
|
||||
|
||||
tail = substr( logical_line, pos + removed_length )
|
||||
logical_line = substr( logical_line, 0, pos - 1 ) tail
|
||||
|
||||
for ( ; i < asorti( break_pos, junk ); i++ )
|
||||
break_pos[i] -= removed_length;
|
||||
|
||||
return removed_length
|
||||
}
|
||||
|
||||
|
||||
function delete_linebreaks_in_2nd_token( \
|
||||
tail, paren_depth, junk, i, j, k, l )
|
||||
{
|
||||
if ( logical_line ~ /^[ \t]*#[ \t]*define[ \t]+[0-9A-Za-z_]+\(/ )
|
||||
{
|
||||
tail = logical_line
|
||||
sub( /^[ \t]*#[ \t]*define[ \t]+[0-9A-Za-z_]+/, "", tail )
|
||||
|
||||
paren_depth = 0
|
||||
l = 0
|
||||
i = length( logical_line ) - length( tail ) + 1 # seek to the 1st op paren
|
||||
j = i
|
||||
do {
|
||||
if ( substr( logical_line, j, 2 ) ~ /[ \t][ \t]/ )
|
||||
l = shrink_spaces( j );
|
||||
else if ( substr( logical_line, j, 1 ) == "(" )
|
||||
paren_depth += 1;
|
||||
else if ( substr( logical_line, j, 1 ) == ")" )
|
||||
paren_depth -= 1;
|
||||
j += 1
|
||||
} while ( j < length( logical_line ) && paren_depth != 0 )
|
||||
|
||||
for ( k = 0; k < asorti( break_pos, junk ); k++ )
|
||||
if ( i <= break_pos[k] && break_pos[k] < j )
|
||||
break_pos[k] = -1;
|
||||
|
||||
if ( l > 0 )
|
||||
shrink_spaces_to_linebreak( j );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BEGIN{
|
||||
init_cpp_src_line()
|
||||
}
|
||||
{
|
||||
append_line( $0 )
|
||||
if ( $0 !~ /\\$/ )
|
||||
{
|
||||
delete_linebreaks_in_2nd_token()
|
||||
print_line()
|
||||
init_cpp_src_line()
|
||||
}
|
||||
}
|
||||
END{
|
||||
if ( 0 < length( logical_line ) )
|
||||
{
|
||||
delete_linebreaks_in_2nd_token()
|
||||
print_line()
|
||||
}
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
TOP_DIR=.
|
||||
OBJ_DIR=.
|
||||
|
||||
for x in "$@"
|
||||
do
|
||||
case x"$x" in
|
||||
x--srcdir=* | x--topdir=* )
|
||||
TOP_DIR=`echo $x | sed 's/^--[a-z]*dir=//'`
|
||||
;;
|
||||
x--builddir=* | x--objdir=* )
|
||||
OBJ_DIR=`echo $x | sed 's/^--[a-z]*dir=//'`
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
mkdir -p ${OBJ_DIR}/builds/atari/tmp/orig
|
||||
|
||||
( cd ${TOP_DIR} && find . -name '*.[CHch]' -type f | fgrep -v builds/atari/tmp | cpio -o ) | \
|
||||
( cd ${OBJ_DIR}/builds/atari/tmp/orig && cpio -idum )
|
||||
cp ${TOP_DIR}/builds/atari/deflinejoiner.awk ${OBJ_DIR}/builds/atari/tmp
|
||||
|
||||
pushd ${OBJ_DIR}/builds/atari/tmp
|
||||
|
||||
cp -pr orig purec
|
||||
for f in `cd orig && find . -type f`
|
||||
do
|
||||
echo filter $f
|
||||
env LANG=C awk -f deflinejoiner.awk < orig/$f > purec/$f
|
||||
done
|
||||
|
||||
echo '#define FT2_BUILD_LIBRARY' > purec/include/ft2build.h
|
||||
echo '#include "ATARI.H"' >> purec/include/ft2build.h
|
||||
env LANG=C awk -f deflinejoiner.awk < orig/include/ft2build.h >> purec/include/ft2build.h
|
||||
|
||||
env LANG=C diff -ur orig purec > ../purec.diff
|
||||
|
||||
popd
|
||||
rm -rf ${OBJ_DIR}/builds/atari/tmp
|
|
@ -1,79 +0,0 @@
|
|||
#
|
||||
# FreeType 2 configuration rules for a BeOS system
|
||||
#
|
||||
# this is similar to the "ansi-def.mk" file, except for BUILD and PLATFORM
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
DELETE := rm -f
|
||||
CAT := cat
|
||||
SEP := /
|
||||
PLATFORM_DIR := $(TOP_DIR)/builds/beos
|
||||
PLATFORM := beos
|
||||
|
||||
# This is used for `make refdoc' and `make refdoc-venv'
|
||||
#
|
||||
BIN := bin
|
||||
|
||||
# The directory where all library files are placed.
|
||||
#
|
||||
# By default, this is the same as $(OBJ_DIR); however, this can be changed
|
||||
# to suit particular needs.
|
||||
#
|
||||
LIB_DIR := $(OBJ_DIR)
|
||||
|
||||
|
||||
# The name of the final library file. Note that the DOS-specific Makefile
|
||||
# uses a shorter (8.3) name.
|
||||
#
|
||||
LIBRARY := lib$(PROJECT)
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -l
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -o$(space)
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -c
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS ?=
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,19 +0,0 @@
|
|||
#
|
||||
# FreeType 2 configuration rules for a BeOS system
|
||||
#
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
include $(TOP_DIR)/builds/beos/beos-def.mk
|
||||
include $(TOP_DIR)/builds/compiler/ansi-cc.mk
|
||||
include $(TOP_DIR)/builds/link_std.mk
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,41 +0,0 @@
|
|||
#
|
||||
# FreeType 2 configuration file to detect an BeOS host platform.
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
.PHONY: setup
|
||||
|
||||
|
||||
ifeq ($(PLATFORM),ansi)
|
||||
|
||||
ifdef BE_HOST_CPU
|
||||
|
||||
PLATFORM := beos
|
||||
|
||||
endif # test MACHTYPE beos
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),beos)
|
||||
|
||||
DELETE := rm -f
|
||||
CAT := cat
|
||||
SEP := /
|
||||
PLATFORM_DIR := $(TOP_DIR)/builds/beos
|
||||
CONFIG_FILE := beos.mk
|
||||
|
||||
setup: std_setup
|
||||
|
||||
endif # test PLATFORM beos
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,52 +0,0 @@
|
|||
# FindBrotliDec.cmake
|
||||
#
|
||||
# Copyright (C) 2019-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# Written by Werner Lemberg <wl@gnu.org>
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
#
|
||||
#
|
||||
# Try to find libbrotlidec include and library directories.
|
||||
#
|
||||
# If found, the following variables are set.
|
||||
#
|
||||
# BROTLIDEC_INCLUDE_DIRS
|
||||
# BROTLIDEC_LIBRARIES
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
pkg_check_modules(PC_BROTLIDEC QUIET libbrotlidec)
|
||||
|
||||
if (PC_BROTLIDEC_VERSION)
|
||||
set(BROTLIDEC_VERSION "${PC_BROTLIDEC_VERSION}")
|
||||
endif ()
|
||||
|
||||
|
||||
find_path(BROTLIDEC_INCLUDE_DIRS
|
||||
NAMES brotli/decode.h
|
||||
HINTS ${PC_BROTLIDEC_INCLUDEDIR}
|
||||
${PC_BROTLIDEC_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES brotli)
|
||||
|
||||
find_library(BROTLIDEC_LIBRARIES
|
||||
NAMES brotlidec
|
||||
HINTS ${PC_BROTLIDEC_LIBDIR}
|
||||
${PC_BROTLIDEC_LIBRARY_DIRS})
|
||||
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
BrotliDec
|
||||
REQUIRED_VARS BROTLIDEC_INCLUDE_DIRS BROTLIDEC_LIBRARIES
|
||||
FOUND_VAR BROTLIDEC_FOUND
|
||||
VERSION_VAR BROTLIDEC_VERSION)
|
||||
|
||||
mark_as_advanced(
|
||||
BROTLIDEC_INCLUDE_DIRS
|
||||
BROTLIDEC_LIBRARIES)
|
|
@ -1,203 +0,0 @@
|
|||
# Copyright (c) 2012, Intel Corporation
|
||||
# Copyright (c) 2019 Sony Interactive Entertainment Inc.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright notice, this
|
||||
# list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
# * Neither the name of Intel Corporation nor the names of its contributors may
|
||||
# be used to endorse or promote products derived from this software without
|
||||
# specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# Try to find Harfbuzz include and library directories.
|
||||
#
|
||||
# After successful discovery, this will set for inclusion where needed:
|
||||
# HarfBuzz_INCLUDE_DIRS - containg the HarfBuzz headers
|
||||
# HarfBuzz_LIBRARIES - containg the HarfBuzz library
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindHarfBuzz
|
||||
--------------
|
||||
|
||||
Find HarfBuzz headers and libraries.
|
||||
|
||||
Imported Targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
``HarfBuzz::HarfBuzz``
|
||||
The HarfBuzz library, if found.
|
||||
|
||||
``HarfBuzz::ICU``
|
||||
The HarfBuzz ICU library, if found.
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This will define the following variables in your project:
|
||||
|
||||
``HarfBuzz_FOUND``
|
||||
true if (the requested version of) HarfBuzz is available.
|
||||
``HarfBuzz_VERSION``
|
||||
the version of HarfBuzz.
|
||||
``HarfBuzz_LIBRARIES``
|
||||
the libraries to link against to use HarfBuzz.
|
||||
``HarfBuzz_INCLUDE_DIRS``
|
||||
where to find the HarfBuzz headers.
|
||||
``HarfBuzz_COMPILE_OPTIONS``
|
||||
this should be passed to target_compile_options(), if the
|
||||
target is not used for linking
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_HARFBUZZ QUIET harfbuzz)
|
||||
set(HarfBuzz_COMPILE_OPTIONS ${PC_HARFBUZZ_CFLAGS_OTHER})
|
||||
set(HarfBuzz_VERSION ${PC_HARFBUZZ_CFLAGS_VERSION})
|
||||
|
||||
find_path(HarfBuzz_INCLUDE_DIR
|
||||
NAMES hb.h
|
||||
HINTS ${PC_HARFBUZZ_INCLUDEDIR} ${PC_HARFBUZZ_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES harfbuzz
|
||||
)
|
||||
|
||||
find_library(HarfBuzz_LIBRARY
|
||||
NAMES ${HarfBuzz_NAMES} harfbuzz
|
||||
HINTS ${PC_HARFBUZZ_LIBDIR} ${PC_HARFBUZZ_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
if (HarfBuzz_INCLUDE_DIR AND NOT HarfBuzz_VERSION)
|
||||
if (EXISTS "${HarfBuzz_INCLUDE_DIR}/hb-version.h")
|
||||
file(READ "${HarfBuzz_INCLUDE_DIR}/hb-version.h" _harfbuzz_version_content)
|
||||
|
||||
string(REGEX MATCH "#define +HB_VERSION_STRING +\"([0-9]+\\.[0-9]+\\.[0-9]+)\"" _dummy "${_harfbuzz_version_content}")
|
||||
set(HarfBuzz_VERSION "${CMAKE_MATCH_1}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if ("${HarfBuzz_FIND_VERSION}" VERSION_GREATER "${HarfBuzz_VERSION}")
|
||||
if (HarfBuzz_FIND_REQUIRED)
|
||||
message(FATAL_ERROR
|
||||
"Required version (" ${HarfBuzz_FIND_VERSION} ")"
|
||||
" is higher than found version (" ${HarfBuzz_VERSION} ")")
|
||||
else ()
|
||||
message(WARNING
|
||||
"Required version (" ${HarfBuzz_FIND_VERSION} ")"
|
||||
" is higher than found version (" ${HarfBuzz_VERSION} ")")
|
||||
unset(HarfBuzz_VERSION)
|
||||
unset(HarfBuzz_INCLUDE_DIRS)
|
||||
unset(HarfBuzz_LIBRARIES)
|
||||
return ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Find components
|
||||
if (HarfBuzz_INCLUDE_DIR AND HarfBuzz_LIBRARY)
|
||||
set(_HarfBuzz_REQUIRED_LIBS_FOUND ON)
|
||||
set(HarfBuzz_LIBS_FOUND "HarfBuzz (required): ${HarfBuzz_LIBRARY}")
|
||||
else ()
|
||||
set(_HarfBuzz_REQUIRED_LIBS_FOUND OFF)
|
||||
set(HarfBuzz_LIBS_NOT_FOUND "HarfBuzz (required)")
|
||||
endif ()
|
||||
|
||||
if (NOT CMAKE_VERSION VERSION_LESS 3.3)
|
||||
if ("ICU" IN_LIST HarfBuzz_FIND_COMPONENTS)
|
||||
pkg_check_modules(PC_HARFBUZZ_ICU QUIET harfbuzz-icu)
|
||||
set(HarfBuzz_ICU_COMPILE_OPTIONS ${PC_HARFBUZZ_ICU_CFLAGS_OTHER})
|
||||
|
||||
find_path(HarfBuzz_ICU_INCLUDE_DIR
|
||||
NAMES hb-icu.h
|
||||
HINTS ${PC_HARFBUZZ_ICU_INCLUDEDIR} ${PC_HARFBUZZ_ICU_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES harfbuzz
|
||||
)
|
||||
|
||||
find_library(HarfBuzz_ICU_LIBRARY
|
||||
NAMES ${HarfBuzz_ICU_NAMES} harfbuzz-icu
|
||||
HINTS ${PC_HARFBUZZ_ICU_LIBDIR} ${PC_HARFBUZZ_ICU_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
if (HarfBuzz_ICU_LIBRARY)
|
||||
if (HarfBuzz_FIND_REQUIRED_ICU)
|
||||
list(APPEND HarfBuzz_LIBS_FOUND "ICU (required): ${HarfBuzz_ICU_LIBRARY}")
|
||||
else ()
|
||||
list(APPEND HarfBuzz_LIBS_FOUND "ICU (optional): ${HarfBuzz_ICU_LIBRARY}")
|
||||
endif ()
|
||||
else ()
|
||||
if (HarfBuzz_FIND_REQUIRED_ICU)
|
||||
set(_HarfBuzz_REQUIRED_LIBS_FOUND OFF)
|
||||
list(APPEND HarfBuzz_LIBS_NOT_FOUND "ICU (required)")
|
||||
else ()
|
||||
list(APPEND HarfBuzz_LIBS_NOT_FOUND "ICU (optional)")
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT HarfBuzz_FIND_QUIETLY)
|
||||
if (HarfBuzz_LIBS_FOUND)
|
||||
message(STATUS "Found the following HarfBuzz libraries:")
|
||||
foreach (found ${HarfBuzz_LIBS_FOUND})
|
||||
message(STATUS " ${found}")
|
||||
endforeach ()
|
||||
endif ()
|
||||
if (HarfBuzz_LIBS_NOT_FOUND)
|
||||
message(STATUS "The following HarfBuzz libraries were not found:")
|
||||
foreach (found ${HarfBuzz_LIBS_NOT_FOUND})
|
||||
message(STATUS " ${found}")
|
||||
endforeach ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(HarfBuzz
|
||||
FOUND_VAR HarfBuzz_FOUND
|
||||
REQUIRED_VARS HarfBuzz_INCLUDE_DIR HarfBuzz_LIBRARY _HarfBuzz_REQUIRED_LIBS_FOUND
|
||||
VERSION_VAR HarfBuzz_VERSION
|
||||
)
|
||||
|
||||
if (NOT CMAKE_VERSION VERSION_LESS 3.1)
|
||||
if (HarfBuzz_LIBRARY AND NOT TARGET HarfBuzz::HarfBuzz)
|
||||
add_library(HarfBuzz::HarfBuzz UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties(HarfBuzz::HarfBuzz PROPERTIES
|
||||
IMPORTED_LOCATION "${HarfBuzz_LIBRARY}"
|
||||
INTERFACE_COMPILE_OPTIONS "${HarfBuzz_COMPILE_OPTIONS}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${HarfBuzz_INCLUDE_DIR}"
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (HarfBuzz_ICU_LIBRARY AND NOT TARGET HarfBuzz::ICU)
|
||||
add_library(HarfBuzz::ICU UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties(HarfBuzz::ICU PROPERTIES
|
||||
IMPORTED_LOCATION "${HarfBuzz_ICU_LIBRARY}"
|
||||
INTERFACE_COMPILE_OPTIONS "${HarfBuzz_ICU_COMPILE_OPTIONS}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${HarfBuzz_ICU_INCLUDE_DIR}"
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(
|
||||
HarfBuzz_INCLUDE_DIR
|
||||
HarfBuzz_ICU_INCLUDE_DIR
|
||||
HarfBuzz_LIBRARY
|
||||
HarfBuzz_ICU_LIBRARY
|
||||
)
|
||||
|
||||
if (HarfBuzz_FOUND)
|
||||
set(HarfBuzz_LIBRARIES ${HarfBuzz_LIBRARY} ${HarfBuzz_ICU_LIBRARY})
|
||||
set(HarfBuzz_INCLUDE_DIRS ${HarfBuzz_INCLUDE_DIR} ${HarfBuzz_ICU_INCLUDE_DIR})
|
||||
endif ()
|
|
@ -1,270 +0,0 @@
|
|||
# iOS.cmake
|
||||
#
|
||||
# Copyright (C) 2014-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# Written by David Wimsey <david@wimsey.us>
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
#
|
||||
#
|
||||
# This file is derived from the files `Platform/Darwin.cmake' and
|
||||
# `Platform/UnixPaths.cmake', which are part of CMake 2.8.4. It has been
|
||||
# altered for iOS development.
|
||||
|
||||
|
||||
# Options
|
||||
# -------
|
||||
#
|
||||
# IOS_PLATFORM = OS | SIMULATOR
|
||||
#
|
||||
# This decides whether SDKS are selected from the `iPhoneOS.platform' or
|
||||
# `iPhoneSimulator.platform' folders.
|
||||
#
|
||||
# OS - the default, used to build for iPhone and iPad physical devices,
|
||||
# which have an ARM architecture.
|
||||
# SIMULATOR - used to build for the Simulator platforms, which have an
|
||||
# x86 architecture.
|
||||
#
|
||||
# CMAKE_IOS_DEVELOPER_ROOT = /path/to/platform/Developer folder
|
||||
#
|
||||
# By default, this location is automatically chosen based on the
|
||||
# IOS_PLATFORM value above. If you manually set this variable, it
|
||||
# overrides the default location and forces the use of a particular
|
||||
# Developer Platform.
|
||||
#
|
||||
# CMAKE_IOS_SDK_ROOT = /path/to/platform/Developer/SDKs/SDK folder
|
||||
#
|
||||
# By default, this location is automatically chosen based on the
|
||||
# CMAKE_IOS_DEVELOPER_ROOT value. In this case it is always the most
|
||||
# up-to-date SDK found in the CMAKE_IOS_DEVELOPER_ROOT path. If you
|
||||
# manually set this variable, it forces the use of a specific SDK
|
||||
# version.
|
||||
#
|
||||
#
|
||||
# Macros
|
||||
# ------
|
||||
#
|
||||
# set_xcode_property (TARGET XCODE_PROPERTY XCODE_VALUE)
|
||||
#
|
||||
# A convenience macro for setting Xcode specific properties on targets.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# set_xcode_property(myioslib IPHONEOS_DEPLOYMENT_TARGET "3.1")
|
||||
#
|
||||
# find_host_package (PROGRAM ARGS)
|
||||
#
|
||||
# A macro to find executable programs on the host system, not within the
|
||||
# iOS environment. Thanks to the `android-cmake' project for providing
|
||||
# the command.
|
||||
|
||||
|
||||
# standard settings
|
||||
set(CMAKE_SYSTEM_NAME Darwin)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(UNIX True)
|
||||
set(APPLE True)
|
||||
set(IOS True)
|
||||
|
||||
# required as of cmake 2.8.10
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET ""
|
||||
CACHE STRING "Force unset of the deployment target for iOS" FORCE
|
||||
)
|
||||
|
||||
# determine the cmake host system version so we know where to find the iOS
|
||||
# SDKs
|
||||
find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin)
|
||||
if (CMAKE_UNAME)
|
||||
exec_program(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
|
||||
string(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1"
|
||||
DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
|
||||
endif (CMAKE_UNAME)
|
||||
|
||||
# skip the platform compiler checks for cross compiling
|
||||
set(CMAKE_CXX_COMPILER_WORKS TRUE)
|
||||
set(CMAKE_C_COMPILER_WORKS TRUE)
|
||||
|
||||
# all iOS/Darwin specific settings - some may be redundant
|
||||
set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
|
||||
set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")
|
||||
set(CMAKE_SHARED_MODULE_PREFIX "lib")
|
||||
set(CMAKE_SHARED_MODULE_SUFFIX ".so")
|
||||
set(CMAKE_MODULE_EXISTS 1)
|
||||
set(CMAKE_DL_LIBS "")
|
||||
|
||||
set(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG
|
||||
"-compatibility_version ")
|
||||
set(CMAKE_C_OSX_CURRENT_VERSION_FLAG
|
||||
"-current_version ")
|
||||
set(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG
|
||||
"${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
|
||||
set(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG
|
||||
"${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
|
||||
|
||||
# hidden visibility is required for cxx on iOS
|
||||
set(CMAKE_C_FLAGS_INIT "")
|
||||
set(CMAKE_CXX_FLAGS_INIT
|
||||
"-headerpad_max_install_names -fvisibility=hidden -fvisibility-inlines-hidden")
|
||||
|
||||
set(CMAKE_C_LINK_FLAGS
|
||||
"-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
|
||||
set(CMAKE_CXX_LINK_FLAGS
|
||||
"-Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")
|
||||
|
||||
set(CMAKE_PLATFORM_HAS_INSTALLNAME 1)
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS
|
||||
"-dynamiclib -headerpad_max_install_names")
|
||||
set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
|
||||
"-bundle -headerpad_max_install_names")
|
||||
set(CMAKE_SHARED_MODULE_LOADER_C_FLAG
|
||||
"-Wl,-bundle_loader,")
|
||||
set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG
|
||||
"-Wl,-bundle_loader,")
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES
|
||||
".dylib" ".so" ".a")
|
||||
|
||||
# hack: If a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old
|
||||
# build tree (where `install_name_tool' was hardcoded), and where
|
||||
# CMAKE_INSTALL_NAME_TOOL isn't in the cache and still cmake didn't
|
||||
# fail in `CMakeFindBinUtils.cmake' (because it isn't rerun), hardcode
|
||||
# CMAKE_INSTALL_NAME_TOOL here to `install_name_tool' so it behaves as
|
||||
# it did before.
|
||||
if (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
|
||||
find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool)
|
||||
endif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
|
||||
|
||||
# set up iOS platform unless specified manually with IOS_PLATFORM
|
||||
if (NOT DEFINED IOS_PLATFORM)
|
||||
set(IOS_PLATFORM "OS")
|
||||
endif (NOT DEFINED IOS_PLATFORM)
|
||||
|
||||
set(IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING "Type of iOS Platform")
|
||||
|
||||
# check the platform selection and setup for developer root
|
||||
if (${IOS_PLATFORM} STREQUAL "OS")
|
||||
set(IOS_PLATFORM_LOCATION "iPhoneOS.platform")
|
||||
|
||||
# this causes the installers to properly locate the output libraries
|
||||
set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos")
|
||||
|
||||
elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR")
|
||||
set(IOS_PLATFORM_LOCATION "iPhoneSimulator.platform")
|
||||
|
||||
# this causes the installers to properly locate the output libraries
|
||||
set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator")
|
||||
|
||||
else (${IOS_PLATFORM} STREQUAL "OS")
|
||||
message(FATAL_ERROR
|
||||
"Unsupported IOS_PLATFORM value selected. Please choose OS or SIMULATOR.")
|
||||
|
||||
endif (${IOS_PLATFORM} STREQUAL "OS")
|
||||
|
||||
# set up iOS developer location unless specified manually with
|
||||
# CMAKE_IOS_DEVELOPER_ROOT --
|
||||
# note that Xcode 4.3 changed the installation location; choose the most
|
||||
# recent one available
|
||||
set(XCODE_POST_43_ROOT
|
||||
"/Applications/Xcode.app/Contents/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer")
|
||||
set(XCODE_PRE_43_ROOT
|
||||
"/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer")
|
||||
|
||||
if (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)
|
||||
if (EXISTS ${XCODE_POST_43_ROOT})
|
||||
set(CMAKE_IOS_DEVELOPER_ROOT ${XCODE_POST_43_ROOT})
|
||||
elseif (EXISTS ${XCODE_PRE_43_ROOT})
|
||||
set(CMAKE_IOS_DEVELOPER_ROOT ${XCODE_PRE_43_ROOT})
|
||||
endif (EXISTS ${XCODE_POST_43_ROOT})
|
||||
endif (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)
|
||||
|
||||
set(CMAKE_IOS_DEVELOPER_ROOT ${CMAKE_IOS_DEVELOPER_ROOT}
|
||||
CACHE PATH "Location of iOS Platform"
|
||||
)
|
||||
|
||||
# find and use the most recent iOS SDK unless specified manually with
|
||||
# CMAKE_IOS_SDK_ROOT
|
||||
if (NOT DEFINED CMAKE_IOS_SDK_ROOT)
|
||||
file(GLOB _CMAKE_IOS_SDKS "${CMAKE_IOS_DEVELOPER_ROOT}/SDKs/*")
|
||||
if (_CMAKE_IOS_SDKS)
|
||||
list(SORT _CMAKE_IOS_SDKS)
|
||||
list(REVERSE _CMAKE_IOS_SDKS)
|
||||
list(GET _CMAKE_IOS_SDKS 0 CMAKE_IOS_SDK_ROOT)
|
||||
else (_CMAKE_IOS_SDKS)
|
||||
message(FATAL_ERROR
|
||||
"No iOS SDK's found in default search path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.")
|
||||
endif (_CMAKE_IOS_SDKS)
|
||||
|
||||
message(STATUS "Toolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT}")
|
||||
endif (NOT DEFINED CMAKE_IOS_SDK_ROOT)
|
||||
|
||||
set(CMAKE_IOS_SDK_ROOT ${CMAKE_IOS_SDK_ROOT}
|
||||
CACHE PATH "Location of the selected iOS SDK"
|
||||
)
|
||||
|
||||
# set the sysroot default to the most recent SDK
|
||||
set(CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT}
|
||||
CACHE PATH "Sysroot used for iOS support"
|
||||
)
|
||||
|
||||
# set the architecture for iOS --
|
||||
# note that currently both ARCHS_STANDARD_32_BIT and
|
||||
# ARCHS_UNIVERSAL_IPHONE_OS set armv7 only, so set both manually
|
||||
if (${IOS_PLATFORM} STREQUAL "OS")
|
||||
set(IOS_ARCH $(ARCHS_STANDARD_32_64_BIT))
|
||||
else (${IOS_PLATFORM} STREQUAL "OS")
|
||||
set(IOS_ARCH i386)
|
||||
endif (${IOS_PLATFORM} STREQUAL "OS")
|
||||
|
||||
set(CMAKE_OSX_ARCHITECTURES ${IOS_ARCH}
|
||||
CACHE string "Build architecture for iOS"
|
||||
)
|
||||
|
||||
# set the find root to the iOS developer roots and to user defined paths
|
||||
set(CMAKE_FIND_ROOT_PATH
|
||||
${CMAKE_IOS_DEVELOPER_ROOT}
|
||||
${CMAKE_IOS_SDK_ROOT}
|
||||
${CMAKE_PREFIX_PATH}
|
||||
CACHE string "iOS find search path root"
|
||||
)
|
||||
|
||||
# default to searching for frameworks first
|
||||
set(CMAKE_FIND_FRAMEWORK FIRST)
|
||||
|
||||
# set up the default search directories for frameworks
|
||||
set(CMAKE_SYSTEM_FRAMEWORK_PATH
|
||||
${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks
|
||||
${CMAKE_IOS_SDK_ROOT}/System/Library/PrivateFrameworks
|
||||
${CMAKE_IOS_SDK_ROOT}/Developer/Library/Frameworks
|
||||
)
|
||||
|
||||
# only search the iOS SDKs, not the remainder of the host filesystem
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
# this little macro lets you set any Xcode specific property
|
||||
macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE)
|
||||
set_property(TARGET ${TARGET}
|
||||
PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY} ${XCODE_VALUE})
|
||||
endmacro(set_xcode_property)
|
||||
|
||||
# this macro lets you find executable programs on the host system
|
||||
macro(find_host_package)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
|
||||
set(IOS FALSE)
|
||||
|
||||
find_package(${ARGN})
|
||||
|
||||
set(IOS TRUE)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
endmacro(find_host_package)
|
||||
|
||||
# eof
|
|
@ -1,157 +0,0 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
# Copyright (C) 2015-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
# This script tests the CMake build. Simply run
|
||||
#
|
||||
# builds/cmake/testbuild.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# BUILD_SHARED_LIBS=1 builds/cmake/testbuild.sh
|
||||
#
|
||||
# The script:
|
||||
#
|
||||
# - builds the main CMakeLists.txt
|
||||
# - builds and runs a small test app in a separate build tree so
|
||||
# the config-module is tested, too
|
||||
#
|
||||
# Options (environment variables):
|
||||
#
|
||||
# - The variable BUILD_SHARED_LIBS will be forwarded to the CMake project
|
||||
# that builds the library.
|
||||
#
|
||||
|
||||
|
||||
# prepare temporary dir
|
||||
|
||||
cd `dirname $0`/../..
|
||||
ftdir=`pwd`
|
||||
tmpdir=/tmp/freetype-cmake-testbuild
|
||||
rm -rf $tmpdir
|
||||
mkdir -p $tmpdir
|
||||
|
||||
|
||||
# build and install freetype
|
||||
|
||||
if test -n "$BUILD_SHARED_LIBS"; then
|
||||
bsl=-DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS
|
||||
else
|
||||
bsl=-UBUILD_SHARED_LIBS
|
||||
fi
|
||||
|
||||
build_opts="-DWITH_ZLIB=0 \
|
||||
-DWITH_BZip2=0 \
|
||||
-DWITH_PNG=0 \
|
||||
-DWITH_HarfBuzz=0 \
|
||||
$bsl \
|
||||
-DCMAKE_INSTALL_PREFIX=$tmpdir/out"
|
||||
|
||||
(set -x; cmake -H$ftdir \
|
||||
-B$tmpdir/ftb \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
$build_opts)
|
||||
(set -x; cmake --build $tmpdir/ftb \
|
||||
--config Debug \
|
||||
--target install)
|
||||
|
||||
(set -x; cmake $tmpdir/ftb \
|
||||
-DCMAKE_BUILD_TYPE=Release)
|
||||
(set -x; cmake --build $tmpdir/ftb \
|
||||
--config Release \
|
||||
--target install \
|
||||
--clean-first)
|
||||
|
||||
|
||||
# create test project CMakeLists.txt
|
||||
|
||||
cat >$tmpdir/CMakeLists.txt << END
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
project(freetype-cmake-testbuild)
|
||||
|
||||
find_package(Freetype REQUIRED CONFIG)
|
||||
|
||||
add_executable(freetype-cmake-test main.c)
|
||||
target_link_libraries(freetype-cmake-test freetype)
|
||||
|
||||
enable_testing()
|
||||
add_test(freetype-cmake-test freetype-cmake-test)
|
||||
END
|
||||
|
||||
|
||||
# create test project main.c
|
||||
|
||||
cat >$tmpdir/main.c << END
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <ft2build.h>
|
||||
#include <freetype/freetype.h>
|
||||
|
||||
|
||||
FT_Library library;
|
||||
|
||||
|
||||
int main(int argc,
|
||||
char*argv[])
|
||||
{
|
||||
FT_Error error;
|
||||
FT_Int major = 0;
|
||||
FT_Int minor = 0;
|
||||
FT_Int patch = 0;
|
||||
|
||||
error = FT_Init_FreeType(&library);
|
||||
if (error)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
FT_Library_Version(library, &major, &minor, &patch);
|
||||
if (major != FREETYPE_MAJOR
|
||||
|| minor != FREETYPE_MINOR
|
||||
|| patch != FREETYPE_PATCH)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
printf("FT_Library_Version: %d.%d.%d\n", major, minor, patch);
|
||||
|
||||
error = FT_Done_FreeType(library);
|
||||
if (error)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
END
|
||||
|
||||
|
||||
# build and test
|
||||
|
||||
mkdir -p $tmpdir/tb
|
||||
cd $tmpdir/tb
|
||||
|
||||
LD_LIBRARY_PATH=$tmpdir/out/lib:$LD_LIBRARY_PATH
|
||||
DYLD_LIBRARY_PATH=$tmpdir/out/lib:$DYLD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH
|
||||
export DYLD_LIBRARY_PATH
|
||||
|
||||
(set -x; cmake $tmpdir \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_PREFIX_PATH=$tmpdir/out)
|
||||
(set -x; cmake --build . \
|
||||
--config Debug)
|
||||
(set -x; ctest -V -C Debug)
|
||||
|
||||
(set -x; cmake . \
|
||||
-DCMAKE_BUILD_TYPE=Release)
|
||||
(set -x; cmake --build . \
|
||||
--config Release \
|
||||
--clean-first)
|
||||
(set -x; ctest -V -C Release)
|
||||
|
||||
rm -rf $tmpdir
|
||||
|
||||
# EOF
|
|
@ -1,80 +0,0 @@
|
|||
#
|
||||
# FreeType 2 generic pseudo ANSI compiler
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Compiler command line name
|
||||
#
|
||||
CC := cc
|
||||
COMPILER_SEP := $(SEP)
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := o
|
||||
SO := o
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := a
|
||||
SA := a
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -l
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -o$(space)
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -c
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
# we assume the compiler is already strictly ANSI
|
||||
#
|
||||
ANSIFLAGS ?=
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
|
||||
LINK_LIBRARY = $(AR) -r $@ $(subst /,$(COMPILER_SEP),$(OBJECTS_LIST))
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,86 +0,0 @@
|
|||
#
|
||||
# FreeType 2 Borland C++-specific with NO OPTIMIZATIONS + DEBUGGING
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Compiler command line name
|
||||
#
|
||||
CC := bcc32
|
||||
COMPILER_SEP := $(SEP)
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := obj
|
||||
SO := obj
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := lib
|
||||
SA := lib
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L :=
|
||||
|
||||
|
||||
# Target flag -- no trailing space.
|
||||
#
|
||||
T := -o
|
||||
TE := -e
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -q -c -y -d -v -Od -w-par -w-ccc -w-rch -w-pro -w-aus
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS ?= -A
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
|
||||
LINK_LIBRARY = tlib /u /P128 $(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST:%=+%))
|
||||
|
||||
|
||||
# Borland C++ specific temporary files
|
||||
#
|
||||
CLEAN += \
|
||||
$(subst /,$(SEP),$(TOP_DIR)/apinames.$(O)) \
|
||||
$(subst /,$(SEP),$(OBJ_DIR)/apinames.tds)
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,86 +0,0 @@
|
|||
#
|
||||
# FreeType 2 Borland C++-specific rules
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Compiler command line name
|
||||
#
|
||||
CC := bcc32
|
||||
COMPILER_SEP := $(SEP)
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := obj
|
||||
SO := obj
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := lib
|
||||
SA := lib
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L :=
|
||||
|
||||
|
||||
# Target flag -- no trailing space.
|
||||
#
|
||||
T := -o
|
||||
TE := -e
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -c -q -y -d -v -Od -w-par -w-ccc -w-rch -w-pro -w-aus
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS ?= -A
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
|
||||
LINK_LIBRARY = tlib /u /P128 $(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST:%=+%))
|
||||
|
||||
|
||||
# Borland C++ specific temporary files
|
||||
#
|
||||
CLEAN += \
|
||||
$(subst /,$(SEP),$(TOP_DIR)/apinames.$(O)) \
|
||||
$(subst /,$(SEP),$(OBJ_DIR)/apinames.tds)
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,77 +0,0 @@
|
|||
#
|
||||
# FreeType 2 emx-specific definitions
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 2003-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Compiler command line name
|
||||
#
|
||||
CC := set GCCOPT="-ansi -pedantic"; gcc
|
||||
COMPILER_SEP := /
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := o
|
||||
SO := o
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := a
|
||||
SA := a
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -l
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -o$(space)
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -c -g -O6 -Wall
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS ?=
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
|
||||
LINK_LIBRARY = $(foreach m,$(OBJECTS_LIST),$(AR) -r $@ $(m);) echo > nul
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,96 +0,0 @@
|
|||
#
|
||||
# FreeType 2 gcc-specific with NO OPTIMIZATIONS + DEBUGGING
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Compiler command line name
|
||||
#
|
||||
CC := gcc
|
||||
COMPILER_SEP := /
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := o
|
||||
SO := o
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := a
|
||||
SA := a
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -l
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -o$(space)
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
|
||||
# ANSI compliance.
|
||||
#
|
||||
ifndef CFLAGS
|
||||
ifeq ($(findstring g++,$(CC)),)
|
||||
nested_externs := -Wnested-externs
|
||||
strict_prototypes := -Wstrict-prototypes
|
||||
endif
|
||||
|
||||
CFLAGS := -c -g -O0 \
|
||||
-Wall \
|
||||
-W \
|
||||
-Wundef \
|
||||
-Wshadow \
|
||||
-Wpointer-arith \
|
||||
-Wwrite-strings \
|
||||
-Wredundant-decls \
|
||||
-Wno-long-long \
|
||||
$(nested_externs) \
|
||||
$(strict_prototypes)
|
||||
endif
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
# You can override this on the command line.
|
||||
#
|
||||
ANSIFLAGS ?= -std=c99 -pedantic
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
|
||||
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,77 +0,0 @@
|
|||
#
|
||||
# FreeType 2 gcc-specific definitions
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Compiler command line name
|
||||
#
|
||||
CC := gcc
|
||||
COMPILER_SEP := /
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := o
|
||||
SO := o
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := a
|
||||
SA := a
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -l
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -o$(space)
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -c -g -O3 -Wall
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS ?= -std=c99 -pedantic
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
|
||||
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,85 +0,0 @@
|
|||
#
|
||||
# FreeType 2 Intel C/C++ definitions (VC++ compatibility mode)
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# compiler command line name
|
||||
#
|
||||
CC := icl
|
||||
COMPILER_SEP := $(SEP)
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := obj
|
||||
SO := obj
|
||||
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := lib
|
||||
SA := lib
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := /I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := /D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := /Fl
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := /Fo
|
||||
TE := /Fe
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
|
||||
# ANSI compliance.
|
||||
#
|
||||
# Note that the Intel C/C++ compiler version 4.5 complains about
|
||||
# the use of FT_FIELD_OFFSET with "value must be arithmetic type"!
|
||||
# This really looks like a bug in the compiler because the macro
|
||||
# _does_ compute an arithmetic value, so we disable this warning
|
||||
# with "/Qwd32".
|
||||
#
|
||||
CFLAGS ?= /nologo /c /Ox /G5 /W3 /Qwd32
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS ?= /Qansi_alias /Za
|
||||
|
||||
# Library linking
|
||||
#
|
||||
#CLEAN_LIBRARY =
|
||||
LINK_LIBRARY = lib /nologo /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,83 +0,0 @@
|
|||
#
|
||||
# FreeType 2 Unix LCC specific definitions
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Command line name
|
||||
#
|
||||
CC := lcc
|
||||
COMPILER_SEP := $(SEP)
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := o
|
||||
SO := o
|
||||
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := a
|
||||
SA := a
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -l
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -o$(space)
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -c -g
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
# LCC is pure ANSI anyway!
|
||||
#
|
||||
# the "-A" flag simply increments verbosity about non ANSI code
|
||||
#
|
||||
ANSIFLAGS ?= -A
|
||||
|
||||
|
||||
# library linking
|
||||
#
|
||||
CLEAN_LIBRARY ?= $(DELETE) $(PROJECT_LIBRARY)
|
||||
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,76 +0,0 @@
|
|||
#
|
||||
# FreeType 2 Visual Age C++ specific definitions
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# command line compiler name
|
||||
#
|
||||
CC := icc
|
||||
COMPILER_SEP := $(SEP)
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := obj
|
||||
SO := obj
|
||||
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := lib
|
||||
SA := lib
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := /I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := /D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := /Fl
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := /Fo
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
CFLAGS ?= /Q- /Gd+ /O2 /G5 /W3 /C
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSI_FLAGS := /Sa
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
#CLEAN_LIBRARY :=
|
||||
LINK_LIBRARY = lib /nologo /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,82 +0,0 @@
|
|||
#
|
||||
# FreeType 2 Visual C++ definitions
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# compiler command line name
|
||||
#
|
||||
CC := cl
|
||||
COMPILER_SEP := $(SEP)
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := obj
|
||||
SO := obj
|
||||
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := lib
|
||||
SA := lib
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := /I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := /D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := /Fl
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := /Fo
|
||||
|
||||
# Target executable flag
|
||||
#
|
||||
TE := /Fe
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= /nologo /c /Ox /W3 /WX
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS ?= /Za /D_CRT_SECURE_NO_DEPRECATE
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
#CLEAN_LIBRARY =
|
||||
LINK_LIBRARY = lib /nologo /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,81 +0,0 @@
|
|||
#
|
||||
# FreeType 2 Watcom-specific definitions
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Compiler command line name
|
||||
#
|
||||
CC := wcc386
|
||||
COMPILER_SEP := $(SEP)
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := obj
|
||||
SO := obj
|
||||
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := lib
|
||||
SA := lib
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I=
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -l
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -FO=
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -zq
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS ?= -za
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
|
||||
LINK_LIBRARY = $(subst /,$(COMPILER_SEP), \
|
||||
wlib -q -n $@; \
|
||||
$(foreach m, $(OBJECTS_LIST), wlib -q $@ +$(m);) \
|
||||
echo > nul)
|
||||
|
||||
# EOF
|
|
@ -1,81 +0,0 @@
|
|||
#
|
||||
# FreeType 2 Win32-LCC specific definitions
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Command line name
|
||||
#
|
||||
CC := lcc
|
||||
COMPILER_SEP := $(SEP)
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := obj
|
||||
SO := obj
|
||||
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := lib
|
||||
SA := lib
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -Fl
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -Fo
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -c -g2 -O
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
# LCC is pure ANSI anyway!
|
||||
#
|
||||
ANSIFLAGS ?=
|
||||
|
||||
|
||||
# library linking
|
||||
#
|
||||
#CLEAN_LIBRARY :=
|
||||
LINK_LIBRARY = lcclib /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
|
||||
|
||||
|
||||
# EOF
|
128
builds/detect.mk
128
builds/detect.mk
|
@ -1,128 +0,0 @@
|
|||
#
|
||||
# FreeType 2 host platform detection rules
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# This sub-Makefile is in charge of detecting the current platform. It sets
|
||||
# the following variables:
|
||||
#
|
||||
# PLATFORM_DIR The configuration and system-specific directory. Usually
|
||||
# `builds/$(PLATFORM)' but can be different for custom builds
|
||||
# of the library.
|
||||
#
|
||||
# The following variables must be defined in system specific `detect.mk'
|
||||
# files:
|
||||
#
|
||||
# PLATFORM The detected platform. This will default to `ansi' if
|
||||
# auto-detection fails.
|
||||
# CONFIG_FILE The configuration sub-makefile to use. This usually depends
|
||||
# on the compiler defined in the `CC' environment variable.
|
||||
# DELETE The shell command used to remove a given file.
|
||||
# COPY The shell command used to copy one file.
|
||||
# SEP The platform-specific directory separator.
|
||||
# COMPILER_SEP The separator used in arguments of the compilation tools.
|
||||
# CC The compiler to use.
|
||||
#
|
||||
# You need to set the following variable(s) before calling it:
|
||||
#
|
||||
# TOP_DIR The top-most directory in the FreeType library source
|
||||
# hierarchy. If not defined, it will default to `.'.
|
||||
|
||||
# Set auto-detection default to `ansi' resp. UNIX-like operating systems.
|
||||
#
|
||||
PLATFORM := ansi
|
||||
DELETE := $(RM)
|
||||
COPY := cp
|
||||
CAT := cat
|
||||
SEP := /
|
||||
|
||||
BUILD_CONFIG := $(TOP_DIR)/builds
|
||||
|
||||
# These two assignments must be delayed.
|
||||
PLATFORM_DIR = $(BUILD_CONFIG)/$(PLATFORM)
|
||||
CONFIG_RULES = $(PLATFORM_DIR)/$(CONFIG_FILE)
|
||||
|
||||
# We define the BACKSLASH variable to hold a single back-slash character.
|
||||
# This is needed because a line like
|
||||
#
|
||||
# SEP := \
|
||||
#
|
||||
# does not work with GNU Make (the backslash is interpreted as a line
|
||||
# continuation). While a line like
|
||||
#
|
||||
# SEP := \\
|
||||
#
|
||||
# really defines $(SEP) as `\' on Unix, and `\\' on Dos and Windows!
|
||||
#
|
||||
BACKSLASH := $(strip \ )
|
||||
|
||||
# Find all auto-detectable platforms.
|
||||
#
|
||||
PLATFORMS := $(notdir $(subst /detect.mk,,$(wildcard $(BUILD_CONFIG)/*/detect.mk)))
|
||||
.PHONY: $(PLATFORMS) ansi
|
||||
|
||||
# Filter out platform specified as setup target.
|
||||
#
|
||||
PLATFORM := $(firstword $(filter $(MAKECMDGOALS),$(PLATFORMS)))
|
||||
|
||||
# If no setup target platform was specified, enable auto-detection/
|
||||
# default platform.
|
||||
#
|
||||
ifeq ($(PLATFORM),)
|
||||
PLATFORM := ansi
|
||||
endif
|
||||
|
||||
# If the user has explicitly asked for `ansi' on the command line,
|
||||
# disable auto-detection.
|
||||
#
|
||||
ifeq ($(findstring ansi,$(MAKECMDGOALS)),)
|
||||
# Now, include all detection rule files found in the `builds/<system>'
|
||||
# directories. Note that the calling order of the various `detect.mk'
|
||||
# files isn't predictable.
|
||||
#
|
||||
include $(wildcard $(BUILD_CONFIG)/*/detect.mk)
|
||||
endif
|
||||
|
||||
# In case no detection rule file was successful, use the default.
|
||||
#
|
||||
ifndef CONFIG_FILE
|
||||
CONFIG_FILE := ansi.mk
|
||||
setup: std_setup
|
||||
.PHONY: setup
|
||||
endif
|
||||
|
||||
# Flash out and copy rules.
|
||||
#
|
||||
.PHONY: std_setup
|
||||
|
||||
std_setup:
|
||||
$(info )
|
||||
$(info $(PROJECT_TITLE) build system -- automatic system detection)
|
||||
$(info )
|
||||
$(info The following settings are used:)
|
||||
$(info )
|
||||
$(info $(empty) platform $(PLATFORM))
|
||||
$(info $(empty) compiler $(CC))
|
||||
$(info $(empty) configuration directory $(subst /,$(SEP),$(PLATFORM_DIR)))
|
||||
$(info $(empty) configuration rules $(subst /,$(SEP),$(CONFIG_RULES)))
|
||||
$(info )
|
||||
$(info If this does not correspond to your system or settings please remove the file)
|
||||
$(info `$(CONFIG_MK)' from this directory then read the INSTALL file for help.)
|
||||
$(info )
|
||||
$(info Otherwise, simply type `$(MAKE)' again to build the library,)
|
||||
$(info or `$(MAKE) refdoc' to build the API reference (this needs Python >= 3.5).)
|
||||
$(info )
|
||||
@$(COPY) $(subst /,$(SEP),$(CONFIG_RULES) $(CONFIG_MK))
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,152 +0,0 @@
|
|||
#
|
||||
# FreeType 2 configuration file to detect a DOS host platform.
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
.PHONY: setup
|
||||
|
||||
|
||||
ifeq ($(PLATFORM),ansi)
|
||||
|
||||
# Test for DJGPP by checking the DJGPP environment variable, which must be
|
||||
# set in order to use the system (ie. it will always be present when the
|
||||
# `make' utility is run).
|
||||
#
|
||||
# We test for the COMSPEC environment variable, then run the `ver'
|
||||
# command-line program to see if its output contains the word `Dos' or
|
||||
# `DOS'.
|
||||
#
|
||||
# If this is true, we are running a Dos-ish platform (or an emulation).
|
||||
#
|
||||
ifdef DJGPP
|
||||
PLATFORM := dos
|
||||
else
|
||||
ifdef COMSPEC
|
||||
is_dos := $(findstring DOS,$(subst Dos,DOS,$(shell ver)))
|
||||
|
||||
# We try to recognize a Dos session under OS/2. The `ver' command
|
||||
# returns `Operating System/2 ...' there, so `is_dos' should be empty.
|
||||
#
|
||||
# To recognize a Dos session under OS/2, we check COMSPEC for the
|
||||
# substring `MDOS\COMMAND'
|
||||
#
|
||||
ifeq ($(is_dos),)
|
||||
is_dos := $(findstring MDOS\COMMAND,$(COMSPEC))
|
||||
endif
|
||||
|
||||
# We also try to recognize Dos 7.x without Windows 9X launched.
|
||||
# See builds/windows/detect.mk for explanations about the logic.
|
||||
#
|
||||
ifeq ($(is_dos),)
|
||||
ifdef winbootdir
|
||||
#ifneq ($(OS),Windows_NT)
|
||||
# If windows is available, do not trigger this test.
|
||||
ifndef windir
|
||||
is_dos := $(findstring Windows,$(strip $(shell ver)))
|
||||
endif
|
||||
#endif
|
||||
endif
|
||||
endif
|
||||
|
||||
endif # test COMSPEC
|
||||
|
||||
ifneq ($(is_dos),)
|
||||
|
||||
PLATFORM := dos
|
||||
|
||||
endif # test Dos
|
||||
endif # test DJGPP
|
||||
endif # test PLATFORM ansi
|
||||
|
||||
ifeq ($(PLATFORM),dos)
|
||||
|
||||
# Use DJGPP (i.e. gcc) by default.
|
||||
#
|
||||
CONFIG_FILE := dos-gcc.mk
|
||||
CC ?= gcc
|
||||
|
||||
# additionally, we provide hooks for various other compilers
|
||||
#
|
||||
ifneq ($(findstring emx,$(MAKECMDGOALS)),) # EMX gcc
|
||||
CONFIG_FILE := dos-emx.mk
|
||||
CC := gcc
|
||||
|
||||
.PHONY: emx
|
||||
emx: setup
|
||||
@cd .
|
||||
endif
|
||||
|
||||
ifneq ($(findstring turboc,$(MAKECMDGOALS)),) # Turbo C
|
||||
CONFIG_FILE := dos-tcc.mk
|
||||
CC := tcc
|
||||
|
||||
.PHONY: turboc
|
||||
turboc: setup
|
||||
@cd .
|
||||
endif
|
||||
|
||||
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
|
||||
CONFIG_FILE := dos-wat.mk
|
||||
CC := wcc386
|
||||
|
||||
.PHONY: watcom
|
||||
watcom: setup
|
||||
@cd .
|
||||
endif
|
||||
|
||||
ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C/C++ 32-bit
|
||||
CONFIG_FILE := dos-bcc.mk
|
||||
CC := bcc32
|
||||
|
||||
.PHONY: borlandc
|
||||
borlandc: setup
|
||||
@cd .
|
||||
endif
|
||||
|
||||
ifneq ($(findstring borlandc16,$(MAKECMDGOALS)),) # Borland C/C++ 16-bit
|
||||
CONFIG_FILE := dos-bcc.mk
|
||||
CC := bcc
|
||||
|
||||
.PHONY: borlandc16
|
||||
borlandc16: setup
|
||||
@cd .
|
||||
endif
|
||||
|
||||
ifneq ($(findstring bash,$(SHELL)),) # check for bash
|
||||
SEP := /
|
||||
DELETE := rm
|
||||
COPY := cp
|
||||
CAT := cat
|
||||
setup: std_setup
|
||||
else
|
||||
SEP := $(BACKSLASH)
|
||||
DELETE := del
|
||||
CAT := type
|
||||
|
||||
# Setting COPY is a bit trickier. We can be running DJGPP on some
|
||||
# Windows NT derivatives, like XP. See builds/windows/detect.mk for
|
||||
# explanations why we need hacking here.
|
||||
#
|
||||
ifeq ($(OS),Windows_NT)
|
||||
COPY := cmd.exe /c copy
|
||||
else
|
||||
COPY := copy
|
||||
endif # test NT
|
||||
|
||||
setup: std_setup
|
||||
endif
|
||||
|
||||
endif # test PLATFORM dos
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,48 +0,0 @@
|
|||
#
|
||||
# FreeType 2 DOS specific definitions
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
DELETE := del
|
||||
CAT := type
|
||||
SEP := $(strip \ )
|
||||
PLATFORM_DIR := $(TOP_DIR)/builds/dos
|
||||
PLATFORM := dos
|
||||
|
||||
# This is used for `make refdoc' and `make refdoc-venv'
|
||||
#
|
||||
BIN := Scripts
|
||||
|
||||
# The executable file extension (for tools), *with* leading dot.
|
||||
#
|
||||
E := .exe
|
||||
|
||||
# The directory where all library files are placed.
|
||||
#
|
||||
# By default, this is the same as $(OBJ_DIR); however, this can be changed
|
||||
# to suit particular needs.
|
||||
#
|
||||
LIB_DIR := $(OBJ_DIR)
|
||||
|
||||
# The name of the final library file. Note that the DOS-specific Makefile
|
||||
# uses a shorter (8.3) name.
|
||||
#
|
||||
LIBRARY := $(PROJECT)
|
||||
|
||||
|
||||
# The NO_OUTPUT macro is used to ignore the output of commands.
|
||||
#
|
||||
NO_OUTPUT = > nul
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,21 +0,0 @@
|
|||
#
|
||||
# FreeType 2 configuration rules for the EMX gcc compiler
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 2003-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
include $(TOP_DIR)/builds/dos/dos-def.mk
|
||||
include $(TOP_DIR)/builds/compiler/emx.mk
|
||||
include $(TOP_DIR)/builds/link_dos.mk
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,21 +0,0 @@
|
|||
#
|
||||
# FreeType 2 configuration rules for the DJGPP compiler
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
include $(TOP_DIR)/builds/dos/dos-def.mk
|
||||
include $(TOP_DIR)/builds/compiler/gcc.mk
|
||||
include $(TOP_DIR)/builds/link_dos.mk
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,20 +0,0 @@
|
|||
#
|
||||
# FreeType 2 configuration rules for the Watcom C/C++ compiler
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 2003-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
include $(TOP_DIR)/builds/dos/dos-def.mk
|
||||
include $(TOP_DIR)/builds/compiler/watcom.mk
|
||||
include $(TOP_DIR)/builds/link_dos.mk
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,80 +0,0 @@
|
|||
#
|
||||
# FreeType 2 exports sub-Makefile
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 2005-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# DO NOT INVOKE THIS MAKEFILE DIRECTLY! IT IS MEANT TO BE INCLUDED BY
|
||||
# OTHER MAKEFILES.
|
||||
|
||||
|
||||
# This sub-Makefile is used to compute the list of exported symbols whenever
|
||||
# the EXPORTS_LIST variable is defined by one of the platform or compiler
|
||||
# specific build files.
|
||||
#
|
||||
# EXPORTS_LIST contains the name of the `list' file, for example a Windows
|
||||
# .DEF file.
|
||||
#
|
||||
ifneq ($(EXPORTS_LIST),)
|
||||
|
||||
# CCexe is the compiler used to compile the `apinames' tool program
|
||||
# on the host machine. This isn't necessarily the same as the compiler
|
||||
# which can be a cross-compiler for a different architecture, for example.
|
||||
#
|
||||
ifeq ($(CCexe),)
|
||||
CCexe := $(CC)
|
||||
endif
|
||||
|
||||
# TE acts like T, but for executables instead of object files.
|
||||
ifeq ($(TE),)
|
||||
TE := $T
|
||||
endif
|
||||
|
||||
# The list of public headers we're going to parse.
|
||||
PUBLIC_HEADERS := $(filter-out $(PUBLIC_DIR)/ftmac.h, \
|
||||
$(wildcard $(PUBLIC_DIR)/*.h))
|
||||
ifneq ($(ftmac_c),)
|
||||
PUBLIC_HEADERS += $(PUBLIC_DIR)/ftmac.h
|
||||
endif
|
||||
|
||||
# The `apinames' source and executable. We use $E_BUILD as the host
|
||||
# executable suffix, which *includes* the final dot.
|
||||
#
|
||||
# Note that $(APINAMES_OPTIONS) is empty, except for Windows compilers.
|
||||
#
|
||||
APINAMES_SRC := $(subst /,$(SEP),$(TOP_DIR)/src/tools/apinames.c)
|
||||
APINAMES_EXE := $(subst /,$(SEP),$(OBJ_DIR)/apinames$(E_BUILD))
|
||||
|
||||
$(APINAMES_EXE): $(APINAMES_SRC)
|
||||
$(CCexe) $(CCexe_CFLAGS) $(TE)$@ $< $(CCexe_LDFLAGS)
|
||||
|
||||
.PHONY: symbols_list
|
||||
|
||||
symbols_list: $(EXPORTS_LIST)
|
||||
|
||||
# We manually add TT_New_Context and TT_RunIns, which are needed by TT
|
||||
# debuggers, to the EXPORTS_LIST.
|
||||
#
|
||||
$(EXPORTS_LIST): $(APINAMES_EXE) $(PUBLIC_HEADERS)
|
||||
$(subst /,$(SEP),$(APINAMES_EXE)) -o$@ $(APINAMES_OPTIONS) $(PUBLIC_HEADERS)
|
||||
@echo TT_New_Context >> $(EXPORTS_LIST)
|
||||
@echo TT_RunIns >> $(EXPORTS_LIST)
|
||||
|
||||
$(PROJECT_LIBRARY): $(EXPORTS_LIST)
|
||||
|
||||
CLEAN += $(EXPORTS_LIST) \
|
||||
$(APINAMES_EXE)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,385 +0,0 @@
|
|||
#
|
||||
# FreeType 2 library sub-Makefile
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# DO NOT INVOKE THIS MAKEFILE DIRECTLY! IT IS MEANT TO BE INCLUDED BY
|
||||
# OTHER MAKEFILES.
|
||||
|
||||
|
||||
# The following variables (set by other Makefile components, in the
|
||||
# environment, or on the command line) are used:
|
||||
#
|
||||
# PLATFORM_DIR The architecture-dependent directory,
|
||||
# e.g., `$(TOP_DIR)/builds/unix'. Added to INCLUDES also.
|
||||
#
|
||||
# OBJ_DIR The directory in which object files are created.
|
||||
#
|
||||
# LIB_DIR The directory in which the library is created.
|
||||
#
|
||||
# DOC_DIR The directory in which the API reference is created.
|
||||
#
|
||||
# INCLUDES A list of directories to be included additionally.
|
||||
#
|
||||
# DEVEL_DIR Development directory which is added to the INCLUDES
|
||||
# variable before the standard include directories.
|
||||
#
|
||||
# CFLAGS Compilation flags. This overrides the default settings
|
||||
# in the platform-specific configuration files.
|
||||
#
|
||||
# FTSYS_SRC If set, its value is used as the name of a replacement
|
||||
# file for `src/base/ftsystem.c'.
|
||||
#
|
||||
# FTDEBUG_SRC If set, its value is used as the name of a replacement
|
||||
# file for `src/base/ftdebug.c'. [For a normal build, this
|
||||
# file does nothing.]
|
||||
#
|
||||
# FTMODULE_H The file which contains the list of module classes for
|
||||
# the current build. Usually, this is automatically
|
||||
# created by `modules.mk'.
|
||||
#
|
||||
# BASE_OBJ_S
|
||||
# BASE_OBJ_M A list of base objects (for single object and multiple
|
||||
# object builds, respectively). Set up in
|
||||
# `src/base/rules.mk'.
|
||||
#
|
||||
# BASE_EXT_OBJ A list of base extension objects. Set up in
|
||||
# `src/base/rules.mk'.
|
||||
#
|
||||
# DRV_OBJ_S
|
||||
# DRV_OBJ_M A list of driver objects (for single object and multiple
|
||||
# object builds, respectively). Set up cumulatively in
|
||||
# `src/<driver>/rules.mk'.
|
||||
#
|
||||
# CLEAN
|
||||
# DISTCLEAN The sub-makefiles can append additional stuff to these two
|
||||
# variables which is to be removed for the `clean' resp.
|
||||
# `distclean' target.
|
||||
#
|
||||
# TOP_DIR, SEP,
|
||||
# COMPILER_SEP,
|
||||
# LIBRARY, CC,
|
||||
# A, I, O, T Check `config.mk' for details.
|
||||
|
||||
|
||||
# The targets `objects' and `library' are defined at the end of this
|
||||
# Makefile after all other rules have been included.
|
||||
#
|
||||
.PHONY: single multi objects library refdoc refdoc-venv
|
||||
|
||||
# default target -- build single objects and library
|
||||
#
|
||||
single: objects library
|
||||
|
||||
# `multi' target -- build multiple objects and library
|
||||
#
|
||||
multi: objects library
|
||||
|
||||
|
||||
# The FreeType source directory, usually `./src'.
|
||||
#
|
||||
SRC_DIR := $(TOP_DIR)/src
|
||||
|
||||
# The directory where the base layer components are placed, usually
|
||||
# `./src/base'.
|
||||
#
|
||||
BASE_DIR := $(SRC_DIR)/base
|
||||
|
||||
# Other derived directories.
|
||||
#
|
||||
PUBLIC_DIR := $(TOP_DIR)/include/freetype
|
||||
INTERNAL_DIR := $(PUBLIC_DIR)/internal
|
||||
SERVICES_DIR := $(INTERNAL_DIR)/services
|
||||
CONFIG_DIR := $(PUBLIC_DIR)/config
|
||||
|
||||
# The documentation directory.
|
||||
#
|
||||
DOC_DIR ?= $(TOP_DIR)/docs
|
||||
|
||||
# The final name of the library file.
|
||||
#
|
||||
PROJECT_LIBRARY := $(LIB_DIR)/$(LIBRARY).$A
|
||||
|
||||
|
||||
# include paths
|
||||
#
|
||||
# IMPORTANT NOTE: The architecture-dependent directory must ALWAYS be placed
|
||||
# before the standard include list. Porters are then able to
|
||||
# put their own version of some of the FreeType components
|
||||
# in the `builds/<system>' directory, as these files will
|
||||
# override the default sources.
|
||||
#
|
||||
INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) \
|
||||
$(DEVEL_DIR) \
|
||||
$(PLATFORM_DIR) \
|
||||
$(TOP_DIR)/include)
|
||||
|
||||
INCLUDE_FLAGS := $(INCLUDES:%=$I%)
|
||||
|
||||
# For a development build, we assume that the external library dependencies
|
||||
# defined in `ftoption.h' are fulfilled, so we directly access the necessary
|
||||
# include directory information using `pkg-config'.
|
||||
#
|
||||
ifdef DEVEL_DIR
|
||||
INCLUDE_FLAGS += $(shell pkg-config --cflags libpng)
|
||||
INCLUDE_FLAGS += $(shell pkg-config --cflags harfbuzz)
|
||||
INCLUDE_FLAGS += $(shell pkg-config --cflags libbrotlidec)
|
||||
endif
|
||||
|
||||
|
||||
# C flags used for the compilation of an object file. This must include at
|
||||
# least the paths for the `base' and `builds/<system>' directories;
|
||||
# debug/optimization/warning flags + ansi compliance if needed.
|
||||
#
|
||||
# $(INCLUDE_FLAGS) should come before $(CFLAGS) to avoid problems with
|
||||
# old FreeType versions.
|
||||
#
|
||||
# Note what we also define the macro FT2_BUILD_LIBRARY when building
|
||||
# FreeType. This is required to let our sources include the internal
|
||||
# headers (something forbidden by clients).
|
||||
#
|
||||
# `CPPFLAGS' might be specified by the user in the environment.
|
||||
#
|
||||
FT_CFLAGS = $(CPPFLAGS) \
|
||||
$(CFLAGS) \
|
||||
$DFT2_BUILD_LIBRARY
|
||||
|
||||
FT_COMPILE := $(CC) $(ANSIFLAGS) $(INCLUDE_FLAGS) $(FT_CFLAGS)
|
||||
|
||||
|
||||
# Include the `exports' rules file.
|
||||
#
|
||||
include $(TOP_DIR)/builds/exports.mk
|
||||
|
||||
|
||||
# Initialize the list of objects.
|
||||
#
|
||||
OBJECTS_LIST :=
|
||||
|
||||
|
||||
# Define $(PUBLIC_H) as the list of all public header files located in
|
||||
# `$(TOP_DIR)/include/freetype'. $(INTERNAL_H), and $(CONFIG_H) are defined
|
||||
# similarly. $(FTOPTION_H) is the option file used in the compilation.
|
||||
#
|
||||
# This is used to simplify the dependency rules -- if one of these files
|
||||
# changes, the whole library is recompiled.
|
||||
#
|
||||
ifneq ($(wildcard $(OBJ_DIR)/ftoption.h),)
|
||||
FTOPTION_H := $(OBJ_DIR)/ftoption.h
|
||||
else ifneq ($(wildcard $(PLATFORM_DIR)/ftoption.h),)
|
||||
FTOPTION_H := $(PLATFORM_DIR)/ftoption.h
|
||||
endif
|
||||
|
||||
PUBLIC_H := $(wildcard $(PUBLIC_DIR)/*.h)
|
||||
INTERNAL_H := $(wildcard $(INTERNAL_DIR)/*.h) \
|
||||
$(wildcard $(SERVICES_DIR)/*.h)
|
||||
CONFIG_H := $(wildcard $(CONFIG_DIR)/*.h) \
|
||||
$(wildcard $(PLATFORM_DIR)/config/*.h) \
|
||||
$(FTMODULE_H) \
|
||||
$(FTOPTION_H)
|
||||
DEVEL_H := $(wildcard $(TOP_DIR)/devel/*.h)
|
||||
|
||||
FREETYPE_H := $(PUBLIC_H) $(INTERNAL_H) $(CONFIG_H) $(DEVEL_H)
|
||||
|
||||
|
||||
# ftsystem component
|
||||
#
|
||||
FTSYS_SRC ?= $(BASE_DIR)/ftsystem.c
|
||||
|
||||
FTSYS_OBJ := $(OBJ_DIR)/ftsystem.$O
|
||||
|
||||
OBJECTS_LIST += $(FTSYS_OBJ)
|
||||
|
||||
$(FTSYS_OBJ): $(FTSYS_SRC) $(FREETYPE_H)
|
||||
$(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
|
||||
|
||||
|
||||
# ftdebug component
|
||||
#
|
||||
FTDEBUG_SRC ?= $(BASE_DIR)/ftdebug.c
|
||||
|
||||
FTDEBUG_OBJ := $(OBJ_DIR)/ftdebug.$O
|
||||
|
||||
OBJECTS_LIST += $(FTDEBUG_OBJ)
|
||||
|
||||
$(FTDEBUG_OBJ): $(FTDEBUG_SRC) $(FREETYPE_H)
|
||||
$(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
|
||||
|
||||
|
||||
# Include all rule files from FreeType components.
|
||||
#
|
||||
include $(SRC_DIR)/base/rules.mk
|
||||
include $(patsubst %,$(SRC_DIR)/%/rules.mk,$(MODULES))
|
||||
include $(SRC_DIR)/dlg/rules.mk
|
||||
|
||||
|
||||
# ftinit component
|
||||
#
|
||||
# The C source `ftinit.c' contains the FreeType initialization routines.
|
||||
# It is able to automatically register one or more drivers when the API
|
||||
# function FT_Init_FreeType() is called.
|
||||
#
|
||||
# The set of initial drivers is determined by the driver Makefiles
|
||||
# includes above. Each driver Makefile updates the FTINIT_xxx lists
|
||||
# which contain additional include paths and macros used to compile the
|
||||
# single `ftinit.c' source.
|
||||
#
|
||||
FTINIT_SRC := $(BASE_DIR)/ftinit.c
|
||||
FTINIT_OBJ := $(OBJ_DIR)/ftinit.$O
|
||||
|
||||
OBJECTS_LIST += $(FTINIT_OBJ)
|
||||
|
||||
$(FTINIT_OBJ): $(FTINIT_SRC) $(FREETYPE_H)
|
||||
$(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
|
||||
|
||||
|
||||
# ftver component
|
||||
#
|
||||
# The VERSIONINFO resource `ftver.rc' contains version and copyright
|
||||
# to be compiled by windres and tagged into DLL usually.
|
||||
#
|
||||
ifneq ($(RC),)
|
||||
FTVER_SRC := $(BASE_DIR)/ftver.rc
|
||||
FTVER_OBJ := $(OBJ_DIR)/ftver.$O
|
||||
|
||||
OBJECTS_LIST += $(FTVER_OBJ)
|
||||
|
||||
$(FTVER_OBJ): $(FTVER_SRC)
|
||||
$(RC) -o $@ $<
|
||||
endif
|
||||
|
||||
|
||||
# All FreeType library objects.
|
||||
#
|
||||
OBJ_M := $(BASE_OBJ_M) $(BASE_EXT_OBJ) $(DRV_OBJS_M) $(DLG_OBJS_M)
|
||||
OBJ_S := $(BASE_OBJ_S) $(BASE_EXT_OBJ) $(DRV_OBJS_S) $(DLG_OBJS_S)
|
||||
|
||||
|
||||
# The target `multi' on the Make command line indicates that we want to
|
||||
# compile each source file independently.
|
||||
#
|
||||
# Otherwise, each module/driver is compiled in a single object file through
|
||||
# source file inclusion (see `src/base/ftbase.c' or
|
||||
# `src/truetype/truetype.c' for examples).
|
||||
#
|
||||
BASE_OBJECTS := $(OBJECTS_LIST)
|
||||
|
||||
ifneq ($(findstring multi,$(MAKECMDGOALS)),)
|
||||
OBJECTS_LIST += $(OBJ_M)
|
||||
else
|
||||
OBJECTS_LIST += $(OBJ_S)
|
||||
endif
|
||||
|
||||
objects: $(OBJECTS_LIST)
|
||||
|
||||
library: $(PROJECT_LIBRARY)
|
||||
|
||||
# Run `docwriter' in the current Python environment.
|
||||
#
|
||||
PYTHON ?= python
|
||||
|
||||
refdoc:
|
||||
@echo Running docwriter...
|
||||
$(PYTHON) -m docwriter \
|
||||
--prefix=ft2 \
|
||||
--title=FreeType-$(version) \
|
||||
--site=reference \
|
||||
--output=$(DOC_DIR) \
|
||||
$(PUBLIC_DIR)/*.h \
|
||||
$(PUBLIC_DIR)/config/*.h \
|
||||
$(PUBLIC_DIR)/cache/*.h
|
||||
@echo Building static site...
|
||||
cd $(DOC_DIR) && $(PYTHON) -m mkdocs build
|
||||
@echo Done.
|
||||
|
||||
# Variables for running `refdoc' with Python's `virtualenv'. The
|
||||
# environment is created in `DOC_DIR/env' and is gitignored.
|
||||
#
|
||||
# We still need to cd into `DOC_DIR' to build `mkdocs' because paths in
|
||||
# `mkdocs.yml' are relative to the current working directory.
|
||||
#
|
||||
VENV_NAME := env
|
||||
VENV_DIR := $(DOC_DIR)$(SEP)$(VENV_NAME)
|
||||
ENV_PYTHON := $(VENV_DIR)$(SEP)$(BIN)$(SEP)$(PYTHON)
|
||||
|
||||
refdoc-venv:
|
||||
@echo Setting up virtualenv for Python...
|
||||
virtualenv --python=$(PYTHON) $(VENV_DIR)
|
||||
@echo Installing docwriter...
|
||||
$(ENV_PYTHON) -m pip install docwriter
|
||||
@echo Running docwriter...
|
||||
$(ENV_PYTHON) -m docwriter \
|
||||
--prefix=ft2 \
|
||||
--title=FreeType-$(version) \
|
||||
--site=reference \
|
||||
--output=$(DOC_DIR) \
|
||||
$(PUBLIC_DIR)/*.h \
|
||||
$(PUBLIC_DIR)/config/*.h \
|
||||
$(PUBLIC_DIR)/cache/*.h
|
||||
@echo Building static site...
|
||||
cd $(DOC_DIR) && $(VENV_NAME)$(SEP)$(BIN)$(SEP)python -m mkdocs build
|
||||
@echo Done.
|
||||
|
||||
.PHONY: clean_project_std distclean_project_std
|
||||
|
||||
# Standard cleaning and distclean rules. These are not accepted
|
||||
# on all systems though.
|
||||
#
|
||||
clean_project_std:
|
||||
-$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S) $(CLEAN)
|
||||
|
||||
distclean_project_std: clean_project_std
|
||||
-$(DELETE) $(PROJECT_LIBRARY)
|
||||
-$(DELETE) *.orig *~ core *.core $(DISTCLEAN)
|
||||
|
||||
|
||||
.PHONY: clean_project_dos distclean_project_dos
|
||||
|
||||
# The Dos command shell does not support very long list of arguments, so
|
||||
# we are stuck with wildcards.
|
||||
#
|
||||
# Don't break the command lines with \; this prevents the "del" command from
|
||||
# working correctly on Win9x.
|
||||
#
|
||||
clean_project_dos:
|
||||
-$(DELETE) $(subst /,$(SEP),$(OBJ_DIR)/*.$O $(CLEAN) $(NO_OUTPUT))
|
||||
|
||||
distclean_project_dos: clean_project_dos
|
||||
-$(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY) $(DISTCLEAN) $(NO_OUTPUT))
|
||||
|
||||
|
||||
.PHONY: remove_config_mk remove_ftmodule_h
|
||||
|
||||
# Remove configuration file (used for distclean).
|
||||
#
|
||||
remove_config_mk:
|
||||
-$(DELETE) $(subst /,$(SEP),$(CONFIG_MK) $(NO_OUTPUT))
|
||||
|
||||
# Remove module list (used for distclean).
|
||||
#
|
||||
remove_ftmodule_h:
|
||||
-$(DELETE) $(subst /,$(SEP),$(FTMODULE_H) $(NO_OUTPUT))
|
||||
|
||||
|
||||
.PHONY: clean distclean
|
||||
|
||||
# The `config.mk' file must define `clean_project' and `distclean_project'.
|
||||
# Implementations may use to relay these to either the `std' or `dos'
|
||||
# versions from above, or simply provide their own implementation.
|
||||
#
|
||||
clean: clean_project
|
||||
distclean: distclean_project remove_config_mk remove_ftmodule_h
|
||||
-$(DELETE) $(subst /,$(SEP),$(DOC_DIR)/*.html $(NO_OUTPUT))
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,42 +0,0 @@
|
|||
#
|
||||
# Link instructions for Dos-like systems (Dos, Win32, OS/2)
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
ifdef BUILD_PROJECT
|
||||
|
||||
.PHONY: clean_project distclean_project
|
||||
|
||||
# Now include the main sub-makefile. It contains all the rules used to
|
||||
# build the library with the previous variables defined.
|
||||
#
|
||||
include $(TOP_DIR)/builds/$(PROJECT).mk
|
||||
|
||||
# The cleanup targets.
|
||||
#
|
||||
clean_project: clean_project_dos
|
||||
distclean_project: distclean_project_dos
|
||||
|
||||
# This final rule is used to link all object files into a single library.
|
||||
# this is compiler-specific
|
||||
#
|
||||
$(PROJECT_LIBRARY): $(OBJECTS_LIST)
|
||||
ifdef CLEAN_LIBRARY
|
||||
-$(CLEAN_LIBRARY) $(NO_OUTPUT)
|
||||
endif
|
||||
$(LINK_LIBRARY)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,42 +0,0 @@
|
|||
#
|
||||
# Link instructions for standard systems
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
ifdef BUILD_PROJECT
|
||||
|
||||
.PHONY: clean_project distclean_project
|
||||
|
||||
# Now include the main sub-makefile. It contains all the rules used to
|
||||
# build the library with the previous variables defined.
|
||||
#
|
||||
include $(TOP_DIR)/builds/$(PROJECT).mk
|
||||
|
||||
# The cleanup targets.
|
||||
#
|
||||
clean_project: clean_project_std
|
||||
distclean_project: distclean_project_std
|
||||
|
||||
# This final rule is used to link all object files into a single library.
|
||||
# this is compiler-specific
|
||||
#
|
||||
$(PROJECT_LIBRARY): $(OBJECTS_LIST)
|
||||
ifdef CLEAN_LIBRARY
|
||||
-$(CLEAN_LIBRARY) $(NO_OUTPUT)
|
||||
endif
|
||||
$(LINK_LIBRARY)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,209 +0,0 @@
|
|||
# File: FreeType.m68k_cfm.make
|
||||
# Target: FreeType.m68k_cfm
|
||||
# Created: Thursday, October 27, 2005 09:23:25 PM
|
||||
|
||||
|
||||
MAKEFILE = FreeType.m68k_cfm.make
|
||||
\xA5MondoBuild\xA5 = {MAKEFILE} # Make blank to avoid rebuilds when makefile is modified
|
||||
|
||||
ObjDir = :objs:
|
||||
Includes = \xB6
|
||||
-ansi strict \xB6
|
||||
-includes unix \xB6
|
||||
-i :include: \xB6
|
||||
-i :src: \xB6
|
||||
-i :include:freetype:config:
|
||||
|
||||
Sym-68K = -sym off
|
||||
|
||||
COptions = \xB6
|
||||
-d FT_MACINTOSH=1 \xB6
|
||||
-d HAVE_FSSPEC=1 \xB6
|
||||
-d HAVE_FSREF=0 \xB6
|
||||
-d HAVE_QUICKDRAW_TOOLBOX=1 \xB6
|
||||
-d HAVE_QUICKDRAW_CARBON=0 \xB6
|
||||
-d HAVE_ATS=0 \xB6
|
||||
-d FT2_BUILD_LIBRARY \xB6
|
||||
-d FT_CONFIG_CONFIG_H="<ftconfig.h>" \xB6
|
||||
-d FT_CONFIG_MODULES_H="<ftmodule.h>" \xB6
|
||||
{Includes} {Sym-68K} -model cfmseg
|
||||
|
||||
|
||||
### Source Files ###
|
||||
|
||||
SrcFiles = \xB6
|
||||
:src:autofit:autofit.c \xB6
|
||||
:builds:mac:ftbase.c \xB6
|
||||
:src:base:ftbbox.c \xB6
|
||||
:src:base:ftbdf.c \xB6
|
||||
:src:base:ftbitmap.c \xB6
|
||||
:src:base:ftdebug.c \xB6
|
||||
:src:base:ftfstype.c \xB6
|
||||
:src:base:ftglyph.c \xB6
|
||||
:src:base:ftgxval.c \xB6
|
||||
:src:base:ftinit.c \xB6
|
||||
:src:base:ftmm.c \xB6
|
||||
:src:base:ftotval.c \xB6
|
||||
:src:base:ftpfr.c \xB6
|
||||
:src:base:ftstroke.c \xB6
|
||||
:src:base:ftsynth.c \xB6
|
||||
:src:base:ftsystem.c \xB6
|
||||
:src:base:fttype1.c \xB6
|
||||
:src:base:ftwinfnt.c \xB6
|
||||
:src:cache:ftcache.c \xB6
|
||||
:src:bdf:bdf.c \xB6
|
||||
:src:cff:cff.c \xB6
|
||||
:src:cid:type1cid.c \xB6
|
||||
# :src:gxvalid:gxvalid.c \xB6
|
||||
:src:gzip:ftgzip.c \xB6
|
||||
:src:bzip2:ftbzip2.c \xB6
|
||||
:src:lzw:ftlzw.c \xB6
|
||||
:src:otvalid:otvalid.c \xB6
|
||||
:src:pcf:pcf.c \xB6
|
||||
:src:pfr:pfr.c \xB6
|
||||
:src:psaux:psaux.c \xB6
|
||||
:src:pshinter:pshinter.c \xB6
|
||||
:src:psnames:psmodule.c \xB6
|
||||
:src:raster:raster.c \xB6
|
||||
:src:sfnt:sfnt.c \xB6
|
||||
:src:smooth:smooth.c \xB6
|
||||
:src:truetype:truetype.c \xB6
|
||||
:src:type1:type1.c \xB6
|
||||
:src:type42:type42.c \xB6
|
||||
:src:winfonts:winfnt.c
|
||||
|
||||
|
||||
### Object Files ###
|
||||
|
||||
ObjFiles-68K = \xB6
|
||||
"{ObjDir}autofit.c.o" \xB6
|
||||
"{ObjDir}ftbase.c.o" \xB6
|
||||
"{ObjDir}ftbbox.c.o" \xB6
|
||||
"{ObjDir}ftbdf.c.o" \xB6
|
||||
"{ObjDir}ftbitmap.c.o" \xB6
|
||||
"{ObjDir}ftdebug.c.o" \xB6
|
||||
"{ObjDir}ftfstype.c.o" \xB6
|
||||
"{ObjDir}ftglyph.c.o" \xB6
|
||||
"{ObjDir}ftgxval.c.o" \xB6
|
||||
"{ObjDir}ftinit.c.o" \xB6
|
||||
"{ObjDir}ftmm.c.o" \xB6
|
||||
"{ObjDir}ftotval.c.o" \xB6
|
||||
"{ObjDir}ftpfr.c.o" \xB6
|
||||
"{ObjDir}ftstroke.c.o" \xB6
|
||||
"{ObjDir}ftsynth.c.o" \xB6
|
||||
"{ObjDir}ftsystem.c.o" \xB6
|
||||
"{ObjDir}fttype1.c.o" \xB6
|
||||
"{ObjDir}ftwinfnt.c.o" \xB6
|
||||
"{ObjDir}ftcache.c.o" \xB6
|
||||
"{ObjDir}bdf.c.o" \xB6
|
||||
"{ObjDir}cff.c.o" \xB6
|
||||
"{ObjDir}type1cid.c.o" \xB6
|
||||
# "{ObjDir}gxvalid.c.o" \xB6
|
||||
"{ObjDir}ftgzip.c.o" \xB6
|
||||
"{ObjDir}ftbzip2.c.o" \xB6
|
||||
"{ObjDir}ftlzw.c.o" \xB6
|
||||
"{ObjDir}otvalid.c.o" \xB6
|
||||
"{ObjDir}pcf.c.o" \xB6
|
||||
"{ObjDir}pfr.c.o" \xB6
|
||||
"{ObjDir}psaux.c.o" \xB6
|
||||
"{ObjDir}pshinter.c.o" \xB6
|
||||
"{ObjDir}psmodule.c.o" \xB6
|
||||
"{ObjDir}raster.c.o" \xB6
|
||||
"{ObjDir}sfnt.c.o" \xB6
|
||||
"{ObjDir}smooth.c.o" \xB6
|
||||
"{ObjDir}truetype.c.o" \xB6
|
||||
"{ObjDir}type1.c.o" \xB6
|
||||
"{ObjDir}type42.c.o" \xB6
|
||||
"{ObjDir}winfnt.c.o"
|
||||
|
||||
|
||||
### Libraries ###
|
||||
|
||||
LibFiles-68K =
|
||||
|
||||
|
||||
### Default Rules ###
|
||||
|
||||
.c.o \xC4 .c {\xA5MondoBuild\xA5}
|
||||
{C} {depDir}{default}.c -o {targDir}{default}.c.o {COptions}
|
||||
|
||||
|
||||
### Build Rules ###
|
||||
|
||||
:builds:mac:ftbase.c \xC4\xC4 :src:base:ftbase.c
|
||||
Duplicate :src:base:ftbase.c :builds:mac:ftbase.c
|
||||
|
||||
"{ObjDir}ftbase.c.o" \xC4\xC4 :builds:mac:ftbase.c
|
||||
{C} :builds:mac:ftbase.c -o "{ObjDir}ftbase.c.o" \xB6
|
||||
-i :builds:mac: \xB6
|
||||
-i :src:base: \xB6
|
||||
{COptions}
|
||||
|
||||
FreeType.m68k_cfm \xC4\xC4 FreeType.m68k_cfm.o
|
||||
|
||||
FreeType.m68k_cfm.o \xC4\xC4 {ObjFiles-68K} {LibFiles-68K} {\xA5MondoBuild\xA5}
|
||||
Lib \xB6
|
||||
-o {Targ} \xB6
|
||||
{ObjFiles-68K} \xB6
|
||||
{LibFiles-68K} \xB6
|
||||
{Sym-68K} \xB6
|
||||
-mf -d
|
||||
|
||||
|
||||
|
||||
### Required Dependencies ###
|
||||
|
||||
"{ObjDir}autofit.c.o" \xC4 :src:autofit:autofit.c
|
||||
# "{ObjDir}ftbase.c.o" \xC4 :src:base:ftbase.c
|
||||
"{ObjDir}ftbbox.c.o" \xC4 :src:base:ftbbox.c
|
||||
"{ObjDir}ftbdf.c.o" \xC4 :src:base:ftbdf.c
|
||||
"{ObjDir}ftbitmap.c.o" \xC4 :src:base:ftbitmap.c
|
||||
"{ObjDir}ftdebug.c.o" \xC4 :src:base:ftdebug.c
|
||||
"{ObjDir}ftfstype.c.o" \xC4 :src:base:ftfstype.c
|
||||
"{ObjDir}ftglyph.c.o" \xC4 :src:base:ftglyph.c
|
||||
"{ObjDir}ftgxval.c.o" \xC4 :src:base:ftgxval.c
|
||||
"{ObjDir}ftinit.c.o" \xC4 :src:base:ftinit.c
|
||||
"{ObjDir}ftmm.c.o" \xC4 :src:base:ftmm.c
|
||||
"{ObjDir}ftotval.c.o" \xC4 :src:base:ftotval.c
|
||||
"{ObjDir}ftpfr.c.o" \xC4 :src:base:ftpfr.c
|
||||
"{ObjDir}ftstroke.c.o" \xC4 :src:base:ftstroke.c
|
||||
"{ObjDir}ftsynth.c.o" \xC4 :src:base:ftsynth.c
|
||||
"{ObjDir}ftsystem.c.o" \xC4 :src:base:ftsystem.c
|
||||
"{ObjDir}fttype1.c.o" \xC4 :src:base:fttype1.c
|
||||
"{ObjDir}ftwinfnt.c.o" \xC4 :src:base:ftwinfnt.c
|
||||
"{ObjDir}ftcache.c.o" \xC4 :src:cache:ftcache.c
|
||||
"{ObjDir}bdf.c.o" \xC4 :src:bdf:bdf.c
|
||||
"{ObjDir}cff.c.o" \xC4 :src:cff:cff.c
|
||||
"{ObjDir}type1cid.c.o" \xC4 :src:cid:type1cid.c
|
||||
# "{ObjDir}gxvalid.c.o" \xC4 :src:gxvalid:gxvalid.c
|
||||
"{ObjDir}ftgzip.c.o" \xC4 :src:gzip:ftgzip.c
|
||||
"{ObjDir}ftbzip2.c.o" \xC4 :src:bzip2:ftbzip2.c
|
||||
"{ObjDir}ftlzw.c.o" \xC4 :src:lzw:ftlzw.c
|
||||
"{ObjDir}otvalid.c.o" \xC4 :src:otvalid:otvalid.c
|
||||
"{ObjDir}pcf.c.o" \xC4 :src:pcf:pcf.c
|
||||
"{ObjDir}pfr.c.o" \xC4 :src:pfr:pfr.c
|
||||
"{ObjDir}psaux.c.o" \xC4 :src:psaux:psaux.c
|
||||
"{ObjDir}pshinter.c.o" \xC4 :src:pshinter:pshinter.c
|
||||
"{ObjDir}psmodule.c.o" \xC4 :src:psnames:psmodule.c
|
||||
"{ObjDir}raster.c.o" \xC4 :src:raster:raster.c
|
||||
"{ObjDir}sfnt.c.o" \xC4 :src:sfnt:sfnt.c
|
||||
"{ObjDir}smooth.c.o" \xC4 :src:smooth:smooth.c
|
||||
"{ObjDir}truetype.c.o" \xC4 :src:truetype:truetype.c
|
||||
"{ObjDir}type1.c.o" \xC4 :src:type1:type1.c
|
||||
"{ObjDir}type42.c.o" \xC4 :src:type42:type42.c
|
||||
"{ObjDir}winfnt.c.o" \xC4 :src:winfonts:winfnt.c
|
||||
|
||||
|
||||
### Optional Dependencies ###
|
||||
### Build this target to generate "include file" dependencies. ###
|
||||
|
||||
Dependencies \xC4 $OutOfDate
|
||||
MakeDepend \xB6
|
||||
-append {MAKEFILE} \xB6
|
||||
-ignore "{CIncludes}" \xB6
|
||||
-objdir "{ObjDir}" \xB6
|
||||
-objext .o \xB6
|
||||
{Includes} \xB6
|
||||
{SrcFiles}
|
||||
|
||||
|
|
@ -1,208 +0,0 @@
|
|||
# File: FreeType.m68k_far.make
|
||||
# Target: FreeType.m68k_far
|
||||
# Created: Tuesday, October 25, 2005 03:34:05 PM
|
||||
|
||||
|
||||
MAKEFILE = FreeType.m68k_far.make
|
||||
\xA5MondoBuild\xA5 = {MAKEFILE} # Make blank to avoid rebuilds when makefile is modified
|
||||
|
||||
ObjDir = :objs:
|
||||
Includes = \xB6
|
||||
-includes unix \xB6
|
||||
-i :include: \xB6
|
||||
-i :src: \xB6
|
||||
-i :include:freetype:config:
|
||||
|
||||
Sym-68K = -sym off
|
||||
|
||||
COptions = \xB6
|
||||
-d FT_MACINTOSH=1 \xB6
|
||||
-d HAVE_FSSPEC=1 \xB6
|
||||
-d HAVE_FSREF=0 \xB6
|
||||
-d HAVE_QUICKDRAW_TOOLBOX=1 \xB6
|
||||
-d HAVE_QUICKDRAW_CARBON=0 \xB6
|
||||
-d HAVE_ATS=0 \xB6
|
||||
-d FT2_BUILD_LIBRARY \xB6
|
||||
-d FT_CONFIG_CONFIG_H="<ftconfig.h>" \xB6
|
||||
-d FT_CONFIG_MODULES_H="<ftmodule.h>" \xB6
|
||||
{Includes} {Sym-68K} -model far
|
||||
|
||||
|
||||
### Source Files ###
|
||||
|
||||
SrcFiles = \xB6
|
||||
:src:autofit:autofit.c \xB6
|
||||
:builds:mac:ftbase.c \xB6
|
||||
:src:base:ftbbox.c \xB6
|
||||
:src:base:ftbdf.c \xB6
|
||||
:src:base:ftbitmap.c \xB6
|
||||
:src:base:ftdebug.c \xB6
|
||||
:src:base:ftfstype.c \xB6
|
||||
:src:base:ftglyph.c \xB6
|
||||
:src:base:ftgxval.c \xB6
|
||||
:src:base:ftinit.c \xB6
|
||||
:src:base:ftmm.c \xB6
|
||||
:src:base:ftotval.c \xB6
|
||||
:src:base:ftpfr.c \xB6
|
||||
:src:base:ftstroke.c \xB6
|
||||
:src:base:ftsynth.c \xB6
|
||||
:src:base:ftsystem.c \xB6
|
||||
:src:base:fttype1.c \xB6
|
||||
:src:base:ftwinfnt.c \xB6
|
||||
:src:cache:ftcache.c \xB6
|
||||
:src:bdf:bdf.c \xB6
|
||||
:src:cff:cff.c \xB6
|
||||
:src:cid:type1cid.c \xB6
|
||||
:src:gxvalid:gxvalid.c \xB6
|
||||
:src:gzip:ftgzip.c \xB6
|
||||
:src:bzip2:ftbzip2.c \xB6
|
||||
:src:lzw:ftlzw.c \xB6
|
||||
:src:otvalid:otvalid.c \xB6
|
||||
:src:pcf:pcf.c \xB6
|
||||
:src:pfr:pfr.c \xB6
|
||||
:src:psaux:psaux.c \xB6
|
||||
:src:pshinter:pshinter.c \xB6
|
||||
:src:psnames:psmodule.c \xB6
|
||||
:src:raster:raster.c \xB6
|
||||
:src:sfnt:sfnt.c \xB6
|
||||
:src:smooth:smooth.c \xB6
|
||||
:src:truetype:truetype.c \xB6
|
||||
:src:type1:type1.c \xB6
|
||||
:src:type42:type42.c \xB6
|
||||
:src:winfonts:winfnt.c
|
||||
|
||||
|
||||
### Object Files ###
|
||||
|
||||
ObjFiles-68K = \xB6
|
||||
"{ObjDir}autofit.c.o" \xB6
|
||||
"{ObjDir}ftbase.c.o" \xB6
|
||||
"{ObjDir}ftbbox.c.o" \xB6
|
||||
"{ObjDir}ftbdf.c.o" \xB6
|
||||
"{ObjDir}ftbitmap.c.o" \xB6
|
||||
"{ObjDir}ftdebug.c.o" \xB6
|
||||
"{ObjDir}ftfstype.c.o" \xB6
|
||||
"{ObjDir}ftglyph.c.o" \xB6
|
||||
"{ObjDir}ftgxval.c.o" \xB6
|
||||
"{ObjDir}ftinit.c.o" \xB6
|
||||
"{ObjDir}ftmm.c.o" \xB6
|
||||
"{ObjDir}ftotval.c.o" \xB6
|
||||
"{ObjDir}ftpfr.c.o" \xB6
|
||||
"{ObjDir}ftstroke.c.o" \xB6
|
||||
"{ObjDir}ftsynth.c.o" \xB6
|
||||
"{ObjDir}ftsystem.c.o" \xB6
|
||||
"{ObjDir}fttype1.c.o" \xB6
|
||||
"{ObjDir}ftwinfnt.c.o" \xB6
|
||||
"{ObjDir}ftcache.c.o" \xB6
|
||||
"{ObjDir}bdf.c.o" \xB6
|
||||
"{ObjDir}cff.c.o" \xB6
|
||||
"{ObjDir}type1cid.c.o" \xB6
|
||||
"{ObjDir}gxvalid.c.o" \xB6
|
||||
"{ObjDir}ftgzip.c.o" \xB6
|
||||
"{ObjDir}ftbzip2.c.o" \xB6
|
||||
"{ObjDir}ftlzw.c.o" \xB6
|
||||
"{ObjDir}otvalid.c.o" \xB6
|
||||
"{ObjDir}pcf.c.o" \xB6
|
||||
"{ObjDir}pfr.c.o" \xB6
|
||||
"{ObjDir}psaux.c.o" \xB6
|
||||
"{ObjDir}pshinter.c.o" \xB6
|
||||
"{ObjDir}psmodule.c.o" \xB6
|
||||
"{ObjDir}raster.c.o" \xB6
|
||||
"{ObjDir}sfnt.c.o" \xB6
|
||||
"{ObjDir}smooth.c.o" \xB6
|
||||
"{ObjDir}truetype.c.o" \xB6
|
||||
"{ObjDir}type1.c.o" \xB6
|
||||
"{ObjDir}type42.c.o" \xB6
|
||||
"{ObjDir}winfnt.c.o"
|
||||
|
||||
|
||||
### Libraries ###
|
||||
|
||||
LibFiles-68K =
|
||||
|
||||
|
||||
### Default Rules ###
|
||||
|
||||
.c.o \xC4 .c {\xA5MondoBuild\xA5}
|
||||
{C} {depDir}{default}.c -o {targDir}{default}.c.o {COptions} \xB6
|
||||
-ansi strict
|
||||
|
||||
### Build Rules ###
|
||||
|
||||
:builds:mac:ftbase.c \xC4\xC4 :src:base:ftbase.c
|
||||
Duplicate :src:base:ftbase.c :builds:mac:ftbase.c
|
||||
|
||||
"{ObjDir}ftbase.c.o" \xC4\xC4 :builds:mac:ftbase.c
|
||||
{C} :builds:mac:ftbase.c -o "{ObjDir}ftbase.c.o" \xB6
|
||||
-i :builds:mac: \xB6
|
||||
-i :src:base: \xB6
|
||||
{COptions}
|
||||
|
||||
FreeType.m68k_far \xC4\xC4 FreeType.m68k_far.o
|
||||
|
||||
FreeType.m68k_far.o \xC4\xC4 {ObjFiles-68K} {LibFiles-68K} {\xA5MondoBuild\xA5}
|
||||
Lib \xB6
|
||||
-o {Targ} \xB6
|
||||
{ObjFiles-68K} \xB6
|
||||
{LibFiles-68K} \xB6
|
||||
{Sym-68K} \xB6
|
||||
-mf -d
|
||||
|
||||
|
||||
|
||||
### Required Dependencies ###
|
||||
|
||||
"{ObjDir}autofit.c.o" \xC4 :src:autofit:autofit.c
|
||||
# "{ObjDir}ftbase.c.o" \xC4 :src:base:ftbase.c
|
||||
"{ObjDir}ftbbox.c.o" \xC4 :src:base:ftbbox.c
|
||||
"{ObjDir}ftbdf.c.o" \xC4 :src:base:ftbdf.c
|
||||
"{ObjDir}ftbitmap.c.o" \xC4 :src:base:ftbitmap.c
|
||||
"{ObjDir}ftdebug.c.o" \xC4 :src:base:ftdebug.c
|
||||
"{ObjDir}ftfstype.c.o" \xC4 :src:base:ftfstype.c
|
||||
"{ObjDir}ftglyph.c.o" \xC4 :src:base:ftglyph.c
|
||||
"{ObjDir}ftgxval.c.o" \xC4 :src:base:ftgxval.c
|
||||
"{ObjDir}ftinit.c.o" \xC4 :src:base:ftinit.c
|
||||
"{ObjDir}ftmm.c.o" \xC4 :src:base:ftmm.c
|
||||
"{ObjDir}ftotval.c.o" \xC4 :src:base:ftotval.c
|
||||
"{ObjDir}ftpfr.c.o" \xC4 :src:base:ftpfr.c
|
||||
"{ObjDir}ftstroke.c.o" \xC4 :src:base:ftstroke.c
|
||||
"{ObjDir}ftsynth.c.o" \xC4 :src:base:ftsynth.c
|
||||
"{ObjDir}ftsystem.c.o" \xC4 :src:base:ftsystem.c
|
||||
"{ObjDir}fttype1.c.o" \xC4 :src:base:fttype1.c
|
||||
"{ObjDir}ftwinfnt.c.o" \xC4 :src:base:ftwinfnt.c
|
||||
"{ObjDir}ftcache.c.o" \xC4 :src:cache:ftcache.c
|
||||
"{ObjDir}bdf.c.o" \xC4 :src:bdf:bdf.c
|
||||
"{ObjDir}cff.c.o" \xC4 :src:cff:cff.c
|
||||
"{ObjDir}type1cid.c.o" \xC4 :src:cid:type1cid.c
|
||||
"{ObjDir}gxvalid.c.o" \xC4 :src:gxvalid:gxvalid.c
|
||||
"{ObjDir}ftgzip.c.o" \xC4 :src:gzip:ftgzip.c
|
||||
"{ObjDir}ftbzip2.c.o" \xC4 :src:bzip2:ftbzip2.c
|
||||
"{ObjDir}ftlzw.c.o" \xC4 :src:lzw:ftlzw.c
|
||||
"{ObjDir}otvalid.c.o" \xC4 :src:otvalid:otvalid.c
|
||||
"{ObjDir}pcf.c.o" \xC4 :src:pcf:pcf.c
|
||||
"{ObjDir}pfr.c.o" \xC4 :src:pfr:pfr.c
|
||||
"{ObjDir}psaux.c.o" \xC4 :src:psaux:psaux.c
|
||||
"{ObjDir}pshinter.c.o" \xC4 :src:pshinter:pshinter.c
|
||||
"{ObjDir}psmodule.c.o" \xC4 :src:psnames:psmodule.c
|
||||
"{ObjDir}raster.c.o" \xC4 :src:raster:raster.c
|
||||
"{ObjDir}sfnt.c.o" \xC4 :src:sfnt:sfnt.c
|
||||
"{ObjDir}smooth.c.o" \xC4 :src:smooth:smooth.c
|
||||
"{ObjDir}truetype.c.o" \xC4 :src:truetype:truetype.c
|
||||
"{ObjDir}type1.c.o" \xC4 :src:type1:type1.c
|
||||
"{ObjDir}type42.c.o" \xC4 :src:type42:type42.c
|
||||
"{ObjDir}winfnt.c.o" \xC4 :src:winfonts:winfnt.c
|
||||
|
||||
|
||||
### Optional Dependencies ###
|
||||
### Build this target to generate "include file" dependencies. ###
|
||||
|
||||
Dependencies \xC4 $OutOfDate
|
||||
MakeDepend \xB6
|
||||
-append {MAKEFILE} \xB6
|
||||
-ignore "{CIncludes}" \xB6
|
||||
-objdir "{ObjDir}" \xB6
|
||||
-objext .o \xB6
|
||||
{Includes} \xB6
|
||||
{SrcFiles}
|
||||
|
||||
|
|
@ -1,212 +0,0 @@
|
|||
# File: FreeType.ppc_carbon.make
|
||||
# Target: FreeType.ppc_carbon
|
||||
# Created: Friday, October 28, 2005 03:40:06 PM
|
||||
|
||||
|
||||
MAKEFILE = FreeType.ppc_carbon.make
|
||||
\xA5MondoBuild\xA5 = {MAKEFILE} # Make blank to avoid rebuilds when makefile is modified
|
||||
|
||||
ObjDir = :objs:
|
||||
Includes = \xB6
|
||||
-ansi strict \xB6
|
||||
-includes unix \xB6
|
||||
-i :include: \xB6
|
||||
-i :src: \xB6
|
||||
-i :include:freetype:config:
|
||||
|
||||
Sym-PPC = -sym off
|
||||
|
||||
PPCCOptions = \xB6
|
||||
-d FT_MACINTOSH=1 \xB6
|
||||
-d HAVE_FSSPEC=1 \xB6
|
||||
-d HAVE_FSREF=1 \xB6
|
||||
-d HAVE_QUICKDRAW_TOOLBOX=1 \xB6
|
||||
-d HAVE_QUICKDRAW_CARBON=1 \xB6
|
||||
-d HAVE_ATS=0 \xB6
|
||||
-d FT2_BUILD_LIBRARY \xB6
|
||||
-d FT_CONFIG_CONFIG_H="<ftconfig.h>" \xB6
|
||||
-d FT_CONFIG_MODULES_H="<ftmodule.h>" \xB6
|
||||
{Includes} {Sym-PPC} -d TARGET_API_MAC_CARBON=1
|
||||
|
||||
|
||||
### Source Files ###
|
||||
|
||||
SrcFiles = \xB6
|
||||
:src:autofit:autofit.c \xB6
|
||||
:builds:mac:ftbase.c \xB6
|
||||
:src:base:ftbbox.c \xB6
|
||||
:src:base:ftbdf.c \xB6
|
||||
:src:base:ftbitmap.c \xB6
|
||||
:src:base:ftdebug.c \xB6
|
||||
:src:base:ftfstype.c \xB6
|
||||
:src:base:ftglyph.c \xB6
|
||||
:src:base:ftgxval.c \xB6
|
||||
:src:base:ftinit.c \xB6
|
||||
:src:base:ftmm.c \xB6
|
||||
:src:base:ftotval.c \xB6
|
||||
:src:base:ftpfr.c \xB6
|
||||
:src:base:ftstroke.c \xB6
|
||||
:src:base:ftsynth.c \xB6
|
||||
:src:base:ftsystem.c \xB6
|
||||
:src:base:fttype1.c \xB6
|
||||
:src:base:ftwinfnt.c \xB6
|
||||
:src:cache:ftcache.c \xB6
|
||||
:src:bdf:bdf.c \xB6
|
||||
:src:cff:cff.c \xB6
|
||||
:src:cid:type1cid.c \xB6
|
||||
:src:gxvalid:gxvalid.c \xB6
|
||||
:src:gzip:ftgzip.c \xB6
|
||||
:src:bzip2:ftbzip2.c \xB6
|
||||
:src:lzw:ftlzw.c \xB6
|
||||
:src:otvalid:otvalid.c \xB6
|
||||
:src:pcf:pcf.c \xB6
|
||||
:src:pfr:pfr.c \xB6
|
||||
:src:psaux:psaux.c \xB6
|
||||
:src:pshinter:pshinter.c \xB6
|
||||
:src:psnames:psmodule.c \xB6
|
||||
:src:raster:raster.c \xB6
|
||||
:src:sfnt:sfnt.c \xB6
|
||||
:src:smooth:smooth.c \xB6
|
||||
:src:truetype:truetype.c \xB6
|
||||
:src:type1:type1.c \xB6
|
||||
:src:type42:type42.c \xB6
|
||||
:src:winfonts:winfnt.c
|
||||
|
||||
|
||||
### Object Files ###
|
||||
|
||||
ObjFiles-PPC = \xB6
|
||||
"{ObjDir}autofit.c.x" \xB6
|
||||
"{ObjDir}ftbase.c.x" \xB6
|
||||
"{ObjDir}ftbbox.c.x" \xB6
|
||||
"{ObjDir}ftbdf.c.x" \xB6
|
||||
"{ObjDir}ftbitmap.c.x" \xB6
|
||||
"{ObjDir}ftdebug.c.x" \xB6
|
||||
"{ObjDir}ftfstype.c.x" \xB6
|
||||
"{ObjDir}ftglyph.c.x" \xB6
|
||||
"{ObjDir}ftgxval.c.x" \xB6
|
||||
"{ObjDir}ftinit.c.x" \xB6
|
||||
"{ObjDir}ftmm.c.x" \xB6
|
||||
"{ObjDir}ftotval.c.x" \xB6
|
||||
"{ObjDir}ftpfr.c.x" \xB6
|
||||
"{ObjDir}ftstroke.c.x" \xB6
|
||||
"{ObjDir}ftsynth.c.x" \xB6
|
||||
"{ObjDir}ftsystem.c.x" \xB6
|
||||
"{ObjDir}fttype1.c.x" \xB6
|
||||
"{ObjDir}ftwinfnt.c.x" \xB6
|
||||
"{ObjDir}ftcache.c.x" \xB6
|
||||
"{ObjDir}bdf.c.x" \xB6
|
||||
"{ObjDir}cff.c.x" \xB6
|
||||
"{ObjDir}type1cid.c.x" \xB6
|
||||
"{ObjDir}gxvalid.c.x" \xB6
|
||||
"{ObjDir}ftgzip.c.x" \xB6
|
||||
"{ObjDir}ftbzip2.c.x" \xB6
|
||||
"{ObjDir}ftlzw.c.x" \xB6
|
||||
"{ObjDir}otvalid.c.x" \xB6
|
||||
"{ObjDir}pcf.c.x" \xB6
|
||||
"{ObjDir}pfr.c.x" \xB6
|
||||
"{ObjDir}psaux.c.x" \xB6
|
||||
"{ObjDir}pshinter.c.x" \xB6
|
||||
"{ObjDir}psmodule.c.x" \xB6
|
||||
"{ObjDir}raster.c.x" \xB6
|
||||
"{ObjDir}sfnt.c.x" \xB6
|
||||
"{ObjDir}smooth.c.x" \xB6
|
||||
"{ObjDir}truetype.c.x" \xB6
|
||||
"{ObjDir}type1.c.x" \xB6
|
||||
"{ObjDir}type42.c.x" \xB6
|
||||
"{ObjDir}winfnt.c.x"
|
||||
|
||||
|
||||
### Libraries ###
|
||||
|
||||
LibFiles-PPC =
|
||||
|
||||
|
||||
### Default Rules ###
|
||||
|
||||
.c.x \xC4 .c {\xA5MondoBuild\xA5}
|
||||
{PPCC} {depDir}{default}.c -o {targDir}{default}.c.x {PPCCOptions}
|
||||
|
||||
|
||||
### Build Rules ###
|
||||
|
||||
:builds:mac:ftbase.c \xC4\xC4 :src:base:ftbase.c
|
||||
Duplicate :src:base:ftbase.c :builds:mac:ftbase.c
|
||||
|
||||
"{ObjDir}ftbase.c.x" \xC4\xC4 :builds:mac:ftbase.c
|
||||
{PPCC} :builds:mac:ftbase.c -o {ObjDir}ftbase.c.x \xB6
|
||||
-i :builds:mac: \xB6
|
||||
-i :src:base: \xB6
|
||||
{PPCCOptions}
|
||||
|
||||
FreeType.ppc_carbon \xC4\xC4 FreeType.ppc_carbon.o
|
||||
|
||||
FreeType.ppc_carbon.o \xC4\xC4 {ObjFiles-PPC} {LibFiles-PPC} {\xA5MondoBuild\xA5}
|
||||
PPCLink \xB6
|
||||
-o {Targ} \xB6
|
||||
{ObjFiles-PPC} \xB6
|
||||
{LibFiles-PPC} \xB6
|
||||
{Sym-PPC} \xB6
|
||||
-mf -d \xB6
|
||||
-t 'XCOF' \xB6
|
||||
-c 'MPS ' \xB6
|
||||
-xm l
|
||||
|
||||
|
||||
|
||||
### Required Dependencies ###
|
||||
|
||||
"{ObjDir}autofit.c.x" \xC4 :src:autofit:autofit.c
|
||||
# "{ObjDir}ftbase.c.x" \xC4 :builds:mac:ftbase.c
|
||||
"{ObjDir}ftbbox.c.x" \xC4 :src:base:ftbbox.c
|
||||
"{ObjDir}ftbdf.c.x" \xC4 :src:base:ftbdf.c
|
||||
"{ObjDir}ftbitmap.c.x" \xC4 :src:base:ftbitmap.c
|
||||
"{ObjDir}ftdebug.c.x" \xC4 :src:base:ftdebug.c
|
||||
"{ObjDir}ftfstype.c.x" \xC4 :src:base:ftfstype.c
|
||||
"{ObjDir}ftglyph.c.x" \xC4 :src:base:ftglyph.c
|
||||
"{ObjDir}ftgxval.c.x" \xC4 :src:base:ftgxval.c
|
||||
"{ObjDir}ftinit.c.x" \xC4 :src:base:ftinit.c
|
||||
"{ObjDir}ftmm.c.x" \xC4 :src:base:ftmm.c
|
||||
"{ObjDir}ftotval.c.x" \xC4 :src:base:ftotval.c
|
||||
"{ObjDir}ftpfr.c.x" \xC4 :src:base:ftpfr.c
|
||||
"{ObjDir}ftstroke.c.x" \xC4 :src:base:ftstroke.c
|
||||
"{ObjDir}ftsynth.c.x" \xC4 :src:base:ftsynth.c
|
||||
"{ObjDir}ftsystem.c.x" \xC4 :src:base:ftsystem.c
|
||||
"{ObjDir}fttype1.c.x" \xC4 :src:base:fttype1.c
|
||||
"{ObjDir}ftwinfnt.c.x" \xC4 :src:base:ftwinfnt.c
|
||||
"{ObjDir}ftcache.c.x" \xC4 :src:cache:ftcache.c
|
||||
"{ObjDir}bdf.c.x" \xC4 :src:bdf:bdf.c
|
||||
"{ObjDir}cff.c.x" \xC4 :src:cff:cff.c
|
||||
"{ObjDir}type1cid.c.x" \xC4 :src:cid:type1cid.c
|
||||
"{ObjDir}gxvalid.c.x" \xC4 :src:gxvalid:gxvalid.c
|
||||
"{ObjDir}ftgzip.c.x" \xC4 :src:gzip:ftgzip.c
|
||||
"{ObjDir}ftbzip2.c.x" \xC4 :src:bzip2:ftbzip2.c
|
||||
"{ObjDir}ftlzw.c.x" \xC4 :src:lzw:ftlzw.c
|
||||
"{ObjDir}otvalid.c.x" \xC4 :src:otvalid:otvalid.c
|
||||
"{ObjDir}pcf.c.x" \xC4 :src:pcf:pcf.c
|
||||
"{ObjDir}pfr.c.x" \xC4 :src:pfr:pfr.c
|
||||
"{ObjDir}psaux.c.x" \xC4 :src:psaux:psaux.c
|
||||
"{ObjDir}pshinter.c.x" \xC4 :src:pshinter:pshinter.c
|
||||
"{ObjDir}psmodule.c.x" \xC4 :src:psnames:psmodule.c
|
||||
"{ObjDir}raster.c.x" \xC4 :src:raster:raster.c
|
||||
"{ObjDir}sfnt.c.x" \xC4 :src:sfnt:sfnt.c
|
||||
"{ObjDir}smooth.c.x" \xC4 :src:smooth:smooth.c
|
||||
"{ObjDir}truetype.c.x" \xC4 :src:truetype:truetype.c
|
||||
"{ObjDir}type1.c.x" \xC4 :src:type1:type1.c
|
||||
"{ObjDir}type42.c.x" \xC4 :src:type42:type42.c
|
||||
"{ObjDir}winfnt.c.x" \xC4 :src:winfonts:winfnt.c
|
||||
|
||||
|
||||
### Optional Dependencies ###
|
||||
### Build this target to generate "include file" dependencies. ###
|
||||
|
||||
Dependencies \xC4 $OutOfDate
|
||||
MakeDepend \xB6
|
||||
-append {MAKEFILE} \xB6
|
||||
-ignore "{CIncludes}" \xB6
|
||||
-objdir "{ObjDir}" \xB6
|
||||
-objext .x \xB6
|
||||
{Includes} \xB6
|
||||
{SrcFiles}
|
||||
|
||||
|
|
@ -1,213 +0,0 @@
|
|||
# File: FreeType.ppc_classic.make
|
||||
# Target: FreeType.ppc_classic
|
||||
# Created: Thursday, October 27, 2005 07:42:43 PM
|
||||
|
||||
|
||||
MAKEFILE = FreeType.ppc_classic.make
|
||||
\xA5MondoBuild\xA5 = {MAKEFILE} # Make blank to avoid rebuilds when makefile is modified
|
||||
|
||||
ObjDir = :objs:
|
||||
Includes = \xB6
|
||||
-ansi strict \xB6
|
||||
-includes unix \xB6
|
||||
-i :include: \xB6
|
||||
-i :src: \xB6
|
||||
-i :include:freetype:config:
|
||||
|
||||
Sym-PPC = -sym off
|
||||
|
||||
PPCCOptions = \xB6
|
||||
-d FT_MACINTOSH=1 \xB6
|
||||
-d HAVE_FSSPEC=1 \xB6
|
||||
-d HAVE_FSREF=0 \xB6
|
||||
-d HAVE_QUICKDRAW_TOOLBOX=1 \xB6
|
||||
-d HAVE_QUICKDRAW_CARBON=0 \xB6
|
||||
-d HAVE_ATS=0 \xB6
|
||||
-d FT2_BUILD_LIBRARY \xB6
|
||||
-d FT_CONFIG_CONFIG_H="<ftconfig.h>" \xB6
|
||||
-d FT_CONFIG_MODULES_H="<ftmodule.h>" \xB6
|
||||
{Includes} {Sym-PPC}
|
||||
|
||||
|
||||
### Source Files ###
|
||||
|
||||
SrcFiles = \xB6
|
||||
:src:autofit:autofit.c \xB6
|
||||
:builds:mac:ftbase.c \xB6
|
||||
:src:base:ftbbox.c \xB6
|
||||
:src:base:ftbdf.c \xB6
|
||||
:src:base:ftbitmap.c \xB6
|
||||
:src:base:ftdebug.c \xB6
|
||||
:src:base:ftfstype.c \xB6
|
||||
:src:base:ftglyph.c \xB6
|
||||
:src:base:ftgxval.c \xB6
|
||||
:src:base:ftinit.c \xB6
|
||||
:src:base:ftmm.c \xB6
|
||||
:src:base:ftotval.c \xB6
|
||||
:src:base:ftpfr.c \xB6
|
||||
:src:base:ftstroke.c \xB6
|
||||
:src:base:ftsynth.c \xB6
|
||||
:src:base:ftsystem.c \xB6
|
||||
:src:base:fttype1.c \xB6
|
||||
:src:base:ftwinfnt.c \xB6
|
||||
:src:cache:ftcache.c \xB6
|
||||
:src:bdf:bdf.c \xB6
|
||||
:src:cff:cff.c \xB6
|
||||
:src:cid:type1cid.c \xB6
|
||||
:src:gxvalid:gxvalid.c \xB6
|
||||
:src:gzip:ftgzip.c \xB6
|
||||
:src:bzip2:ftbzip2.c \xB6
|
||||
:src:lzw:ftlzw.c \xB6
|
||||
:src:otvalid:otvalid.c \xB6
|
||||
:src:pcf:pcf.c \xB6
|
||||
:src:pfr:pfr.c \xB6
|
||||
:src:psaux:psaux.c \xB6
|
||||
:src:pshinter:pshinter.c \xB6
|
||||
:src:psnames:psmodule.c \xB6
|
||||
:src:raster:raster.c \xB6
|
||||
:src:sfnt:sfnt.c \xB6
|
||||
:src:smooth:smooth.c \xB6
|
||||
:src:truetype:truetype.c \xB6
|
||||
:src:type1:type1.c \xB6
|
||||
:src:type42:type42.c \xB6
|
||||
:src:winfonts:winfnt.c
|
||||
|
||||
|
||||
### Object Files ###
|
||||
|
||||
ObjFiles-PPC = \xB6
|
||||
"{ObjDir}autofit.c.x" \xB6
|
||||
"{ObjDir}ftbase.c.x" \xB6
|
||||
"{ObjDir}ftbbox.c.x" \xB6
|
||||
"{ObjDir}ftbdf.c.x" \xB6
|
||||
"{ObjDir}ftbitmap.c.x" \xB6
|
||||
"{ObjDir}ftdebug.c.x" \xB6
|
||||
"{ObjDir}ftfstype.c.x" \xB6
|
||||
"{ObjDir}ftglyph.c.x" \xB6
|
||||
"{ObjDir}ftgxval.c.x" \xB6
|
||||
"{ObjDir}ftinit.c.x" \xB6
|
||||
"{ObjDir}ftmm.c.x" \xB6
|
||||
"{ObjDir}ftotval.c.x" \xB6
|
||||
"{ObjDir}ftpfr.c.x" \xB6
|
||||
"{ObjDir}ftstroke.c.x" \xB6
|
||||
"{ObjDir}ftsynth.c.x" \xB6
|
||||
"{ObjDir}ftsystem.c.x" \xB6
|
||||
"{ObjDir}fttype1.c.x" \xB6
|
||||
"{ObjDir}ftwinfnt.c.x" \xB6
|
||||
"{ObjDir}ftcache.c.x" \xB6
|
||||
"{ObjDir}bdf.c.x" \xB6
|
||||
"{ObjDir}cff.c.x" \xB6
|
||||
"{ObjDir}type1cid.c.x" \xB6
|
||||
"{ObjDir}gxvalid.c.x" \xB6
|
||||
"{ObjDir}ftgzip.c.x" \xB6
|
||||
"{ObjDir}ftbzip2.c.x" \xB6
|
||||
"{ObjDir}ftlzw.c.x" \xB6
|
||||
"{ObjDir}otvalid.c.x" \xB6
|
||||
"{ObjDir}pcf.c.x" \xB6
|
||||
"{ObjDir}pfr.c.x" \xB6
|
||||
"{ObjDir}psaux.c.x" \xB6
|
||||
"{ObjDir}pshinter.c.x" \xB6
|
||||
"{ObjDir}psmodule.c.x" \xB6
|
||||
"{ObjDir}raster.c.x" \xB6
|
||||
"{ObjDir}sfnt.c.x" \xB6
|
||||
"{ObjDir}smooth.c.x" \xB6
|
||||
"{ObjDir}truetype.c.x" \xB6
|
||||
"{ObjDir}type1.c.x" \xB6
|
||||
"{ObjDir}type42.c.x" \xB6
|
||||
"{ObjDir}winfnt.c.x"
|
||||
|
||||
|
||||
### Libraries ###
|
||||
|
||||
LibFiles-PPC =
|
||||
|
||||
|
||||
### Default Rules ###
|
||||
|
||||
.c.x \xC4 .c {\xA5MondoBuild\xA5}
|
||||
{PPCC} {depDir}{default}.c -o {targDir}{default}.c.x {PPCCOptions}
|
||||
|
||||
|
||||
### Build Rules ###
|
||||
|
||||
:builds:mac:ftbase.c \xC4\xC4 :src:base:ftbase.c
|
||||
Duplicate :src:base:ftbase.c :builds:mac:ftbase.c
|
||||
|
||||
"{ObjDir}ftbase.c.x" \xC4\xC4 :builds:mac:ftbase.c
|
||||
{PPCC} :builds:mac:ftbase.c -o "{ObjDir}ftbase.c.x" \xB6
|
||||
-i :builds:mac: \xB6
|
||||
-i :src:base: \xB6
|
||||
{PPCCOptions}
|
||||
|
||||
FreeType.ppc_classic \xC4\xC4 FreeType.ppc_classic.o
|
||||
|
||||
FreeType.ppc_classic.o \xC4\xC4 {ObjFiles-PPC} {LibFiles-PPC} {\xA5MondoBuild\xA5}
|
||||
PPCLink \xB6
|
||||
-o {Targ} \xB6
|
||||
{ObjFiles-PPC} \xB6
|
||||
{LibFiles-PPC} \xB6
|
||||
{Sym-PPC} \xB6
|
||||
-mf -d \xB6
|
||||
-t 'XCOF' \xB6
|
||||
-c 'MPS ' \xB6
|
||||
-xm l
|
||||
|
||||
|
||||
|
||||
### Required Dependencies ###
|
||||
|
||||
"{ObjDir}autofit.c.x" \xC4 :src:autofit:autofit.c
|
||||
# "{ObjDir}ftbase.c.x" \xC4 :builds:mac:ftbase.c
|
||||
"{ObjDir}ftbbox.c.x" \xC4 :src:base:ftbbox.c
|
||||
"{ObjDir}ftbdf.c.x" \xC4 :src:base:ftbdf.c
|
||||
"{ObjDir}ftbitmap.c.x" \xC4 :src:base:ftbitmap.c
|
||||
"{ObjDir}ftdebug.c.x" \xC4 :src:base:ftdebug.c
|
||||
"{ObjDir}ftfstype.c.x" \xC4 :src:base:ftfstype.c
|
||||
"{ObjDir}ftglyph.c.x" \xC4 :src:base:ftglyph.c
|
||||
"{ObjDir}ftgxval.c.x" \xC4 :src:base:ftgxval.c
|
||||
"{ObjDir}ftinit.c.x" \xC4 :src:base:ftinit.c
|
||||
"{ObjDir}ftmm.c.x" \xC4 :src:base:ftmm.c
|
||||
"{ObjDir}ftotval.c.x" \xC4 :src:base:ftotval.c
|
||||
"{ObjDir}ftpfr.c.x" \xC4 :src:base:ftpfr.c
|
||||
"{ObjDir}ftstroke.c.x" \xC4 :src:base:ftstroke.c
|
||||
"{ObjDir}ftsynth.c.x" \xC4 :src:base:ftsynth.c
|
||||
"{ObjDir}ftsystem.c.x" \xC4 :src:base:ftsystem.c
|
||||
"{ObjDir}fttype1.c.x" \xC4 :src:base:fttype1.c
|
||||
"{ObjDir}ftwinfnt.c.x" \xC4 :src:base:ftwinfnt.c
|
||||
"{ObjDir}ftcache.c.x" \xC4 :src:cache:ftcache.c
|
||||
"{ObjDir}bdf.c.x" \xC4 :src:bdf:bdf.c
|
||||
"{ObjDir}cff.c.x" \xC4 :src:cff:cff.c
|
||||
"{ObjDir}type1cid.c.x" \xC4 :src:cid:type1cid.c
|
||||
"{ObjDir}gxvalid.c.x" \xC4 :src:gxvalid:gxvalid.c
|
||||
"{ObjDir}ftgzip.c.x" \xC4 :src:gzip:ftgzip.c
|
||||
"{ObjDir}ftbzip2.c.x" \xC4 :src:bzip2:ftbzip2.c
|
||||
"{ObjDir}ftlzw.c.x" \xC4 :src:lzw:ftlzw.c
|
||||
"{ObjDir}otvalid.c.x" \xC4 :src:otvalid:otvalid.c
|
||||
"{ObjDir}pcf.c.x" \xC4 :src:pcf:pcf.c
|
||||
"{ObjDir}pfr.c.x" \xC4 :src:pfr:pfr.c
|
||||
"{ObjDir}psaux.c.x" \xC4 :src:psaux:psaux.c
|
||||
"{ObjDir}pshinter.c.x" \xC4 :src:pshinter:pshinter.c
|
||||
"{ObjDir}psmodule.c.x" \xC4 :src:psnames:psmodule.c
|
||||
"{ObjDir}raster.c.x" \xC4 :src:raster:raster.c
|
||||
"{ObjDir}sfnt.c.x" \xC4 :src:sfnt:sfnt.c
|
||||
"{ObjDir}smooth.c.x" \xC4 :src:smooth:smooth.c
|
||||
"{ObjDir}truetype.c.x" \xC4 :src:truetype:truetype.c
|
||||
"{ObjDir}type1.c.x" \xC4 :src:type1:type1.c
|
||||
"{ObjDir}type42.c.x" \xC4 :src:type42:type42.c
|
||||
"{ObjDir}winfnt.c.x" \xC4 :src:winfonts:winfnt.c
|
||||
|
||||
|
||||
|
||||
### Optional Dependencies ###
|
||||
### Build this target to generate "include file" dependencies. ###
|
||||
|
||||
Dependencies \xC4 $OutOfDate
|
||||
MakeDepend \xB6
|
||||
-append {MAKEFILE} \xB6
|
||||
-ignore "{CIncludes}" \xB6
|
||||
-objdir "{ObjDir}" \xB6
|
||||
-objext .x \xB6
|
||||
{Includes} \xB6
|
||||
{SrcFiles}
|
||||
|
||||
|
|
@ -1,393 +0,0 @@
|
|||
This folder contains
|
||||
|
||||
* Makefile skeletons for Apple MPW (Macintosh's Programmer's Workshop)
|
||||
|
||||
* Python script to generate MPW makefile from skeleton
|
||||
|
||||
* Metrowerks CodeWarrior 9.0 project file in XML format
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
1. What is this
|
||||
---------------
|
||||
|
||||
Files in this directory are designed to build FreeType
|
||||
running on classic MacOS. To build FreeType running on
|
||||
Mac OS X, build as the system is UNIX.
|
||||
|
||||
However, Mac OS X is most useful to manipulate files in
|
||||
vanilla FreeType to fit classic MacOS.
|
||||
|
||||
The information about MacOS specific API is written in
|
||||
appendix of this document.
|
||||
|
||||
2. Requirement
|
||||
--------------
|
||||
|
||||
You can use MPW: a free-charged developer environment
|
||||
by Apple, or CodeWarrior: a commercial developer
|
||||
environment by Metrowerks. GCC for MPW and Symantec
|
||||
"Think C" are not tested at present.
|
||||
|
||||
|
||||
2-1. Apple MPW
|
||||
--------------
|
||||
|
||||
Following C compilers are tested:
|
||||
|
||||
m68k target: Apple SC 8.9.0d3e1
|
||||
ppc target: Apple MrC 5.0.0d3c1
|
||||
|
||||
The final MPW-GM (official release on 1999/Dec) is too
|
||||
old and cannot compile FreeType, because bundled C
|
||||
compilers cannot search header files in sub directories.
|
||||
Updating by the final MPW-PR (pre-release on 2001/Feb)
|
||||
is required.
|
||||
|
||||
Required files are downloadable from:
|
||||
|
||||
http://macintoshgarden.org/apps/macintosh-programmers-workshop
|
||||
|
||||
Also you can find documents how to update by MPW-PR.
|
||||
|
||||
Python is required to restore MPW makefiles from the
|
||||
skeletons. Python bundled to Mac OS X is enough. For
|
||||
classic MacOS, MacPython is available:
|
||||
|
||||
https://homepages.cwi.nl/~jack/macpython/
|
||||
|
||||
MPW requires all files are typed by resource fork.
|
||||
ResEdit bundled to MPW is enough. In Mac OS X,
|
||||
/Developer/Tools/SetFile of DevTool is useful to
|
||||
manipulate from commandline.
|
||||
|
||||
2-2. Metrowerks CodeWarrior
|
||||
---------------------------
|
||||
|
||||
XML project file is generated and tested by
|
||||
CodeWarrior 9.0. Older versions are not tested
|
||||
at all. At present, static library for ppc target
|
||||
is available in the project file.
|
||||
|
||||
|
||||
3. How to build
|
||||
---------------
|
||||
|
||||
3-1. Apple MPW
|
||||
--------------
|
||||
Detailed building procedure by Apple MPW is
|
||||
described in following.
|
||||
|
||||
3-1-1. Generate MPW makefiles from the skeletons
|
||||
------------------------------------------------
|
||||
|
||||
Here are 4 skeletons for following targets are
|
||||
included.
|
||||
|
||||
- FreeType.m68k_far.make.txt
|
||||
Ancient 32bit binary executable format for
|
||||
m68k MacOS: System 6, with 32bit addressing
|
||||
mode (far-pointer-model) So-called "Toolbox"
|
||||
API is used.
|
||||
|
||||
- FreeType.m68k_cfm.make.txt
|
||||
CFM binary executable format for m68k MacOS:
|
||||
System 7. So-called "Toolbox" API is used.
|
||||
|
||||
- FreeType.ppc_classic.make.txt
|
||||
CFM binary executable format for ppc MacOS:
|
||||
System 7, MacOS 8, MacOS 9. So-called "Toolbox"
|
||||
API is used.
|
||||
|
||||
- FreeType.ppc_carbon.make.txt
|
||||
CFM binary executable format for ppc MacOS:
|
||||
MacOS 9. Carbon API is used.
|
||||
|
||||
At present, static library is only supported,
|
||||
although targets except of m68k_far are capable
|
||||
to use shared library.
|
||||
|
||||
MPW makefile syntax uses 8bit characters. To keep
|
||||
from violating them during version control, here
|
||||
we store skeletons in pure ASCII format. You must
|
||||
generate MPW makefile by Python script ascii2mpw.py.
|
||||
|
||||
In Mac OS X terminal, you can convert as:
|
||||
|
||||
python builds/mac/ascii2mpw.py \
|
||||
< builds/mac/FreeType.m68k_far.make.txt \
|
||||
> FreeType.m68k_far.make
|
||||
|
||||
The skeletons are designed to use in the top
|
||||
directory where there are builds, include, src etc.
|
||||
You must name the generated MPW makefile by removing
|
||||
".txt" from source skeleton name.
|
||||
|
||||
3-1-2. Add resource forks to related files
|
||||
------------------------------------------
|
||||
|
||||
MPW's Make and C compilers cannot recognize files
|
||||
without resource fork. You have to add resource
|
||||
fork to the files that MPW uses. In Mac OS X
|
||||
terminal of the system, you can do as:
|
||||
|
||||
find . -name '*.[ch]' -exec \
|
||||
/Developer/Tools/SetFile -a l -c "MPS " -t TEXT \{\} \;
|
||||
|
||||
find . -name '*.make' -exec \
|
||||
/Developer/Tools/SetFile -a l -c "MPS " -t TEXT \{\} \;
|
||||
|
||||
|
||||
3-1-3. Open MPW shell and build
|
||||
-------------------------------
|
||||
|
||||
Open MPW shell and go to the top directory that
|
||||
FreeType sources are extracted (MPW makefile must
|
||||
be located in there), from "Set Directory" in
|
||||
"Directory" menu.
|
||||
|
||||
Choose "Build" from "Build" menu, and type the
|
||||
name of project by removing ".make" from MPW
|
||||
makefile, as: FreeType.m68k_far
|
||||
|
||||
If building is successfully finished, you can find
|
||||
built library in objs/ directory.
|
||||
|
||||
|
||||
3-2. Metrowerks CodeWarrior
|
||||
---------------------------
|
||||
|
||||
Detailed building procedure by Metrowerks
|
||||
CodeWarrior (CW) 9.0 is described in following.
|
||||
|
||||
3-2-1. Import XML project file
|
||||
------------------------------
|
||||
|
||||
CW XML project file is not ready for double-
|
||||
click. Start CodeWarrior IDE, and choose
|
||||
"Import project" in "File" menu. Choose XML
|
||||
project file: builds/mac/ftlib.prj.xml.
|
||||
In next, you will be asked where to save CW
|
||||
native project file: you must choose
|
||||
"builds/mac/ftlib.prj". The project file is
|
||||
designed with relative path from there. After
|
||||
CW native project file is generated, it is
|
||||
automatically loaded, small project window
|
||||
titled "ftlib.prj" is displayed.
|
||||
|
||||
3-2-2. Building
|
||||
---------------
|
||||
Choose "Make" from "Project" menu. If building
|
||||
is successfully finished, you can find built
|
||||
library at objs/FreeTypeLib.
|
||||
|
||||
4. TODO
|
||||
-------
|
||||
|
||||
4-1. All modules should be included
|
||||
-----------------------------------
|
||||
|
||||
At present, MPW makefiles and CW project file are
|
||||
just updated versions of these by Leonard. Some
|
||||
modules are added after the last maintenance, they
|
||||
are not included.
|
||||
|
||||
4-2. Working test with ftdemos
|
||||
------------------------------
|
||||
|
||||
At present, MPW makefiles and CW project file can
|
||||
build FreeType for classic MacOS. But their working
|
||||
behaviours are not tested at all. Building ftdemos
|
||||
for classic MacOS and working test is required.
|
||||
|
||||
|
||||
APPENDIX I
|
||||
----------
|
||||
|
||||
A-1. Framework dependencies
|
||||
---------------------------
|
||||
|
||||
src/base/ftmac.c adds two Mac-specific features to
|
||||
FreeType. These features are based on MacOS libraries.
|
||||
|
||||
* accessing resource-fork font
|
||||
The fonts for classic MacOS store their graphical data
|
||||
in resource forks which cannot be accessed via ANSI C
|
||||
functions. FreeType2 provides functions to handle such
|
||||
resource fork fonts, they are based on File Manager
|
||||
framework of MacOS. In addition, HFS and HFS+ file
|
||||
system driver of Linux is supported. Following
|
||||
functions are for this purpose.
|
||||
|
||||
FT_New_Face_From_Resource()
|
||||
FT_New_Face_From_FSSpec()
|
||||
FT_New_Face_From_FSRef()
|
||||
|
||||
* resolving font name to font file
|
||||
The font menu of MacOS application prefers font name
|
||||
written in FOND resource than sfnt resource. FreeType2
|
||||
provides functions to find font file by name in MacOS
|
||||
application, they are based on QuickDraw Font Manager
|
||||
and Apple Type Service framework of MacOS.
|
||||
|
||||
FT_GetFile_From_Mac_Name()
|
||||
FT_GetFile_From_Mac_ATS_Name()
|
||||
|
||||
Working functions for each MacOS are summarized as
|
||||
following.
|
||||
|
||||
upto MacOS 6:
|
||||
not tested (you have to obtain MPW 2.x)
|
||||
|
||||
MacOS 7.x, 8.x, 9.x (without CarbonLib):
|
||||
FT_GetFile_From_Mac_Name()
|
||||
FT_New_Face_From_Resource()
|
||||
FT_New_Face_From_FSSpec()
|
||||
|
||||
MacOS 9.x (with CarbonLib):
|
||||
FT_GetFile_From_Mac_Name()
|
||||
FT_New_Face_From_Resource()
|
||||
FT_New_Face_From_FSSpec()
|
||||
FT_New_Face_From_FSRef()
|
||||
|
||||
Mac OS X upto 10.4.x:
|
||||
FT_GetFile_From_Mac_Name() deprecated
|
||||
FT_New_Face_From_FSSpec() deprecated
|
||||
FT_GetFile_From_Mac_ATS_Name() deprecated?
|
||||
FT_New_Face_From_FSRef()
|
||||
|
||||
A-2. Deprecated Functions
|
||||
-------------------------
|
||||
|
||||
A-2-1. FileManager
|
||||
------------------
|
||||
|
||||
For convenience to write MacOS application, ftmac.c
|
||||
provides functions to specify a file by FSSpec and FSRef,
|
||||
because the file identification pathname had ever been
|
||||
unrecommended method in MacOS programming.
|
||||
|
||||
Toward to MacOS X 10.4 & 5, Carbon functions using FSSpec
|
||||
datatype is noticed as deprecated, and recommended to
|
||||
migrate to FSRef datatype. The big differences of FSRef
|
||||
against FSSpec are explained in Apple TechNotes 2078.
|
||||
|
||||
https://developer.apple.com/library/archive/technotes/tn2078/
|
||||
|
||||
- filename length: the max length of file
|
||||
name of FSRef is 255 chars (it is limit of HFS+),
|
||||
that of FSSpec is 31 chars (it is limit of HFS).
|
||||
|
||||
- filename encoding: FSSpec is localized by
|
||||
legacy encoding for each language system,
|
||||
FSRef is Unicode enabled.
|
||||
|
||||
A-2-2. FontManager
|
||||
------------------
|
||||
|
||||
Following functions receive QuickDraw fontname:
|
||||
|
||||
FT_GetFile_From_Mac_Name()
|
||||
|
||||
QuickDraw is deprecated and replaced by Quartz
|
||||
since Mac OS X 10.4. They are still kept for
|
||||
backward compatibility. By undefinition of
|
||||
HAVE_QUICKDRAW in building, you can change these
|
||||
functions to return FT_Err_Unimplemented always.
|
||||
|
||||
Replacement functions are added for migration.
|
||||
|
||||
FT_GetFile_From_Mac_ATS_Name()
|
||||
|
||||
They are usable on Mac OS X only. On older systems,
|
||||
these functions return FT_Err_Unimplemented always.
|
||||
|
||||
The detailed incompatibilities and possibility
|
||||
of FontManager emulation without QuickDraw is
|
||||
explained in
|
||||
|
||||
http://gyvern.ipc.hiroshima-u.ac.jp/~mpsuzuki/ats_benchmark.html
|
||||
|
||||
A-3. Framework Availabilities
|
||||
-----------------------------
|
||||
|
||||
The framework of MacOS are often revised, especially
|
||||
when new format of binary executable is introduced.
|
||||
Following table is the minimum version of frameworks
|
||||
to use functions used in FreeType2. The table is
|
||||
extracted from MPW header files for assembly language.
|
||||
|
||||
*** NOTE ***
|
||||
The conditional definition of available data type
|
||||
in MPW compiler is insufficient. You can compile
|
||||
program using FSRef data type for older systems
|
||||
(MacOS 7, 8) that don't know FSRef data type.
|
||||
|
||||
|
||||
+-------------------+-----------------------------+
|
||||
CPU | mc680x0 | PowerPC |
|
||||
+---------+---------+---------+---------+---------+
|
||||
Binary Executable Format | Classic | 68K-CFM | CFM | CFM | Mach-O |
|
||||
+---------+---------+---------+---------+---------+
|
||||
Framework API | Toolbox | Toolbox | Toolbox | Carbon | Carbon |
|
||||
+---------+---------+---------+---------+---------+
|
||||
|
||||
+---------+---------+---------+---------+---------+
|
||||
| ?(*) |Interface|Interface|CarbonLib|Mac OS X |
|
||||
| |Lib |Lib | | |
|
||||
* Files.h +---------+---------+---------+---------+---------+
|
||||
PBGetFCBInfoSync() | o | 7.1- | 7.1- | 1.0- | o |
|
||||
FSMakeFSSpec() | o | 7.1- | 7.1- | 1.0- | o |
|
||||
FSGetForkCBInfo() | o | (**) | 9.0- | 1.0- | o |
|
||||
FSpMakeFSRef() | o | (**) | 9.0- | 1.0- | o |
|
||||
FSGetCatalogInfo() | o | (**) | 9.0- | 1.0- | -10.3 |
|
||||
FSPathMakeRef() | x | x | x | 1.1- | -10.3 |
|
||||
+---------+---------+---------+---------+---------+
|
||||
|
||||
+---------+---------+---------+---------+---------+
|
||||
| ?(*) |Font |Font |CarbonLib|Mac OS X |
|
||||
| |Manager |Manager | | |
|
||||
* Fonts.h +---------+---------+---------+---------+---------+
|
||||
FMCreateFontFamilyIterator() | x | x | 9.0- | 1.0- | -10.3 |
|
||||
FMDisposeFontFamilyIterator() | x | x | 9.0- | 1.0- | -10.3 |
|
||||
FMGetNextFontFamily() | x | x | 9.0- | 1.0- | -10.3 |
|
||||
FMGetFontFamilyName() | x | x | 9.0- | 1.0- | -10.3 |
|
||||
FMCreateFontFamilyInstanceIterator() | x | x | 9.0- | 1.0- | -10.3 |
|
||||
FMDisposeFontFamilyInstanceIterator() | x | x | 9.0- | 1.0- | -10.3 |
|
||||
FMGetNextFontFamilyInstance() | x | x | 9.0- | 1.0- | -10.3 |
|
||||
+---------+---------+---------+---------+---------+
|
||||
|
||||
+---------+---------+---------+---------+---------+
|
||||
| - | - | - |CarbonLib|Mac OS X |
|
||||
* ATSFont.h (***) +---------+---------+---------+---------+---------+
|
||||
ATSFontFindFromName() | x | x | x | x | o |
|
||||
ATSFontGetFileSpecification() | x | x | x | x | o |
|
||||
+---------+---------+---------+---------+---------+
|
||||
|
||||
(*)
|
||||
In the "Classic": the original binary executable
|
||||
format, these framework functions are directly
|
||||
transformed to MacOS system call. Therefore, the
|
||||
exact availability should be checked by running
|
||||
system.
|
||||
|
||||
(**)
|
||||
InterfaceLib is bundled to MacOS and its version
|
||||
is usually equal to MacOS. There's no separate
|
||||
update for InterfaceLib. It is supposed that
|
||||
there's no InterfaceLib 9.x for m68k platforms.
|
||||
In fact, these functions are FSRef dependent.
|
||||
|
||||
(***)
|
||||
ATSUI framework is available on ATSUnicode 8.5 on
|
||||
ppc Toolbox CFM, CarbonLib 1.0 too. But its base:
|
||||
ATS font manager is not published in these versions.
|
||||
|
||||
------------------------------------------------------------
|
||||
Last update: 2013-Nov-03.
|
||||
|
||||
Currently maintained by
|
||||
suzuki toshiya, <mpsuzuki@hiroshima-u.ac.jp>
|
||||
Originally prepared by
|
||||
Leonard Rosenthol, <leonardr@lazerware.com>
|
||||
Just van Rossum, <just@letterror.com>
|
|
@ -1,24 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
import sys
|
||||
import string
|
||||
|
||||
if len( sys.argv ) == 1 :
|
||||
for asc_line in sys.stdin.readlines():
|
||||
mpw_line = string.replace(asc_line, "\\xA5", "\245")
|
||||
mpw_line = string.replace(mpw_line, "\\xB6", "\266")
|
||||
mpw_line = string.replace(mpw_line, "\\xC4", "\304")
|
||||
mpw_line = string.replace(mpw_line, "\\xC5", "\305")
|
||||
mpw_line = string.replace(mpw_line, "\\xFF", "\377")
|
||||
mpw_line = string.replace(mpw_line, "\n", "\r")
|
||||
mpw_line = string.replace(mpw_line, "\\n", "\n")
|
||||
sys.stdout.write(mpw_line)
|
||||
elif sys.argv[1] == "-r" :
|
||||
for mpw_line in sys.stdin.readlines():
|
||||
asc_line = string.replace(mpw_line, "\n", "\\n")
|
||||
asc_line = string.replace(asc_line, "\r", "\n")
|
||||
asc_line = string.replace(asc_line, "\245", "\\xA5")
|
||||
asc_line = string.replace(asc_line, "\266", "\\xB6")
|
||||
asc_line = string.replace(asc_line, "\304", "\\xC4")
|
||||
asc_line = string.replace(asc_line, "\305", "\\xC5")
|
||||
asc_line = string.replace(asc_line, "\377", "\\xFF")
|
||||
sys.stdout.write(asc_line)
|
|
@ -1,36 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
|
||||
"https://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
|
||||
<plist version="1.0">
|
||||
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>freetype</string>
|
||||
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>FreeType ${PROJECT_VERSION}</string>
|
||||
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
|
||||
<key>CFBundleName</key>
|
||||
<string>FreeType</string>
|
||||
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${PROJECT_VERSION}</string>
|
||||
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${PROJECT_VERSION}</string>
|
||||
</dict>
|
||||
|
||||
</plist>
|
File diff suppressed because it is too large
Load diff
1542
builds/mac/ftmac.c
1542
builds/mac/ftmac.c
File diff suppressed because it is too large
Load diff
|
@ -1,117 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2020-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
"""Extract the FreeType version numbers from `<freetype/freetype.h>`.
|
||||
|
||||
This script parses the header to extract the version number defined there.
|
||||
By default, the full dotted version number is printed, but `--major`,
|
||||
`--minor` or `--patch` can be used to only print one of these values
|
||||
instead.
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
# Expected input:
|
||||
#
|
||||
# ...
|
||||
# #define FREETYPE_MAJOR 2
|
||||
# #define FREETYPE_MINOR 10
|
||||
# #define FREETYPE_PATCH 2
|
||||
# ...
|
||||
|
||||
RE_MAJOR = re.compile(r"^ \#define \s+ FREETYPE_MAJOR \s+ (.*) $", re.X)
|
||||
RE_MINOR = re.compile(r"^ \#define \s+ FREETYPE_MINOR \s+ (.*) $", re.X)
|
||||
RE_PATCH = re.compile(r"^ \#define \s+ FREETYPE_PATCH \s+ (.*) $", re.X)
|
||||
|
||||
|
||||
def parse_freetype_header(header):
|
||||
major = None
|
||||
minor = None
|
||||
patch = None
|
||||
|
||||
for line in header.splitlines():
|
||||
line = line.rstrip()
|
||||
m = RE_MAJOR.match(line)
|
||||
if m:
|
||||
assert major == None, "FREETYPE_MAJOR appears more than once!"
|
||||
major = m.group(1)
|
||||
continue
|
||||
|
||||
m = RE_MINOR.match(line)
|
||||
if m:
|
||||
assert minor == None, "FREETYPE_MINOR appears more than once!"
|
||||
minor = m.group(1)
|
||||
continue
|
||||
|
||||
m = RE_PATCH.match(line)
|
||||
if m:
|
||||
assert patch == None, "FREETYPE_PATCH appears more than once!"
|
||||
patch = m.group(1)
|
||||
continue
|
||||
|
||||
assert (
|
||||
major and minor and patch
|
||||
), "This header is missing one of FREETYPE_MAJOR, FREETYPE_MINOR or FREETYPE_PATCH!"
|
||||
|
||||
return (major, minor, patch)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
|
||||
group = parser.add_mutually_exclusive_group()
|
||||
group.add_argument(
|
||||
"--major",
|
||||
action="store_true",
|
||||
help="Only print the major version number.",
|
||||
)
|
||||
group.add_argument(
|
||||
"--minor",
|
||||
action="store_true",
|
||||
help="Only print the minor version number.",
|
||||
)
|
||||
group.add_argument(
|
||||
"--patch",
|
||||
action="store_true",
|
||||
help="Only print the patch version number.",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"input",
|
||||
metavar="FREETYPE_H",
|
||||
help="The input freetype.h header to parse.",
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
with open(args.input) as f:
|
||||
header = f.read()
|
||||
|
||||
version = parse_freetype_header(header)
|
||||
|
||||
if args.major:
|
||||
print(version[0])
|
||||
elif args.minor:
|
||||
print(version[1])
|
||||
elif args.patch:
|
||||
print(version[2])
|
||||
else:
|
||||
print("%s.%s.%s" % version)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
|
@ -1,115 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2020-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
"""Extract the libtool version from `configure.raw`.
|
||||
|
||||
This script parses the `configure.raw` file to extract the libtool version
|
||||
number. By default, the full dotted version number is printed, but
|
||||
`--major`, `--minor` or `--patch` can be used to only print one of these
|
||||
values instead.
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
# Expected input:
|
||||
#
|
||||
# ...
|
||||
# version_info='23:2:17'
|
||||
# ...
|
||||
|
||||
RE_VERSION_INFO = re.compile(r"^version_info='(\d+):(\d+):(\d+)'")
|
||||
|
||||
|
||||
def parse_configure_raw(header):
|
||||
major = None
|
||||
minor = None
|
||||
patch = None
|
||||
|
||||
for line in header.splitlines():
|
||||
line = line.rstrip()
|
||||
m = RE_VERSION_INFO.match(line)
|
||||
if m:
|
||||
assert major == None, "version_info appears more than once!"
|
||||
major = m.group(1)
|
||||
minor = m.group(2)
|
||||
patch = m.group(3)
|
||||
continue
|
||||
|
||||
assert (
|
||||
major and minor and patch
|
||||
), "This input file is missing a version_info definition!"
|
||||
|
||||
return (major, minor, patch)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
|
||||
group = parser.add_mutually_exclusive_group()
|
||||
group.add_argument(
|
||||
"--major",
|
||||
action="store_true",
|
||||
help="Only print the major version number.",
|
||||
)
|
||||
group.add_argument(
|
||||
"--minor",
|
||||
action="store_true",
|
||||
help="Only print the minor version number.",
|
||||
)
|
||||
group.add_argument(
|
||||
"--patch",
|
||||
action="store_true",
|
||||
help="Only print the patch version number.",
|
||||
)
|
||||
group.add_argument(
|
||||
"--soversion",
|
||||
action="store_true",
|
||||
help="Only print the libtool library suffix.",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"input",
|
||||
metavar="CONFIGURE_RAW",
|
||||
help="The input configure.raw file to parse.",
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
with open(args.input) as f:
|
||||
raw_file = f.read()
|
||||
|
||||
version = parse_configure_raw(raw_file)
|
||||
|
||||
if args.major:
|
||||
print(version[0])
|
||||
elif args.minor:
|
||||
print(version[1])
|
||||
elif args.patch:
|
||||
print(version[2])
|
||||
elif args.soversion:
|
||||
# Convert libtool version_info to the library suffix.
|
||||
# (current,revision, age) -> (current - age, age, revision)
|
||||
print(
|
||||
"%d.%s.%s"
|
||||
% (int(version[0]) - int(version[2]), version[2], version[1])
|
||||
)
|
||||
else:
|
||||
print("%s.%s.%s" % version)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
|
@ -1,89 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2020-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
"""Generate FreeType reference documentation."""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import glob
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
|
||||
parser.add_argument(
|
||||
"--input-dir",
|
||||
required=True,
|
||||
help="Top-level FreeType source directory.",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--version", required=True, help='FreeType version (e.g. "2.x.y").'
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--output-dir", required=True, help="Output directory."
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# Get the list of input files of interest.
|
||||
include_dir = os.path.join(args.input_dir, "include")
|
||||
include_config_dir = os.path.join(include_dir, "config")
|
||||
include_cache_dir = os.path.join(include_dir, "cache")
|
||||
|
||||
all_headers = (
|
||||
glob.glob(os.path.join(args.input_dir, "include", "freetype", "*.h"))
|
||||
+ glob.glob(
|
||||
os.path.join(
|
||||
args.input_dir, "include", "freetype", "config", "*.h"
|
||||
)
|
||||
)
|
||||
+ glob.glob(
|
||||
os.path.join(
|
||||
args.input_dir, "include", "freetype", "cache", "*.h"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
if not os.path.exists(args.output_dir):
|
||||
os.makedirs(args.output_dir)
|
||||
else:
|
||||
assert os.path.isdir(args.output_dir), (
|
||||
"Not a directory: " + args.output_dir
|
||||
)
|
||||
|
||||
cmds = [
|
||||
sys.executable,
|
||||
"-m",
|
||||
"docwriter",
|
||||
"--prefix=ft2",
|
||||
"--title=FreeType-" + args.version,
|
||||
"--site=reference",
|
||||
"--output=" + args.output_dir,
|
||||
] + all_headers
|
||||
|
||||
print("Running docwriter...")
|
||||
subprocess.check_call(cmds)
|
||||
|
||||
print("Building static site...")
|
||||
subprocess.check_call(
|
||||
[sys.executable, "-m", "mkdocs", "build"], cwd=args.output_dir
|
||||
)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
|
@ -1,177 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2020-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
"""Parse modules.cfg and dump its output either as ftmodule.h or a list of
|
||||
base extensions.
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
# Expected input:
|
||||
#
|
||||
# ...
|
||||
# FONT_MODULES += <name>
|
||||
# HINTING_MODULES += <name>
|
||||
# RASTER_MODULES += <name>
|
||||
# AUX_MODULES += <name>
|
||||
# BASE_EXTENSIONS += <name>
|
||||
# ...
|
||||
|
||||
|
||||
def parse_modules_cfg(input_file):
|
||||
|
||||
lists = {
|
||||
"FONT_MODULES": [],
|
||||
"HINTING_MODULES": [],
|
||||
"RASTER_MODULES": [],
|
||||
"AUX_MODULES": [],
|
||||
"BASE_EXTENSIONS": [],
|
||||
}
|
||||
|
||||
for line in input_file.splitlines():
|
||||
line = line.rstrip()
|
||||
# Ignore empty lines and those that start with a comment.
|
||||
if not line or line[0] == "#":
|
||||
continue
|
||||
|
||||
items = line.split()
|
||||
assert len(items) == 3 and items[1] == "+=", (
|
||||
"Unexpected input line [%s]" % line
|
||||
)
|
||||
assert items[0] in lists, (
|
||||
"Unexpected configuration variable name " + items[0]
|
||||
)
|
||||
|
||||
lists[items[0]].append(items[2])
|
||||
|
||||
return lists
|
||||
|
||||
|
||||
def generate_ftmodule(lists):
|
||||
result = "/* This is a generated file. */\n"
|
||||
for driver in lists["FONT_MODULES"]:
|
||||
if driver == "sfnt": # Special case for the sfnt 'driver'.
|
||||
result += "FT_USE_MODULE( FT_Module_Class, sfnt_module_class )\n"
|
||||
continue
|
||||
|
||||
name = {
|
||||
"truetype": "tt",
|
||||
"type1": "t1",
|
||||
"cid": "t1cid",
|
||||
"type42": "t42",
|
||||
"winfonts": "winfnt",
|
||||
}.get(driver, driver)
|
||||
result += (
|
||||
"FT_USE_MODULE( FT_Driver_ClassRec, %s_driver_class )\n" % name
|
||||
)
|
||||
|
||||
for module in lists["HINTING_MODULES"]:
|
||||
result += (
|
||||
"FT_USE_MODULE( FT_Module_Class, %s_module_class )\n" % module
|
||||
)
|
||||
|
||||
for module in lists["RASTER_MODULES"]:
|
||||
names = {
|
||||
"raster": ("ft_raster1",),
|
||||
"smooth": ("ft_smooth",),
|
||||
"svg": ("ft_svg",),
|
||||
"sdf": ("ft_sdf", "ft_bitmap_sdf"),
|
||||
}.get(module)
|
||||
for name in names:
|
||||
result += (
|
||||
"FT_USE_MODULE( FT_Renderer_Class, %s_renderer_class )\n" % name
|
||||
)
|
||||
|
||||
for module in lists["AUX_MODULES"]:
|
||||
if module in ("psaux", "psnames", "otvalid", "gxvalid"):
|
||||
name = {
|
||||
"gxvalid": "gxv",
|
||||
"otvalid": "otv",
|
||||
}.get(module, module)
|
||||
result += (
|
||||
"FT_USE_MODULE( FT_Module_Class, %s_module_class )\n" % name
|
||||
)
|
||||
|
||||
result += "/* EOF */\n"
|
||||
return result
|
||||
|
||||
|
||||
def generate_main_modules(lists):
|
||||
return "\n".join(
|
||||
lists["FONT_MODULES"]
|
||||
+ lists["HINTING_MODULES"]
|
||||
+ lists["RASTER_MODULES"]
|
||||
)
|
||||
|
||||
|
||||
def generate_aux_modules(lists):
|
||||
return "\n".join(lists["AUX_MODULES"])
|
||||
|
||||
|
||||
def generate_base_extensions(lists):
|
||||
return "\n".join(lists["BASE_EXTENSIONS"])
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
|
||||
parser.add_argument(
|
||||
"--format",
|
||||
required=True,
|
||||
choices=(
|
||||
"ftmodule.h",
|
||||
"main-modules",
|
||||
"aux-modules",
|
||||
"base-extensions-list",
|
||||
),
|
||||
help="Select output format.",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"input",
|
||||
metavar="CONFIGURE_RAW",
|
||||
help="The input configure.raw file to parse.",
|
||||
)
|
||||
|
||||
parser.add_argument("--output", help="Output file (default is stdout).")
|
||||
|
||||
args = parser.parse_args()
|
||||
with open(args.input) as f:
|
||||
input_data = f.read()
|
||||
|
||||
lists = parse_modules_cfg(input_data)
|
||||
|
||||
if args.format == "ftmodule.h":
|
||||
result = generate_ftmodule(lists)
|
||||
elif args.format == "main-modules":
|
||||
result = generate_main_modules(lists)
|
||||
elif args.format == "aux-modules":
|
||||
result = generate_aux_modules(lists)
|
||||
elif args.format == "base-extensions-list":
|
||||
result = generate_base_extensions(lists)
|
||||
else:
|
||||
assert False, "Invalid output format!"
|
||||
|
||||
if args.output:
|
||||
with open(args.output, "w") as f:
|
||||
f.write(result)
|
||||
else:
|
||||
print(result)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
|
@ -1,115 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2020-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
"""Toggle settings in `ftoption.h` file based on command-line arguments.
|
||||
|
||||
This script takes an `ftoption.h` file as input and rewrites
|
||||
`#define`/`#undef` lines in it based on `--enable=CONFIG_VARNAME` or
|
||||
`--disable=CONFIG_VARNAME` arguments passed to it, where `CONFIG_VARNAME` is
|
||||
configuration variable name, such as `FT_CONFIG_OPTION_USE_LZW`, that may
|
||||
appear in the file.
|
||||
|
||||
Note that if one of `CONFIG_VARNAME` is not found in the input file, this
|
||||
script exits with an error message listing the missing variable names.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
|
||||
parser.add_argument(
|
||||
"input", metavar="FTOPTION_H", help="Path to input ftoption.h file."
|
||||
)
|
||||
|
||||
parser.add_argument("--output", help="Output to file instead of stdout.")
|
||||
|
||||
parser.add_argument(
|
||||
"--enable",
|
||||
action="append",
|
||||
default=[],
|
||||
help="Enable a given build option (e.g. FT_CONFIG_OPTION_USE_LZW).",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--disable",
|
||||
action="append",
|
||||
default=[],
|
||||
help="Disable a given build option.",
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
common_options = set(args.enable) & set(args.disable)
|
||||
if common_options:
|
||||
parser.error(
|
||||
"Options cannot be both enabled and disabled: %s"
|
||||
% sorted(common_options)
|
||||
)
|
||||
return 1
|
||||
|
||||
with open(args.input) as f:
|
||||
input_file = f.read()
|
||||
|
||||
options_seen = set()
|
||||
|
||||
new_lines = []
|
||||
for line in input_file.splitlines():
|
||||
# Expected formats:
|
||||
# #define <CONFIG_VAR>
|
||||
# /* #define <CONFIG_VAR> */
|
||||
# #undef <CONFIG_VAR>
|
||||
line = line.rstrip()
|
||||
if line.startswith("/* #define ") and line.endswith(" */"):
|
||||
option_name = line[11:-3].strip()
|
||||
option_enabled = False
|
||||
elif line.startswith("#define "):
|
||||
option_name = line[8:].strip()
|
||||
option_enabled = True
|
||||
elif line.startswith("#undef "):
|
||||
option_name = line[7:].strip()
|
||||
option_enabled = False
|
||||
else:
|
||||
new_lines.append(line)
|
||||
continue
|
||||
|
||||
options_seen.add(option_name)
|
||||
if option_enabled and option_name in args.disable:
|
||||
line = "#undef " + option_name
|
||||
elif not option_enabled and option_name in args.enable:
|
||||
line = "#define " + option_name
|
||||
new_lines.append(line)
|
||||
|
||||
result = "\n".join(new_lines) + "\n"
|
||||
|
||||
# Sanity check that all command-line options were actually processed.
|
||||
cmdline_options = set(args.enable) | set(args.disable)
|
||||
assert cmdline_options.issubset(
|
||||
options_seen
|
||||
), "Could not find options in input file: " + ", ".join(
|
||||
sorted(cmdline_options - options_seen)
|
||||
)
|
||||
|
||||
if args.output:
|
||||
with open(args.output, "w") as f:
|
||||
f.write(result)
|
||||
else:
|
||||
print(result)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
|
@ -1,79 +0,0 @@
|
|||
#
|
||||
# FreeType 2 modules sub-Makefile
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# DO NOT INVOKE THIS MAKEFILE DIRECTLY! IT IS MEANT TO BE INCLUDED BY
|
||||
# OTHER MAKEFILES.
|
||||
|
||||
|
||||
# This file is in charge of handling the generation of the modules list
|
||||
# file.
|
||||
|
||||
|
||||
# Build the modules list.
|
||||
#
|
||||
$(FTMODULE_H): $(MODULES_CFG)
|
||||
$(FTMODULE_H_INIT)
|
||||
$(FTMODULE_H_CREATE)
|
||||
$(FTMODULE_H_DONE)
|
||||
|
||||
ifneq ($(findstring $(PLATFORM),dos windows os2),)
|
||||
OPEN_MODULE := @echo$(space)
|
||||
CLOSE_MODULE := >> $(subst /,$(SEP),$(FTMODULE_H))
|
||||
REMOVE_MODULE := @-$(DELETE) $(subst /,$(SEP),$(FTMODULE_H))
|
||||
else
|
||||
OPEN_MODULE := @echo "
|
||||
CLOSE_MODULE := " >> $(FTMODULE_H)
|
||||
REMOVE_MODULE := @-$(DELETE) $(FTMODULE_H)
|
||||
endif
|
||||
|
||||
|
||||
define FTMODULE_H_INIT
|
||||
$(REMOVE_MODULE)
|
||||
$(info Generating modules list in $(FTMODULE_H)...)
|
||||
$(OPEN_MODULE)/* This is a generated file. */$(CLOSE_MODULE)
|
||||
endef
|
||||
|
||||
# It is no mistake that the final closing parenthesis is on the
|
||||
# next line -- it produces proper newlines during the expansion
|
||||
# of `foreach'.
|
||||
#
|
||||
define FTMODULE_H_CREATE
|
||||
$(foreach COMMAND,$(FTMODULE_H_COMMANDS),$($(COMMAND))
|
||||
)
|
||||
endef
|
||||
|
||||
define FTMODULE_H_DONE
|
||||
$(OPEN_MODULE)/* EOF */$(CLOSE_MODULE)
|
||||
$(info done.)
|
||||
endef
|
||||
|
||||
|
||||
# $(OPEN_DRIVER) & $(CLOSE_DRIVER) are used to specify a given font driver
|
||||
# in the `module.mk' rules file.
|
||||
#
|
||||
OPEN_DRIVER := $(OPEN_MODULE)FT_USE_MODULE(
|
||||
CLOSE_DRIVER := )$(CLOSE_MODULE)
|
||||
|
||||
ECHO_DRIVER := @echo "* module:$(space)
|
||||
ECHO_DRIVER_DESC := (
|
||||
ECHO_DRIVER_DONE := )"
|
||||
|
||||
# Each `module.mk' in the `src/*' subdirectories adds a variable with
|
||||
# commands to $(FTMODULE_H_COMMANDS). Note that we can't use SRC_DIR here.
|
||||
#
|
||||
-include $(patsubst %,$(TOP_DIR)/src/%/module.mk,$(MODULES))
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,81 +0,0 @@
|
|||
#
|
||||
# FreeType 2 configuration file to detect an OS/2 host platform.
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
.PHONY: setup
|
||||
|
||||
|
||||
ifeq ($(PLATFORM),ansi)
|
||||
|
||||
ifdef OS2_SHELL
|
||||
|
||||
PLATFORM := os2
|
||||
|
||||
endif # test OS2_SHELL
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),os2)
|
||||
|
||||
COPY := copy
|
||||
DELETE := del
|
||||
CAT := type
|
||||
SEP := $(BACKSLASH)
|
||||
|
||||
# gcc-emx by default
|
||||
CONFIG_FILE := os2-gcc.mk
|
||||
|
||||
# additionally, we provide hooks for various other compilers
|
||||
#
|
||||
ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
|
||||
CONFIG_FILE := os2-icc.mk
|
||||
CC := icc
|
||||
|
||||
.PHONY: visualage
|
||||
visualage: setup
|
||||
@cd .
|
||||
endif
|
||||
|
||||
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
|
||||
CONFIG_FILE := os2-wat.mk
|
||||
CC := wcc386
|
||||
|
||||
.PHONY: watcom
|
||||
watcom: setup
|
||||
@cd .
|
||||
endif
|
||||
|
||||
ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C++ 32-bit
|
||||
CONFIG_FILE := os2-bcc.mk
|
||||
CC := bcc32
|
||||
|
||||
.PHONY: borlandc
|
||||
borlandc: setup
|
||||
@cd .
|
||||
endif
|
||||
|
||||
ifneq ($(findstring devel,$(MAKECMDGOALS)),) # development target
|
||||
CONFIG_FILE := os2-dev.mk
|
||||
CC := gcc
|
||||
|
||||
.PHONY: devel
|
||||
devel: setup
|
||||
@cd .
|
||||
endif
|
||||
|
||||
setup: std_setup
|
||||
|
||||
endif # test PLATFORM os2
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,48 +0,0 @@
|
|||
#
|
||||
# FreeType 2 OS/2 specific definitions
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
DELETE := del
|
||||
CAT := type
|
||||
SEP := $(strip \ )
|
||||
PLATFORM_DIR := $(TOP_DIR)/builds/os2
|
||||
PLATFORM := os2
|
||||
|
||||
# This is used for `make refdoc' and `make refdoc-venv'
|
||||
#
|
||||
BIN := Scripts
|
||||
|
||||
# The executable file extension (for tools), *with* leading dot.
|
||||
#
|
||||
E := .exe
|
||||
|
||||
# The directory where all library files are placed.
|
||||
#
|
||||
# By default, this is the same as $(OBJ_DIR); however, this can be changed
|
||||
# to suit particular needs.
|
||||
#
|
||||
LIB_DIR := $(OBJ_DIR)
|
||||
|
||||
# The name of the final library file. Note that the DOS-specific Makefile
|
||||
# uses a shorter (8.3) name.
|
||||
#
|
||||
LIBRARY := $(PROJECT)
|
||||
|
||||
|
||||
# The NO_OUTPUT macro is used to ignore the output of commands.
|
||||
#
|
||||
NO_OUTPUT = 2> nul
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,30 +0,0 @@
|
|||
#
|
||||
# FreeType 2 configuration rules for OS/2 + GCC
|
||||
#
|
||||
# Development version without optimizations.
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
DEVEL_DIR := $(TOP_DIR)/devel
|
||||
|
||||
# include OS/2-specific definitions
|
||||
include $(TOP_DIR)/builds/os2/os2-def.mk
|
||||
|
||||
# include gcc-specific definitions
|
||||
include $(TOP_DIR)/builds/compiler/gcc-dev.mk
|
||||
|
||||
# include linking instructions
|
||||
include $(TOP_DIR)/builds/link_dos.mk
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,26 +0,0 @@
|
|||
#
|
||||
# FreeType 2 configuration rules for the OS/2 + gcc
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# include OS/2-specific definitions
|
||||
include $(TOP_DIR)/builds/os2/os2-def.mk
|
||||
|
||||
# include gcc-specific definitions
|
||||
include $(TOP_DIR)/builds/compiler/gcc.mk
|
||||
|
||||
# include linking instructions
|
||||
include $(TOP_DIR)/builds/link_dos.mk
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,72 +0,0 @@
|
|||
//
|
||||
// FreeType 2 project for the symbian platform
|
||||
//
|
||||
|
||||
// Copyright (C) 2008-2024 by
|
||||
// David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
//
|
||||
// This file is part of the FreeType project, and may only be used, modified,
|
||||
// and distributed under the terms of the FreeType project license,
|
||||
// LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
// indicate that you have read the license and understand and accept it
|
||||
// fully.
|
||||
|
||||
PRJ_PLATFORMS
|
||||
DEFAULT
|
||||
|
||||
PRJ_MMPFILES
|
||||
freetype.mmp
|
||||
|
||||
PRJ_EXPORTS
|
||||
../../include/freetype/ft2build.h
|
||||
../../include/freetype/config/ftconfig.h config/ftconfig.h
|
||||
../../include/freetype/config/ftheader.h config/ftheader.h
|
||||
../../include/freetype/config/ftmodule.h config/ftmodule.h
|
||||
../../include/freetype/config/ftoption.h config/ftoption.h
|
||||
../../include/freetype/config/ftstdlib.h config/ftstdlib.h
|
||||
../../include/freetype/freetype.h freetype.h
|
||||
../../include/freetype/ftadvanc.h ftadvanc.h
|
||||
../../include/freetype/ftautoh.h ftautoh.h
|
||||
../../include/freetype/ftbbox.h ftbbox.h
|
||||
../../include/freetype/ftbdf.h ftbdf.h
|
||||
../../include/freetype/ftbitmap.h ftbitmap.h
|
||||
../../include/freetype/ftbzip2.h ftbzip2.h
|
||||
../../include/freetype/ftcache.h ftcache.h
|
||||
../../include/freetype/ftcffdrv.h ftcffdrv.h
|
||||
../../include/freetype/ftcid.h ftcid.h
|
||||
../../include/freetype/fterrdef.h fterrdef.h
|
||||
../../include/freetype/fterrors.h fterrors.h
|
||||
../../include/freetype/ftfntfmt.h ftfntfmt.h
|
||||
../../include/freetype/ftgasp.h ftgasp.h
|
||||
../../include/freetype/ftglyph.h ftglyph.h
|
||||
../../include/freetype/ftgxval.h ftgxval.h
|
||||
../../include/freetype/ftgzip.h ftgzip.h
|
||||
../../include/freetype/ftimage.h ftimage.h
|
||||
../../include/freetype/ftincrem.h ftincrem.h
|
||||
../../include/freetype/ftlcdfil.h ftlcdfil.h
|
||||
../../include/freetype/ftlist.h ftlist.h
|
||||
../../include/freetype/ftlzw.h ftlzw.h
|
||||
../../include/freetype/ftmac.h ftmac.h
|
||||
../../include/freetype/ftmm.h ftmm.h
|
||||
../../include/freetype/ftmodapi.h ftmodapi.h
|
||||
../../include/freetype/ftmoderr.h ftmoderr.h
|
||||
../../include/freetype/ftotval.h ftotval.h
|
||||
../../include/freetype/ftoutln.h ftoutln.h
|
||||
../../include/freetype/ftparams.h ftparams.h
|
||||
../../include/freetype/ftpcfdrv.h ftpcfdrv.h
|
||||
../../include/freetype/ftpfr.h ftpfr.h
|
||||
../../include/freetype/ftrender.h ftrender.h
|
||||
../../include/freetype/ftsizes.h ftsizes.h
|
||||
../../include/freetype/ftsnames.h ftsnames.h
|
||||
../../include/freetype/ftstroke.h ftstroke.h
|
||||
../../include/freetype/ftsynth.h ftsynth.h
|
||||
../../include/freetype/ftsystem.h ftsystem.h
|
||||
../../include/freetype/ftt1drv.h ftt1drv.h
|
||||
../../include/freetype/fttrigon.h fttrigon.h
|
||||
../../include/freetype/ftttdrv.h ftttdrv.h
|
||||
../../include/freetype/fttypes.h fttypes.h
|
||||
../../include/freetype/ftwinfnt.h ftwinfnt.h
|
||||
../../include/freetype/t1tables.h t1tables.h
|
||||
../../include/freetype/ttnameid.h ttnameid.h
|
||||
../../include/freetype/tttables.h tttables.h
|
||||
../../include/freetype/tttags.h tttags.h
|
|
@ -1,146 +0,0 @@
|
|||
//
|
||||
// FreeType 2 makefile for the symbian platform
|
||||
//
|
||||
|
||||
// Copyright (C) 2008-2024 by
|
||||
// David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
//
|
||||
// This file is part of the FreeType project, and may only be used, modified,
|
||||
// and distributed under the terms of the FreeType project license,
|
||||
// LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
// indicate that you have read the license and understand and accept it
|
||||
// fully.
|
||||
|
||||
target freetype.lib
|
||||
targettype lib
|
||||
|
||||
macro NDEBUG
|
||||
macro FT2_BUILD_LIBRARY
|
||||
|
||||
sourcepath ..\..\src\autofit
|
||||
|
||||
source autofit.c
|
||||
|
||||
sourcepath ..\..\src\base
|
||||
|
||||
source ftbase.c
|
||||
source ftbbox.c
|
||||
source ftbdf.c
|
||||
source ftbitmap.c
|
||||
source ftcid.c
|
||||
source ftfstype.c
|
||||
source ftgasp.c
|
||||
source ftglyph.c
|
||||
source ftgxval.c
|
||||
source ftinit.c
|
||||
source ftmm.c
|
||||
source ftotval.c
|
||||
source ftpatent.c
|
||||
source ftpfr.c
|
||||
source ftstroke.c
|
||||
source ftsynth.c
|
||||
source ftsystem.c
|
||||
source fttype1.c
|
||||
source ftwinfnt.c
|
||||
|
||||
sourcepath ..\..\src\bdf
|
||||
|
||||
source bdf.c
|
||||
|
||||
sourcepath ..\..\src\bzip2
|
||||
|
||||
source ftbzip2.c
|
||||
|
||||
sourcepath ..\..\src\cache
|
||||
|
||||
source ftcache.c
|
||||
|
||||
sourcepath ..\..\src\cff
|
||||
|
||||
source cff.c
|
||||
|
||||
sourcepath ..\..\src\cid
|
||||
|
||||
source type1cid.c
|
||||
|
||||
sourcepath ..\..\src\gzip
|
||||
|
||||
source ftgzip.c
|
||||
|
||||
sourcepath ..\..\src\lzw
|
||||
|
||||
source ftlzw.c
|
||||
|
||||
sourcepath ..\..\src\pcf
|
||||
|
||||
source pcf.c
|
||||
|
||||
sourcepath ..\..\src\pfr
|
||||
|
||||
source pfr.c
|
||||
|
||||
sourcepath ..\..\src\psaux
|
||||
|
||||
source psaux.c
|
||||
|
||||
sourcepath ..\..\src\pshinter
|
||||
|
||||
source pshinter.c
|
||||
|
||||
sourcepath ..\..\src\psnames
|
||||
|
||||
source psmodule.c
|
||||
|
||||
sourcepath ..\..\src\raster
|
||||
|
||||
source raster.c
|
||||
|
||||
sourcepath ..\..\src\sfnt
|
||||
|
||||
source sfnt.c
|
||||
|
||||
sourcepath ..\..\src\smooth
|
||||
|
||||
source smooth.c
|
||||
|
||||
sourcepath ..\..\src\truetype
|
||||
|
||||
source truetype.c
|
||||
|
||||
sourcepath ..\..\src\type1
|
||||
|
||||
source type1.c
|
||||
|
||||
sourcepath ..\..\src\type42
|
||||
|
||||
source type42.c
|
||||
|
||||
sourcepath ..\..\src\winfonts
|
||||
|
||||
source winfnt.c
|
||||
|
||||
|
||||
systeminclude ..\..\include
|
||||
systeminclude \epoc32\include\stdapis
|
||||
userinclude ..\..\src\autofit
|
||||
userinclude ..\..\src\bdf
|
||||
userinclude ..\..\src\bzip2
|
||||
userinclude ..\..\src\cache
|
||||
userinclude ..\..\src\cff
|
||||
userinclude ..\..\src\cid
|
||||
userinclude ..\..\src\gxvalid
|
||||
userinclude ..\..\src\gzip
|
||||
userinclude ..\..\src\lzw
|
||||
userinclude ..\..\src\otvalid
|
||||
userinclude ..\..\src\pcf
|
||||
userinclude ..\..\src\pfr
|
||||
userinclude ..\..\src\psaux
|
||||
userinclude ..\..\src\pshinter
|
||||
userinclude ..\..\src\psnames
|
||||
userinclude ..\..\src\raster
|
||||
userinclude ..\..\src\sfnt
|
||||
userinclude ..\..\src\smooth
|
||||
userinclude ..\..\src\truetype
|
||||
userinclude ..\..\src\type1
|
||||
userinclude ..\..\src\type42
|
||||
userinclude ..\..\src\winfonts
|
|
@ -1,316 +0,0 @@
|
|||
#
|
||||
# FreeType build system -- top-level sub-Makefile
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# This file is designed for GNU Make, do not use it with another Make tool!
|
||||
#
|
||||
# It works as follows:
|
||||
#
|
||||
# - When invoked for the first time, this Makefile includes the rules found
|
||||
# in `PROJECT/builds/detect.mk'. They are in charge of detecting the
|
||||
# current platform.
|
||||
#
|
||||
# A summary of the detection is displayed, and the file `config.mk' is
|
||||
# created in the current directory.
|
||||
#
|
||||
# - When invoked later, this Makefile includes the rules found in
|
||||
# `config.mk'. This sub-Makefile defines some system-specific variables
|
||||
# (like compiler, compilation flags, object suffix, etc.), then includes
|
||||
# the rules found in `PROJECT/builds/PROJECT.mk', used to build the
|
||||
# library.
|
||||
#
|
||||
# See the comments in `builds/detect.mk' and `builds/PROJECT.mk' for more
|
||||
# details on host platform detection and library builds.
|
||||
|
||||
|
||||
# First of all, check whether we have `$(value ...)'. We do this by testing
|
||||
# for `$(eval ...)' which has been introduced in the same GNU make version.
|
||||
|
||||
eval_available :=
|
||||
$(eval eval_available := T)
|
||||
ifneq ($(eval_available),T)
|
||||
$(error FreeType's build system needs a Make program which supports $$(value))
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: all dist distclean modules setup
|
||||
|
||||
|
||||
# The `space' variable is used to avoid trailing spaces in defining the
|
||||
# `T' variable later.
|
||||
#
|
||||
empty :=
|
||||
space := $(empty) $(empty)
|
||||
|
||||
|
||||
# The main configuration file, defining the `XXX_MODULES' variables. We
|
||||
# prefer a `modules.cfg' file in OBJ_DIR over TOP_DIR.
|
||||
#
|
||||
ifndef MODULES_CFG
|
||||
MODULES_CFG := $(TOP_DIR)/modules.cfg
|
||||
ifneq ($(wildcard $(OBJ_DIR)/modules.cfg),)
|
||||
MODULES_CFG := $(OBJ_DIR)/modules.cfg
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# FTMODULE_H, as its name suggests, indicates where the FreeType module
|
||||
# class file resides.
|
||||
#
|
||||
FTMODULE_H ?= $(OBJ_DIR)/ftmodule.h
|
||||
|
||||
|
||||
include $(MODULES_CFG)
|
||||
|
||||
|
||||
# The list of modules we are using.
|
||||
#
|
||||
MODULES := $(FONT_MODULES) \
|
||||
$(HINTING_MODULES) \
|
||||
$(RASTER_MODULES) \
|
||||
$(AUX_MODULES)
|
||||
|
||||
|
||||
CONFIG_MK ?= config.mk
|
||||
|
||||
# If no configuration sub-makefile is present, or if `setup' is the target
|
||||
# to be built, run the auto-detection rules to figure out which
|
||||
# configuration rules file to use.
|
||||
#
|
||||
# Note that the configuration file is put in the current directory, which is
|
||||
# not necessarily $(TOP_DIR).
|
||||
|
||||
# If `config.mk' is not present, set `check_platform'.
|
||||
#
|
||||
ifeq ($(wildcard $(CONFIG_MK)),)
|
||||
check_platform := 1
|
||||
endif
|
||||
|
||||
# If `setup' is one of the targets requested, set `check_platform'.
|
||||
#
|
||||
ifneq ($(findstring setup,$(MAKECMDGOALS)),)
|
||||
check_platform := 1
|
||||
endif
|
||||
|
||||
|
||||
# Include the automatic host platform detection rules when we need to
|
||||
# check the platform.
|
||||
#
|
||||
ifdef check_platform
|
||||
|
||||
all modules: setup
|
||||
|
||||
include $(TOP_DIR)/builds/detect.mk
|
||||
|
||||
# For builds directly from the git repository we need to copy files
|
||||
# from `subprojects/dlg' to `src/dlg' and `include/dlg'.
|
||||
#
|
||||
ifeq ($(wildcard $(TOP_DIR)/src/dlg/dlg.*),)
|
||||
ifeq ($(wildcard $(TOP_DIR)/subprojects/dlg/*),)
|
||||
copy_submodule: check_out_submodule
|
||||
endif
|
||||
|
||||
setup: copy_submodule
|
||||
endif
|
||||
|
||||
# This rule makes sense for Unix only to remove files created by a run of
|
||||
# the configure script which hasn't been successful (so that no
|
||||
# `config.mk' has been created). It uses the built-in $(RM) command of
|
||||
# GNU make. Similarly, `nul' is created if e.g. `make setup windows' has
|
||||
# been erroneously used.
|
||||
#
|
||||
# Note: This test is duplicated in `builds/unix/detect.mk'.
|
||||
#
|
||||
is_unix := $(strip $(wildcard /sbin/init) \
|
||||
$(wildcard /usr/sbin/init) \
|
||||
$(wildcard /dev/null) \
|
||||
$(wildcard /hurd/auth))
|
||||
ifneq ($(is_unix),)
|
||||
|
||||
distclean:
|
||||
$(RM) $(TOP_DIR)/builds/unix/config.cache
|
||||
$(RM) $(TOP_DIR)/builds/unix/config.log
|
||||
$(RM) $(TOP_DIR)/builds/unix/config.status
|
||||
$(RM) $(TOP_DIR)/builds/unix/unix-def.mk
|
||||
$(RM) $(TOP_DIR)/builds/unix/unix-cc.mk
|
||||
$(RM) $(TOP_DIR)/builds/unix/freetype2.pc
|
||||
$(RM) nul
|
||||
|
||||
endif # test is_unix
|
||||
|
||||
# IMPORTANT:
|
||||
#
|
||||
# `setup' must be defined by the host platform detection rules to create
|
||||
# the `config.mk' file in the current directory.
|
||||
|
||||
else
|
||||
|
||||
# A configuration sub-Makefile is present -- simply run it.
|
||||
#
|
||||
all: single
|
||||
|
||||
BUILD_PROJECT := yes
|
||||
include $(CONFIG_MK)
|
||||
|
||||
endif # test check_platform
|
||||
|
||||
|
||||
.PHONY: check_out_submodule copy_submodule
|
||||
|
||||
check_out_submodule:
|
||||
$(info Checking out submodule in `subprojects/dlg')
|
||||
git -C $(TOP_DIR) submodule update --init
|
||||
|
||||
copy_submodule:
|
||||
$(info Copying files from `subprojects/dlg' to `src/dlg' and `include/dlg')
|
||||
ifeq ($(wildcard $(TOP_DIR)/include/dlg),)
|
||||
mkdir $(subst /,$(SEP),$(TOP_DIR)/include/dlg)
|
||||
endif
|
||||
$(COPY) $(subst /,$(SEP),$(TOP_DIR)/subprojects/dlg/include/dlg/output.h $(TOP_DIR)/include/dlg)
|
||||
$(COPY) $(subst /,$(SEP),$(TOP_DIR)/subprojects/dlg/include/dlg/dlg.h $(TOP_DIR)/include/dlg)
|
||||
$(COPY) $(subst /,$(SEP),$(TOP_DIR)/subprojects/dlg/src/dlg/dlg.c $(TOP_DIR)/src/dlg)
|
||||
|
||||
|
||||
# We always need the list of modules in ftmodule.h.
|
||||
#
|
||||
all setup: $(FTMODULE_H)
|
||||
|
||||
|
||||
# The `modules' target unconditionally rebuilds the module list.
|
||||
#
|
||||
modules:
|
||||
$(FTMODULE_H_INIT)
|
||||
$(FTMODULE_H_CREATE)
|
||||
$(FTMODULE_H_DONE)
|
||||
|
||||
include $(TOP_DIR)/builds/modules.mk
|
||||
|
||||
|
||||
# get FreeType version string using built-in string functions
|
||||
#
|
||||
hash := \#
|
||||
|
||||
work := $(strip $(shell $(CAT) \
|
||||
$(subst /,$(SEP),$(TOP_DIR)/include/freetype/freetype.h)))
|
||||
|
||||
work := $(subst $(hash)define$(space)FREETYPE_MAJOR$(space),MAjOR=,$(work))
|
||||
work := $(subst $(hash)define$(space)FREETYPE_MINOR$(space),MInOR=,$(work))
|
||||
work := $(subst $(hash)define$(space)FREETYPE_PATCH$(space),PAtCH=,$(work))
|
||||
|
||||
major := $(subst MAjOR=,,$(filter MAjOR=%,$(work)))
|
||||
minor := $(subst MInOR=,,$(filter MInOR=%,$(work)))
|
||||
patch := $(subst PAtCH=,,$(filter PAtCH=%,$(work)))
|
||||
|
||||
work :=
|
||||
|
||||
# ifneq ($(findstring x0x,x$(patch)x),)
|
||||
# version := $(major).$(minor)
|
||||
# winversion := $(major)$(minor)
|
||||
# else
|
||||
version := $(major).$(minor).$(patch)
|
||||
winversion := $(major)$(minor)$(patch)
|
||||
version_tag := VER-$(major)-$(minor)-$(patch)
|
||||
# endif
|
||||
|
||||
|
||||
# This target builds the tarballs.
|
||||
#
|
||||
# Not to be run by a normal user -- there are no attempts to make it
|
||||
# generic.
|
||||
|
||||
dist:
|
||||
-rm -rf tmp
|
||||
rm -f freetype-$(version).tar.gz
|
||||
rm -f freetype-$(version).tar.xz
|
||||
rm -f ft$(winversion).zip
|
||||
|
||||
for d in `find . -wholename '*/.git' -prune \
|
||||
-o -type f \
|
||||
-o -print` ; do \
|
||||
mkdir -p tmp/$$d ; \
|
||||
done ;
|
||||
|
||||
currdir=`pwd` ; \
|
||||
for f in `find . -wholename '*/.git' -prune \
|
||||
-o -name .gitattributes \
|
||||
-o -name .gitignore \
|
||||
-o -name .gitlab-ci.yml \
|
||||
-o -name .gitmodules \
|
||||
-o -name .mailmap \
|
||||
-o -type d \
|
||||
-o -print` ; do \
|
||||
ln -s $$currdir/$$f tmp/$$f ; \
|
||||
done
|
||||
|
||||
cd tmp ; \
|
||||
$(MAKE) devel ; \
|
||||
$(MAKE) do-dist
|
||||
|
||||
mv tmp freetype-$(version)
|
||||
|
||||
tar -H ustar -chf - freetype-$(version) \
|
||||
| gzip -9 -c > freetype-$(version).tar.gz
|
||||
tar -H ustar -chf - freetype-$(version) \
|
||||
| xz -c > freetype-$(version).tar.xz
|
||||
|
||||
@# Use CR/LF for zip files.
|
||||
zip -lr9 ft$(winversion).zip freetype-$(version)
|
||||
|
||||
rm -fr freetype-$(version)
|
||||
|
||||
|
||||
# The locations of the latest `config.guess' and `config.sub' versions (from
|
||||
# GNU `config' git repository), relative to the `tmp' directory used during
|
||||
# `make dist'.
|
||||
#
|
||||
CONFIG_GUESS = ~/git/config/config.guess
|
||||
CONFIG_SUB = ~/git/config/config.sub
|
||||
|
||||
# We also use this repository to access the gnulib script that converts git
|
||||
# commit messages to a ChangeLog file.
|
||||
CHANGELOG_SCRIPT = ~/git/config/gitlog-to-changelog
|
||||
|
||||
|
||||
# Don't say `make do-dist'. Always use `make dist' instead.
|
||||
#
|
||||
.PHONY: do-dist
|
||||
|
||||
do-dist: distclean refdoc
|
||||
@# Without removing the files, `autoconf' and friends follow links.
|
||||
rm -f $(TOP_DIR)/builds/unix/aclocal.m4
|
||||
rm -f $(TOP_DIR)/builds/unix/configure.ac
|
||||
rm -f $(TOP_DIR)/builds/unix/configure
|
||||
|
||||
sh autogen.sh
|
||||
rm -rf $(TOP_DIR)/builds/unix/autom4te.cache
|
||||
|
||||
cp $(CONFIG_GUESS) $(TOP_DIR)/builds/unix
|
||||
cp $(CONFIG_SUB) $(TOP_DIR)/builds/unix
|
||||
|
||||
@# Generate `ChangeLog' file with commits since release 2.11.0
|
||||
@# (when we stopped creating this file manually).
|
||||
$(CHANGELOG_SCRIPT) \
|
||||
--format='%B%n' \
|
||||
--no-cluster \
|
||||
-- VER-2-11-0..$(version_tag) \
|
||||
> ChangeLog
|
||||
|
||||
@# Remove intermediate files created by the `refdoc' target.
|
||||
rm -rf $(TOP_DIR)/docs/markdown
|
||||
rm -f $(TOP_DIR)/docs/mkdocs.yml
|
||||
|
||||
@# Remove more stuff related to git.
|
||||
rm -rf $(TOP_DIR)/subprojects/dlg
|
||||
|
||||
# EOF
|
18
builds/unix/.gitignore
vendored
18
builds/unix/.gitignore
vendored
|
@ -1,18 +0,0 @@
|
|||
aclocal.m4
|
||||
autom4te.cache
|
||||
config.cache
|
||||
config.guess
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
configure.ac
|
||||
freetype2.pc
|
||||
freetype-config
|
||||
ftconfig.h
|
||||
ftoption.h
|
||||
install-sh
|
||||
libtool
|
||||
ltmain.sh
|
||||
unix-cc.mk
|
||||
unix-def.mk
|
|
@ -1,177 +0,0 @@
|
|||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_compare_version.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro compares two version strings. Due to the various number of
|
||||
# minor-version numbers that can exist, and the fact that string
|
||||
# comparisons are not compatible with numeric comparisons, this is not
|
||||
# necessarily trivial to do in a autoconf script. This macro makes doing
|
||||
# these comparisons easy.
|
||||
#
|
||||
# The six basic comparisons are available, as well as checking equality
|
||||
# limited to a certain number of minor-version levels.
|
||||
#
|
||||
# The operator OP determines what type of comparison to do, and can be one
|
||||
# of:
|
||||
#
|
||||
# eq - equal (test A == B)
|
||||
# ne - not equal (test A != B)
|
||||
# le - less than or equal (test A <= B)
|
||||
# ge - greater than or equal (test A >= B)
|
||||
# lt - less than (test A < B)
|
||||
# gt - greater than (test A > B)
|
||||
#
|
||||
# Additionally, the eq and ne operator can have a number after it to limit
|
||||
# the test to that number of minor versions.
|
||||
#
|
||||
# eq0 - equal up to the length of the shorter version
|
||||
# ne0 - not equal up to the length of the shorter version
|
||||
# eqN - equal up to N sub-version levels
|
||||
# neN - not equal up to N sub-version levels
|
||||
#
|
||||
# When the condition is true, shell commands ACTION-IF-TRUE are run,
|
||||
# otherwise shell commands ACTION-IF-FALSE are run. The environment
|
||||
# variable 'ax_compare_version' is always set to either 'true' or 'false'
|
||||
# as well.
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8])
|
||||
# AX_COMPARE_VERSION([3.15],[lt],[3.15.8])
|
||||
#
|
||||
# would both be true.
|
||||
#
|
||||
# AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8])
|
||||
# AX_COMPARE_VERSION([3.15],[gt],[3.15.8])
|
||||
#
|
||||
# would both be false.
|
||||
#
|
||||
# AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8])
|
||||
#
|
||||
# would be true because it is only comparing two minor versions.
|
||||
#
|
||||
# AX_COMPARE_VERSION([3.15.7],[eq0],[3.15])
|
||||
#
|
||||
# would be true because it is only comparing the lesser number of minor
|
||||
# versions of the two values.
|
||||
#
|
||||
# Note: The characters that separate the version numbers do not matter. An
|
||||
# empty string is the same as version 0. OP is evaluated by autoconf, not
|
||||
# configure, so must be a string, not a variable.
|
||||
#
|
||||
# The author would like to acknowledge Guido Draheim whose advice about
|
||||
# the m4_case and m4_ifvaln functions make this macro only include the
|
||||
# portions necessary to perform the specific comparison specified by the
|
||||
# OP argument in the final configure script.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Tim Toolan <toolan@ele.uri.edu>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 13
|
||||
|
||||
dnl #########################################################################
|
||||
AC_DEFUN([AX_COMPARE_VERSION], [
|
||||
AC_REQUIRE([AC_PROG_AWK])
|
||||
|
||||
# Used to indicate true or false condition
|
||||
ax_compare_version=false
|
||||
|
||||
# Convert the two version strings to be compared into a format that
|
||||
# allows a simple string comparison. The end result is that a version
|
||||
# string of the form 1.12.5-r617 will be converted to the form
|
||||
# 0001001200050617. In other words, each number is zero padded to four
|
||||
# digits, and non digits are removed.
|
||||
AS_VAR_PUSHDEF([A],[ax_compare_version_A])
|
||||
A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
|
||||
-e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/[[^0-9]]//g'`
|
||||
|
||||
AS_VAR_PUSHDEF([B],[ax_compare_version_B])
|
||||
B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
|
||||
-e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/[[^0-9]]//g'`
|
||||
|
||||
dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary
|
||||
dnl # then the first line is used to determine if the condition is true.
|
||||
dnl # The sed right after the echo is to remove any indented white space.
|
||||
m4_case(m4_tolower($2),
|
||||
[lt],[
|
||||
ax_compare_version=`echo "x$A
|
||||
x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"`
|
||||
],
|
||||
[gt],[
|
||||
ax_compare_version=`echo "x$A
|
||||
x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"`
|
||||
],
|
||||
[le],[
|
||||
ax_compare_version=`echo "x$A
|
||||
x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"`
|
||||
],
|
||||
[ge],[
|
||||
ax_compare_version=`echo "x$A
|
||||
x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
|
||||
],[
|
||||
dnl Split the operator from the subversion count if present.
|
||||
m4_bmatch(m4_substr($2,2),
|
||||
[0],[
|
||||
# A count of zero means use the length of the shorter version.
|
||||
# Determine the number of characters in A and B.
|
||||
ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'`
|
||||
ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'`
|
||||
|
||||
# Set A to no more than B's length and B to no more than A's length.
|
||||
A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
|
||||
B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
|
||||
],
|
||||
[[0-9]+],[
|
||||
# A count greater than zero means use only that many subversions
|
||||
A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
|
||||
B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
|
||||
],
|
||||
[.+],[
|
||||
AC_WARNING(
|
||||
[invalid OP numeric parameter: $2])
|
||||
],[])
|
||||
|
||||
# Pad zeros at end of numbers to make same length.
|
||||
ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`"
|
||||
B="$B`echo $A | sed 's/./0/g'`"
|
||||
A="$ax_compare_version_tmp_A"
|
||||
|
||||
# Check for equality or inequality as necessary.
|
||||
m4_case(m4_tolower(m4_substr($2,0,2)),
|
||||
[eq],[
|
||||
test "x$A" = "x$B" && ax_compare_version=true
|
||||
],
|
||||
[ne],[
|
||||
test "x$A" != "x$B" && ax_compare_version=true
|
||||
],[
|
||||
AC_WARNING([invalid OP parameter: $2])
|
||||
])
|
||||
])
|
||||
|
||||
AS_VAR_POPDEF([A])dnl
|
||||
AS_VAR_POPDEF([B])dnl
|
||||
|
||||
dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE.
|
||||
if test "$ax_compare_version" = "true" ; then
|
||||
m4_ifvaln([$4],[$4],[:])dnl
|
||||
m4_ifvaln([$5],[else $5])dnl
|
||||
fi
|
||||
]) dnl AX_COMPARE_VERSION
|
|
@ -1,66 +0,0 @@
|
|||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_prog_python_version.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_PROG_PYTHON_VERSION([VERSION],[ACTION-IF-TRUE],[ACTION-IF-FALSE])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Makes sure that python supports the version indicated. If true the shell
|
||||
# commands in ACTION-IF-TRUE are executed. If not the shell commands in
|
||||
# ACTION-IF-FALSE are run. Note if $PYTHON is not set (for example by
|
||||
# running AC_CHECK_PROG or AC_PATH_PROG) the macro will fail.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# AC_PATH_PROG([PYTHON],[python])
|
||||
# AX_PROG_PYTHON_VERSION([2.4.4],[ ... ],[ ... ])
|
||||
#
|
||||
# This will check to make sure that the python you have supports at least
|
||||
# version 2.4.4.
|
||||
#
|
||||
# NOTE: This macro uses the $PYTHON variable to perform the check.
|
||||
# AX_WITH_PYTHON can be used to set that variable prior to running this
|
||||
# macro. The $PYTHON_VERSION variable will be valorized with the detected
|
||||
# version.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2009 Francesco Salvestrini <salvestrini@users.sourceforge.net>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 12
|
||||
|
||||
AC_DEFUN([AX_PROG_PYTHON_VERSION],[
|
||||
AC_REQUIRE([AC_PROG_SED])
|
||||
AC_REQUIRE([AC_PROG_GREP])
|
||||
|
||||
AS_IF([test -n "$PYTHON"],[
|
||||
ax_python_version="$1"
|
||||
|
||||
AC_MSG_CHECKING([for python version])
|
||||
changequote(<<,>>)
|
||||
python_version=`$PYTHON -V 2>&1 | $GREP "^Python " | $SED -e 's/^.* \([0-9]*\.[0-9]*\.[0-9]*\)/\1/'`
|
||||
changequote([,])
|
||||
AC_MSG_RESULT($python_version)
|
||||
|
||||
AC_SUBST([PYTHON_VERSION],[$python_version])
|
||||
|
||||
AX_COMPARE_VERSION([$ax_python_version],[le],[$python_version],[
|
||||
:
|
||||
$2
|
||||
],[
|
||||
:
|
||||
$3
|
||||
])
|
||||
],[
|
||||
AC_MSG_WARN([could not find the python interpreter])
|
||||
$3
|
||||
])
|
||||
])
|
|
@ -1,522 +0,0 @@
|
|||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_pthread.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro figures out how to build C programs using POSIX threads. It
|
||||
# sets the PTHREAD_LIBS output variable to the threads library and linker
|
||||
# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
|
||||
# flags that are needed. (The user can also force certain compiler
|
||||
# flags/libs to be tested by setting these environment variables.)
|
||||
#
|
||||
# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is
|
||||
# needed for multi-threaded programs (defaults to the value of CC
|
||||
# respectively CXX otherwise). (This is necessary on e.g. AIX to use the
|
||||
# special cc_r/CC_r compiler alias.)
|
||||
#
|
||||
# NOTE: You are assumed to not only compile your program with these flags,
|
||||
# but also to link with them as well. For example, you might link with
|
||||
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
|
||||
# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
|
||||
#
|
||||
# If you are only building threaded programs, you may wish to use these
|
||||
# variables in your default LIBS, CFLAGS, and CC:
|
||||
#
|
||||
# LIBS="$PTHREAD_LIBS $LIBS"
|
||||
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
|
||||
# CC="$PTHREAD_CC"
|
||||
# CXX="$PTHREAD_CXX"
|
||||
#
|
||||
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
|
||||
# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
|
||||
# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
|
||||
#
|
||||
# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
|
||||
# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
|
||||
# PTHREAD_CFLAGS.
|
||||
#
|
||||
# ACTION-IF-FOUND is a list of shell commands to run if a threads library
|
||||
# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
|
||||
# is not found. If ACTION-IF-FOUND is not specified, the default action
|
||||
# will define HAVE_PTHREAD.
|
||||
#
|
||||
# Please let the authors know if this macro fails on any platform, or if
|
||||
# you have any other suggestions or comments. This macro was based on work
|
||||
# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
|
||||
# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
|
||||
# Alejandro Forero Cuervo to the autoconf macro repository. We are also
|
||||
# grateful for the helpful feedback of numerous users.
|
||||
#
|
||||
# Updated for Autoconf 2.68 by Daniel Richard G.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
|
||||
# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
|
||||
# Copyright (c) 2019 Marc Stevens <marc.stevens@cwi.nl>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 30
|
||||
|
||||
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
|
||||
AC_DEFUN([AX_PTHREAD], [
|
||||
AC_REQUIRE([AC_CANONICAL_TARGET])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_PROG_SED])
|
||||
AC_LANG_PUSH([C])
|
||||
ax_pthread_ok=no
|
||||
|
||||
# We used to check for pthread.h first, but this fails if pthread.h
|
||||
# requires special compiler flags (e.g. on Tru64 or Sequent).
|
||||
# It gets checked for in the link test anyway.
|
||||
|
||||
# First of all, check if the user has set any of the PTHREAD_LIBS,
|
||||
# etcetera environment variables, and if threads linking works using
|
||||
# them:
|
||||
if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
|
||||
ax_pthread_save_CC="$CC"
|
||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
||||
ax_pthread_save_LIBS="$LIBS"
|
||||
AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"])
|
||||
AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"])
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS])
|
||||
AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes])
|
||||
AC_MSG_RESULT([$ax_pthread_ok])
|
||||
if test "x$ax_pthread_ok" = "xno"; then
|
||||
PTHREAD_LIBS=""
|
||||
PTHREAD_CFLAGS=""
|
||||
fi
|
||||
CC="$ax_pthread_save_CC"
|
||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
||||
LIBS="$ax_pthread_save_LIBS"
|
||||
fi
|
||||
|
||||
# We must check for the threads library under a number of different
|
||||
# names; the ordering is very important because some systems
|
||||
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
|
||||
# libraries is broken (non-POSIX).
|
||||
|
||||
# Create a list of thread flags to try. Items with a "," contain both
|
||||
# C compiler flags (before ",") and linker flags (after ","). Other items
|
||||
# starting with a "-" are C compiler flags, and remaining items are
|
||||
# library names, except for "none" which indicates that we try without
|
||||
# any flags at all, and "pthread-config" which is a program returning
|
||||
# the flags for the Pth emulation library.
|
||||
|
||||
ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
|
||||
|
||||
# The ordering *is* (sometimes) important. Some notes on the
|
||||
# individual items follow:
|
||||
|
||||
# pthreads: AIX (must check this before -lpthread)
|
||||
# none: in case threads are in libc; should be tried before -Kthread and
|
||||
# other compiler flags to prevent continual compiler warnings
|
||||
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
|
||||
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
|
||||
# (Note: HP C rejects this with "bad form for `-t' option")
|
||||
# -pthreads: Solaris/gcc (Note: HP C also rejects)
|
||||
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
|
||||
# doesn't hurt to check since this sometimes defines pthreads and
|
||||
# -D_REENTRANT too), HP C (must be checked before -lpthread, which
|
||||
# is present but should not be used directly; and before -mthreads,
|
||||
# because the compiler interprets this as "-mt" + "-hreads")
|
||||
# -mthreads: Mingw32/gcc, Lynx/gcc
|
||||
# pthread: Linux, etcetera
|
||||
# --thread-safe: KAI C++
|
||||
# pthread-config: use pthread-config program (for GNU Pth library)
|
||||
|
||||
case $target_os in
|
||||
|
||||
freebsd*)
|
||||
|
||||
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
|
||||
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
|
||||
|
||||
ax_pthread_flags="-kthread lthread $ax_pthread_flags"
|
||||
;;
|
||||
|
||||
hpux*)
|
||||
|
||||
# From the cc(1) man page: "[-mt] Sets various -D flags to enable
|
||||
# multi-threading and also sets -lpthread."
|
||||
|
||||
ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
|
||||
;;
|
||||
|
||||
openedition*)
|
||||
|
||||
# IBM z/OS requires a feature-test macro to be defined in order to
|
||||
# enable POSIX threads at all, so give the user a hint if this is
|
||||
# not set. (We don't define these ourselves, as they can affect
|
||||
# other portions of the system API in unpredictable ways.)
|
||||
|
||||
AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING],
|
||||
[
|
||||
# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
|
||||
AX_PTHREAD_ZOS_MISSING
|
||||
# endif
|
||||
],
|
||||
[AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])])
|
||||
;;
|
||||
|
||||
solaris*)
|
||||
|
||||
# On Solaris (at least, for some versions), libc contains stubbed
|
||||
# (non-functional) versions of the pthreads routines, so link-based
|
||||
# tests will erroneously succeed. (N.B.: The stubs are missing
|
||||
# pthread_cleanup_push, or rather a function called by this macro,
|
||||
# so we could check for that, but who knows whether they'll stub
|
||||
# that too in a future libc.) So we'll check first for the
|
||||
# standard Solaris way of linking pthreads (-mt -lpthread).
|
||||
|
||||
ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Are we compiling with Clang?
|
||||
|
||||
AC_CACHE_CHECK([whether $CC is Clang],
|
||||
[ax_cv_PTHREAD_CLANG],
|
||||
[ax_cv_PTHREAD_CLANG=no
|
||||
# Note that Autoconf sets GCC=yes for Clang as well as GCC
|
||||
if test "x$GCC" = "xyes"; then
|
||||
AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
|
||||
[/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
|
||||
# if defined(__clang__) && defined(__llvm__)
|
||||
AX_PTHREAD_CC_IS_CLANG
|
||||
# endif
|
||||
],
|
||||
[ax_cv_PTHREAD_CLANG=yes])
|
||||
fi
|
||||
])
|
||||
ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
|
||||
|
||||
|
||||
# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
|
||||
|
||||
# Note that for GCC and Clang -pthread generally implies -lpthread,
|
||||
# except when -nostdlib is passed.
|
||||
# This is problematic using libtool to build C++ shared libraries with pthread:
|
||||
# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
|
||||
# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
|
||||
# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
|
||||
# To solve this, first try -pthread together with -lpthread for GCC
|
||||
|
||||
AS_IF([test "x$GCC" = "xyes"],
|
||||
[ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"])
|
||||
|
||||
# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
|
||||
|
||||
AS_IF([test "x$ax_pthread_clang" = "xyes"],
|
||||
[ax_pthread_flags="-pthread,-lpthread -pthread"])
|
||||
|
||||
|
||||
# The presence of a feature test macro requesting re-entrant function
|
||||
# definitions is, on some systems, a strong hint that pthreads support is
|
||||
# correctly enabled
|
||||
|
||||
case $target_os in
|
||||
darwin* | hpux* | linux* | osf* | solaris*)
|
||||
ax_pthread_check_macro="_REENTRANT"
|
||||
;;
|
||||
|
||||
aix*)
|
||||
ax_pthread_check_macro="_THREAD_SAFE"
|
||||
;;
|
||||
|
||||
*)
|
||||
ax_pthread_check_macro="--"
|
||||
;;
|
||||
esac
|
||||
AS_IF([test "x$ax_pthread_check_macro" = "x--"],
|
||||
[ax_pthread_check_cond=0],
|
||||
[ax_pthread_check_cond="!defined($ax_pthread_check_macro)"])
|
||||
|
||||
|
||||
if test "x$ax_pthread_ok" = "xno"; then
|
||||
for ax_pthread_try_flag in $ax_pthread_flags; do
|
||||
|
||||
case $ax_pthread_try_flag in
|
||||
none)
|
||||
AC_MSG_CHECKING([whether pthreads work without any flags])
|
||||
;;
|
||||
|
||||
*,*)
|
||||
PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
|
||||
PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
|
||||
AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"])
|
||||
;;
|
||||
|
||||
-*)
|
||||
AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag])
|
||||
PTHREAD_CFLAGS="$ax_pthread_try_flag"
|
||||
;;
|
||||
|
||||
pthread-config)
|
||||
AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
|
||||
AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
|
||||
PTHREAD_CFLAGS="`pthread-config --cflags`"
|
||||
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
|
||||
;;
|
||||
|
||||
*)
|
||||
AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag])
|
||||
PTHREAD_LIBS="-l$ax_pthread_try_flag"
|
||||
;;
|
||||
esac
|
||||
|
||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
||||
ax_pthread_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
|
||||
# Check for various functions. We must include pthread.h,
|
||||
# since some functions may be macros. (On the Sequent, we
|
||||
# need a special flag -Kthread to make this header compile.)
|
||||
# We check for pthread_join because it is in -lpthread on IRIX
|
||||
# while pthread_create is in libc. We check for pthread_attr_init
|
||||
# due to DEC craziness with -lpthreads. We check for
|
||||
# pthread_cleanup_push because it is one of the few pthread
|
||||
# functions on Solaris that doesn't have a non-functional libc stub.
|
||||
# We try pthread_create on general principles.
|
||||
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
|
||||
# if $ax_pthread_check_cond
|
||||
# error "$ax_pthread_check_macro must be defined"
|
||||
# endif
|
||||
static void *some_global = NULL;
|
||||
static void routine(void *a)
|
||||
{
|
||||
/* To avoid any unused-parameter or
|
||||
unused-but-set-parameter warning. */
|
||||
some_global = a;
|
||||
}
|
||||
static void *start_routine(void *a) { return a; }],
|
||||
[pthread_t th; pthread_attr_t attr;
|
||||
pthread_create(&th, 0, start_routine, 0);
|
||||
pthread_join(th, 0);
|
||||
pthread_attr_init(&attr);
|
||||
pthread_cleanup_push(routine, 0);
|
||||
pthread_cleanup_pop(0) /* ; */])],
|
||||
[ax_pthread_ok=yes],
|
||||
[])
|
||||
|
||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
||||
LIBS="$ax_pthread_save_LIBS"
|
||||
|
||||
AC_MSG_RESULT([$ax_pthread_ok])
|
||||
AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
|
||||
|
||||
PTHREAD_LIBS=""
|
||||
PTHREAD_CFLAGS=""
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Clang needs special handling, because older versions handle the -pthread
|
||||
# option in a rather... idiosyncratic way
|
||||
|
||||
if test "x$ax_pthread_clang" = "xyes"; then
|
||||
|
||||
# Clang takes -pthread; it has never supported any other flag
|
||||
|
||||
# (Note 1: This will need to be revisited if a system that Clang
|
||||
# supports has POSIX threads in a separate library. This tends not
|
||||
# to be the way of modern systems, but it's conceivable.)
|
||||
|
||||
# (Note 2: On some systems, notably Darwin, -pthread is not needed
|
||||
# to get POSIX threads support; the API is always present and
|
||||
# active. We could reasonably leave PTHREAD_CFLAGS empty. But
|
||||
# -pthread does define _REENTRANT, and while the Darwin headers
|
||||
# ignore this macro, third-party headers might not.)
|
||||
|
||||
# However, older versions of Clang make a point of warning the user
|
||||
# that, in an invocation where only linking and no compilation is
|
||||
# taking place, the -pthread option has no effect ("argument unused
|
||||
# during compilation"). They expect -pthread to be passed in only
|
||||
# when source code is being compiled.
|
||||
#
|
||||
# Problem is, this is at odds with the way Automake and most other
|
||||
# C build frameworks function, which is that the same flags used in
|
||||
# compilation (CFLAGS) are also used in linking. Many systems
|
||||
# supported by AX_PTHREAD require exactly this for POSIX threads
|
||||
# support, and in fact it is often not straightforward to specify a
|
||||
# flag that is used only in the compilation phase and not in
|
||||
# linking. Such a scenario is extremely rare in practice.
|
||||
#
|
||||
# Even though use of the -pthread flag in linking would only print
|
||||
# a warning, this can be a nuisance for well-run software projects
|
||||
# that build with -Werror. So if the active version of Clang has
|
||||
# this misfeature, we search for an option to squash it.
|
||||
|
||||
AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread],
|
||||
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG],
|
||||
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
|
||||
# Create an alternate version of $ac_link that compiles and
|
||||
# links in two steps (.c -> .o, .o -> exe) instead of one
|
||||
# (.c -> exe), because the warning occurs only in the second
|
||||
# step
|
||||
ax_pthread_save_ac_link="$ac_link"
|
||||
ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
|
||||
ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"`
|
||||
ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
|
||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
||||
for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
|
||||
AS_IF([test "x$ax_pthread_try" = "xunknown"], [break])
|
||||
CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
|
||||
ac_link="$ax_pthread_save_ac_link"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
|
||||
[ac_link="$ax_pthread_2step_ac_link"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
|
||||
[break])
|
||||
])
|
||||
done
|
||||
ac_link="$ax_pthread_save_ac_link"
|
||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
||||
AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no])
|
||||
ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
|
||||
])
|
||||
|
||||
case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
|
||||
no | unknown) ;;
|
||||
*) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
|
||||
esac
|
||||
|
||||
fi # $ax_pthread_clang = yes
|
||||
|
||||
|
||||
|
||||
# Various other checks:
|
||||
if test "x$ax_pthread_ok" = "xyes"; then
|
||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
||||
ax_pthread_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
|
||||
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
|
||||
AC_CACHE_CHECK([for joinable pthread attribute],
|
||||
[ax_cv_PTHREAD_JOINABLE_ATTR],
|
||||
[ax_cv_PTHREAD_JOINABLE_ATTR=unknown
|
||||
for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
|
||||
[int attr = $ax_pthread_attr; return attr /* ; */])],
|
||||
[ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break],
|
||||
[])
|
||||
done
|
||||
])
|
||||
AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
|
||||
test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
|
||||
test "x$ax_pthread_joinable_attr_defined" != "xyes"],
|
||||
[AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE],
|
||||
[$ax_cv_PTHREAD_JOINABLE_ATTR],
|
||||
[Define to necessary symbol if this constant
|
||||
uses a non-standard name on your system.])
|
||||
ax_pthread_joinable_attr_defined=yes
|
||||
])
|
||||
|
||||
AC_CACHE_CHECK([whether more special flags are required for pthreads],
|
||||
[ax_cv_PTHREAD_SPECIAL_FLAGS],
|
||||
[ax_cv_PTHREAD_SPECIAL_FLAGS=no
|
||||
case $target_os in
|
||||
solaris*)
|
||||
ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
|
||||
;;
|
||||
esac
|
||||
])
|
||||
AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
|
||||
test "x$ax_pthread_special_flags_added" != "xyes"],
|
||||
[PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
|
||||
ax_pthread_special_flags_added=yes])
|
||||
|
||||
AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
|
||||
[ax_cv_PTHREAD_PRIO_INHERIT],
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
|
||||
[[int i = PTHREAD_PRIO_INHERIT;
|
||||
return i;]])],
|
||||
[ax_cv_PTHREAD_PRIO_INHERIT=yes],
|
||||
[ax_cv_PTHREAD_PRIO_INHERIT=no])
|
||||
])
|
||||
AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
|
||||
test "x$ax_pthread_prio_inherit_defined" != "xyes"],
|
||||
[AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])
|
||||
ax_pthread_prio_inherit_defined=yes
|
||||
])
|
||||
|
||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
||||
LIBS="$ax_pthread_save_LIBS"
|
||||
|
||||
# More AIX lossage: compile with *_r variant
|
||||
if test "x$GCC" != "xyes"; then
|
||||
case $target_os in
|
||||
aix*)
|
||||
AS_CASE(["x/$CC"],
|
||||
[x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
|
||||
[#handle absolute path differently from PATH based program lookup
|
||||
AS_CASE(["x$CC"],
|
||||
[x/*],
|
||||
[
|
||||
AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])
|
||||
AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])])
|
||||
],
|
||||
[
|
||||
AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])
|
||||
AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])])
|
||||
]
|
||||
)
|
||||
])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
|
||||
test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
|
||||
|
||||
AC_SUBST([PTHREAD_LIBS])
|
||||
AC_SUBST([PTHREAD_CFLAGS])
|
||||
AC_SUBST([PTHREAD_CC])
|
||||
AC_SUBST([PTHREAD_CXX])
|
||||
|
||||
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
|
||||
if test "x$ax_pthread_ok" = "xyes"; then
|
||||
ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
|
||||
:
|
||||
else
|
||||
ax_pthread_ok=no
|
||||
$2
|
||||
fi
|
||||
AC_LANG_POP
|
||||
])dnl AX_PTHREAD
|
File diff suppressed because it is too large
Load diff
|
@ -1,99 +0,0 @@
|
|||
#
|
||||
# FreeType 2 configuration file to detect a UNIX host platform.
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
.PHONY: setup
|
||||
|
||||
ifeq ($(PLATFORM),ansi)
|
||||
|
||||
# Note: this test is duplicated in "builds/toplevel.mk".
|
||||
#
|
||||
is_unix := $(strip $(wildcard /sbin/init) \
|
||||
$(wildcard /usr/sbin/init) \
|
||||
$(wildcard /dev/null) \
|
||||
$(wildcard /hurd/auth))
|
||||
ifneq ($(is_unix),)
|
||||
|
||||
PLATFORM := unix
|
||||
|
||||
endif # test is_unix
|
||||
endif # test PLATFORM ansi
|
||||
|
||||
ifeq ($(PLATFORM),unix)
|
||||
COPY := cp
|
||||
DELETE := rm -f
|
||||
CAT := cat
|
||||
|
||||
# If `devel' is the requested target, we use a special configuration
|
||||
# file named `unix-dev.mk'. It disables optimization and libtool.
|
||||
#
|
||||
ifneq ($(findstring devel,$(MAKECMDGOALS)),)
|
||||
CONFIG_FILE := unix-dev.mk
|
||||
CC := gcc
|
||||
|
||||
.PHONY: devel
|
||||
devel: setup
|
||||
@:
|
||||
else
|
||||
|
||||
# If `lcc' is the requested target, we use a special configuration
|
||||
# file named `unix-lcc.mk'. It disables libtool for LCC.
|
||||
#
|
||||
ifneq ($(findstring lcc,$(MAKECMDGOALS)),)
|
||||
CONFIG_FILE := unix-lcc.mk
|
||||
CC := lcc
|
||||
|
||||
.PHONY: lcc
|
||||
lcc: setup
|
||||
@:
|
||||
else
|
||||
|
||||
# If a Unix platform is detected, the configure script is called and
|
||||
# `unix-def.mk' together with `unix-cc.mk' is created.
|
||||
#
|
||||
# Arguments to `configure' should be in the CFG variable. Example:
|
||||
#
|
||||
# make CFG="--prefix=/usr --disable-static"
|
||||
#
|
||||
# If you need to set CFLAGS or LDFLAGS, do it here also.
|
||||
#
|
||||
# Feel free to add support for other platform specific compilers in
|
||||
# this directory (e.g. solaris.mk + changes here to detect the
|
||||
# platform).
|
||||
#
|
||||
CONFIG_FILE := unix.mk
|
||||
must_configure := 1
|
||||
|
||||
.PHONY: unix
|
||||
unix: setup
|
||||
@:
|
||||
endif
|
||||
endif
|
||||
|
||||
have_Makefile := $(wildcard $(OBJ_DIR)/Makefile)
|
||||
|
||||
setup: std_setup
|
||||
ifdef must_configure
|
||||
ifneq ($(have_Makefile),)
|
||||
# we are building FT2 not in the src tree
|
||||
$(TOP_DIR)/builds/unix/configure $(value CFG)
|
||||
else
|
||||
cd builds/unix; \
|
||||
./configure $(value CFG)
|
||||
endif
|
||||
endif
|
||||
|
||||
endif # test PLATFORM unix
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,211 +0,0 @@
|
|||
#! /bin/sh
|
||||
#
|
||||
# Copyright (C) 2000-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
|
||||
|
||||
# if `pkg-config' is available, use values from `freetype2.pc'
|
||||
%PKG_CONFIG% --atleast-pkgconfig-version 0.24 >/dev/null 2>&1
|
||||
if test $? -eq 0 ; then
|
||||
# note that option `--variable' is not affected by the
|
||||
# PKG_CONFIG_SYSROOT_DIR environment variable
|
||||
if test "x$SYSROOT" != "x" ; then
|
||||
PKG_CONFIG_SYSROOT_DIR="$SYSROOT"
|
||||
export PKG_CONFIG_SYSROOT_DIR
|
||||
fi
|
||||
|
||||
prefix=`%PKG_CONFIG% --variable prefix freetype2`
|
||||
exec_prefix=`%PKG_CONFIG% --variable exec_prefix freetype2`
|
||||
|
||||
includedir=`%PKG_CONFIG% --variable includedir freetype2`
|
||||
libdir=`%PKG_CONFIG% --variable libdir freetype2`
|
||||
|
||||
version=`%PKG_CONFIG% --modversion freetype2`
|
||||
|
||||
cflags=`%PKG_CONFIG% --cflags freetype2`
|
||||
dynamic_libs=`%PKG_CONFIG% --libs freetype2`
|
||||
static_libs=`%PKG_CONFIG% --static --libs freetype2`
|
||||
else
|
||||
prefix="%prefix%"
|
||||
exec_prefix="%exec_prefix%"
|
||||
|
||||
includedir="%includedir%"
|
||||
libdir="%libdir%"
|
||||
|
||||
version=%ft_version%
|
||||
|
||||
cflags="-I${SYSROOT}$includedir/freetype2"
|
||||
dynamic_libs="-lfreetype"
|
||||
static_libs="%LIBSSTATIC_CONFIG%"
|
||||
if test "${SYSROOT}$libdir" != "/usr/lib" &&
|
||||
test "${SYSROOT}$libdir" != "/usr/lib64" ; then
|
||||
libs_L="-L${SYSROOT}$libdir"
|
||||
fi
|
||||
fi
|
||||
|
||||
orig_prefix=$prefix
|
||||
orig_exec_prefix=$exec_prefix
|
||||
|
||||
orig_includedir=$includedir
|
||||
orig_libdir=$libdir
|
||||
|
||||
include_suffix=`echo $includedir | sed "s|$prefix||"`
|
||||
lib_suffix=`echo $libdir | sed "s|$exec_prefix||"`
|
||||
|
||||
|
||||
usage()
|
||||
{
|
||||
cat <<EOF
|
||||
Usage: freetype-config [OPTION]...
|
||||
Get FreeType compilation and linking information.
|
||||
|
||||
Options:
|
||||
--prefix display \`--prefix' value used for building the
|
||||
FreeType library
|
||||
--prefix=PREFIX override \`--prefix' value with PREFIX
|
||||
--exec-prefix display \`--exec-prefix' value used for building
|
||||
the FreeType library
|
||||
--exec-prefix=EPREFIX override \`--exec-prefix' value with EPREFIX
|
||||
--version display libtool version of the FreeType library
|
||||
--ftversion display FreeType version number
|
||||
--libs display flags for linking with the FreeType library
|
||||
--libtool display library name for linking with libtool
|
||||
--cflags display flags for compiling with the FreeType
|
||||
library
|
||||
--static make command line options display flags
|
||||
for static linking
|
||||
--help display this help and exit
|
||||
EOF
|
||||
exit $1
|
||||
}
|
||||
|
||||
|
||||
if test $# -eq 0 ; then
|
||||
usage 1 1>&2
|
||||
fi
|
||||
|
||||
|
||||
while test $# -gt 0 ; do
|
||||
case "$1" in
|
||||
-*=*)
|
||||
optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
|
||||
;;
|
||||
*)
|
||||
optarg=
|
||||
;;
|
||||
esac
|
||||
|
||||
case $1 in
|
||||
--prefix=*)
|
||||
prefix=$optarg
|
||||
local_prefix=yes
|
||||
;;
|
||||
--prefix)
|
||||
echo_prefix=yes
|
||||
;;
|
||||
--exec-prefix=*)
|
||||
exec_prefix=$optarg
|
||||
exec_prefix_set=yes
|
||||
local_prefix=yes
|
||||
;;
|
||||
--exec-prefix)
|
||||
echo_exec_prefix=yes
|
||||
;;
|
||||
--version)
|
||||
echo_version=yes
|
||||
break
|
||||
;;
|
||||
--ftversion)
|
||||
echo_ft_version=yes
|
||||
;;
|
||||
--cflags)
|
||||
echo_cflags=yes
|
||||
;;
|
||||
--libs)
|
||||
echo_libs=yes
|
||||
;;
|
||||
--libtool)
|
||||
echo_libtool=yes
|
||||
;;
|
||||
--static)
|
||||
show_static=yes
|
||||
;;
|
||||
--help)
|
||||
usage 0
|
||||
;;
|
||||
*)
|
||||
usage 1 1>&2
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
|
||||
if test "$local_prefix" = "yes" ; then
|
||||
if test "$exec_prefix_set" != "yes" ; then
|
||||
exec_prefix=$prefix
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$local_prefix" = "yes" ; then
|
||||
includedir=${prefix}${include_suffix}
|
||||
if test "$exec_prefix_set" = "yes" ; then
|
||||
libdir=${exec_prefix}${lib_suffix}
|
||||
else
|
||||
libdir=${prefix}${lib_suffix}
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test "$echo_version" = "yes" ; then
|
||||
echo $version
|
||||
fi
|
||||
|
||||
if test "$echo_prefix" = "yes" ; then
|
||||
echo ${SYSROOT}$prefix
|
||||
fi
|
||||
|
||||
if test "$echo_exec_prefix" = "yes" ; then
|
||||
echo ${SYSROOT}$exec_prefix
|
||||
fi
|
||||
|
||||
if test "$echo_ft_version" = "yes" ; then
|
||||
major=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
|
||||
| grep FREETYPE_MAJOR \
|
||||
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
|
||||
minor=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
|
||||
| grep FREETYPE_MINOR \
|
||||
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
|
||||
patch=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
|
||||
| grep FREETYPE_PATCH \
|
||||
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
|
||||
echo $major.$minor.$patch
|
||||
fi
|
||||
|
||||
if test "$echo_cflags" = "yes" ; then
|
||||
echo $cflags | sed "s|$orig_includedir/freetype2|$includedir/freetype2|"
|
||||
fi
|
||||
|
||||
if test "$echo_libs" = "yes" ; then
|
||||
if test "$show_static" = "yes" ; then
|
||||
libs="$libs_L $static_libs"
|
||||
else
|
||||
libs="$libs_L $dynamic_libs"
|
||||
fi
|
||||
echo $libs | sed "s|$orig_libdir|$libdir|"
|
||||
fi
|
||||
|
||||
if test "$echo_libtool" = "yes" ; then
|
||||
echo ${SYSROOT}$libdir/libfreetype.la
|
||||
fi
|
||||
|
||||
# EOF
|
|
@ -1,14 +0,0 @@
|
|||
prefix=%prefix%
|
||||
exec_prefix=%exec_prefix%
|
||||
libdir=%libdir%
|
||||
includedir=%includedir%
|
||||
|
||||
Name: FreeType 2
|
||||
URL: https://freetype.org
|
||||
Description: A free, high-quality, and portable font engine.
|
||||
Version: %ft_version%
|
||||
Requires: %PKGCONFIG_REQUIRES%
|
||||
Requires.private: %PKGCONFIG_REQUIRES_PRIVATE%
|
||||
Libs: %PKGCONFIG_LIBS%
|
||||
Libs.private: %PKGCONFIG_LIBS_PRIVATE%
|
||||
Cflags: -I${includedir}/freetype2
|
|
@ -1,194 +0,0 @@
|
|||
# Configure paths for FreeType2
|
||||
# Marcelo Magallon 2001-10-26, based on `gtk.m4` by Owen Taylor
|
||||
#
|
||||
# Copyright (C) 2001-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
#
|
||||
# As a special exception to the FreeType project license, this file may be
|
||||
# distributed as part of a program that contains a configuration script
|
||||
# generated by Autoconf, under the same distribution terms as the rest of
|
||||
# that program.
|
||||
#
|
||||
# serial 7
|
||||
|
||||
# AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
# Test for FreeType 2, and define FT2_CFLAGS and FT2_LIBS.
|
||||
# MINIMUM-VERSION is what libtool reports; the default is '7.0.1' (this is
|
||||
# FreeType 2.0.4).
|
||||
#
|
||||
# To make this code work with older autoconf versions, `AS_HELP_STRING` is
|
||||
# not quoted.
|
||||
#
|
||||
AC_DEFUN([AC_CHECK_FT2],
|
||||
[# Get the cflags and libraries from the freetype-config script
|
||||
#
|
||||
AC_ARG_WITH([ft-prefix],
|
||||
AS_HELP_STRING([--with-ft-prefix=PREFIX],
|
||||
[Prefix where FreeType is installed (optional)]),
|
||||
[ft_config_prefix="$withval"],
|
||||
[ft_config_prefix=""])
|
||||
|
||||
AC_ARG_WITH([ft-exec-prefix],
|
||||
AS_HELP_STRING([--with-ft-exec-prefix=PREFIX],
|
||||
[Exec prefix where FreeType is installed (optional)]),
|
||||
[ft_config_exec_prefix="$withval"],
|
||||
[ft_config_exec_prefix=""])
|
||||
|
||||
AC_ARG_ENABLE([freetypetest],
|
||||
AS_HELP_STRING([--disable-freetypetest],
|
||||
[Do not try to compile and run a test FreeType program]),
|
||||
[],
|
||||
[enable_fttest=yes])
|
||||
|
||||
if test x$ft_config_exec_prefix != x ; then
|
||||
ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix"
|
||||
if test x${FT2_CONFIG+set} != xset ; then
|
||||
FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x$ft_config_prefix != x ; then
|
||||
ft_config_args="$ft_config_args --prefix=$ft_config_prefix"
|
||||
if test x${FT2_CONFIG+set} != xset ; then
|
||||
FT2_CONFIG=$ft_config_prefix/bin/freetype-config
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FT2_CONFIG" = x ; then
|
||||
AC_PATH_TOOL([FT2_CONFIG], [freetype-config], [no])
|
||||
fi
|
||||
|
||||
min_ft_version=m4_if([$1], [], [7.0.1], [$1])
|
||||
AC_MSG_CHECKING([for FreeType -- version >= $min_ft_version])
|
||||
no_ft=""
|
||||
if test "$FT2_CONFIG" = "no" ; then
|
||||
no_ft=yes
|
||||
else
|
||||
FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags`
|
||||
FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs`
|
||||
ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
ft_min_major_version=`echo $min_ft_version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
ft_min_minor_version=`echo $min_ft_version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
ft_min_micro_version=`echo $min_ft_version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test x$enable_fttest = xyes ; then
|
||||
ft_config_is_lt=""
|
||||
if test $ft_config_major_version -lt $ft_min_major_version ; then
|
||||
ft_config_is_lt=yes
|
||||
else
|
||||
if test $ft_config_major_version -eq $ft_min_major_version ; then
|
||||
if test $ft_config_minor_version -lt $ft_min_minor_version ; then
|
||||
ft_config_is_lt=yes
|
||||
else
|
||||
if test $ft_config_minor_version -eq $ft_min_minor_version ; then
|
||||
if test $ft_config_micro_version -lt $ft_min_micro_version ; then
|
||||
ft_config_is_lt=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test x$ft_config_is_lt = xyes ; then
|
||||
no_ft=yes
|
||||
else
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $FT2_CFLAGS"
|
||||
LIBS="$FT2_LIBS $LIBS"
|
||||
|
||||
#
|
||||
# Sanity checks for the results of freetype-config to some extent.
|
||||
#
|
||||
AC_RUN_IFELSE([
|
||||
AC_LANG_SOURCE([[
|
||||
|
||||
#include <ft2build.h>
|
||||
#include <freetype/freetype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
FT_Library library;
|
||||
FT_Error error;
|
||||
|
||||
error = FT_Init_FreeType(&library);
|
||||
|
||||
if (error)
|
||||
return 1;
|
||||
else
|
||||
{
|
||||
FT_Done_FreeType(library);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
]])
|
||||
],
|
||||
[],
|
||||
[no_ft=yes],
|
||||
[echo $ECHO_N "cross compiling; assuming OK... $ECHO_C"])
|
||||
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi # test $ft_config_version -lt $ft_min_version
|
||||
fi # test x$enable_fttest = xyes
|
||||
fi # test "$FT2_CONFIG" = "no"
|
||||
|
||||
if test x$no_ft = x ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
m4_if([$2], [], [:], [$2])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
if test "$FT2_CONFIG" = "no" ; then
|
||||
AC_MSG_WARN([
|
||||
|
||||
The freetype-config script installed by FreeType 2 could not be found.
|
||||
If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in
|
||||
your path, or set the FT2_CONFIG environment variable to the
|
||||
full path to freetype-config.
|
||||
])
|
||||
else
|
||||
if test x$ft_config_is_lt = xyes ; then
|
||||
AC_MSG_WARN([
|
||||
|
||||
Your installed version of the FreeType 2 library is too old.
|
||||
If you have different versions of FreeType 2, make sure that
|
||||
correct values for --with-ft-prefix or --with-ft-exec-prefix
|
||||
are used, or set the FT2_CONFIG environment variable to the
|
||||
full path to freetype-config.
|
||||
])
|
||||
else
|
||||
AC_MSG_WARN([
|
||||
|
||||
The FreeType test program failed to run. If your system uses
|
||||
shared libraries and they are installed outside the normal
|
||||
system library path, make sure the variable LD_LIBRARY_PATH
|
||||
(or whatever is appropriate for your system) is correctly set.
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
FT2_CFLAGS=""
|
||||
FT2_LIBS=""
|
||||
m4_if([$3], [], [:], [$3])
|
||||
fi
|
||||
|
||||
AC_SUBST([FT2_CFLAGS])
|
||||
AC_SUBST([FT2_LIBS])])
|
||||
|
||||
# end of freetype2.m4
|
|
@ -1,32 +0,0 @@
|
|||
## FreeType specific autoconf tests
|
||||
#
|
||||
# Copyright (C) 2002-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
# serial 2
|
||||
|
||||
AC_DEFUN([FT_MUNMAP_PARAM],
|
||||
[AC_MSG_CHECKING([for munmap's first parameter type])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_SOURCE([[
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
int munmap(void *, size_t);
|
||||
|
||||
]])
|
||||
],
|
||||
[AC_MSG_RESULT([void *])
|
||||
AC_DEFINE([MUNMAP_USES_VOIDP],
|
||||
[],
|
||||
[Define to 1 if the first argument of munmap is of type void *])],
|
||||
[AC_MSG_RESULT([char *])])
|
||||
])
|
||||
|
||||
# end of ft-munmap.m4
|
|
@ -1,52 +0,0 @@
|
|||
/****************************************************************************
|
||||
*
|
||||
* ftconfig.h.in
|
||||
*
|
||||
* UNIX-specific configuration file (specification only).
|
||||
*
|
||||
* Copyright (C) 1996-2024 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
* modified, and distributed under the terms of the FreeType project
|
||||
* license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
* this file you indicate that you have read the license and
|
||||
* understand and accept it fully.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* This header file contains a number of macro definitions that are used by
|
||||
* the rest of the engine. Most of the macros here are automatically
|
||||
* determined at compile time, and you should not need to change it to port
|
||||
* FreeType, except to compile the library with a non-ANSI compiler.
|
||||
*
|
||||
* Note however that if some specific modifications are needed, we advise
|
||||
* you to place a modified copy in your build directory.
|
||||
*
|
||||
* The build directory is usually `builds/<system>`, and contains
|
||||
* system-specific files that are always included first when building the
|
||||
* library.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef FTCONFIG_H_
|
||||
#define FTCONFIG_H_
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_CONFIG_OPTIONS_H
|
||||
#include FT_CONFIG_STANDARD_LIBRARY_H
|
||||
|
||||
#undef HAVE_UNISTD_H
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
#include <freetype/config/integer-types.h>
|
||||
#include <freetype/config/public-macros.h>
|
||||
#include <freetype/config/mac-support.h>
|
||||
|
||||
#endif /* FTCONFIG_H_ */
|
||||
|
||||
|
||||
/* END */
|
|
@ -1,436 +0,0 @@
|
|||
/****************************************************************************
|
||||
*
|
||||
* ftsystem.c
|
||||
*
|
||||
* Unix-specific FreeType low-level system interface (body).
|
||||
*
|
||||
* Copyright (C) 1996-2024 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
* modified, and distributed under the terms of the FreeType project
|
||||
* license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
* this file you indicate that you have read the license and
|
||||
* understand and accept it fully.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
/* we use our special ftconfig.h file, not the standard one */
|
||||
#include FT_CONFIG_CONFIG_H
|
||||
#include <freetype/internal/ftdebug.h>
|
||||
#include <freetype/ftsystem.h>
|
||||
#include <freetype/fterrors.h>
|
||||
#include <freetype/fttypes.h>
|
||||
#include <freetype/internal/ftstream.h>
|
||||
|
||||
/* memory-mapping includes and definitions */
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <sys/mman.h>
|
||||
#ifndef MAP_FILE
|
||||
#define MAP_FILE 0x00
|
||||
#endif
|
||||
|
||||
#ifdef MUNMAP_USES_VOIDP
|
||||
#define MUNMAP_ARG_CAST void *
|
||||
#else
|
||||
#define MUNMAP_ARG_CAST char *
|
||||
#endif
|
||||
|
||||
#ifdef NEED_MUNMAP_DECL
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#else
|
||||
extern
|
||||
#endif
|
||||
int
|
||||
munmap( char* addr,
|
||||
int len );
|
||||
|
||||
#define MUNMAP_ARG_CAST char *
|
||||
|
||||
#endif /* NEED_DECLARATION_MUNMAP */
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* MEMORY MANAGEMENT INTERFACE
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* It is not necessary to do any error checking for the
|
||||
* allocation-related functions. This will be done by the higher level
|
||||
* routines like ft_mem_alloc() or ft_mem_realloc().
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @Function:
|
||||
* ft_alloc
|
||||
*
|
||||
* @Description:
|
||||
* The memory allocation function.
|
||||
*
|
||||
* @Input:
|
||||
* memory ::
|
||||
* A pointer to the memory object.
|
||||
*
|
||||
* size ::
|
||||
* The requested size in bytes.
|
||||
*
|
||||
* @Return:
|
||||
* The address of newly allocated block.
|
||||
*/
|
||||
FT_CALLBACK_DEF( void* )
|
||||
ft_alloc( FT_Memory memory,
|
||||
long size )
|
||||
{
|
||||
FT_UNUSED( memory );
|
||||
|
||||
return malloc( size );
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @Function:
|
||||
* ft_realloc
|
||||
*
|
||||
* @Description:
|
||||
* The memory reallocation function.
|
||||
*
|
||||
* @Input:
|
||||
* memory ::
|
||||
* A pointer to the memory object.
|
||||
*
|
||||
* cur_size ::
|
||||
* The current size of the allocated memory block.
|
||||
*
|
||||
* new_size ::
|
||||
* The newly requested size in bytes.
|
||||
*
|
||||
* block ::
|
||||
* The current address of the block in memory.
|
||||
*
|
||||
* @Return:
|
||||
* The address of the reallocated memory block.
|
||||
*/
|
||||
FT_CALLBACK_DEF( void* )
|
||||
ft_realloc( FT_Memory memory,
|
||||
long cur_size,
|
||||
long new_size,
|
||||
void* block )
|
||||
{
|
||||
FT_UNUSED( memory );
|
||||
FT_UNUSED( cur_size );
|
||||
|
||||
return realloc( block, new_size );
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @Function:
|
||||
* ft_free
|
||||
*
|
||||
* @Description:
|
||||
* The memory release function.
|
||||
*
|
||||
* @Input:
|
||||
* memory ::
|
||||
* A pointer to the memory object.
|
||||
*
|
||||
* block ::
|
||||
* The address of block in memory to be freed.
|
||||
*/
|
||||
FT_CALLBACK_DEF( void )
|
||||
ft_free( FT_Memory memory,
|
||||
void* block )
|
||||
{
|
||||
FT_UNUSED( memory );
|
||||
|
||||
free( block );
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* RESOURCE MANAGEMENT INTERFACE
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* The macro FT_COMPONENT is used in trace mode. It is an implicit
|
||||
* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
|
||||
* messages during execution.
|
||||
*/
|
||||
#undef FT_COMPONENT
|
||||
#define FT_COMPONENT io
|
||||
|
||||
/* We use the macro STREAM_FILE for convenience to extract the */
|
||||
/* system-specific stream handle from a given FreeType stream object */
|
||||
#define STREAM_FILE( stream ) ( (FILE*)stream->descriptor.pointer )
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @Function:
|
||||
* ft_close_stream_by_munmap
|
||||
*
|
||||
* @Description:
|
||||
* The function to close a stream which is opened by mmap.
|
||||
*
|
||||
* @Input:
|
||||
* stream :: A pointer to the stream object.
|
||||
*/
|
||||
FT_CALLBACK_DEF( void )
|
||||
ft_close_stream_by_munmap( FT_Stream stream )
|
||||
{
|
||||
munmap( (MUNMAP_ARG_CAST)stream->descriptor.pointer, stream->size );
|
||||
|
||||
stream->descriptor.pointer = NULL;
|
||||
stream->size = 0;
|
||||
stream->base = NULL;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @Function:
|
||||
* ft_close_stream_by_free
|
||||
*
|
||||
* @Description:
|
||||
* The function to close a stream which is created by ft_alloc.
|
||||
*
|
||||
* @Input:
|
||||
* stream :: A pointer to the stream object.
|
||||
*/
|
||||
FT_CALLBACK_DEF( void )
|
||||
ft_close_stream_by_free( FT_Stream stream )
|
||||
{
|
||||
ft_free( stream->memory, stream->descriptor.pointer );
|
||||
|
||||
stream->descriptor.pointer = NULL;
|
||||
stream->size = 0;
|
||||
stream->base = NULL;
|
||||
}
|
||||
|
||||
|
||||
/* documentation is in ftobjs.h */
|
||||
|
||||
FT_BASE_DEF( FT_Error )
|
||||
FT_Stream_Open( FT_Stream stream,
|
||||
const char* filepathname )
|
||||
{
|
||||
int file;
|
||||
struct stat stat_buf;
|
||||
|
||||
|
||||
if ( !stream )
|
||||
return FT_THROW( Invalid_Stream_Handle );
|
||||
|
||||
/* open the file */
|
||||
file = open( filepathname, O_RDONLY );
|
||||
if ( file < 0 )
|
||||
{
|
||||
FT_ERROR(( "FT_Stream_Open:" ));
|
||||
FT_ERROR(( " could not open `%s'\n", filepathname ));
|
||||
return FT_THROW( Cannot_Open_Resource );
|
||||
}
|
||||
|
||||
/* Here we ensure that a "fork" will _not_ duplicate */
|
||||
/* our opened input streams on Unix. This is critical */
|
||||
/* since it avoids some (possible) access control */
|
||||
/* issues and cleans up the kernel file table a bit. */
|
||||
/* */
|
||||
#ifdef F_SETFD
|
||||
#ifdef FD_CLOEXEC
|
||||
(void)fcntl( file, F_SETFD, FD_CLOEXEC );
|
||||
#else
|
||||
(void)fcntl( file, F_SETFD, 1 );
|
||||
#endif /* FD_CLOEXEC */
|
||||
#endif /* F_SETFD */
|
||||
|
||||
if ( fstat( file, &stat_buf ) < 0 )
|
||||
{
|
||||
FT_ERROR(( "FT_Stream_Open:" ));
|
||||
FT_ERROR(( " could not `fstat' file `%s'\n", filepathname ));
|
||||
goto Fail_Map;
|
||||
}
|
||||
|
||||
/* XXX: TODO -- real 64bit platform support */
|
||||
/* */
|
||||
/* `stream->size' is typedef'd to unsigned long (in `ftsystem.h'); */
|
||||
/* `stat_buf.st_size', however, is usually typedef'd to off_t */
|
||||
/* (in sys/stat.h). */
|
||||
/* On some platforms, the former is 32bit and the latter is 64bit. */
|
||||
/* To avoid overflow caused by fonts in huge files larger than */
|
||||
/* 2GB, do a test. Temporary fix proposed by Sean McBride. */
|
||||
/* */
|
||||
if ( stat_buf.st_size > LONG_MAX )
|
||||
{
|
||||
FT_ERROR(( "FT_Stream_Open: file is too big\n" ));
|
||||
goto Fail_Map;
|
||||
}
|
||||
else if ( stat_buf.st_size == 0 )
|
||||
{
|
||||
FT_ERROR(( "FT_Stream_Open: zero-length file\n" ));
|
||||
goto Fail_Map;
|
||||
}
|
||||
|
||||
/* This cast potentially truncates a 64bit to 32bit! */
|
||||
stream->size = (unsigned long)stat_buf.st_size;
|
||||
stream->pos = 0;
|
||||
stream->base = (unsigned char *)mmap( NULL,
|
||||
stream->size,
|
||||
PROT_READ,
|
||||
MAP_FILE | MAP_PRIVATE,
|
||||
file,
|
||||
0 );
|
||||
|
||||
if ( stream->base != MAP_FAILED )
|
||||
stream->close = ft_close_stream_by_munmap;
|
||||
else
|
||||
{
|
||||
ssize_t total_read_count;
|
||||
|
||||
|
||||
FT_ERROR(( "FT_Stream_Open:" ));
|
||||
FT_ERROR(( " could not `mmap' file `%s'\n", filepathname ));
|
||||
|
||||
stream->base = (unsigned char*)ft_alloc( stream->memory, stream->size );
|
||||
|
||||
if ( !stream->base )
|
||||
{
|
||||
FT_ERROR(( "FT_Stream_Open:" ));
|
||||
FT_ERROR(( " could not `alloc' memory\n" ));
|
||||
goto Fail_Map;
|
||||
}
|
||||
|
||||
total_read_count = 0;
|
||||
do
|
||||
{
|
||||
ssize_t read_count;
|
||||
|
||||
|
||||
read_count = read( file,
|
||||
stream->base + total_read_count,
|
||||
stream->size - total_read_count );
|
||||
|
||||
if ( read_count <= 0 )
|
||||
{
|
||||
if ( read_count == -1 && errno == EINTR )
|
||||
continue;
|
||||
|
||||
FT_ERROR(( "FT_Stream_Open:" ));
|
||||
FT_ERROR(( " error while `read'ing file `%s'\n", filepathname ));
|
||||
goto Fail_Read;
|
||||
}
|
||||
|
||||
total_read_count += read_count;
|
||||
|
||||
} while ( (unsigned long)total_read_count != stream->size );
|
||||
|
||||
stream->close = ft_close_stream_by_free;
|
||||
}
|
||||
|
||||
close( file );
|
||||
|
||||
stream->descriptor.pointer = stream->base;
|
||||
stream->pathname.pointer = (char*)filepathname;
|
||||
|
||||
stream->read = NULL;
|
||||
|
||||
FT_TRACE1(( "FT_Stream_Open:" ));
|
||||
FT_TRACE1(( " opened `%s' (%ld bytes) successfully\n",
|
||||
filepathname, stream->size ));
|
||||
|
||||
return FT_Err_Ok;
|
||||
|
||||
Fail_Read:
|
||||
ft_free( stream->memory, stream->base );
|
||||
|
||||
Fail_Map:
|
||||
close( file );
|
||||
|
||||
stream->base = NULL;
|
||||
stream->size = 0;
|
||||
stream->pos = 0;
|
||||
|
||||
return FT_THROW( Cannot_Open_Stream );
|
||||
}
|
||||
|
||||
|
||||
#ifdef FT_DEBUG_MEMORY
|
||||
|
||||
extern FT_Int
|
||||
ft_mem_debug_init( FT_Memory memory );
|
||||
|
||||
extern void
|
||||
ft_mem_debug_done( FT_Memory memory );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* documentation is in ftobjs.h */
|
||||
|
||||
FT_BASE_DEF( FT_Memory )
|
||||
FT_New_Memory( void )
|
||||
{
|
||||
FT_Memory memory;
|
||||
|
||||
|
||||
memory = (FT_Memory)malloc( sizeof ( *memory ) );
|
||||
if ( memory )
|
||||
{
|
||||
memory->user = NULL;
|
||||
memory->alloc = ft_alloc;
|
||||
memory->realloc = ft_realloc;
|
||||
memory->free = ft_free;
|
||||
#ifdef FT_DEBUG_MEMORY
|
||||
ft_mem_debug_init( memory );
|
||||
#endif
|
||||
}
|
||||
|
||||
return memory;
|
||||
}
|
||||
|
||||
|
||||
/* documentation is in ftobjs.h */
|
||||
|
||||
FT_BASE_DEF( void )
|
||||
FT_Done_Memory( FT_Memory memory )
|
||||
{
|
||||
#ifdef FT_DEBUG_MEMORY
|
||||
ft_mem_debug_done( memory );
|
||||
#endif
|
||||
memory->free( memory, memory );
|
||||
}
|
||||
|
||||
|
||||
/* END */
|
|
@ -1,102 +0,0 @@
|
|||
#
|
||||
# FreeType 2 installation instructions for Unix systems
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
# If you say
|
||||
#
|
||||
# make install DESTDIR=/tmp/somewhere/
|
||||
#
|
||||
# don't forget the final backslash (this command is mainly for package
|
||||
# maintainers).
|
||||
|
||||
|
||||
.PHONY: install uninstall check
|
||||
|
||||
# Unix installation and deinstallation targets.
|
||||
#
|
||||
# Note that we remove any data found in `$(includedir)/freetype2' before
|
||||
# installing new files to avoid interferences with files installed by
|
||||
# previous FreeType versions (which use slightly different locations).
|
||||
#
|
||||
# We also remove `$(includedir)/ft2build.h' for the same reason.
|
||||
#
|
||||
# Note that some header files get handled twice for simplicity; a special,
|
||||
# configured version overwrites the generic one.
|
||||
#
|
||||
install: $(PROJECT_LIBRARY)
|
||||
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2
|
||||
-$(DELETE) $(DESTDIR)$(includedir)/ft2build.h
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
|
||||
$(DESTDIR)$(libdir)/pkgconfig \
|
||||
$(DESTDIR)$(includedir)/freetype2/freetype/config \
|
||||
$(DESTDIR)$(datadir)/aclocal
|
||||
ifeq ($(INSTALL_FT2_CONFIG),TRUE)
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(bindir) \
|
||||
$(DESTDIR)$(mandir)/man1
|
||||
endif
|
||||
$(LIBTOOL) --mode=install $(INSTALL) \
|
||||
$(PROJECT_LIBRARY) $(DESTDIR)$(libdir)
|
||||
-for P in $(PUBLIC_H) ; do \
|
||||
$(INSTALL_DATA) \
|
||||
$$P $(DESTDIR)$(includedir)/freetype2/freetype ; \
|
||||
done
|
||||
-for P in $(CONFIG_H) ; do \
|
||||
$(INSTALL_DATA) \
|
||||
$$P $(DESTDIR)$(includedir)/freetype2/freetype/config ; \
|
||||
done
|
||||
$(INSTALL_DATA) $(TOP_DIR)/include/ft2build.h \
|
||||
$(DESTDIR)$(includedir)/freetype2/ft2build.h
|
||||
$(INSTALL_DATA) $(OBJ_BUILD)/ftconfig.h \
|
||||
$(DESTDIR)$(includedir)/freetype2/freetype/config/ftconfig.h
|
||||
$(INSTALL_DATA) $(OBJ_DIR)/ftmodule.h \
|
||||
$(DESTDIR)$(includedir)/freetype2/freetype/config/ftmodule.h
|
||||
$(INSTALL_DATA) $(OBJ_BUILD)/ftoption.h \
|
||||
$(DESTDIR)$(includedir)/freetype2/freetype/config/ftoption.h
|
||||
$(INSTALL_SCRIPT) -m 644 $(PLATFORM_DIR)/freetype2.m4 \
|
||||
$(DESTDIR)$(datadir)/aclocal/freetype2.m4
|
||||
$(INSTALL_SCRIPT) -m 644 $(OBJ_BUILD)/freetype2.pc \
|
||||
$(DESTDIR)$(libdir)/pkgconfig/freetype2.pc
|
||||
ifeq ($(INSTALL_FT2_CONFIG),TRUE)
|
||||
$(INSTALL_SCRIPT) -m 755 $(OBJ_BUILD)/freetype-config \
|
||||
$(DESTDIR)$(bindir)/freetype-config
|
||||
$(INSTALL_DATA) $(TOP_DIR)/docs/freetype-config.1 \
|
||||
$(DESTDIR)$(mandir)/man1/freetype-config.1
|
||||
endif
|
||||
|
||||
|
||||
uninstall:
|
||||
-$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/$(LIBRARY).$A
|
||||
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2
|
||||
-$(DELETE) $(DESTDIR)$(bindir)/freetype-config
|
||||
-$(DELETE) $(DESTDIR)$(datadir)/aclocal/freetype2.m4
|
||||
-$(DELETE) $(DESTDIR)$(libdir)/pkgconfig/freetype2.pc
|
||||
-$(DELETE) $(DESTDIR)$(mandir)/man1/freetype-config.1
|
||||
|
||||
|
||||
check:
|
||||
$(info There is no validation suite for this package.)
|
||||
|
||||
|
||||
.PHONY: clean_project_unix distclean_project_unix
|
||||
|
||||
# Unix cleaning and distclean rules.
|
||||
#
|
||||
clean_project_unix:
|
||||
-$(LIBTOOL) --mode=clean $(RM) $(OBJECTS_LIST)
|
||||
-$(DELETE) $(CLEAN)
|
||||
|
||||
distclean_project_unix: clean_project_unix
|
||||
-$(LIBTOOL) --mode=clean $(RM) $(PROJECT_LIBRARY)
|
||||
-$(DELETE) *.orig *~ core *.core $(DISTCLEAN)
|
||||
|
||||
# EOF
|
|
@ -1,199 +0,0 @@
|
|||
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
# serial 1 (pkg-config-0.24)
|
||||
#
|
||||
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
||||
# ----------------------------------
|
||||
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
||||
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
||||
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
|
||||
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
|
||||
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
|
||||
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
|
||||
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
|
||||
|
||||
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
||||
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
||||
fi
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
_pkg_min_version=m4_default([$1], [0.9.0])
|
||||
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
PKG_CONFIG=""
|
||||
fi
|
||||
fi[]dnl
|
||||
])# PKG_PROG_PKG_CONFIG
|
||||
|
||||
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
# Check to see whether a particular set of modules exists. Similar
|
||||
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||
#
|
||||
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
# only at the first occurrence in configure.ac, so if the first place
|
||||
# it's called might be skipped (such as if it is within an "if", you
|
||||
# have to call PKG_CHECK_EXISTS manually
|
||||
# --------------------------------------------------------------
|
||||
AC_DEFUN([PKG_CHECK_EXISTS],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
||||
m4_default([$2], [:])
|
||||
m4_ifvaln([$3], [else
|
||||
$3])dnl
|
||||
fi])
|
||||
|
||||
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
||||
# ---------------------------------------------
|
||||
m4_define([_PKG_CONFIG],
|
||||
[if test -n "$$1"; then
|
||||
pkg_cv_[]$1="$$1"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
PKG_CHECK_EXISTS([$3],
|
||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes ],
|
||||
[pkg_failed=yes])
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi[]dnl
|
||||
])# _PKG_CONFIG
|
||||
|
||||
# _PKG_SHORT_ERRORS_SUPPORTED
|
||||
# -----------------------------
|
||||
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi[]dnl
|
||||
])# _PKG_SHORT_ERRORS_SUPPORTED
|
||||
|
||||
|
||||
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
# [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
#
|
||||
# Note that if there is a possibility the first call to
|
||||
# PKG_CHECK_MODULES might not happen, you should be sure to include an
|
||||
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
||||
#
|
||||
#
|
||||
# --------------------------------------------------------------
|
||||
AC_DEFUN([PKG_CHECK_MODULES],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
||||
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
||||
|
||||
pkg_failed=no
|
||||
AC_MSG_CHECKING([for $1])
|
||||
|
||||
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
||||
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
||||
|
||||
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
||||
and $1[]_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.])
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
AC_MSG_RESULT([no])
|
||||
_PKG_SHORT_ERRORS_SUPPORTED
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
||||
|
||||
m4_default([$4], [AC_MSG_ERROR(
|
||||
[Package requirements ($2) were not met:
|
||||
|
||||
$$1_PKG_ERRORS
|
||||
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
_PKG_TEXT])[]dnl
|
||||
])
|
||||
elif test $pkg_failed = untried; then
|
||||
AC_MSG_RESULT([no])
|
||||
m4_default([$4], [AC_MSG_FAILURE(
|
||||
[The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
|
||||
_PKG_TEXT
|
||||
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
|
||||
])
|
||||
else
|
||||
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
||||
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
||||
AC_MSG_RESULT([yes])
|
||||
$3
|
||||
fi[]dnl
|
||||
])# PKG_CHECK_MODULES
|
||||
|
||||
|
||||
# PKG_INSTALLDIR(DIRECTORY)
|
||||
# -------------------------
|
||||
# Substitutes the variable pkgconfigdir as the location where a module
|
||||
# should install pkg-config .pc files. By default the directory is
|
||||
# $libdir/pkgconfig, but the default can be changed by passing
|
||||
# DIRECTORY. The user can override through the --with-pkgconfigdir
|
||||
# parameter.
|
||||
AC_DEFUN([PKG_INSTALLDIR],
|
||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
|
||||
m4_pushdef([pkg_description],
|
||||
[pkg-config installation directory @<:@]pkg_default[@:>@])
|
||||
AC_ARG_WITH([pkgconfigdir],
|
||||
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
|
||||
[with_pkgconfigdir=]pkg_default)
|
||||
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
|
||||
m4_popdef([pkg_default])
|
||||
m4_popdef([pkg_description])
|
||||
]) dnl PKG_INSTALLDIR
|
||||
|
||||
|
||||
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
|
||||
# -------------------------
|
||||
# Substitutes the variable noarch_pkgconfigdir as the location where a
|
||||
# module should install arch-independent pkg-config .pc files. By
|
||||
# default the directory is $datadir/pkgconfig, but the default can be
|
||||
# changed by passing DIRECTORY. The user can override through the
|
||||
# --with-noarch-pkgconfigdir parameter.
|
||||
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
|
||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
|
||||
m4_pushdef([pkg_description],
|
||||
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
|
||||
AC_ARG_WITH([noarch-pkgconfigdir],
|
||||
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
|
||||
[with_noarch_pkgconfigdir=]pkg_default)
|
||||
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
|
||||
m4_popdef([pkg_default])
|
||||
m4_popdef([pkg_description])
|
||||
]) dnl PKG_NOARCH_INSTALLDIR
|
|
@ -1,130 +0,0 @@
|
|||
#
|
||||
# FreeType 2 template for Unix-specific compiler definitions
|
||||
#
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
CC := @CC@
|
||||
COMPILER_SEP := $(SEP)
|
||||
FT_LIBTOOL_DIR ?= $(PLATFORM_DIR)
|
||||
|
||||
LIBTOOL := $(FT_LIBTOOL_DIR)/libtool
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := lo
|
||||
SO := o
|
||||
|
||||
|
||||
# The executable file extension. Although most Unix platforms use no
|
||||
# extension, we copy the extension detected by autoconf. Useful for cross
|
||||
# building on Unix systems for non-Unix systems.
|
||||
#
|
||||
E := @EXEEXT@
|
||||
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := la
|
||||
SA := a
|
||||
|
||||
|
||||
# The name of the final library file. Note that the DOS-specific Makefile
|
||||
# uses a shorter (8.3) name.
|
||||
#
|
||||
LIBRARY := lib$(PROJECT)
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -l
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -o$(space)
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
|
||||
# ANSI compliance.
|
||||
#
|
||||
# We use our own FreeType configuration files overriding defaults.
|
||||
#
|
||||
CPPFLAGS := @CPPFLAGS@
|
||||
CFLAGS := -c @XX_CFLAGS@ @CFLAGS@ \
|
||||
$DFT_CONFIG_CONFIG_H="<ftconfig.h>" \
|
||||
$DFT_CONFIG_MODULES_H="<ftmodule.h>" \
|
||||
$DFT_CONFIG_OPTIONS_H="<ftoption.h>"
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS := @XX_ANSIFLAGS@
|
||||
|
||||
# C compiler to use -- we use libtool!
|
||||
#
|
||||
# CC might be set on the command line; we store this value in `CCraw'.
|
||||
# Consequently, we use the `override' directive to ensure that the
|
||||
# libtool call is always prepended.
|
||||
#
|
||||
CCraw := $(CC)
|
||||
override CC := $(LIBTOOL) --mode=compile $(CCraw)
|
||||
|
||||
# Resource compiler to use on Cygwin/MinGW, usually windres.
|
||||
#
|
||||
RCraw := @RC@
|
||||
ifneq ($(RCraw),)
|
||||
RC := $(LIBTOOL) --tag=RC --mode=compile $(RCraw)
|
||||
endif
|
||||
|
||||
# Linker flags.
|
||||
#
|
||||
LDFLAGS := @LDFLAGS@
|
||||
|
||||
# export symbols
|
||||
#
|
||||
CCraw_build := @CC_BUILD@ # native CC of building system
|
||||
E_BUILD := @EXEEXT_BUILD@ # extension for executable on building system
|
||||
EXPORTS_LIST := $(OBJ_DIR)/ftexport.sym
|
||||
CCexe := $(CCraw_build) # used to compile `apinames' only
|
||||
|
||||
|
||||
# Library linking.
|
||||
#
|
||||
LINK_LIBRARY = $(LIBTOOL) --mode=link $(CCraw) -o $@ $(OBJECTS_LIST) \
|
||||
-rpath $(libdir) -version-info $(version_info) \
|
||||
$(LDFLAGS) -no-undefined \
|
||||
-export-symbols $(EXPORTS_LIST)
|
||||
|
||||
# For the demo programs.
|
||||
FT_DEMO_CFLAGS := @FT_DEMO_CFLAGS@
|
||||
FT_DEMO_LDFLAGS := @FT_DEMO_LDFLAGS@
|
||||
|
||||
# EOF
|
|
@ -1,163 +0,0 @@
|
|||
#
|
||||
# FreeType 2 configuration rules templates for Unix + configure
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
SHELL := @SHELL@
|
||||
|
||||
TOP_DIR := $(shell cd $(TOP_DIR); pwd)
|
||||
|
||||
DELETE := rm -f
|
||||
DELDIR := rm -rf
|
||||
CAT := cat
|
||||
SEP := /
|
||||
|
||||
# This is used for `make refdoc' and `make refdoc-venv'
|
||||
#
|
||||
PYTHON := @PYTHON@
|
||||
BIN := bin
|
||||
|
||||
# this is used for `make distclean' and `make install'
|
||||
OBJ_BUILD ?= $(PLATFORM_DIR)
|
||||
|
||||
# don't use `:=' here since the path stuff will be included after this file
|
||||
#
|
||||
FTSYS_SRC = @FTSYS_SRC@
|
||||
|
||||
INSTALL := @INSTALL@
|
||||
INSTALL_DATA := @INSTALL_DATA@
|
||||
INSTALL_PROGRAM := @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT := @INSTALL_SCRIPT@
|
||||
MKINSTALLDIRS := @MKDIR_P@
|
||||
|
||||
CLEAN += $(OBJ_BUILD)/freetype-config \
|
||||
$(OBJ_BUILD)/freetype2.pc
|
||||
|
||||
DISTCLEAN += $(OBJ_BUILD)/config.cache \
|
||||
$(OBJ_BUILD)/config.log \
|
||||
$(OBJ_BUILD)/config.status \
|
||||
$(OBJ_BUILD)/unix-def.mk \
|
||||
$(OBJ_BUILD)/unix-cc.mk \
|
||||
$(OBJ_BUILD)/ftconfig.h \
|
||||
$(OBJ_BUILD)/ftoption.h \
|
||||
$(LIBTOOL) \
|
||||
$(OBJ_BUILD)/Makefile
|
||||
|
||||
|
||||
# Standard installation variables.
|
||||
#
|
||||
prefix := @prefix@
|
||||
exec_prefix := @exec_prefix@
|
||||
libdir := @libdir@
|
||||
bindir := @bindir@
|
||||
includedir := @includedir@
|
||||
datarootdir := @datarootdir@
|
||||
datadir := @datadir@
|
||||
mandir := @mandir@
|
||||
|
||||
version_info := @version_info@
|
||||
|
||||
# Variables needed for `freetype-config' and `freetype.pc'.
|
||||
#
|
||||
PKG_CONFIG := @PKG_CONFIG@
|
||||
PKGCONFIG_REQUIRES := @PKGCONFIG_REQUIRES@
|
||||
PKGCONFIG_REQUIRES_PRIVATE := @PKGCONFIG_REQUIRES_PRIVATE@
|
||||
PKGCONFIG_LIBS := @PKGCONFIG_LIBS@
|
||||
PKGCONFIG_LIBS_PRIVATE := @PKGCONFIG_LIBS_PRIVATE@
|
||||
LIBSSTATIC_CONFIG := @LIBSSTATIC_CONFIG@
|
||||
build_libtool_libs := @build_libtool_libs@
|
||||
ft_version := @ft_version@
|
||||
|
||||
# The directory where all library files are placed.
|
||||
#
|
||||
# By default, this is the same as $(OBJ_DIR); however, this can be changed
|
||||
# to suit particular needs.
|
||||
#
|
||||
LIB_DIR := $(OBJ_DIR)
|
||||
|
||||
# The BASE_SRC macro lists all source files that should be included in
|
||||
# src/base/ftbase.c. When configure sets up CFLAGS to build ftmac.c,
|
||||
# ftmac.c should be added to BASE_SRC.
|
||||
ftmac_c := @ftmac_c@
|
||||
|
||||
# The SYSTEM_ZLIB macro is defined if the user wishes to link dynamically
|
||||
# with its system wide zlib. If SYSTEM_ZLIB is 'yes', the zlib part of the
|
||||
# ftgzip module is not compiled in.
|
||||
SYSTEM_ZLIB := @SYSTEM_ZLIB@
|
||||
|
||||
|
||||
# The NO_OUTPUT macro is appended to command lines in order to ignore
|
||||
# the output of some programs.
|
||||
#
|
||||
NO_OUTPUT := 2> /dev/null
|
||||
|
||||
|
||||
# To support calls like
|
||||
#
|
||||
# configure --includedir='${libdir}'/freetype2/include
|
||||
#
|
||||
# we generate `freetype-config' and `freetype.pc' at compile time so that
|
||||
# those variables are properly expanded.
|
||||
|
||||
$(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in
|
||||
rm -f $@ $@.tmp
|
||||
sed -e 's|%LIBSSTATIC_CONFIG%|$(LIBSSTATIC_CONFIG)|' \
|
||||
-e 's|%PKG_CONFIG%|$(PKG_CONFIG)|' \
|
||||
-e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
|
||||
-e 's|%exec_prefix%|$(exec_prefix)|' \
|
||||
-e 's|%ft_version%|$(ft_version)|' \
|
||||
-e 's|%includedir%|$(includedir)|' \
|
||||
-e 's|%libdir%|$(libdir)|' \
|
||||
-e 's|%prefix%|$(prefix)|' \
|
||||
$< \
|
||||
> $@.tmp
|
||||
chmod +x $@.tmp
|
||||
chmod go-w $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
# To support directory names with spaces (as might easily happen on Windows
|
||||
# platforms), the right solution would be to surround the pkg-variables in
|
||||
# `freetype2.pc' with double quotes. However, doing so ironically disables
|
||||
# the prefix override mechanism especially written for Windows. This is a
|
||||
# bug in pkg-config version 0.28 and earlier.
|
||||
#
|
||||
# For this reason, we escape spaces with backslashes.
|
||||
|
||||
exec_prefix_x := $(subst $(space),\\$(space),$(exec_prefix))
|
||||
includedir_x := $(subst $(space),\\$(space),$(includedir))
|
||||
libdir_x := $(subst $(space),\\$(space),$(libdir))
|
||||
prefix_x := $(subst $(space),\\$(space),$(prefix))
|
||||
|
||||
$(OBJ_BUILD)/freetype2.pc: $(TOP_DIR)/builds/unix/freetype2.in
|
||||
rm -f $@ $@.tmp
|
||||
sed -e 's|%PKGCONFIG_REQUIRES%|$(PKGCONFIG_REQUIRES)|' \
|
||||
-e 's|%PKGCONFIG_REQUIRES_PRIVATE%|$(PKGCONFIG_REQUIRES_PRIVATE)|' \
|
||||
-e 's|%PKGCONFIG_LIBS%|$(PKGCONFIG_LIBS)|' \
|
||||
-e 's|%PKGCONFIG_LIBS_PRIVATE%|$(PKGCONFIG_LIBS_PRIVATE)|' \
|
||||
-e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
|
||||
-e 's|%exec_prefix%|$(exec_prefix_x)|' \
|
||||
-e 's|%ft_version%|$(ft_version)|' \
|
||||
-e 's|%includedir%|$(includedir_x)|' \
|
||||
-e 's|%libdir%|$(libdir_x)|' \
|
||||
-e 's|%prefix%|$(prefix_x)|' \
|
||||
$< \
|
||||
> $@.tmp
|
||||
chmod a-w $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
# defines whether we should install `freetype-config' or not
|
||||
INSTALL_FT2_CONFIG = @INSTALL_FT2_CONFIG@
|
||||
|
||||
all install: $(OBJ_BUILD)/freetype-config \
|
||||
$(OBJ_BUILD)/freetype2.pc
|
||||
|
||||
# EOF
|
|
@ -1,26 +0,0 @@
|
|||
#
|
||||
# FreeType 2 Configuration rules for Unix + GCC
|
||||
#
|
||||
# Development version without optimizations & libtool
|
||||
# and no installation.
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
DEVEL_DIR := $(TOP_DIR)/devel
|
||||
|
||||
include $(TOP_DIR)/builds/unix/unixddef.mk
|
||||
include $(TOP_DIR)/builds/compiler/gcc-dev.mk
|
||||
include $(TOP_DIR)/builds/link_std.mk
|
||||
|
||||
|
||||
# EOF
|
|
@ -1,24 +0,0 @@
|
|||
#
|
||||
# FreeType 2 Configuration rules for Unix + LCC
|
||||
#
|
||||
# Development version without optimizations & libtool
|
||||
# and no installation.
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 1996-2024 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
include $(TOP_DIR)/builds/unix/unixddef.mk
|
||||
include $(TOP_DIR)/builds/compiler/unix-lcc.mk
|
||||
include $(TOP_DIR)/builds/link_std.mk
|
||||
|
||||
|
||||
# EOF
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue