2000-07-08 00:22:20 +00:00
|
|
|
#
|
|
|
|
# FreeType 2 host platform detection rules
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-01-17 06:18:48 +00:00
|
|
|
# Copyright (C) 1996-2021 by
|
2000-07-08 00:22:20 +00:00
|
|
|
# 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:
|
|
|
|
#
|
2021-01-10 14:34:46 +00:00
|
|
|
# PLATFORM_DIR The configuration and system-specific directory. Usually
|
2013-11-13 07:55:46 +00:00
|
|
|
# `builds/$(PLATFORM)' but can be different for custom builds
|
|
|
|
# of the library.
|
2000-07-08 00:22:20 +00:00
|
|
|
#
|
|
|
|
# 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.
|
2003-06-09 04:46:30 +00:00
|
|
|
# COMPILER_SEP The separator used in arguments of the compilation tools.
|
2000-07-08 00:22:20 +00:00
|
|
|
# CC The compiler to use.
|
|
|
|
#
|
|
|
|
# You need to set the following variable(s) before calling it:
|
|
|
|
#
|
2002-06-14 08:09:25 +00:00
|
|
|
# TOP_DIR The top-most directory in the FreeType library source
|
2000-07-08 00:22:20 +00:00
|
|
|
# hierarchy. If not defined, it will default to `.'.
|
|
|
|
|
|
|
|
# Set auto-detection default to `ansi' resp. UNIX-like operating systems.
|
|
|
|
#
|
2003-06-09 04:46:30 +00:00
|
|
|
PLATFORM := ansi
|
|
|
|
DELETE := $(RM)
|
|
|
|
COPY := cp
|
2006-12-09 20:01:43 +00:00
|
|
|
CAT := cat
|
2003-06-09 04:46:30 +00:00
|
|
|
SEP := /
|
2000-07-08 00:22:20 +00:00
|
|
|
|
2003-06-09 04:46:30 +00:00
|
|
|
BUILD_CONFIG := $(TOP_DIR)/builds
|
|
|
|
|
|
|
|
# These two assignments must be delayed.
|
2021-01-10 14:34:46 +00:00
|
|
|
PLATFORM_DIR = $(BUILD_CONFIG)/$(PLATFORM)
|
|
|
|
CONFIG_RULES = $(PLATFORM_DIR)/$(CONFIG_FILE)
|
2000-07-08 00:22:20 +00:00
|
|
|
|
|
|
|
# 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 \ )
|
|
|
|
|
2000-12-20 22:09:41 +00:00
|
|
|
# Find all auto-detectable platforms.
|
2000-07-08 00:22:20 +00:00
|
|
|
#
|
2003-06-09 04:46:30 +00:00
|
|
|
PLATFORMS := $(notdir $(subst /detect.mk,,$(wildcard $(BUILD_CONFIG)/*/detect.mk)))
|
|
|
|
.PHONY: $(PLATFORMS) ansi
|
2000-12-20 22:09:41 +00:00
|
|
|
|
|
|
|
# Filter out platform specified as setup target.
|
|
|
|
#
|
2003-06-09 04:46:30 +00:00
|
|
|
PLATFORM := $(firstword $(filter $(MAKECMDGOALS),$(PLATFORMS)))
|
2000-12-20 22:09:41 +00:00
|
|
|
|
|
|
|
# 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.
|
|
|
|
#
|
2003-06-09 04:46:30 +00:00
|
|
|
include $(wildcard $(BUILD_CONFIG)/*/detect.mk)
|
2000-12-20 22:09:41 +00:00
|
|
|
endif
|
2000-07-08 00:22:20 +00:00
|
|
|
|
|
|
|
# In case no detection rule file was successful, use the default.
|
|
|
|
#
|
|
|
|
ifndef CONFIG_FILE
|
|
|
|
CONFIG_FILE := ansi.mk
|
|
|
|
setup: std_setup
|
2000-12-20 22:09:41 +00:00
|
|
|
.PHONY: setup
|
2000-07-08 00:22:20 +00:00
|
|
|
endif
|
|
|
|
|
2018-04-15 20:27:10 +00:00
|
|
|
# Flash out and copy rules.
|
2000-07-08 00:22:20 +00:00
|
|
|
#
|
2018-04-15 20:27:10 +00:00
|
|
|
.PHONY: std_setup
|
2000-07-08 00:22:20 +00:00
|
|
|
|
|
|
|
std_setup:
|
2018-04-15 20:27:10 +00:00
|
|
|
$(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))
|
2021-01-10 14:34:46 +00:00
|
|
|
$(info $(empty) configuration directory $(subst /,$(SEP),$(PLATFORM_DIR)))
|
2018-04-15 20:27:10 +00:00
|
|
|
$(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,)
|
2020-03-21 14:47:17 +00:00
|
|
|
$(info or `$(MAKE) refdoc' to build the API reference (this needs Python >= 3.5).)
|
2018-04-15 20:27:10 +00:00
|
|
|
$(info )
|
|
|
|
@$(COPY) $(subst /,$(SEP),$(CONFIG_RULES) $(CONFIG_MK))
|
2000-07-08 00:22:20 +00:00
|
|
|
|
2003-06-09 04:46:30 +00:00
|
|
|
|
2000-07-08 00:22:20 +00:00
|
|
|
# EOF
|