* autogen.sh (copy_submodule_files): New script to copy all the necessary source and include files from `submodules/dlg` to `src/dlg`. * src/dlg/dlgwrap.c: New wrapper file for `src/dlg.c`. It enables the build of 'dlg' if the `FT_LOGGING` macro is defined. * src/dlg/rules.mk: New sub-Makefile. * builds/freetype.mk (DLG_DIR): New variable to include the header files of the 'dlg' library. (INCLUDES): Add `DLG_DIR`. (FT_CFLAGS): Add `-std=c99' flag. Include `src/dlg/rules.mk` file to build 'dlg' library. (OBJ_S, OBJ_M): Add `DLG_OBJS_M` and `DLG_OBJS_S`. * builds/toplevel.mk: For builds directly from the git repository we need to copy files from `submodule/dlg` to `src/dlg`. * include/freetype/config/ftoption.h, devel/ftoption.h (FT_LOGGING): New macro to enable or disable the logging facility in FreeType.wl/meson-logging
parent
8da4b437b4
commit
34b1c897c1
8 changed files with 203 additions and 5 deletions
@ -0,0 +1,30 @@ |
||||
/****************************************************************************
|
||||
* |
||||
* dlgwrap.c |
||||
* |
||||
* Wrapper file for the 'dlg' library (body only) |
||||
* |
||||
* Copyright (C) 2020 by |
||||
* David Turner, Robert Wilhelm, and Werner Lemberg. |
||||
* |
||||
* This file is part of the FreeType project, and may only be used, |
||||
* modified, and distributed under the terms of the FreeType project |
||||
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
||||
* this file you indicate that you have read the license and |
||||
* understand and accept it fully. |
||||
* |
||||
*/ |
||||
|
||||
|
||||
#include <freetype/freetype.h> |
||||
|
||||
|
||||
#ifdef FT_LOGGING |
||||
#include "dlg.c" |
||||
#else |
||||
/* ANSI C doesn't like empty source files */ |
||||
typedef int _dlg_dummy; |
||||
#endif |
||||
|
||||
|
||||
/* END */ |
@ -0,0 +1,70 @@ |
||||
#
|
||||
# FreeType 2 dlg logging library configuration rules
|
||||
#
|
||||
|
||||
|
||||
# Copyright (C) 2020 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# dlg logging library directory
|
||||
#
|
||||
DLG_DIR := $(SRC_DIR)/dlg
|
||||
|
||||
|
||||
# compilation flags for the library
|
||||
#
|
||||
DLG_COMPILE := $(CC) $(ANSIFLAGS) \
|
||||
$I$(subst /,$(COMPILER_SEP),$(DLG_DIR)) \
|
||||
$(INCLUDE_FLAGS) \
|
||||
$(FT_CFLAGS)
|
||||
|
||||
|
||||
# dlg logging library sources (i.e., C files)
|
||||
#
|
||||
DLG_SRC := $(DLG_DIR)/dlgwrap.c
|
||||
|
||||
# dlg logging library headers
|
||||
#
|
||||
DLG_H := $(DLG_DIR)/dlg/dlg.h \
|
||||
$(DLG_DIR)/dlg/output.h
|
||||
|
||||
|
||||
# dlg logging library object(s)
|
||||
#
|
||||
# DLG_OBJ_M is used during `multi' builds
|
||||
# DLG_OBJ_S is used during `single' builds
|
||||
#
|
||||
DLG_OBJ_M := $(DLG_SRC:$(DLG_DIR)/%.c=$(OBJ_DIR)/%.$O)
|
||||
DLG_OBJ_S := $(OBJ_DIR)/dlg.$O
|
||||
|
||||
# dlg logging library source file for single build
|
||||
#
|
||||
DLG_SRC_S := $(DLG_DIR)/dlgwrap.c
|
||||
|
||||
|
||||
# dlg logging library - single object
|
||||
#
|
||||
$(DLG_OBJ_S): $(DLG_SRC_S) $(DLG_SRC) $(FREETYPE_H) $(DLG_H) |
||||
$(DLG_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(DLG_SRC_S))
|
||||
|
||||
|
||||
# dlg logging library - multiple objects
|
||||
#
|
||||
$(OBJ_DIR)/%.$O: $(DLG_DIR)/%.c $(FREETYPE_H) $(DLG_H) |
||||
$(DLG_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
|
||||
|
||||
|
||||
# update main object lists
|
||||
#
|
||||
DLG_OBJS_S += $(DLG_OBJ_S)
|
||||
DLG_OBJS_M += $(DLG_OBJ_M)
|
||||
|
||||
|
||||
# EOF
|
Loading…
Reference in new issue