1# 2# FreeType 2 base layer configuration rules 3# 4 5 6# Copyright (C) 1996-2020 by 7# David Turner, Robert Wilhelm, and Werner Lemberg. 8# 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 13# fully. 14 15 16# It sets the following variables which are used by the master Makefile 17# after the call: 18# 19# BASE_OBJ_S: The single-object base layer. 20# BASE_OBJ_M: A list of all objects for a multiple-objects build. 21# BASE_EXT_OBJ: A list of base layer extensions, i.e., components found 22# in `src/base' which are not compiled within the base 23# layer proper. 24 25 26BASE_COMPILE := $(CC) $(ANSIFLAGS) \ 27 $I$(subst /,$(COMPILER_SEP),$(BASE_DIR)) \ 28 $(INCLUDE_FLAGS) \ 29 $(FT_CFLAGS) 30 31 32# Base layer sources 33# 34# ftsystem, ftinit, and ftdebug are handled by freetype.mk 35# 36# All files listed here should be included in `ftbase.c' (for a `single' 37# build). 38# 39BASE_SRC := $(BASE_DIR)/ftadvanc.c \ 40 $(BASE_DIR)/ftcalc.c \ 41 $(BASE_DIR)/ftcolor.c \ 42 $(BASE_DIR)/ftdbgmem.c \ 43 $(BASE_DIR)/fterrors.c \ 44 $(BASE_DIR)/ftfntfmt.c \ 45 $(BASE_DIR)/ftgloadr.c \ 46 $(BASE_DIR)/fthash.c \ 47 $(BASE_DIR)/ftlcdfil.c \ 48 $(BASE_DIR)/ftobjs.c \ 49 $(BASE_DIR)/ftoutln.c \ 50 $(BASE_DIR)/ftpsprop.c \ 51 $(BASE_DIR)/ftrfork.c \ 52 $(BASE_DIR)/ftsnames.c \ 53 $(BASE_DIR)/ftstream.c \ 54 $(BASE_DIR)/fttrigon.c \ 55 $(BASE_DIR)/ftutil.c 56 57 58ifneq ($(ftmac_c),) 59 BASE_SRC += $(BASE_DIR)/$(ftmac_c) 60endif 61 62# for simplicity, we also handle `md5.c' (which gets included by `ftobjs.h') 63BASE_H := $(BASE_DIR)/ftbase.h \ 64 $(BASE_DIR)/md5.c \ 65 $(BASE_DIR)/md5.h 66 67# Base layer `extensions' sources 68# 69# An extension is added to the library file as a separate object. It is 70# then linked to the final executable only if one of its symbols is used by 71# the application. 72# 73BASE_EXT_SRC := $(patsubst %,$(BASE_DIR)/%,$(BASE_EXTENSIONS)) 74 75# Default extensions objects 76# 77BASE_EXT_OBJ := $(BASE_EXT_SRC:$(BASE_DIR)/%.c=$(OBJ_DIR)/%.$O) 78 79 80# Base layer object(s) 81# 82# BASE_OBJ_M is used during `multi' builds (each base source file compiles 83# to a single object file). 84# 85# BASE_OBJ_S is used during `single' builds (the whole base layer is 86# compiled as a single object file using ftbase.c). 87# 88BASE_OBJ_M := $(BASE_SRC:$(BASE_DIR)/%.c=$(OBJ_DIR)/%.$O) 89BASE_OBJ_S := $(OBJ_DIR)/ftbase.$O 90 91# Base layer root source file for single build 92# 93BASE_SRC_S := $(BASE_DIR)/ftbase.c 94 95 96# Base layer - single object build 97# 98$(BASE_OBJ_S): $(BASE_SRC_S) $(BASE_SRC) $(FREETYPE_H) $(BASE_H) 99 $(BASE_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(BASE_SRC_S)) 100 101 102# Multiple objects build + extensions 103# 104$(OBJ_DIR)/%.$O: $(BASE_DIR)/%.c $(FREETYPE_H) $(BASE_H) 105 $(BASE_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<) 106 107 108# EOF 109