2 # FreeType 2 host platform detection rules
6 # Copyright 1996-2000 by
7 # David Turner, Robert Wilhelm, and Werner Lemberg.
9 # This file is part of the FreeType project, and may only be used, modified,
10 # and distributed under the terms of the FreeType project license,
11 # LICENSE.TXT. By continuing to use, modify, or distribute this file you
12 # indicate that you have read the license and understand and accept it
16 # This sub-Makefile is in charge of detecting the current platform. It sets
17 # the following variables:
19 # BUILD The configuration and system-specific directory. Usually
20 # `freetype/builds/$(PLATFORM)' but can be different for
21 # custom builds of the library.
23 # The following variables must be defined in system specific `detect.mk'
26 # PLATFORM The detected platform. This will default to `ansi' if
27 # auto-detection fails.
28 # CONFIG_FILE The configuration sub-makefile to use. This usually depends
29 # on the compiler defined in the `CC' environment variable.
30 # DELETE The shell command used to remove a given file.
31 # COPY The shell command used to copy one file.
32 # SEP The platform-specific directory separator.
33 # CC The compiler to use.
35 # You need to set the following variable(s) before calling it:
37 # TOP The top-most directory in the FreeType library source
38 # hierarchy. If not defined, it will default to `.'.
40 # If TOP is not defined, default it to `.'
46 # Set auto-detection default to `ansi' resp. UNIX-like operating systems.
47 # Note that we delay the evaluation of $(BUILD_CONFIG_), $(BUILD), and
55 BUILD_CONFIG_ = $(TOP)$(SEP)builds$(SEP)
56 BUILD = $(BUILD_CONFIG_)$(PLATFORM)
57 CONFIG_RULES = $(BUILD)$(SEP)$(CONFIG_FILE)
59 # We define the BACKSLASH variable to hold a single back-slash character.
60 # This is needed because a line like
64 # does not work with GNU Make (the backslash is interpreted as a line
65 # continuation). While a line like
69 # really defines $(SEP) as `\' on Unix, and `\\' on Dos and Windows!
71 BACKSLASH := $(strip \ )
73 # Now, include all detection rule files found in the `builds/<system>'
74 # directories. Note that the calling order of the various `detect.mk' files
77 include $(wildcard $(BUILD_CONFIG_)*/detect.mk)
79 # In case no detection rule file was successful, use the default.
82 CONFIG_FILE := ansi.mk
86 # The following targets are equivalent, with the exception that they use
87 # a slightly different syntax for the `echo' command.
89 # std_setup: defined for most (i.e. Unix-like) platforms
90 # dos_setup: defined for Dos-ish platforms like Dos, Windows & OS/2
92 .PHONY: std_setup dos_setup
96 @echo "FreeType build system -- automatic system detection"
98 @echo "The following settings are used:"
100 @echo " platform $(PLATFORM)"
101 @echo " compiler $(CC)"
102 @echo " configuration directory $(BUILD)"
103 @echo " configuration rules $(CONFIG_RULES)"
105 @echo "If this does not correspond to your system or settings please remove the file"
106 @echo "\`$(CONFIG_MK)' from this directory then read the INSTALL file for help."
108 @echo "Otherwise, simply type \`make' again to build the library."
110 @$(COPY) $(CONFIG_RULES) $(CONFIG_MK)
114 @echo FreeType build system -- automatic system detection
116 @echo The following settings are used:
118 @echo ÿÿplatformÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ$(PLATFORM)
119 @echo ÿÿcompilerÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ$(CC)
120 @echo ÿÿconfiguration directoryÿÿÿÿÿÿ$(BUILD)
121 @echo ÿÿconfiguration rulesÿÿÿÿÿÿÿÿÿÿ$(CONFIG_RULES)
123 @echo If this does not correspond to your system or settings please remove the file
124 @echo '$(CONFIG_MK)' from this directory then read the INSTALL file for help.
126 @echo Otherwise, simply type 'make' again to build the library.
128 @$(COPY) $(subst /,\,$(CONFIG_RULES) $(CONFIG_MK)) > nul