2 # FreeType 2 GZip support configuration rules
6 # Copyright (C) 2002-2020 by
7 # David Turner, Robert Wilhelm, and Werner Lemberg.
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
16 # gzip driver directory
18 GZIP_DIR := $(SRC_DIR)/gzip
21 # compilation flags for the driver
23 ifeq ($(SYSTEM_ZLIB),)
24 GZIP_COMPILE := $(CC) $(ANSIFLAGS) \
25 $I$(subst /,$(COMPILER_SEP),$(GZIP_DIR)) \
29 GZIP_COMPILE := $(CC) $(ANSIFLAGS) \
35 # gzip support sources
37 # All source and header files get loaded by `ftgzip.c' only if SYSTEM_ZLIB
38 # is not defined (regardless whether we have a `single' or a `multi' build).
39 # However, it doesn't harm if we add everything as a dependency
42 GZIP_DRV_SRCS := $(GZIP_DIR)/adler32.c \
43 $(GZIP_DIR)/ftzconf.h \
44 $(GZIP_DIR)/infblock.c \
45 $(GZIP_DIR)/infblock.h \
46 $(GZIP_DIR)/infcodes.c \
47 $(GZIP_DIR)/infcodes.h \
48 $(GZIP_DIR)/inffixed.h \
49 $(GZIP_DIR)/inflate.c \
50 $(GZIP_DIR)/inftrees.c \
51 $(GZIP_DIR)/inftrees.h \
52 $(GZIP_DIR)/infutil.c \
53 $(GZIP_DIR)/infutil.h \
59 # gzip driver object(s)
61 # GZIP_DRV_OBJ is used during both `single' and `multi' builds
63 GZIP_DRV_OBJ := $(OBJ_DIR)/ftgzip.$O
66 # gzip main source file
68 GZIP_DRV_SRC := $(GZIP_DIR)/ftgzip.c
71 # gzip support - object
73 $(GZIP_DRV_OBJ): $(GZIP_DRV_SRC) $(GZIP_DRV_SRCS) $(FREETYPE_H)
74 $(GZIP_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(GZIP_DRV_SRC))
77 # update main driver object lists
79 DRV_OBJS_S += $(GZIP_DRV_OBJ)
80 DRV_OBJS_M += $(GZIP_DRV_OBJ)