modules/freetype2/builds/detect.mk

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 #
michael@0 2 # FreeType 2 host platform detection rules
michael@0 3 #
michael@0 4
michael@0 5
michael@0 6 # Copyright 1996-2003, 2006, 2008, 2013 by
michael@0 7 # David Turner, Robert Wilhelm, and Werner Lemberg.
michael@0 8 #
michael@0 9 # This file is part of the FreeType project, and may only be used, modified,
michael@0 10 # and distributed under the terms of the FreeType project license,
michael@0 11 # LICENSE.TXT. By continuing to use, modify, or distribute this file you
michael@0 12 # indicate that you have read the license and understand and accept it
michael@0 13 # fully.
michael@0 14
michael@0 15
michael@0 16 # This sub-Makefile is in charge of detecting the current platform. It sets
michael@0 17 # the following variables:
michael@0 18 #
michael@0 19 # BUILD_DIR The configuration and system-specific directory. Usually
michael@0 20 # `builds/$(PLATFORM)' but can be different for custom builds
michael@0 21 # of the library.
michael@0 22 #
michael@0 23 # The following variables must be defined in system specific `detect.mk'
michael@0 24 # files:
michael@0 25 #
michael@0 26 # PLATFORM The detected platform. This will default to `ansi' if
michael@0 27 # auto-detection fails.
michael@0 28 # CONFIG_FILE The configuration sub-makefile to use. This usually depends
michael@0 29 # on the compiler defined in the `CC' environment variable.
michael@0 30 # DELETE The shell command used to remove a given file.
michael@0 31 # COPY The shell command used to copy one file.
michael@0 32 # SEP The platform-specific directory separator.
michael@0 33 # COMPILER_SEP The separator used in arguments of the compilation tools.
michael@0 34 # CC The compiler to use.
michael@0 35 #
michael@0 36 # You need to set the following variable(s) before calling it:
michael@0 37 #
michael@0 38 # TOP_DIR The top-most directory in the FreeType library source
michael@0 39 # hierarchy. If not defined, it will default to `.'.
michael@0 40
michael@0 41 # Set auto-detection default to `ansi' resp. UNIX-like operating systems.
michael@0 42 #
michael@0 43 PLATFORM := ansi
michael@0 44 DELETE := $(RM)
michael@0 45 COPY := cp
michael@0 46 CAT := cat
michael@0 47 SEP := /
michael@0 48
michael@0 49 BUILD_CONFIG := $(TOP_DIR)/builds
michael@0 50
michael@0 51 # These two assignments must be delayed.
michael@0 52 BUILD_DIR = $(BUILD_CONFIG)/$(PLATFORM)
michael@0 53 CONFIG_RULES = $(BUILD_DIR)/$(CONFIG_FILE)
michael@0 54
michael@0 55 # We define the BACKSLASH variable to hold a single back-slash character.
michael@0 56 # This is needed because a line like
michael@0 57 #
michael@0 58 # SEP := \
michael@0 59 #
michael@0 60 # does not work with GNU Make (the backslash is interpreted as a line
michael@0 61 # continuation). While a line like
michael@0 62 #
michael@0 63 # SEP := \\
michael@0 64 #
michael@0 65 # really defines $(SEP) as `\' on Unix, and `\\' on Dos and Windows!
michael@0 66 #
michael@0 67 BACKSLASH := $(strip \ )
michael@0 68
michael@0 69 # Find all auto-detectable platforms.
michael@0 70 #
michael@0 71 PLATFORMS := $(notdir $(subst /detect.mk,,$(wildcard $(BUILD_CONFIG)/*/detect.mk)))
michael@0 72 .PHONY: $(PLATFORMS) ansi
michael@0 73
michael@0 74 # Filter out platform specified as setup target.
michael@0 75 #
michael@0 76 PLATFORM := $(firstword $(filter $(MAKECMDGOALS),$(PLATFORMS)))
michael@0 77
michael@0 78 # If no setup target platform was specified, enable auto-detection/
michael@0 79 # default platform.
michael@0 80 #
michael@0 81 ifeq ($(PLATFORM),)
michael@0 82 PLATFORM := ansi
michael@0 83 endif
michael@0 84
michael@0 85 # If the user has explicitly asked for `ansi' on the command line,
michael@0 86 # disable auto-detection.
michael@0 87 #
michael@0 88 ifeq ($(findstring ansi,$(MAKECMDGOALS)),)
michael@0 89 # Now, include all detection rule files found in the `builds/<system>'
michael@0 90 # directories. Note that the calling order of the various `detect.mk'
michael@0 91 # files isn't predictable.
michael@0 92 #
michael@0 93 include $(wildcard $(BUILD_CONFIG)/*/detect.mk)
michael@0 94 endif
michael@0 95
michael@0 96 # In case no detection rule file was successful, use the default.
michael@0 97 #
michael@0 98 ifndef CONFIG_FILE
michael@0 99 CONFIG_FILE := ansi.mk
michael@0 100 setup: std_setup
michael@0 101 .PHONY: setup
michael@0 102 endif
michael@0 103
michael@0 104 # The following targets are equivalent, with the exception that they use
michael@0 105 # a slightly different syntax for the `echo' command.
michael@0 106 #
michael@0 107 # std_setup: defined for most (i.e. Unix-like) platforms
michael@0 108 # dos_setup: defined for Dos-ish platforms like Dos, Windows & OS/2
michael@0 109 #
michael@0 110 .PHONY: std_setup dos_setup
michael@0 111
michael@0 112 std_setup:
michael@0 113 @echo ""
michael@0 114 @echo "$(PROJECT_TITLE) build system -- automatic system detection"
michael@0 115 @echo ""
michael@0 116 @echo "The following settings are used:"
michael@0 117 @echo ""
michael@0 118 @echo " platform $(PLATFORM)"
michael@0 119 @echo " compiler $(CC)"
michael@0 120 @echo " configuration directory $(BUILD_DIR)"
michael@0 121 @echo " configuration rules $(CONFIG_RULES)"
michael@0 122 @echo ""
michael@0 123 @echo "If this does not correspond to your system or settings please remove the file"
michael@0 124 @echo "\`$(CONFIG_MK)' from this directory then read the INSTALL file for help."
michael@0 125 @echo ""
michael@0 126 @echo "Otherwise, simply type \`$(MAKE)' again to build the library,"
michael@0 127 @echo "or \`$(MAKE) refdoc' to build the API reference (the latter needs python)."
michael@0 128 @echo ""
michael@0 129 @$(COPY) $(CONFIG_RULES) $(CONFIG_MK)
michael@0 130
michael@0 131
michael@0 132 # Special case for Dos, Windows, OS/2, where echo "" doesn't work correctly!
michael@0 133 #
michael@0 134 dos_setup:
michael@0 135 @type builds$(SEP)newline
michael@0 136 @echo $(PROJECT_TITLE) build system -- automatic system detection
michael@0 137 @type builds$(SEP)newline
michael@0 138 @echo The following settings are used:
michael@0 139 @type builds$(SEP)newline
michael@0 140 @echo platform˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙$(PLATFORM)
michael@0 141 @echo compiler˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙$(CC)
michael@0 142 @echo configuration directory˙˙˙˙˙˙$(subst /,$(SEP),$(BUILD_DIR))
michael@0 143 @echo configuration rules˙˙˙˙˙˙˙˙˙˙$(subst /,$(SEP),$(CONFIG_RULES))
michael@0 144 @type builds$(SEP)newline
michael@0 145 @echo If this does not correspond to your system or settings please remove the file
michael@0 146 @echo '$(CONFIG_MK)' from this directory then read the INSTALL file for help.
michael@0 147 @type builds$(SEP)newline
michael@0 148 @echo Otherwise, simply type 'make' again to build the library.
michael@0 149 @echo or 'make refdoc' to build the API reference (the latter needs python).
michael@0 150 @type builds$(SEP)newline
michael@0 151 @$(COPY) $(subst /,$(SEP),$(CONFIG_RULES) $(CONFIG_MK)) > nul
michael@0 152
michael@0 153
michael@0 154 # EOF

mercurial