• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# FreeType 2 template for Unix-specific compiler definitions
3#
4
5# Copyright 1996-2018 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 file.
80#
81CPPFLAGS := @CPPFLAGS@
82CFLAGS   := -c @XX_CFLAGS@ @CFLAGS@ -DFT_CONFIG_CONFIG_H="<ftconfig.h>"
83
84# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
85#
86ANSIFLAGS := @XX_ANSIFLAGS@
87
88# C compiler to use -- we use libtool!
89#
90CCraw := $(CC)
91CC    := $(LIBTOOL) --mode=compile $(CCraw)
92
93# Resource compiler to use on Cygwin/MinGW, usually windres.
94#
95RCraw := @RC@
96ifneq ($(RCraw),)
97  RC := $(LIBTOOL) --tag=RC --mode=compile $(RCraw)
98endif
99
100# Linker flags.
101#
102LDFLAGS           := @LDFLAGS@
103LIB_CLOCK_GETTIME := @LIB_CLOCK_GETTIME@  # for ftbench
104
105
106# export symbols
107#
108CCraw_build  := @CC_BUILD@	# native CC of building system
109E_BUILD      := @EXEEXT_BUILD@	# extension for executable on building system
110EXPORTS_LIST := $(OBJ_DIR)/ftexport.sym
111CCexe        := $(CCraw_build)	# used to compile `apinames' only
112
113
114# Library linking
115#
116LINK_LIBRARY = $(LIBTOOL) --mode=link $(CCraw) -o $@ $(OBJECTS_LIST) \
117                          -rpath $(libdir) -version-info $(version_info) \
118                          $(LDFLAGS) -no-undefined \
119                          -export-symbols $(EXPORTS_LIST)
120
121# EOF
122