1999-12-16 23:11:37 +00:00
|
|
|
|
#
|
2000-03-05 01:14:19 +00:00
|
|
|
|
# FreeType 2 host platform detection rules
|
1999-12-16 23:11:37 +00:00
|
|
|
|
#
|
|
|
|
|
|
2000-03-05 01:14:19 +00:00
|
|
|
|
|
|
|
|
|
# Copyright 1996-2000 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.
|
1999-12-16 23:11:37 +00:00
|
|
|
|
|
|
|
|
|
|
2000-03-05 01:14:19 +00:00
|
|
|
|
# This sub-Makefile is in charge of detecting the current platform. It sets
|
|
|
|
|
# the following variables:
|
|
|
|
|
#
|
|
|
|
|
# BUILD The configuration and system-specific directory. Usually
|
2000-05-12 15:01:18 +00:00
|
|
|
|
# `freetype/config/$(PLATFORM)' but can be different for
|
|
|
|
|
# custom builds of the library.
|
2000-03-05 01:14:19 +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.
|
2000-05-12 15:01:18 +00:00
|
|
|
|
# CONFIG_FILE The configuration sub-makefile to use. This usually depends
|
|
|
|
|
# on the compiler defined in the `CC' environment variable.
|
2000-03-05 01:14:19 +00:00
|
|
|
|
# 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.
|
|
|
|
|
# CC The compiler to use.
|
1999-12-16 23:11:37 +00:00
|
|
|
|
#
|
2000-03-05 01:14:19 +00:00
|
|
|
|
# You need to set the following variable(s) before calling it:
|
1999-12-16 23:11:37 +00:00
|
|
|
|
#
|
2000-03-05 01:14:19 +00:00
|
|
|
|
# TOP The top-most directory in the FreeType library source
|
|
|
|
|
# hierarchy. If not defined, it will default to `.'.
|
|
|
|
|
|
|
|
|
|
# If TOP is not defined, default it to `.'
|
|
|
|
|
#
|
|
|
|
|
ifndef TOP
|
|
|
|
|
TOP := .
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
# Set auto-detection default to `ansi'.
|
2000-05-12 15:01:18 +00:00
|
|
|
|
# Note that we delay the evaluation of $(BUILD_CONFIG_), $(BUILD), and
|
2000-03-05 01:14:19 +00:00
|
|
|
|
# $(CONFIG_RULES).
|
1999-12-16 23:11:37 +00:00
|
|
|
|
#
|
2000-03-05 01:14:19 +00:00
|
|
|
|
PLATFORM := ansi
|
|
|
|
|
DELETE := $(RM)
|
|
|
|
|
COPY := cp
|
|
|
|
|
SEP := /
|
1999-12-16 23:11:37 +00:00
|
|
|
|
|
2000-05-12 15:01:18 +00:00
|
|
|
|
BUILD_CONFIG_ = $(TOP)$(SEP)config$(SEP)
|
|
|
|
|
BUILD = $(BUILD_CONFIG_)$(PLATFORM)
|
|
|
|
|
CONFIG_RULES = $(BUILD)$(SEP)$(CONFIG_FILE)
|
2000-03-05 01:14:19 +00:00
|
|
|
|
|
|
|
|
|
# We define the BACKSLASH variable to hold a single back-slash character.
|
1999-12-16 23:11:37 +00:00
|
|
|
|
# This is needed because a line like
|
|
|
|
|
#
|
2000-03-05 01:14:19 +00:00
|
|
|
|
# SEP := \
|
1999-12-16 23:11:37 +00:00
|
|
|
|
#
|
2000-03-05 01:14:19 +00:00
|
|
|
|
# does not work with GNU Make (the backslash is interpreted as a line
|
|
|
|
|
# continuation). While a line like
|
1999-12-16 23:11:37 +00:00
|
|
|
|
#
|
2000-03-05 01:14:19 +00:00
|
|
|
|
# SEP := \\
|
1999-12-16 23:11:37 +00:00
|
|
|
|
#
|
2000-03-05 01:14:19 +00:00
|
|
|
|
# really defines $(SEP) as `\' on Unix, and `\\' on Dos and Windows!
|
1999-12-16 23:11:37 +00:00
|
|
|
|
#
|
|
|
|
|
BACKSLASH := $(strip \ )
|
|
|
|
|
|
2000-03-05 01:14:19 +00:00
|
|
|
|
# Now, include all detection rule files found in the `config/<system>'
|
|
|
|
|
# directories. Note that the calling order of the various `detect.mk' files
|
|
|
|
|
# isn't predictable.
|
|
|
|
|
#
|
2000-05-12 15:01:18 +00:00
|
|
|
|
include $(wildcard $(BUILD_CONFIG_)*/detect.mk)
|
1999-12-16 23:11:37 +00:00
|
|
|
|
|
2000-03-05 01:14:19 +00:00
|
|
|
|
# In case no detection rule file was successful, use the default.
|
|
|
|
|
#
|
|
|
|
|
ifndef CONFIG_FILE
|
|
|
|
|
CONFIG_FILE := ansi.mk
|
|
|
|
|
setup: std_setup
|
|
|
|
|
endif
|
1999-12-16 23:11:37 +00:00
|
|
|
|
|
|
|
|
|
# The following targets are equivalent, with the exception that they use
|
2000-03-05 01:14:19 +00:00
|
|
|
|
# slightly different syntaxes for the `echo' command.
|
1999-12-16 23:11:37 +00:00
|
|
|
|
#
|
2000-05-12 15:01:18 +00:00
|
|
|
|
# std_setup: defined for most (i.e. Unix-like) platforms
|
2000-03-05 01:14:19 +00:00
|
|
|
|
# dos_setup: defined for Dos-ish platforms like Dos, Windows & OS/2
|
1999-12-16 23:11:37 +00:00
|
|
|
|
#
|
2000-03-05 01:14:19 +00:00
|
|
|
|
.PHONY: std_setup dos_setup
|
1999-12-16 23:11:37 +00:00
|
|
|
|
|
|
|
|
|
std_setup:
|
|
|
|
|
@echo ""
|
2000-03-05 01:14:19 +00:00
|
|
|
|
@echo "FreeType build system -- automatic system detection"
|
1999-12-16 23:11:37 +00:00
|
|
|
|
@echo ""
|
2000-03-05 01:14:19 +00:00
|
|
|
|
@echo "The following settings are used:"
|
1999-12-16 23:11:37 +00:00
|
|
|
|
@echo ""
|
2000-03-05 01:14:19 +00:00
|
|
|
|
@echo " platform $(PLATFORM)"
|
|
|
|
|
@echo " compiler $(CC)"
|
|
|
|
|
@echo " configuration directory $(BUILD)"
|
|
|
|
|
@echo " configuration rules $(CONFIG_RULES)"
|
1999-12-16 23:11:37 +00:00
|
|
|
|
@echo ""
|
|
|
|
|
@echo "If this does not correspond to your system or settings please remove the file"
|
|
|
|
|
@echo "\`$(CONFIG_MK)' from this directory then read the INSTALL file for help."
|
|
|
|
|
@echo ""
|
2000-03-05 01:14:19 +00:00
|
|
|
|
@echo "Otherwise, simply type \`make' again to build the library."
|
1999-12-16 23:11:37 +00:00
|
|
|
|
@echo ""
|
|
|
|
|
@$(COPY) $(CONFIG_RULES) $(CONFIG_MK)
|
|
|
|
|
|
|
|
|
|
dos_setup:
|
|
|
|
|
@echo <20>
|
2000-03-05 01:14:19 +00:00
|
|
|
|
@echo FreeType build system -- automatic system detection
|
1999-12-16 23:11:37 +00:00
|
|
|
|
@echo <20>
|
2000-03-05 01:14:19 +00:00
|
|
|
|
@echo The following settings are used:
|
1999-12-16 23:11:37 +00:00
|
|
|
|
@echo <20>
|
2000-03-05 01:14:19 +00:00
|
|
|
|
@echo <20><>platform<72><6D><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>$(PLATFORM)
|
|
|
|
|
@echo <20><>compiler<65><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>$(CC)
|
|
|
|
|
@echo <20><>configuration directory<72><79><EFBFBD><EFBFBD><EFBFBD><EFBFBD>$(BUILD)
|
|
|
|
|
@echo <20><>configuration rules<65><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>$(CONFIG_RULES)
|
1999-12-16 23:11:37 +00:00
|
|
|
|
@echo <20>
|
|
|
|
|
@echo If this does not correspond to your system or settings please remove the file
|
|
|
|
|
@echo '$(CONFIG_MK)' from this directory then read the INSTALL file for help.
|
|
|
|
|
@echo <20>
|
2000-03-05 01:14:19 +00:00
|
|
|
|
@echo Otherwise, simply type 'make' again to build the library.
|
1999-12-16 23:11:37 +00:00
|
|
|
|
@echo <20>
|
2000-01-17 11:20:26 +00:00
|
|
|
|
@$(COPY) $(subst /,\,$(CONFIG_RULES) $(CONFIG_MK)) > nul
|
1999-12-16 23:11:37 +00:00
|
|
|
|
|
2000-03-05 01:14:19 +00:00
|
|
|
|
# EOF
|