• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# FreeType 2 template for Unix-specific compiler definitions
3#
4
5# Copyright (C) 1996-2020 by
6# David Turner, Robert Wilhelm, and Werner Lemberg.
7#
8# This file is part of the FreeType project, and may only be used, modified,
9# and distributed under the terms of the FreeType project license,
10# LICENSE.TXT.  By continuing to use, modify, or distribute this file you
11# indicate that you have read the license and understand and accept it
12# fully.
13
14
15CC           := @CC@
16COMPILER_SEP := $(SEP)
17FT_LIBTOOL_DIR ?= $(BUILD_DIR)
18
19LIBTOOL := $(FT_LIBTOOL_DIR)/libtool
20
21
22# The object file extension (for standard and static libraries).  This can be
23# .o, .tco, .obj, etc., depending on the platform.
24#
25O  := lo
26SO := o
27
28
29# The executable file extension.  Although most Unix platforms use no
30# extension, we copy the extension detected by autoconf.  Useful for cross
31# building on Unix systems for non-Unix systems.
32#
33E := @EXEEXT@
34
35
36# The library file extension (for standard and static libraries).  This can
37# be .a, .lib, etc., depending on the platform.
38#
39A  := la
40SA := a
41
42
43# The name of the final library file.  Note that the DOS-specific Makefile
44# uses a shorter (8.3) name.
45#
46LIBRARY := lib$(PROJECT)
47
48
49# Path inclusion flag.  Some compilers use a different flag than `-I' to
50# specify an additional include path.  Examples are `/i=' or `-J'.
51#
52I := -I
53
54
55# C flag used to define a macro before the compilation of a given source
56# object.  Usually it is `-D' like in `-DDEBUG'.
57#
58D := -D
59
60
61# The link flag used to specify a given library file on link.  Note that
62# this is only used to compile the demo programs, not the library itself.
63#
64L := -l
65
66
67# Target flag.
68#
69T := -o$(space)
70
71
72# C flags
73#
74#   These should concern: debug output, optimization & warnings.
75#
76#   Use the ANSIFLAGS variable to define the compiler flags used to enfore
77#   ANSI compliance.
78#
79#   We use our own FreeType configuration files overriding defaults.
80#
81CPPFLAGS := @CPPFLAGS@
82CFLAGS   := -c @XX_CFLAGS@ @CFLAGS@ \
83            $DFT_CONFIG_CONFIG_H="<ftconfig.h>" \
84            $DFT_CONFIG_MODULES_H="<ftmodule.h>" \
85            $DFT_CONFIG_OPTIONS_H="<ftoption.h>"
86
87# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
88#
89ANSIFLAGS := @XX_ANSIFLAGS@
90
91# C compiler to use -- we use libtool!
92#
93# CC might be set on the command line; we store this value in `CCraw'.
94# Consequently, we use the `override' directive to ensure that the
95# libtool call is always prepended.
96#
97CCraw       := $(CC)
98override CC := $(LIBTOOL) --mode=compile $(CCraw)
99
100# Resource compiler to use on Cygwin/MinGW, usually windres.
101#
102RCraw := @RC@
103ifneq ($(RCraw),)
104  RC := $(LIBTOOL) --tag=RC --mode=compile $(RCraw)
105endif
106
107# Linker flags.
108#
109LDFLAGS           := @LDFLAGS@
110LIB_CLOCK_GETTIME := @LIB_CLOCK_GETTIME@  # for ftbench
111
112
113# export symbols
114#
115CCraw_build  := @CC_BUILD@	# native CC of building system
116E_BUILD      := @EXEEXT_BUILD@	# extension for executable on building system
117EXPORTS_LIST := $(OBJ_DIR)/ftexport.sym
118CCexe        := $(CCraw_build)	# used to compile `apinames' only
119
120
121# Library linking
122#
123LINK_LIBRARY = $(LIBTOOL) --mode=link $(CCraw) -o $@ $(OBJECTS_LIST) \
124                          -rpath $(libdir) -version-info $(version_info) \
125                          $(LDFLAGS) -no-undefined \
126                          -export-symbols $(EXPORTS_LIST)
127
128# EOF
129