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 15 CC := @CC@ 16 COMPILER_SEP := $(SEP) 17 FT_LIBTOOL_DIR ?= $(BUILD_DIR) 18 19 LIBTOOL := $(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 # 25 O := lo 26 SO := 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 # 33 E := @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 # 39 A := la 40 SA := 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 # 46 LIBRARY := 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 # 52 I := -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 # 58 D := -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 # 64 L := -l 65 66 67 # Target flag. 68 # 69 T := -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 # 81 CPPFLAGS := @CPPFLAGS@ 82 CFLAGS := -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 # 86 ANSIFLAGS := @XX_ANSIFLAGS@ 87 88 # C compiler to use -- we use libtool! 89 # 90 CCraw := $(CC) 91 CC := $(LIBTOOL) --mode=compile $(CCraw) 92 93 # Resource compiler to use on Cygwin/MinGW, usually windres. 94 # 95 RCraw := @RC@ 96 ifneq ($(RCraw),) 97 RC := $(LIBTOOL) --tag=RC --mode=compile $(RCraw) 98 endif 99 100 # Linker flags. 101 # 102 LDFLAGS := @LDFLAGS@ 103 LIB_CLOCK_GETTIME := @LIB_CLOCK_GETTIME@ # for ftbench 104 105 106 # export symbols 107 # 108 CCraw_build := @CC_BUILD@ # native CC of building system 109 E_BUILD := @EXEEXT_BUILD@ # extension for executable on building system 110 EXPORTS_LIST := $(OBJ_DIR)/ftexport.sym 111 CCexe := $(CCraw_build) # used to compile `apinames' only 112 113 114 # Library linking 115 # 116 LINK_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