# mkfile for Plan 9 from Bell Labs
#
# See builds/plan9/README for usage.
#
# Copyright (C) 2026 by Yaroslav Kolomiiets.
#
# 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.
#
</$objtype/mkfile
LIB=libfreetype.a$O
OFILES=\
src/base/ftbase.$O \
ftsystem.$O \
ftinit.$O \
ftdebug.$O \
ftbitmap.$O \
ftglyph.$O \
ftmm.$O \
src/autofit/autofit.$O \
src/bdf/bdf.$O \
src/cache/ftcache.$O \
src/cff/cff.$O \
src/cid/type1cid.$O \
src/gzip/ftgzip.$O \
src/lzw/ftlzw.$O \
src/pcf/pcf.$O \
src/pfr/pfr.$O \
src/psaux/psaux.$O \
src/pshinter/pshinter.$O \
src/psnames/psnames.$O \
src/raster/raster.$O \
# src/sdf/sdf.$O \
src/sfnt/sfnt.$O \
src/smooth/smooth.$O \
# src/svg/svg.$O \
# src/truetype/truetype.$O \
builds/plan9/p9ttwrap.$O \
builds/plan9/p9ttgload.$O \
src/type1/type1.$O \
src/type42/type42.$O \
src/winfonts/winfnt.$O \
HFILES=\
builds/plan9/p9ftopt.h \
builds/plan9/p9ftmod.h \
builds/plan9/p9lib.h \
builds/plan9/stddef.h \
GENFILES=\
builds/plan9/p9ftopt.h \
builds/plan9/p9ftmod.h \
builds/plan9/stddef.h \
builds/plan9/p9ttwrap.c \
builds/plan9/p9ttgload.c \
CLEANFILES=\
builds/plan9/p9ttwrap.$O \
builds/plan9/p9ttgload.$O \
CFLAGS=-p -Ibuilds/plan9 -Iinclude \
-D'FT_CONFIG_OPTIONS_H=<p9ftopt.h>' \
-D'FT_CONFIG_MODULES_H=<p9ftmod.h>' \
-D'FT_CONFIG_STANDARD_LIBRARY_H=<p9lib.h>' \
-DFT2_BUILD_LIBRARY \
</sys/src/cmd/mklib
%.$O: %.c
$CC $CFLAGS -o $stem.$O $stem.c
%.$O: src/base/%.c
$CC $CFLAGS src/base/$stem.c
builds/plan9/p9ttwrap.$O: builds/plan9/p9ttwrap.c
$CC -Isrc/truetype $CFLAGS -o $target builds/plan9/p9ttwrap.c
builds/plan9/p9ttgload.$O: builds/plan9/p9ttgload.c
$CC -Isrc/truetype $CFLAGS -o $target builds/plan9/p9ttgload.c
builds/plan9/p9ftopt.h:D: include/freetype/config/ftoption.h
sed '/#define FT_CONFIG_OPTION_USE_(LZW|ZLIB)/ s!^!// !' $prereq > $target
builds/plan9/p9ftmod.h:D: include/freetype/config/ftmodule.h
sed '/(sdf|svg)_renderer_class/d' $prereq > $target
#builds/plan9/p9typ.h:D: include/freetype/fttypes.h
# sed '/#include <stddef.h>/d' $prereq > $target
builds/plan9/stddef.h:D:
echo > $target
builds/plan9/p9ttwrap.c:D: src/truetype/truetype.c
sed '/#include <ttgload.c>/d' $prereq > $target
builds/plan9/p9ttgload.c:D: src/truetype/ttgload.c
sed -f builds/plan9/fixint.sed $prereq > $target
clean:V:
rm -f *.[$OS] src/*/*.[$OS] $CLEANFILES
nuke:V:
rm -f *.[$OS] src/*/*.[$OS] $CLEANFILES
rm -f libfreetype.a[$OS] $GENFILES
|